summaryrefslogtreecommitdiff
path: root/lib/stdopen.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-06-30 20:23:09 +0000
committerJim Meyering <jim@meyering.net>2005-06-30 20:23:09 +0000
commitd3f25798b97f8e189b26444479893c7d8c2dedb9 (patch)
treedabd3774f19257890791a145483cdec048387260 /lib/stdopen.c
parenta3d8cfece3537fc1ecdc924cc7be6f3e06ee7d9c (diff)
downloadcoreutils-d3f25798b97f8e189b26444479893c7d8c2dedb9.tar.xz
Add copyright.
Include <fcntl.h> and <unistd.h> unconditionally -- it seems to be ok to do this, these days.
Diffstat (limited to 'lib/stdopen.c')
-rw-r--r--lib/stdopen.c34
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