e1a077a1908cfff515d635e02060b9320225cb40
[gnulib.git] / doc / posix-functions / freopen.texi
1 @node freopen
2 @section @code{freopen}
3 @findex freopen
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/freopen.html}
6
7 Gnulib module: freopen
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 On platforms where @code{off_t} is a 32-bit type, @code{freopen} may not work
13 correctly with files larger than 2 GB.  (Cf. @code{AC_SYS_LARGEFILE}.)
14 @item
15 On Windows platforms (excluding Cygwin), this function does usually not
16 recognize the @file{/dev/null} filename.
17 @end itemize
18
19 Portability problems not fixed by Gnulib:
20 @itemize
21 @item
22 On Windows platforms (excluding Cygwin), this function does not set @code{errno}
23 upon failure.
24 @item
25 This function does not fail when the file name argument ends in a slash
26 and (without the slash) names a nonexistent file or a file that is not a
27 directory, on some platforms:
28 HP-UX 11.00, Solaris 9, Irix 5.3.
29 @item
30 Applications should not assume that @code{fileno(f)} will be the same
31 before and after a call to @code{freopen(name,mode,f)}.  However, the
32 module freopen-safer can at least protect @code{stdin}, @code{stdout},
33 and @code{stderr}.
34 @end itemize