]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 3.4.1
authorJim Meyering <jim@meyering.net>
Mon, 29 Mar 1993 05:09:09 +0000 (05:09 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 29 Mar 1993 05:09:09 +0000 (05:09 +0000)
lib/Makefile.in
lib/dirname.c
lib/fsusage.c
lib/makepath.c
old/fileutils/ChangeLog
src/cp.c
src/df.c
src/ln.c
src/ls.c
src/rm.c

index d441c4e3c2b579208fd56ffc329457505d041695..fb21e13dc431ce60788a00d984f54a6974c0e3b4 100644 (file)
@@ -64,7 +64,10 @@ realclean: distclean
        rm -f TAGS
 
 dist:
-       ln $(DISTFILES) ../`cat ../.fname`/lib
+       for file in $(DISTFILES); do \
+         ln $$file ../`cat ../.fname`/lib \
+           || cp $$file ../`cat ../.fname`/lib; \
+       done
 
 libfu.a: $(OBJECTS)
        rm -f $@
index 7467d29e853d51df40056adc48ce5124223166fb..5a92ce557ff6d6f08fc9e527ddbea90dea46752f 100644 (file)
@@ -20,7 +20,7 @@
 #else
 char *malloc ();
 #endif
-#if defined(USG) || defined(STDC_HEADERS)
+#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
 #ifndef rindex
 #define rindex strrchr
index 8cc0c6d7333d858177ed4b1ebfc9b85e72eee151..b434913439e67a5c53af495e94e96ef0c240cb1d 100644 (file)
@@ -56,14 +56,18 @@ int statvfs ();
 /* Return the number of TOSIZE-byte blocks used by
    BLOCKS FROMSIZE-byte blocks, rounding up.  */
 
-#define adjust_blocks(blocks, fromsize, tosize)                \
-  (((fromsize) == (tosize))                            \
-   ? (blocks)  /* E.g., from 512 to 512.  */           \
-   : (((fromsize) > (tosize))                          \
-      /* E.g., from 2048 to 512.  */                   \
-      ? (blocks) * ((fromsize) / (tosize))             \
-      /* E.g., from 256 to 512.  */                    \
-      : ((blocks) + 1) / ((tosize) / (fromsize))))
+static long
+adjust_blocks (blocks, fromsize, tosize)
+     long blocks;
+     int fromsize, tosize;
+{
+  if (fromsize == tosize)      /* E.g., from 512 to 512.  */
+    return blocks;
+  else if (fromsize > tosize)  /* E.g., from 2048 to 512.  */
+    return blocks * (fromsize / tosize);
+  else                         /* E.g., from 256 to 512.  */
+    return (blocks + 1) / (tosize / fromsize);
+}
 
 /* Fill in the fields of FSP with information about space usage for
    the filesystem on which PATH resides.
index 98b78a1e658e69d7aa5b91107b69af45838ffe7a..3ca5c97654ac29e5073bf359afbff2abef36c223 100644 (file)
@@ -49,9 +49,11 @@ char *alloca ();
 extern int errno;
 #endif
 
-#if defined(USG) || defined(STDC_HEADERS)
+#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
+#ifndef index
 #define index strchr
+#endif
 #else
 #include <strings.h>
 #endif
index a7e45e68230fec913f7ad1e0c68d58e6d6324270..77c3edddaa958e30aeeb0d5b6a36cd52abf2753e 100644 (file)
@@ -1,7 +1,14 @@
+Sun Mar 28 21:22:30 1993  Jim Meyering  (meyering@comco.com)
+
+       * Makefile.in (dist): Use cp when hard link fails.
+       Use tar-1.11.2's -z option instead of -Z.
+
+       * makepath.c [index]: Don't redefine.
+
 Fri Mar 26 00:32:39 1993  Jim Meyering  (meyering@comco.com)
 
-       * df.c (add_omitted_fs_type, fs_to_omit): New functions adding
-       support for --exclude-type option.  From Kaveh R. Ghazi
+       * df.c (add_excluded_fs_type, excluded_fs_type): New functions adding
+       support for --exclude-type option.  Derived from Kaveh R. Ghazi
        <ghazi@caip.rutgers.edu>.
 
        * ls.c (decode_switches, print_long_format): New option: --full-time.
@@ -57,6 +64,35 @@ Wed Dec  2 12:28:10 1992  Jim Meyering  (meyering@idefix.comco.com)
        struct option to use new macros from getopt.h: no_argument,
        required_argument, and optional_argument.
 
+Tue Nov 24 07:54:45 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+       * system.h: Use HAVE_FCNTL_H instead of USG.
+
+       * xgetcwd.c: Use HAVE_GETCWD instead of USG.
+
+       * backupfile.c, basename.c, dirname.c, idcache.c, makepath.c,
+       mountlist.c, stripslash.c, userspec.c, xstrdup.c, system.h:
+       Use HAVE_STRING_H instead of USG.
+
+       * system.h: Use SYSDIR and NDIR instead of USG.
+       Define direct as dirent, not vice-versa.
+       * ls.c, rm.c, backupfile.c, savedir.c: Use `struct dirent',
+       not `struct direct'.
+
+Thu Nov 12 23:10:56 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+       * system.h: If dirent is #defined, don't define direct as dirent;
+       for Sinix.  Derived from Heinfried Korn (korn@med-in.uni-sb.de).
+
+Mon Nov  9 14:13:57 1992  Jim Meyering  (meyering@idefix.comco.com)
+
+       * fsusage.c (adjust_blocks): Reverse Oct 31 change --
+       the function is more readable than the macro.
+
+       * All files in src: Make all functions and extern variables static.
+       Make all longopts arrays const as well as static.
+       Make a couple statically initialized aggregates `const.'
+
 Sat Oct 31 16:32:17 1992  Jim Meyering  (meyering@idefix.comco.com)
 
        * fsusage.c (adjust_blocks): Convert to a macro.  The static
@@ -68,6 +104,11 @@ Sat Oct 31 16:32:17 1992  Jim Meyering  (meyering@idefix.comco.com)
        * dd.c (swab_buffer): Fix typo that incremented pointer instead
        of counter.  Add braces around static struct initializers.
 
+Fri Oct 30 11:40:58 1992  David J. MacKenzie  (djm@goldman.gnu.ai.mit.edu)
+
+       * ln.c, cp.c (main): Make -s on systems without symlinks an
+       error, not a warning.
+
 Thu Oct 29 14:57:21 1992  David J. MacKenzie  (djm@kropotkin.gnu.ai.mit.edu)
 
        * Version 3.4.
index c1415b7902585522e7101e33486dab155b315f80..9eef69c9fbd4c04c506226436e2f1ab12505be21 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -220,8 +220,7 @@ main (argc, argv)
 #ifdef S_ISLNK
          flag_symbolic_link = 1;
 #else
-         error (0, 0, "symbolic links not supported; making hard links");
-         flag_hard_link = 1;
+         error (1, 0, "symbolic links are not supported on this system");
 #endif
          break;
 
index 88f7d043dbd4d2525dd3e2bcdecbe8ce256a09db..994987f3f55b4b7199610be51295d642da1ebc49 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -442,7 +442,7 @@ usage ()
 {
   fprintf (stderr, "\
 Usage: %s [-aikPv] [-t fstype] [-x fstype] [--all] [--inodes]\n\
-\t[--type fstype] [--exclude-type fstype] [--kilobytes] [--portability]\n\
+\t[--type=fstype] [--exclude-type=fstype] [--kilobytes] [--portability]\n\
 \t[path...]\n",
           program_name);
   exit (1);
index ea8d3b2f3f278933c55c5be6262c21f4ce98ad5d..3907399ee4240fb0dd6a3b9ef98b33c6cdbf4a4b 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -122,7 +122,7 @@ main (argc, argv)
 #ifdef S_ISLNK
          symbolic_link = 1;
 #else
-         error (0, 0, "symbolic links not supported; making hard links");
+         error (1, 0, "symbolic links are not supported on this system");
 #endif
          break;
        case 'v':
index c26b91f92f924e848007d3bf9f7df6eba0e130ea..38cdd252d42ae8c2350f614dd64a5063c07e7f24 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -214,7 +214,7 @@ enum time_type
 
 static enum time_type time_type;
 
-/* print the full time, -T, otherwise the standard unix heuristics. */
+/* print the full time, -f, otherwise the standard unix heuristics. */
 
 int full_time;
 
@@ -777,7 +777,7 @@ print_dir (name, realname)
      char *realname;
 {
   register DIR *reading;
-  register struct direct *next;
+  register struct dirent *next;
   register int total_blocks = 0;
 
   errno = 0;
@@ -852,7 +852,7 @@ add_ignore_pattern (pattern)
 
 static int
 file_interesting (next)
-     register struct direct *next;
+     register struct dirent *next;
 {
   register struct ignore_pattern *ignore;
 
index 7e711dd99705df0243571e8e8aa039154d12841b..4b6c2d2ebd1254e95262ca840f7d2972c243b682 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -134,7 +134,7 @@ main (argc, argv)
       if (ignore_missing_files)
        exit (0);
       else
-    usage ();
+       usage ();
     }
 
   stdin_tty = isatty (0);
@@ -320,7 +320,7 @@ clear_directory (statp)
      struct stat *statp;
 {
   DIR *dirp;
-  struct direct *dp;
+  struct dirent *dp;
   char *name_space;            /* Copy of directory's filenames. */
   char *namep;                 /* Current entry in `name_space'. */
   unsigned name_size;          /* Bytes allocated for `name_space'. */