freopen
POSIX specification:
http://www.opengroup.org/onlinepubs/9699919799/functions/freopen.html
Gnulib module: freopen
Portability problems fixed by Gnulib:
off_t is a 32-bit type, freopen may not work
correctly with files larger than 2 GB. (Cf. AC_SYS_LARGEFILE.)
Portability problems not fixed by Gnulib:
errno
upon failure.
NULL file name argument on some
platforms:
OpenBSD 4.9, AIX 7.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw, MSVC 9.
fileno(f) will be the same
before and after a call to freopen(name,mode,f). However, the
module freopen-safer can at least protect stdin, stdout,
and stderr.