/* 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.
#include "files.h"
#include "getargs.h"
#include "gram.h"
+#include "stdio-safer.h"
/* From basename.c. Almost a lie, as it returns a char *. */
const char *base_name (char const *name);
{
FILE *ptr;
- ptr = fopen (name, mode);
+ ptr = fopen_safer (name, mode);
if (!ptr)
error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name);