PIPS
unistd.in.h File Reference
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
+ Include dependency graph for unistd.in.h:

Go to the source code of this file.

Macros

#define _   @GUARD_PREFIX@_UNISTD_H
 Substitute for and wrapper around <unistd.h>. More...
 
#define STDIN_FILENO   0
 NetBSD 5.0 mis-defines NULL. More...
 
#define STDOUT_FILENO   1
 
#define STDERR_FILENO   2
 
#define F_OK   0
 Ensure *_OK macros exist. More...
 
#define X_OK   1
 
#define W_OK   2
 
#define R_OK   4
 

Macro Definition Documentation

◆ _

#define _   @GUARD_PREFIX@_UNISTD_H

Substitute for and wrapper around <unistd.h>.

Copyright (C) 2003-2011 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Special invocation convention:

  • On mingw, several headers, including <winsock2.h>, include <unistd.h>, but we need to ensure that both the system <unistd.h> and <winsock2.h> are completely included before we replace gethostname.
    The include_next requires a split double-inclusion guard.
    Get all possible declarations of gethostname().

Definition at line 55 of file unistd.in.h.

◆ F_OK

#define F_OK   0

Ensure *_OK macros exist.


Definition at line 219 of file unistd.in.h.

◆ R_OK

#define R_OK   4

Definition at line 222 of file unistd.in.h.

◆ STDERR_FILENO

#define STDERR_FILENO   2

Definition at line 214 of file unistd.in.h.

◆ STDIN_FILENO

#define STDIN_FILENO   0

NetBSD 5.0 mis-defines NULL.

Also get size_t.
mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>.
Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>.
But avoid namespace pollution on glibc systems.
Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>.
But avoid namespace pollution on glibc systems.
mingw fails to declare _exit in <unistd.h>.
mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.
Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>.
But avoid namespace pollution on glibc systems.
Native Windows platforms declare chdir, getcwd, rmdir in <io.h> and/or <direct.h>, not in <unistd.h>.
AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>. NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>.
But avoid namespace pollution on glibc systems.
MSVC defines off_t in <sys/types.h>.
Get off_t.
Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems.
The definitions of _GL_FUNCDECL_RPL etc. are copied here.
The definition of _GL_ARG_NONNULL is copied here.
The definition of _GL_WARN_ON_USE is copied here.
Hide some function declarations from <winsock2.h>.
OS/2 EMX lacks these macros.

Definition at line 208 of file unistd.in.h.

◆ STDOUT_FILENO

#define STDOUT_FILENO   1

Definition at line 211 of file unistd.in.h.

◆ W_OK

#define W_OK   2

Definition at line 221 of file unistd.in.h.

◆ X_OK

#define X_OK   1

Definition at line 220 of file unistd.in.h.