fopen: document mingw bug on directories
[pspp] / doc / posix-functions / fopen.texi
1 @node fopen
2 @section @code{fopen}
3 @findex fopen
4
5 POSIX specification: @url{http://www.opengroup.org/susv3xsh/fopen.html}
6
7 Gnulib module: fopen
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function does not fail when the file name argument ends in a slash
13 and (without the slash) names a nonexistent file, on some platforms:
14 HP-UX 11.00, Solaris 9.
15 @item
16 On Windows platforms (excluding Cygwin), this function does usually not
17 recognize the @file{/dev/null} filename.
18 @end itemize
19
20 Portability problems not fixed by Gnulib:
21 @itemize
22 @item
23 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
24 upon failure.
25 @item
26 On Windows, this function returns a file stream in ``text'' mode by default;
27 this means that it translates @code{'\n'} to CR/LF by default.  Use the
28 @code{"b"} flag if you need reliable binary I/O.
29 @item
30 On Windows platforms (excluding Cygwin), this function fails to open
31 directories for reading.  Such streams have implementation-defined
32 semantics on other platforms.  To avoid directory streams with a
33 consistent error message, use @code{fstat} after @code{open} and
34 @code{fdopen}, rather than @code{fopen} and @code{fileno}.
35 @end itemize