mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
* bootstrap: Add stdio-safer, unistd-safer modules.
Remove m4/glibc2.m4 (introduced by latest gnulib, but we don't need it). * lib/.cvsignore: Add dup-safer.c, fd-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h. * lib/subpipe.c: Include "unistd-safer.h". (create_subpipe): Make sure all the newly-created file descriptors are > 2, so that diagnostics don't get sent down them (which might cause Bison to hang, in theory). * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4. * src/files.c (xfopen): Use fopen_safer, not fopen.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Open and close files for Bison.
|
||||
|
||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
|
||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
@@ -95,7 +95,7 @@ xfopen (const char *name, const char *mode)
|
||||
{
|
||||
FILE *ptr;
|
||||
|
||||
ptr = fopen (name, mode);
|
||||
ptr = fopen_safer (name, mode);
|
||||
if (!ptr)
|
||||
error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user