| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- --- src/stat.c.orig Sun Dec 1 10:48:21 2002
- +++ src/stat.c Sun Jan 12 11:30:01 2003
- @@ -43,6 +43,12 @@
- # endif
- #endif
-
- +/* FreeBSD 5.0 need this for struct statfs */
- +#if HAVE_SYS_MOUNT_H
- +# include <sys/param.h>
- +# include <sys/mount.h>
- +#endif
- +
- #include "system.h"
-
- #include "closeout.h"
- --- src/test.c.orig Mon Feb 10 10:19:09 2003
- +++ src/test.c Sun Feb 23 20:44:50 2003
- @@ -139,7 +139,7 @@
- /* Do the same thing access(2) does, but use the effective uid and gid. */
-
- static int
- -eaccess (char const *file, int mode)
- +my_eaccess (char const *file, int mode)
- {
- static int have_ids;
- static uid_t uid, euid;
- @@ -172,7 +172,7 @@
- return result;
- }
- #else
- -# define eaccess(F, M) euidaccess (F, M)
- +# define my_eaccess(F, M) euidaccess (F, M)
- #endif
-
- /* Increment our position in the argument list. Check that we're not
- @@ -635,17 +635,17 @@
-
- case 'r': /* file is readable? */
- unary_advance ();
- - value = -1 != eaccess (argv[pos - 1], R_OK);
- + value = -1 != my_eaccess (argv[pos - 1], R_OK);
- return (TRUE == value);
-
- case 'w': /* File is writable? */
- unary_advance ();
- - value = -1 != eaccess (argv[pos - 1], W_OK);
- + value = -1 != my_eaccess (argv[pos - 1], W_OK);
- return (TRUE == value);
-
- case 'x': /* File is executable? */
- unary_advance ();
- - value = -1 != eaccess (argv[pos - 1], X_OK);
- + value = -1 != my_eaccess (argv[pos - 1], X_OK);
- return (TRUE == value);
-
- case 'O': /* File is owned by you? */
- --- src/nice.c.orig 2003-08-10 19:43:35.000000000 +0200
- +++ src/nice.c 2003-09-10 20:03:27.000000000 +0200
- @@ -23,6 +23,7 @@
- #include <assert.h>
-
- #include <getopt.h>
- +#include <sys/time.h>
- #include <sys/types.h>
-
- #include "system.h"
- --- src/date.c.orig 2004-02-05 10:36:07.000000000 +0100
- +++ src/date.c 2004-03-24 15:22:04.000000000 +0100
- @@ -299,7 +299,8 @@
- int n_args;
- int status;
- int option_specified_date;
- - char const *short_options = (posix2_version () < 200112
- + char const *short_options = (posix2_version () < 200112 ||
- + !getenv ("POSIXLY_CORRECT")
- ? COMMON_SHORT_OPTIONS "I::"
- : COMMON_SHORT_OPTIONS "I:");
-
- --- src/expand.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/expand.c 2004-03-24 15:23:21.000000000 +0100
- @@ -406,6 +406,8 @@
- }
-
- if (obsolete_tablist && 200112 <= posix2_version ())
- + if (obsolete_tablist && 200112 <= posix2_version () &&
- + getenv ("POSIXLY_CORRECT"))
- {
- error (0, 0, _("`-LIST' option is obsolete; use `-t LIST'"));
- usage (EXIT_FAILURE);
- --- src/fold.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/fold.c 2004-03-24 15:26:20.000000000 +0100
- @@ -270,6 +270,7 @@
- memcpy (s + 2, a + 1, len_a);
- argv[i] = s;
- if (200112 <= posix2_version ())
- + if (200112 <= posix2_version () && getenv ("POSIXLY_CORRECT"))
- {
- error (0, 0, _("`%s' option is obsolete; use `%s'"), a, s);
- usage (EXIT_FAILURE);
- --- src/head.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/head.c 2004-03-24 15:27:04.000000000 +0100
- @@ -996,6 +996,7 @@
- }
-
- if (200112 <= posix2_version ())
- + if (200112 <= posix2_version () && getenv ("POSIXLY_CORRECT"))
- {
- error (0, 0, _("`-%s' option is obsolete; use `-%c %.*s%.*s%s'"),
- n_string, count_lines ? 'n' : 'c',
- --- src/nice.c.orig 2004-01-22 00:23:24.000000000 +0100
- +++ src/nice.c 2004-03-24 15:28:51.000000000 +0100
- @@ -107,7 +107,7 @@
- char *s = argv[i];
-
- if (s[0] == '-' && s[1] == '-' && ISDIGIT (s[2])
- - && posix2_version () < 200112)
- + && (posix2_version () < 200112 || !getenv ("POSIXLY_CORRECT")))
- {
- if (xstrtol (&s[2], NULL, 10, &adjustment, "") != LONGINT_OK)
- error (EXIT_FAIL, 0, _("invalid option `%s'"), s);
- @@ -118,7 +118,7 @@
- }
- else if (s[0] == '-'
- && (ISDIGIT (s[1]) || (s[1] == '+' && ISDIGIT (s[2])))
- - && posix2_version () < 200112)
- + && (posix2_version () < 200112 || !getenv ("POSIXLY_CORRECT")))
- {
- if (s[1] == '+')
- ++s;
- --- src/od.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/od.c 2004-03-24 15:29:59.000000000 +0100
- @@ -1621,7 +1621,8 @@
- int width_specified = 0;
- int n_failed_decodes = 0;
- int err;
- - char const *short_options = (posix2_version () < 200112
- + char const *short_options = (posix2_version () < 200112 ||
- + !getenv ("POSIXLY_CORRECT")
- ? COMMON_SHORT_OPTIONS "s::w::"
- : COMMON_SHORT_OPTIONS "s:w:");
-
- --- src/pr.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/pr.c 2004-03-24 15:30:48.000000000 +0100
- @@ -854,7 +854,8 @@
- int old_w = FALSE;
- int old_s = FALSE;
- char **file_names;
- - char const *short_options = (posix2_version () < 200112
- + char const *short_options = (posix2_version () < 200112 ||
- + !getenv ("POSIXLY_CORRECT")
- ? COMMON_SHORT_OPTIONS "S::"
- : COMMON_SHORT_OPTIONS "S:");
-
- --- src/sort.c.orig 2004-02-17 11:47:35.000000000 +0100
- +++ src/sort.c 2004-03-24 15:31:54.000000000 +0100
- @@ -2219,7 +2219,7 @@
- bool mergeonly = false;
- int nfiles = 0;
- bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
- - bool obsolete_usage = (posix2_version () < 200112);
- + bool obsolete_usage = (posix2_version () < 200112) || !posixly_correct;
- char const *short_options = (obsolete_usage
- ? COMMON_SHORT_OPTIONS "y::"
- : COMMON_SHORT_OPTIONS "y:");
- --- src/split.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/split.c 2004-03-24 15:32:48.000000000 +0100
- @@ -498,6 +498,8 @@
- }
-
- if (digits_optind && 200112 <= posix2_version ())
- + if (digits_optind && 200112 <= posix2_version ()
- + && getenv ("POSIXLY_CORRECT"))
- {
- char buffer[INT_BUFSIZE_BOUND (uintmax_t)];
- char const *a = umaxtostr (n_units, buffer);
- --- src/tail.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/tail.c 2004-03-24 15:33:32.000000000 +0100
- @@ -1364,7 +1364,7 @@
- if (argc < 2)
- return 0;
-
- - obsolete_usage = (posix2_version () < 200112);
- + obsolete_usage = (posix2_version () < 200112) || !getenv ("POSIXLY_CORRECT");
-
- /* If P starts with `+' and the POSIX version predates 1003.1-2001,
- or if P starts with `-N' (where N is a digit), or `-l', then it
- --- src/touch.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/touch.c 2004-03-24 15:34:28.000000000 +0100
- @@ -385,7 +385,7 @@
- /* The obsolete `MMDDhhmm[YY]' form is valid IFF there are
- two or more non-option arguments. */
- if (!date_set && 2 <= argc - optind && !STREQ (argv[optind - 1], "--")
- - && posix2_version () < 200112)
- + && (posix2_version () < 200112 || !getenv ("POSIXLY_CORRECT")))
- {
- if (posixtime (&newtime.tv_sec, argv[optind], PDS_TRAILING_YEAR))
- {
- --- src/unexpand.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/unexpand.c 2004-03-24 15:35:09.000000000 +0100
- @@ -461,7 +461,8 @@
- }
- }
-
- - if (obsolete_tablist && 200112 <= posix2_version ())
- + if (obsolete_tablist && 200112 <= posix2_version ()
- + && getenv ("POSIXLY_CORRECT"))
- {
- error (0, 0,
- _("`-LIST' option is obsolete; use `--first-only -t LIST'"));
- --- src/uniq.c.orig 2004-01-21 23:27:02.000000000 +0100
- +++ src/uniq.c 2004-03-24 15:36:59.000000000 +0100
- @@ -446,7 +446,7 @@
- {
- unsigned long int size;
- if (optarg[0] == '+'
- - && posix2_version () < 200112
- + && (posix2_version () < 200112 || !getenv ("POSIXLY_CORRECT"))
- && xstrtoul (optarg, NULL, 10, &size, "") == LONGINT_OK
- && size <= SIZE_MAX)
- skip_chars = size;
- @@ -531,7 +531,8 @@
- }
- }
-
- - if (obsolete_skip_fields && 200112 <= posix2_version ())
- + if (obsolete_skip_fields && 200112 <= posix2_version ()
- + && getenv ("POSIXLY_CORRECT"))
- {
- error (0, 0, _("`-%lu' option is obsolete; use `-f %lu'"),
- (unsigned long) skip_fields, (unsigned long) skip_fields);
- Index: doc/Makefile.in
- --- doc/Makefile.in.orig 2004-03-11 09:57:59.000000000 +0100
- +++ doc/Makefile.in 2004-04-21 15:11:16.000000000 +0200
- @@ -319,29 +319,6 @@
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
- .texi.info:
- - restore=: && \
- - backupdir="$(am__leading_dot)am$$$$" && \
- - am__cwd=`pwd` && cd $(srcdir) && \
- - rm -rf $$backupdir && mkdir $$backupdir && \
- - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- - if test -f $$f; then \
- - mv $$f $$backupdir; \
- - restore=mv; \
- - fi; \
- - done; \
- - cd "$$am__cwd"; \
- - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- - -o $@ $<; \
- - then \
- - rc=0; \
- - cd $(srcdir); \
- - else \
- - rc=$$?; \
- - cd $(srcdir) && \
- - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- - fi; \
- - rm -rf $$backupdir; \
- - exit $$rc
-
- .texi.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|