summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-10-06 16:44:26 +0000
committerJim Meyering <jim@meyering.net>1993-10-06 16:44:26 +0000
commitf2080b7714a4dc451a40c9ba12d4c6125a1e69f5 (patch)
tree1fc76c1b7d92d4010cc1bd278b67a6e540cfabc2
parent19cd821ddb4b6c195239870de617a99781e081ce (diff)
downloadcoreutils-f2080b7714a4dc451a40c9ba12d4c6125a1e69f5.tar.xz
merge with 3.8.3b
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/backupfile.c11
-rw-r--r--lib/dirname.c11
-rw-r--r--lib/fsusage.c11
-rw-r--r--lib/makepath.c22
-rw-r--r--lib/userspec.c11
-rw-r--r--old/fileutils/ChangeLog47
-rw-r--r--old/fileutils/NEWS2
-rw-r--r--src/chgrp.c11
-rw-r--r--src/chmod.c11
-rw-r--r--src/chown.c11
-rw-r--r--src/cp.c12
-rw-r--r--src/dd.c11
-rw-r--r--src/df.c11
-rw-r--r--src/du.c12
-rw-r--r--src/install.c11
-rw-r--r--src/ln.c12
-rw-r--r--src/ls.c12
-rw-r--r--src/mkdir.c11
-rw-r--r--src/mkfifo.c11
-rw-r--r--src/mknod.c11
-rw-r--r--src/mv.c12
-rw-r--r--src/rm.c11
-rw-r--r--src/rmdir.c11
-rw-r--r--src/touch.c11
25 files changed, 297 insertions, 12 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index ae30a2df5..af3bf1c8e 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/backupfile.c b/lib/backupfile.c
index 670db0f5d..ddf3fa789 100644
--- a/lib/backupfile.c
+++ b/lib/backupfile.c
@@ -18,6 +18,17 @@
/* David MacKenzie <djm@gnu.ai.mit.edu>.
Some algorithms adapted from GNU Emacs. */
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> 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 <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/lib/dirname.c b/lib/dirname.c
index 5a92ce557..8e365ed92 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 <config.h> 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 <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#ifdef STDC_HEADERS
#include <stdlib.h>
#else
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 2f1179b23..28c54ac17 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 <config.h> 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 <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#include <sys/types.h>
#include "fsusage.h"
diff --git a/lib/makepath.c b/lib/makepath.c
index 7699c178d..be5f8c347 100644
--- a/lib/makepath.c
+++ b/lib/makepath.c
@@ -18,6 +18,17 @@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> and
Jim Meyering <meyering@cs.utexas.edu>. */
+#ifdef HAVE_CONFIG_H
+#if defined (CONFIG_BROKETS)
+/* We use <config.h> 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 <config.h>
+#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 <config.h> 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 <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/lib/userspec.c b/lib/userspec.c
index 44d7d9174..8c1e9ec8e 100644
--- a/lib/userspec.c
+++ b/lib/userspec.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 will use ./config.h rather than /config.h
+ (which it would do because it found this file in ). */
+#include <config.h>
+#else
+#include "config.h"
+#endif
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index d489f7fb2..0a661c8a5 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -7,6 +7,31 @@ Tue Oct 05 14:52:02 1993 Jim Meyering (meyering@comco.com)
* xmalloc.c [CONFIG_BROKETS]: Test this.
+ * install.c (install_file_in_dir): Use stpcpy instead of slow sprintf.
+
+ * argmatch.c, backupfile.c, basename.c, dirname.c, eaccess.c,
+ fileblocks.c, fsusage.c, getversion.c, idcache.c, isdir.c,
+ makepath.c, mountlist.c, rename.c, savedir.c, stripslash.c,
+ userspec.c, xgetcwd.c, xstrdup.c, yesno.c, [HAVE_CONFIG_H,
+ CONFIG_BROKETS]: Include <config.h> or "config.h".
+
+ * lib/Makefile.in, src/Makefile.in [.c.o]: Put -I.. before
+ -I$(srcdir) so <config.h> will get the right file.
+
+ * chgrp.c, chmod.c, chown.c, cp-aux.c, cp-hash.c, cp.c, dd.c,
+ df.c, du.c, install.c, ln.c, ls.c, mkdir.c, mkfifo.c, mknod.c,
+ mv.c, mvdir.c, rm.c, rmdir.c, touch.c, version.c [HAVE_CONFIG_H,
+ CONFIG_BROKETS]: Include <config.h> or "config.h".
+
+ * configure.in [AC_CONFIG_HEADER]: Use it.
+
+ * configure.in (rename.o) [MVDIR definition]: Remove it.
+ * src/Makefile.in [DEFS]: Put it here instead.
+
+ * config.h.in, acconfig.h: New files
+ * Makefile [DISTFILES]: Add them.
+ (config.h.in): Add a rule to warn if it may need to be rebuilt.
+
Thu Sep 9 08:52:10 1993 Jim Meyering (meyering@comco.com)
* src/*.c: Print version on standard output, not stderr.
@@ -58,11 +83,11 @@ Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
when computing the negative free-block count for disks that are
more than 100% full.
- * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
- (is_real_dir): New function.
- (movefile): In addition to when dest is a directory, if dest has
- a trailing `/' and source is not a directory, presume the target
- is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
+ * mv.c (movefile): Use nested calls to stpcpy instead of sprintf.
+ (is_real_dir): New function.
+ (movefile): In addition to when dest is a directory, if dest has
+ a trailing `/' and source is not a directory, presume the target
+ is dest/`basename source`. This converts `mv x y/' to `mv x y/x'
when x is not a directory. This change means that the command
`mv any file/' will now fail rather than performing the move.
@@ -71,10 +96,10 @@ Fri Aug 13 17:19:52 1993 Jim Meyering (meyering@comco.com)
Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
- * ls.c (get_link_name): Don't ever use the stat field st_size as a
+ * ls.c (get_link_name): Don't ever use the stat field st_size as a
buffer size. Too many systems don't set it properly for mount points.
- Instead, use a fixed-length buffer. From Michael Joosten
- <joost@ori.CAdlab.DE>.
+ Instead, use a fixed-length buffer. From Michael Joosten
+ <joost@ori.CAdlab.DE>.
* cp.c (copy): Ditto.
Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
@@ -2077,9 +2102,9 @@ Thu Mar 15 12:33:23 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* ls.c (print_type_indicator): Don't print a '*' next to
executable block or character special files.
- * chmod.c (error): New function, replacing nonfatal_perror,
- memory_out, and invalid_mode.
- Global: Call error instead of the above functions.
+ * chmod.c (error): New function, replacing nonfatal_perror,
+ memory_out, and invalid_mode.
+ Global: Call error instead of the above functions.
(change_dir_mode): Make the new size of the path twice the
size of the name that was too long, rather than twice its old
size.
diff --git a/old/fileutils/NEWS b/old/fileutils/NEWS
index e4121a4d9..81468bae0 100644
--- a/old/fileutils/NEWS
+++ b/old/fileutils/NEWS
@@ -1,4 +1,6 @@
Major changes in release 3.9:
+* configure uses config.h, so DEFS won't exceed preprocessor limits of
+ some compilers on the number of symbols defined via -D.
* ls and cp can handle mount points on more systems
* cp, mkdir, and rmdir long option --path renamed to --parents; --path
will still work for a while
diff --git a/src/chgrp.c b/src/chgrp.c
index 6a6737a03..ca66a595c 100644
--- a/src/chgrp.c
+++ b/src/chgrp.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
+
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/src/chmod.c b/src/chmod.c
index eb3316c0e..511e3e22a 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -23,6 +23,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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/chown.c b/src/chown.c
index 6c9678137..c295f5816 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -28,6 +28,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
+
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/src/cp.c b/src/cp.c
index f0a5ce529..c1ae72c84 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -20,6 +20,18 @@
#ifdef _AIX
#pragma alloca
#endif
+
+#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 <stdio.h>
#include <getopt.h>
#include "cp.h"
diff --git a/src/dd.c b/src/dd.c
index fd1091488..9ff4cf993 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -53,6 +53,17 @@
sync Pad every input block to size of ibs with
trailing NULs. */
+#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 <stdio.h>
#include <ctype.h>
diff --git a/src/df.c b/src/df.c
index 35b1896aa..7b779258f 100644
--- a/src/df.c
+++ b/src/df.c
@@ -32,6 +32,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
+
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>
diff --git a/src/du.c b/src/du.c
index 4ea63f336..5f538ec7f 100644
--- a/src/du.c
+++ b/src/du.c
@@ -39,6 +39,18 @@
#ifdef _AIX
#pragma alloca
#endif
+
+#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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/install.c b/src/install.c
index 31a15dd1b..075620085 100644
--- a/src/install.c
+++ b/src/install.c
@@ -52,6 +52,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 <stdio.h>
#include <getopt.h>
#include <ctype.h>
diff --git a/src/ln.c b/src/ln.c
index f8cf11e52..8e96eb848 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -20,6 +20,18 @@
#ifdef _AIX
#pragma alloca
#endif
+
+#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 <stdio.h>
#include <sys/types.h>
#include <getopt.h>
diff --git a/src/ls.c b/src/ls.c
index 947e1b5b8..9db617448 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -35,6 +35,18 @@
#ifdef _AIX
#pragma alloca
#endif
+
+#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(_POSIX_SOURCE) || defined(_AIX)
#include <sys/ioctl.h>
diff --git a/src/mkdir.c b/src/mkdir.c
index f5d89b7f3..1167c1a2e 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -27,6 +27,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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 4b16d1254..c15f740e6 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -22,6 +22,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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/mknod.c b/src/mknod.c
index 74efa86b2..702435186 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -27,6 +27,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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/mv.c b/src/mv.c
index 5029c7a76..a5d22eb8e 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -40,6 +40,18 @@
#ifdef _AIX
#pragma alloca
#endif
+
+#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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/rm.c b/src/rm.c
index 2bd8db4ce..b20950f78 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -17,6 +17,17 @@
/* Written by Paul Rubin, David MacKenzie, and Richard Stallman. */
+#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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/rmdir.c b/src/rmdir.c
index 7c497b4b9..ac4c88c50 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -22,6 +22,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 <stdio.h>
#include <getopt.h>
#include <sys/types.h>
diff --git a/src/touch.c b/src/touch.c
index 152a27e84..dc1d06f95 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -32,6 +32,17 @@
Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie,
and Randy Smith. */
+#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 <stdio.h>
#include <ctype.h>
#include <getopt.h>