annotate doc/posix-functions/open.texi @ 14594:e270695eecd5

Move the support of O_NONBLOCK in open() to the 'open' module. * modules/nonblocking (Depends-on): Remove 'open'. * m4/nonblocking.m4 (gl_NONBLOCKING_IO_BODY): Set gl_cv_have_open_O_NONBLOCK. * m4/open.m4 (gl_FUNC_OPEN): Replace open() also when required for O_NONBLOCK support. * doc/posix-functions/open.texi: Document support for O_NONBLOCK.
author Bruno Haible <bruno@clisp.org>
date Tue, 19 Apr 2011 10:38:30 +0200
parents bb0ceefd22dc
children cef4d5bc6b72
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 @node open
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 @section @code{open}
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 @findex open
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
13549
bb0ceefd22dc avoid some overlong lines from posix urls, etc.
Karl Berry <karl@freefriends.org>
parents: 13490
diff changeset
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/open.html}
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
11922
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
7 Gnulib module: open, fchdir
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
11922
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
9 Portability problems fixed by the Gnulib module open:
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 @itemize
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 @item
10201
270b7afb8fb7 Work around open() bug on HP-UX 11 and Solaris 9.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
12 This function does not fail when the file name argument ends in a slash
10472
a4dc39a18d54 Ensure that a filename ending in a slash cannot be used to access a non-directory.
Bruno Haible <bruno@clisp.org>
parents: 10201
diff changeset
13 and (without the slash) names a nonexistent file or a file that is not a
a4dc39a18d54 Ensure that a filename ending in a slash cannot be used to access a non-directory.
Bruno Haible <bruno@clisp.org>
parents: 10201
diff changeset
14 directory, on some platforms:
13490
e04f4ee19c1b open, fopen: Update regarding AIX.
Bruno Haible <bruno@clisp.org>
parents: 12259
diff changeset
15 FreeBSD 7.2, AIX 7.1, HP-UX 11.00, Solaris 9, Irix 5.3.
10201
270b7afb8fb7 Work around open() bug on HP-UX 11 and Solaris 9.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
16 @item
14594
e270695eecd5 Move the support of O_NONBLOCK in open() to the 'open' module.
Bruno Haible <bruno@clisp.org>
parents: 13549
diff changeset
17 This function does not support the @code{O_NONBLOCK} flag when it is defined
e270695eecd5 Move the support of O_NONBLOCK in open() to the 'open' module.
Bruno Haible <bruno@clisp.org>
parents: 13549
diff changeset
18 by the gnulib module @code{nonblock} on some platforms:
e270695eecd5 Move the support of O_NONBLOCK in open() to the 'open' module.
Bruno Haible <bruno@clisp.org>
parents: 13549
diff changeset
19 mingw.
e270695eecd5 Move the support of O_NONBLOCK in open() to the 'open' module.
Bruno Haible <bruno@clisp.org>
parents: 13549
diff changeset
20 @item
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 On Windows platforms (excluding Cygwin), this function does usually not
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 recognize the @file{/dev/null} filename.
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 @end itemize
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
11922
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
25 Portability problems fixed by the Gnulib module fchdir:
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
26 @itemize
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
27 @item
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
28 On Windows platforms (excluding Cygwin), this function fails to open a
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
29 read-only descriptor for directories.
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
30 @end itemize
9750527ffbab fchdir: port to mingw
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
31
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 Portability problems not fixed by Gnulib:
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 @itemize
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 On Windows, this function returns a file handle in @code{O_TEXT} mode by
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 default; this means that it translates '\n' to CR/LF by default. Use the
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 @code{O_BINARY} flag if you need reliable binary I/O.
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 On platforms where @code{off_t} is a 32-bit type, @code{open} may not work
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 correctly with files larger than 2 GB. The fix is to use the
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 @code{AC_SYS_LARGEFILE} macro.
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 @end itemize