changeset 115:21add36c3efa

GNU shell utilities
author Jim Meyering <jim@meyering.net>
date Tue, 12 Oct 1993 14:30:12 +0000
parents 57a0fd8d9f26
children 463cdf37b865
files lib/gethostname.c lib/getugroups.c lib/getusershell.c lib/putenv.c lib/stime.c lib/strcspn.c lib/strftime.c lib/strtod.c
diffstat 8 files changed, 88 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/gethostname.c
+++ b/lib/gethostname.c
@@ -17,6 +17,17 @@
 
 /* David MacKenzie <djm@gnu.ai.mit.edu> */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #ifdef HAVE_UNAME
 #include <sys/utsname.h>
 #endif
--- a/lib/getugroups.c
+++ b/lib/getugroups.c
@@ -17,6 +17,17 @@
 
 /* Written by David MacKenzie. */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #include <sys/types.h>
 #include <grp.h>
 
--- a/lib/getusershell.c
+++ b/lib/getusershell.c
@@ -17,6 +17,17 @@
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #ifndef SHELLS_FILE
 /* File containing a list of nonrestricted shells, one per line. */
 #define SHELLS_FILE "/etc/shells"
--- a/lib/putenv.c
+++ b/lib/putenv.c
@@ -16,6 +16,17 @@
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #include <sys/types.h>
 #include <errno.h>
 
--- a/lib/stime.c
+++ b/lib/stime.c
@@ -17,6 +17,17 @@
 
 /* David MacKenzie <djm@ai.mit.edu> */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #include <sys/types.h>
 #include <sys/time.h>
 
--- a/lib/strcspn.c
+++ b/lib/strcspn.c
@@ -16,6 +16,17 @@
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 char *index ();
 
 /* Return the length of the maximum inital segment of S
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -73,6 +73,17 @@
 
    David MacKenzie <djm@gnu.ai.mit.edu> */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #include <sys/types.h>
 #if defined(TM_IN_SYS_TIME) || (!defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME))
 #include <sys/time.h>
--- a/lib/strtod.c
+++ b/lib/strtod.c
@@ -16,6 +16,17 @@
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> instead of "config.h" so that a compilation
+   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
+   (which it would do because it found this file in $srcdir).  */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
 #include <errno.h>
 #include <ctype.h>
 #include <math.h>