view lib/stdio--.h @ 11849:18b5c404aa04

tests: test some of the *-safer modules * modules/fopen-safer (Depends-on): Add fopen. * modules/fcntl-safer (Depends-on): Add fcntl. * modules/stdlib-safer (Depends-on): Add stdlib. (configure.ac): Set indicator. * modules/unistd-safer (configure.ac): Likewise. * modules/tmpfile-safer (configure.ac): Likewise. (Depends-on): Add tmpfile. * lib/stdio--.h (fopen, tmpfile): Don't override unless module is active. * tests/test-fopen.c (includes): Test safer versions when they are in use. * tests/test-open.c (includes): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 19 Aug 2009 09:54:54 -0600 (2009-08-19)
parents bbbbbf4cd1c5
children 9ebc8e9eca64
line wrap: on
line source
/* Like stdio.h, but redefine some names to avoid glitches.

   Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* Written by Paul Eggert.  */

#include <stdio.h>
#include "stdio-safer.h"

#if GNULIB_FOPEN_SAFER
# undef fopen
# define fopen fopen_safer
#endif

#if GNULIB_TMPFILE_SAFER
# undef tmpfile
# define tmpfile tmpfile_safer
#endif