diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stdopen.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/lib/stdopen.c b/lib/stdopen.c index 2bf2a01b4..6ea2264b8 100644 --- a/lib/stdopen.c +++ b/lib/stdopen.c @@ -1,11 +1,33 @@ +/* stdopen.c - ensure that the three standard file descriptors are in use + + Copyright (C) 2005 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 2, 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, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert and Jim Meyering. */ + +#if HAVE_CONFIG_H +# include <config.h> +#endif + +#include "stdopen.h" + #include <sys/types.h> #include <sys/stat.h> -#if HAVE_FCNTL_H -# include <fcntl.h> -#endif -#if HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <fcntl.h> +#include <unistd.h> #include <errno.h> #ifndef STDIN_FILENO |