1 |
/* Invoke fopen, but avoid some glitches. |
/* Invoke fopen, but avoid some glitches. |
2 |
Copyright (C) 2001, 2004 Free Software Foundation, Inc. |
Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
17 |
|
|
18 |
/* Written by Paul Eggert. */ |
/* Written by Paul Eggert. */ |
19 |
|
|
20 |
#if HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
21 |
# include <config.h> |
# include <config.h> |
22 |
#endif |
#endif |
23 |
|
|
24 |
#if HAVE_UNISTD_H |
#include "stdio-safer.h" |
25 |
# include <unistd.h> |
|
26 |
#endif |
#include <errno.h> |
27 |
#include <unistd-safer.h> |
#include <unistd.h> |
28 |
|
#include "unistd-safer.h" |
29 |
|
|
30 |
#ifndef STDERR_FILENO |
#ifndef STDERR_FILENO |
31 |
# define STDERR_FILENO 2 |
# define STDERR_FILENO 2 |
32 |
#endif |
#endif |
33 |
|
|
|
#include <errno.h> |
|
|
#include <stdio.h> |
|
|
#include <stdio-safer.h> |
|
|
|
|
34 |
/* Like fopen, but do not return stdin, stdout, or stderr. */ |
/* Like fopen, but do not return stdin, stdout, or stderr. */ |
35 |
|
|
36 |
FILE * |
FILE * |