1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Files
gnulib/modules/freopen
Paul Eggert b947d0524d freopen: work around glibc bug with closed fd
Work around glibc bug#15589, where freopen mishandles the case
where stdin etc. are already closed.
* doc/posix-functions/freopen.texi (freopen): Document the bug.
* lib/freopen.c (_GL_ALREADY_INCLUDING_STDIO_H): Define this
instead of __need_FILE, as the latter does not work with glibc.
Include <fcntl.h>, for open flags.
(rpl_freopen): Work around glibc bug.
* m4/freopen.m4 (gl_FUNC_FREOPEN): Check for bug.
* modules/freopen (Depends-on): Add fcntl-h.
* tests/test-freopen.c (main): Test for bug.
2016-11-26 14:54:38 -08:00

31 lines
381 B
Plaintext

Description:
freopen() function: open a stream to a file.
Files:
lib/freopen.c
m4/freopen.m4
Depends-on:
fcntl-h [test $REPLACE_FREOPEN = 1]
stdio
largefile
configure.ac:
gl_FUNC_FREOPEN
if test $REPLACE_FREOPEN = 1; then
AC_LIBOBJ([freopen])
gl_PREREQ_FREOPEN
fi
gl_STDIO_MODULE_INDICATOR([freopen])
Makefile.am:
Include:
<stdio.h>
License:
LGPL
Maintainer:
all