Support for MSVC compiler: Ensure ssize_t gets defined.
[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 @samp{O_CLOEXEC}, @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY},
16 @samp{O_NOFOLLOW}, @samp{O_RSYNC}, @samp{O_SYNC},
17 and @samp{O_TTY_INIT} are not defined on some platforms.  Gnulib defines
18 these macros to 0, which is generally safe.
19
20 @item
21 @samp{O_NONBLOCK} is not defined on some platforms.  If the
22 @samp{nonblocking} module is in use, gnulib guarantees a working
23 non-zero value; otherwise, the gnulib replacement is 0.
24
25 @item
26 @samp{O_EXEC} and @samp{O_SEARCH} are not defined on some platforms.
27 Gnulib defines these macros to @samp{O_RDONLY}, which is typically 0.
28
29 @item
30 @samp{O_ACCMODE} is not defined on some platforms:
31 MSVC 9.
32
33 @item
34 The @samp{O_ACCMODE} mask mistakenly omits @samp{O_SEARCH} and
35 @samp{O_EXEC} on some platforms:
36 Cygwin.
37
38 @item
39 @samp{O_BINARY}, @samp{O_TEXT} (not specified by POSIX, but essential for
40 portability to Woe32 platforms) are defined on some platforms but not on
41 others.
42
43 @item
44 @samp{O_DIRECT}, @samp{O_NDELAY}, @samp{O_NOATIME},
45 and @samp{O_NOLINKS} (not specified by POSIX) are defined
46 on some platforms but not on others.
47
48 @item
49 @samp{FD_CLOEXEC}, @samp{F_DUPFD}, and @samp{F_GETFD} are not defined
50 on some platforms:
51 mingw, MSVC 9.
52
53 @item
54 @samp{F_DUPFD_CLOEXEC} is not defined on some platforms:
55 MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
56 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.7.1, mingw, MSVC 9, Interix 3.5,
57 BeOS.
58
59 @item
60 @samp{AT_FDCWD}, @samp{AT_EACCESS}, @samp{AT_SYMLINK_NOFOLLOW},
61 @samp{AT_SYMLINK_FOLLOW}, and @samp{AT_REMOVEDIR}
62 are not defined on many platforms:
63 glibc 2.3.6, MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, OpenBSD 3.8, AIX
64 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.
65
66 @item
67 @samp{AT_FDCWD} is defined with a value too large for an @code{int} on some
68 platforms:
69 Solaris 11 2010-11.
70 @end itemize
71
72 Portability problems not fixed by Gnulib:
73 @itemize
74 @item
75 @samp{F_SETFD}, @samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK},
76 @samp{F_SETLK}, @samp{F_SETLOKW}, @samp{F_GETOWN}, and @samp{F_SETOWN}
77 are not defined on some platforms:
78 mingw, MSVC 9.
79
80 @item
81 @samp{POSIX_FADV_DONTNEED}, @samp{POSIX_FADV_NOREUSE},
82 @samp{POSIX_FADV_NORMAL}, @samp{POSIX_FADV_RANDOM},
83 @samp{POSIX_FADV_SEQUENTIAL}, and @samp{POSIX_FADV_WILLNEED} are not
84 defined on some platforms.
85 @end itemize