md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
[gnulib.git] / doc / posix-headers / fcntl.texi
1 @node fcntl.h
2 @section @file{fcntl.h}
3
4 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html}
5
6 Gnulib module: fcntl-h
7
8 Portability problems fixed by Gnulib:
9 @itemize
10 @item
11 The type @code{pid_t} is not defined on some platforms:
12 MSVC 9.
13
14 @item
15 The type @code{mode_t} is not defined on some platforms:
16 MSVC 9.
17
18 @item
19 @samp{O_CLOEXEC}, @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY},
20 @samp{O_NOFOLLOW}, @samp{O_RSYNC}, @samp{O_SYNC},
21 and @samp{O_TTY_INIT} are not defined on some platforms.  Gnulib defines
22 these macros to 0, which is generally safe.
23
24 @item
25 @samp{O_NONBLOCK} is not defined on some platforms.  If the
26 @samp{nonblocking} module is in use, gnulib guarantees a working
27 non-zero value; otherwise, the gnulib replacement is 0.
28
29 @item
30 @samp{O_EXEC} and @samp{O_SEARCH} are not defined on some platforms.
31 Gnulib defines these macros to @samp{O_RDONLY}, which is typically 0.
32 The @samp{O_PATH} macro of GNU/Linux is not a suitable substitute, as
33 fchmod fails with @samp{errno==EBADF} when invoked on a file
34 descriptor that was opened with @samp{O_PATH}.
35
36 @item
37 @samp{O_ACCMODE} is not defined on some platforms:
38 MSVC 9.
39
40 @item
41 The @samp{O_ACCMODE} mask mistakenly omits @samp{O_SEARCH} and
42 @samp{O_EXEC} on some platforms:
43 Cygwin.
44
45 @item
46 @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for
47 portability to native Windows platforms) are defined on some platforms but
48 not on others.
49
50 @item
51 @samp{O_DIRECT}, @samp{O_IGNORE_CTTY}, @samp{O_NDELAY},
52 @samp{O_NOATIME}, @samp{O_NOLINK}, @samp{O_NOLINKS}, and
53 @samp{O_NOTRANS} (not specified by POSIX) are defined
54 on some platforms but not on others.
55
56 @item
57 @samp{FD_CLOEXEC}, @samp{F_DUPFD}, and @samp{F_GETFD} are not defined
58 on some platforms:
59 mingw, MSVC 9.
60
61 @item
62 @samp{F_DUPFD_CLOEXEC} is not defined on some platforms:
63 Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
64 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5,
65 BeOS.
66
67 @item
68 @samp{AT_FDCWD}, @samp{AT_EACCESS}, @samp{AT_SYMLINK_NOFOLLOW},
69 @samp{AT_SYMLINK_FOLLOW}, and @samp{AT_REMOVEDIR}
70 are not defined on many platforms:
71 glibc 2.3.6, Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
72 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
73
74 @item
75 @samp{AT_FDCWD} is defined with a value too large for an @code{int} on some
76 platforms:
77 Solaris 11 2011-11.
78 @end itemize
79
80 Portability problems not fixed by Gnulib:
81 @itemize
82 @item
83 @samp{F_SETFD}, @samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK},
84 @samp{F_SETLK}, @samp{F_SETLKW}, @samp{F_GETOWN}, and @samp{F_SETOWN}
85 are not defined on some platforms:
86 mingw, MSVC 9.
87
88 @item
89 @samp{POSIX_FADV_DONTNEED}, @samp{POSIX_FADV_NOREUSE},
90 @samp{POSIX_FADV_NORMAL}, @samp{POSIX_FADV_RANDOM},
91 @samp{POSIX_FADV_SEQUENTIAL}, and @samp{POSIX_FADV_WILLNEED} are not
92 defined on some platforms.
93 @end itemize