From: Jim Meyering Date: Wed, 6 Oct 1993 16:41:02 +0000 (+0000) Subject: GNU file utilities X-Git-Tag: FILEUTILS-3_8_3c~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=338c0994807e8ace838328b07d10c8acfa0bf277;p=thirdparty%2Fgnulib.git GNU file utilities --- diff --git a/lib/Makefile.in b/lib/Makefile.in index ae30a2df5a..af3bf1c8ea 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -49,7 +49,7 @@ fnmatch.h fsusage.h mountlist.h pathmax.h system.h $(SOURCES) all: libfu.a .c.o: - $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $< + $(CC) -c $(CPPFLAGS) $(DEFS) -I.. -I$(srcdir) $(CFLAGS) $< install: all diff --git a/lib/argmatch.c b/lib/argmatch.c index f3f1a50d22..bf1581aa34 100644 --- a/lib/argmatch.c +++ b/lib/argmatch.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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #ifdef STDC_HEADERS #include diff --git a/lib/backupfile.c b/lib/backupfile.c index 670db0f5d5..ddf3fa7894 100644 --- a/lib/backupfile.c +++ b/lib/backupfile.c @@ -18,6 +18,17 @@ /* David MacKenzie . Some algorithms adapted from GNU Emacs. */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/dirname.c b/lib/dirname.c index 5a92ce557f..8e365ed928 100644 --- a/lib/dirname.c +++ b/lib/dirname.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #ifdef STDC_HEADERS #include #else diff --git a/lib/fileblocks.c b/lib/fileblocks.c index 23dee98150..fad39de13c 100644 --- a/lib/fileblocks.c +++ b/lib/fileblocks.c @@ -17,6 +17,17 @@ /* Written by Brian L. Matthews, blm@6sceng.UUCP. */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #if !defined (HAVE_ST_BLOCKS) && !defined(_POSIX_SOURCE) #include #include diff --git a/lib/fsusage.c b/lib/fsusage.c index 2f1179b231..28c54ac179 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include "fsusage.h" diff --git a/lib/ftruncate.c b/lib/ftruncate.c index 17d263d512..3bf53fa89f 100644 --- a/lib/ftruncate.c +++ b/lib/ftruncate.c @@ -1,6 +1,17 @@ /* ftruncate emulations that work on some System V's. This file is in the public domain. */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include diff --git a/lib/getversion.c b/lib/getversion.c index eca294599e..0784edad96 100644 --- a/lib/getversion.c +++ b/lib/getversion.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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include "backupfile.h" #ifdef STDC_HEADERS diff --git a/lib/idcache.c b/lib/idcache.c index dd9c366b16..5242366ac6 100644 --- a/lib/idcache.c +++ b/lib/idcache.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/isdir.c b/lib/isdir.c index 439235f8e1..76b79829d5 100644 --- a/lib/isdir.c +++ b/lib/isdir.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include diff --git a/lib/makepath.c b/lib/makepath.c index 7699c178df..be5f8c3471 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -18,6 +18,17 @@ /* Written by David MacKenzie and Jim Meyering . */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #ifdef __GNUC__ #define alloca __builtin_alloca #else @@ -32,6 +43,17 @@ char *alloca (); #endif #endif +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/mkdir.c b/lib/mkdir.c index 68e6b6327a..a5f6230344 100644 --- a/lib/mkdir.c +++ b/lib/mkdir.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/modechange.c b/lib/modechange.c index 978ab46d17..6b3c88e240 100644 --- a/lib/modechange.c +++ b/lib/modechange.c @@ -24,6 +24,17 @@ changing the mode of many files, this probably results in a performance gain. */ +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use instead of "config.h" so that a compilation + using -I. -I will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include "modechange.h" diff --git a/lib/mountlist.c b/lib/mountlist.c index 4528c9e0dc..55e79b12a7 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include "mountlist.h" diff --git a/lib/rename.c b/lib/rename.c index 593cf31dad..ca778e9abe 100644 --- a/lib/rename.c +++ b/lib/rename.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/savedir.c b/lib/savedir.c index d89adc0a09..378fb4774c 100644 --- a/lib/savedir.c +++ b/lib/savedir.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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #ifdef HAVE_UNISTD_H diff --git a/lib/strdup.c b/lib/strdup.c index b137db2d95..40b2df6037 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #ifdef STDC_HEADERS #include #include diff --git a/lib/stripslash.c b/lib/stripslash.c index 2971d4ced0..bccbdeb0a2 100644 --- a/lib/stripslash.c +++ b/lib/stripslash.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include #else diff --git a/lib/userspec.c b/lib/userspec.c index 44d7d91744..8c1e9ec8ea 100644 --- a/lib/userspec.c +++ b/lib/userspec.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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include #include #include diff --git a/lib/xstrdup.c b/lib/xstrdup.c index 9588bc78d1..d422fcaddf 100644 --- a/lib/xstrdup.c +++ b/lib/xstrdup.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include #else diff --git a/lib/yesno.c b/lib/yesno.c index a705da732e..6eca9dd598 100644 --- a/lib/yesno.c +++ b/lib/yesno.c @@ -15,6 +15,17 @@ along with this program; 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 will use ./config.h rather than /config.h + (which it would do because it found this file in ). */ +#include +#else +#include "config.h" +#endif +#endif + #include /* Read one line from standard input