From ae53a723a34ad75f4141e65cc65c3d08f732db78 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 12 Oct 1993 14:30:12 +0000 Subject: [PATCH] GNU shell utilities --- lib/gethostname.c | 11 +++++++++++ lib/getugroups.c | 11 +++++++++++ lib/getusershell.c | 11 +++++++++++ lib/putenv.c | 11 +++++++++++ lib/stime.c | 11 +++++++++++ lib/strcspn.c | 11 +++++++++++ lib/strftime.c | 11 +++++++++++ lib/strtod.c | 11 +++++++++++ 8 files changed, 88 insertions(+) diff --git a/lib/gethostname.c b/lib/gethostname.c index fe78dbb4a..a7a271b33 100644 --- a/lib/gethostname.c +++ b/lib/gethostname.c @@ -17,6 +17,17 @@ /* David MacKenzie */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use 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 +#else +#include "config.h" +#endif +#endif + #ifdef HAVE_UNAME #include #endif diff --git a/lib/getugroups.c b/lib/getugroups.c index dab04a0cf..f7d3d0035 100644 --- 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 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 +#else +#include "config.h" +#endif +#endif + #include #include diff --git a/lib/getusershell.c b/lib/getusershell.c index 1dee6e7ab..2607535f2 100644 --- a/lib/getusershell.c +++ b/lib/getusershell.c @@ -17,6 +17,17 @@ /* Written by David MacKenzie */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use 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 +#else +#include "config.h" +#endif +#endif + #ifndef SHELLS_FILE /* File containing a list of nonrestricted shells, one per line. */ #define SHELLS_FILE "/etc/shells" diff --git a/lib/putenv.c b/lib/putenv.c index c39d1b71e..573e62478 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -16,6 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If 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 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 +#else +#include "config.h" +#endif +#endif + #include #include diff --git a/lib/stime.c b/lib/stime.c index e64795387..185c753d9 100644 --- a/lib/stime.c +++ b/lib/stime.c @@ -17,6 +17,17 @@ /* David MacKenzie */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use 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 +#else +#include "config.h" +#endif +#endif + #include #include diff --git a/lib/strcspn.c b/lib/strcspn.c index ea61aa120..ea1bbbc34 100644 --- a/lib/strcspn.c +++ b/lib/strcspn.c @@ -16,6 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If 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 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 +#else +#include "config.h" +#endif +#endif + char *index (); /* Return the length of the maximum inital segment of S diff --git a/lib/strftime.c b/lib/strftime.c index cfd41adbe..569a3d448 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -73,6 +73,17 @@ David MacKenzie */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use 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 +#else +#include "config.h" +#endif +#endif + #include #if defined(TM_IN_SYS_TIME) || (!defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME)) #include diff --git a/lib/strtod.c b/lib/strtod.c index 1b8e5b544..d28975368 100644 --- a/lib/strtod.c +++ b/lib/strtod.c @@ -16,6 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If 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 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 +#else +#include "config.h" +#endif +#endif + #include #include #include -- 2.11.0