]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 3.8.3b FILEUTILS-3_8_3b
authorJim Meyering <jim@meyering.net>
Wed, 6 Oct 1993 16:44:26 +0000 (16:44 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 6 Oct 1993 16:44:26 +0000 (16:44 +0000)
25 files changed:
lib/Makefile.in
lib/backupfile.c
lib/dirname.c
lib/fsusage.c
lib/makepath.c
lib/userspec.c
old/fileutils/ChangeLog
old/fileutils/NEWS
src/chgrp.c
src/chmod.c
src/chown.c
src/cp.c
src/dd.c
src/df.c
src/du.c
src/install.c
src/ln.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/rm.c
src/rmdir.c
src/touch.c

index ae30a2df5a944130e4ac03106e6dc5c858bafbad..af3bf1c8ea51dda6b2e64e0c0bef7794c5029806 100644 (file)
@@ -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
 
index 670db0f5d521bd8d822c8edfee702398bd0e78ce..ddf3fa7894643362b3c0b8ac3d8e2d6cb0baf4f7 100644 (file)
 /* 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>
index 5a92ce557ff6d6f08fc9e527ddbea90dea46752f..8e365ed928a05c763830786beea29808ca1a1fdd 100644 (file)
    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
index 2f1179b231fba35edcf1713196b87ed0be33a88b..28c54ac179cca15a92ee585c933d004d86cd535f 100644 (file)
    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"
 
index 7699c178df79fb2e89ec3a939478d9cf670d235b..be5f8c34718fbb45b7b276aa5890e6c271fbfc3a 100644 (file)
 /* 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>
index 44d7d91744d68e89625015aa1c101562e1a78df6..8c1e9ec8ea0680367599ac8945322f216ac05644 100644 (file)
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
 \f
+#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>
index d489f7fb2c87b726f3159dded57aa9ef4ead0c81..0a661c8a55c10594ac8cbd3f1f8488fa5595b97a 100644 (file)
@@ -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. 
index e4121a4d9d78c8cb3b13ced5dae0fcfceef8e017..81468bae064073707d4c7fd030aa71c61029d5e5 100644 (file)
@@ -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
index 6a6737a03c8ef33b7dbc34b5f4084cb0487b407a..ca66a595c6e277932c5cecf43b6f785872592634 100644 (file)
 
 /* 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>
index eb3316c0ee8f616db292b3bfb3a070b48c8caba5..511e3e22a0502a01b3512dd8d40b5a9d63ece517 100644 (file)
 
    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>
index 6c967813718dc14497c96cd922d0884340d1a8fe..c295f5816430549a47d9536570bad250c845ec70 100644 (file)
 
    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>
index f0a5ce529e0a2a02a897d840b4f91dbe939f9eca..c1ae72c8455b80279839e8a47e42617cc1f174e0 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
 #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"
index fd10914880914652c45b1b3dccbe127938ec7803..9ff4cf99325838a5279a2d647d224539b3e7fd6f 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
    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>
 
index 35b1896aa5b61dc21fbaddea55a20414c6f9d125..7b779258f20d871e99201d525a5f32f9a8ca57cf 100644 (file)
--- a/src/df.c
+++ b/src/df.c
 
    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>
index 4ea63f3366846bd209f4f45dbf2fe67eefad40cf..5f538ec7f2460bacc3346c839856c3a3d48c7f69 100644 (file)
--- a/src/du.c
+++ b/src/du.c
 #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>
index 31a15dd1b19d0c9d60a5cb6d048c24320da6b095..0756200856fa971149ee0291989f502dcf2d9bb7 100644 (file)
 
    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>
index f8cf11e528f937c0977c60ed0f3219b3e921c9b7..8e96eb848716c4268547fe8111ba44ab26a033d0 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
 #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>
index 947e1b5b81bfede3c54b62328bf88a62c3ea83b2..9db617448deed06ce022470b886c4ed1aeae5f23 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
 #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>
index f5d89b7f3af3c0c90e2d3aeff41d1d6f5757cb22..1167c1a2e2c86e99094f9be4f850f29effc20e96 100644 (file)
 
    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>
index 4b16d12543109510d5bf18c085cc450cb265d57c..c15f740e604fb7e2b414af125631cf2a6c20939e 100644 (file)
 
    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>
index 74efa86b2e456b45d0538d00ae1576a440a3fbd4..7024351867c82a38d1b8673dab1d55bfe2dd055e 100644 (file)
 
    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>
index 5029c7a7687db1e8968a9c288fc843c1b5ecfbd8..a5d22eb8efee2db22c869335bd9f7925bb2d395c 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
 #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>
index 2bd8db4ced952054f4c16d5ae54e7cb659fbcc7a..b20950f7818eb3badbf1c5c49c14dc3f0b34ca9d 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
 
 /* 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>
index 7c497b4b92d4b7d896593555e466b194c9797962..ac4c88c509d18e7c41f28249987df25579976774 100644 (file)
 
    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>
index 152a27e844ce68cba93b23df348602138ced1f2e..dc1d06f9599f0e5872e60363e89d2093c1b79e98 100644 (file)
    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>