Compare commits

...

1991 Commits
v5.90 ... v6.5

Author SHA1 Message Date
Jim Meyering
497a5cf465 Version 6.5.
* NEWS: Record release date.  Remove "-cvs" suffix.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-11-19 10:58:55 +01:00
Jim Meyering
1efc5bda6c "ln --backup f f" now produces a sensible diagnostic 2006-11-18 20:19:16 +01:00
Jim Meyering
0cafba44bb "ln --backup f f" produces a misleading diagnostic:
ln: creating hard link `f' => `f': No such file or directory
* src/ln.c (do_link): Give a better diagnostic in this unusual case.
(do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
* tests/ln/Makefile.am (TESTS): Add hard-backup.
* tests/ln/hard-backup: New test for the above.
2006-11-18 20:00:39 +01:00
Paul Eggert
1a0333565f * bootstrap.conf (gnulib_modules): Add sys_stat, since we use it directly too.
* lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
* m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
* src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
Omit unnecessary parenthesization of args.
* src/od.c (EQUAL_BLOCKS): Likewise.
* src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
2006-11-16 19:51:23 +01:00
Jim Meyering
a73fdeb2ce * tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
automake we're skipping this test), and give a diagnostic to tell
the user the same thing.  Reported by Mike Grayson.
2006-11-16 10:05:36 +01:00
Jim Meyering
751f6acf54 change log date to be today's 2006-11-16 09:58:49 +01:00
Ralf Wildenhues
8b139ff78c Arrange to install manpages only for tools that are installed.
* man/Makefile.am (dist_man_MANS): Replace all optional manpages
with `$(MAN)', computed at configure time; also, list them ...
(optional_mans): ... in this new variable.
(max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
2006-11-16 09:57:34 +01:00
Jim Meyering
b6b438c45d * src/csplit.c (load_buffer): Plug an inconsequential leak. 2006-11-16 09:16:08 +01:00
Jim Meyering
fc9b802e3d Help valgrind see that there is no leak in dd.c.
* src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
so we need not free them at all.  This is easier than freeing
both buffers at each of the early "return"s.
2006-11-16 09:15:47 +01:00
Jim Meyering
e189a79efd * .x-po-check: Exclude gl/ files. Otherwise, po-check would
complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
2006-11-15 10:37:02 +01:00
Jim Meyering
56206ccb80 * gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
remove the now-unnecessary use of AC_LIBSOURCES.
2006-11-14 14:09:34 +01:00
Jim Meyering
3ef2f939f7 Adapt to new version of gnulib-tool.
* gl/modules/root-dev-ino: New file.
* lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
* gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
* m4/root-dev-ino.m4: Move this file ...
* gl/m4/root-dev-ino.m4: ... to here.
* bootstrap.conf (gnulib_modules): Add root-dev-ino.
2006-11-14 14:02:18 +01:00
Jim Meyering
1b00a69ff2 * readlink-stub.c, lstat-stub.c: Remove now-unused files. 2006-11-14 09:38:32 +01:00
Jim Meyering
7932d2e2d4 * src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
From Paul Eggert.
2006-11-13 19:15:43 +01:00
Jim Meyering
2061f04847 Plug another technically-unimportant leak in sort.
* src/sort.c (main): Don't allocate memory for each new key here.
(insertkey): Allocate memory for each key here, instead.
(key_init): Rename from new_key.  Don't allocate.
2006-11-13 15:19:22 +01:00
Jim Meyering
d5d00c7f9f * src/sort.c (main): Plug a tiny memory leak.
Move declaration of local "minus" down to be nearer point of use.
2006-11-13 15:06:15 +01:00
Jim Meyering
84268dae4e More automatically-added ignorables. 2006-11-12 22:45:14 +01:00
Jim Meyering
78a1d22aa0 * tests/du/Makefile.am (TESTS): Add inacc-dest. 2006-11-12 19:58:58 +01:00
Jim Meyering
597bfeb851 * NEWS: Mention this bug fix. 2006-11-12 19:13:32 +01:00
Jim Meyering
c24e93d926 du would exit early, when encountering an inaccessible directory
Reported by Mike Frysinger, in
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
* tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
* tests/chgrp/no-x: Remove the "fts_read failed: ..."
diagnostic from the expected output when using native fdopendir.
* tests/chmod/no-x: Likewise.
* tests/du/no-x: Likewise.
2006-11-12 18:42:24 +01:00
Jim Meyering
75be540f7d * Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
for xalloc.h itself.
2006-11-12 18:41:01 +01:00
Jim Meyering
28c7ef509e Avoid false-positive when testing via valgrind.
* tests/mv/atomic: Grep strace output for a more specific pattern
than just "unlink", since that got a false positive when testing
under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
* tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
2006-11-12 08:22:46 +01:00
Jim Meyering
7c96936a04 update .cvsignore/.gitignore files 2006-10-30 09:10:56 +01:00
Jim Meyering
e24ce7c58d * Makefile.maint (patch-check): Make it easier to regenerate
the src/c99-to-c89.diff file.  E.g., I do this:
make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
2006-10-28 18:23:30 +02:00
Jim Meyering
876e46bce7 * src/c99-to-c89.diff: Update to reflect new offsets in rm.c. 2006-10-28 18:21:13 +02:00
Jim Meyering
a0db0def2d * coreutils.texi (wc invocation): When giving the order in which
the various "counts" are listed, also mention "maximum line length".
Prompted by a report from Vincent LeFevre.
2006-10-28 18:19:05 +02:00
Jim Meyering
0766fb8b54 * src/system.h (ftello): Add a compile-time check for the highly
unlikely condition of off_t narrower than long int, rather than
handling it at run time.  Based on a patch from Paul Eggert.
2006-10-26 15:16:41 +02:00
Jim Meyering
b40b5b6917 Avoid a shell bug in Tru64 4.0 sh's handling of double-quoted strings.
[patch by Paul Eggert]

* tests/chmod/c-option: When double-quoting part of a word, prefer
to double-quote the whole word.  This is a bit easier to read (at
least for me), and in some cases it avoids a shell bug with Tru64
4.0 sh reported by Nelson H. F. Beebe.  For example, instead of
"$abs_srcdir"/../setgid-check we now write
"$abs_srcdir/../setgid-check".

* tests/cp/cp-parents: Likewise.
* tests/du/inaccessible-cwd: Likewise.
* tests/du/long-from-unreadable: Likewise.
* tests/install/basic-1: Likewise.
* tests/install/trap: Likewise.
* tests/misc/close-stdout: Likewise.
* tests/mkdir/concurrent-1: Likewise.
* tests/mkdir/p-1: Likewise.
* tests/mkdir/p-3: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/readlink/can-e: Likewise.
* tests/readlink/can-f: Likewise.
* tests/readlink/can-m: Likewise.
* tests/rm/inaccessible: Likewise.
* tests/rm/unread3: Likewise.
* tests/touch/no-create-missing: Likewise.

* lib/.cvsignore: Add uinttostr.c.
2006-10-26 11:03:30 +02:00
Jim Meyering
95954ad583 Portability to Tru64 V4.0.
* src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
Define inline replacement function.
This (along with a yesterday's fix for autoconf's
_AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
now builds once more on Tru64 V4.0.  Reported by Nelson Beebe.
2006-10-25 11:47:06 +02:00
Jim Meyering
e81a82b74f * src/cat.c (infile): Add "const" to declaration.
* src/csplit.c (prefix): Likewise.
* src/printf.c (cfcc_msg): Likewise.
* src/tail.c (valid_file_spec): Likewise.
* src/cut.c (cut_file): Likewise, for a parameter.
* src/expr.c (str_value): Likewise.
* src/fold.c (fold_file): Likewise.
* src/pr.c (init_header): Likewise.
* src/dircolors.c (dc_parse_stream): Likewise, for a local.
* src/tr.c (make_printable_str): Likewise.
* src/nl.c (body_type, header_type, footer_type, current_type):
(separator_str, build_type_arg, nl_file): Likewise, for many.
* src/paste.c (main): Don't assign a read-only string to 'optarg'.
* src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
2006-10-25 01:05:30 +02:00
Jim Meyering
3e9cc76189 * tests/sample-test: Update copyright year list to include only
the current year, since this is what I'll want in any new test.
2006-10-25 00:16:13 +02:00
Jim Meyering
693311a5c3 * src/c99-to-c89.diff: Update to reflect new offsets. 2006-10-25 00:14:51 +02:00
Jim Meyering
5e42576c01 new feature: rm accepts new option: --one-file-system
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
* src/remove.h (struct rm_options) [one_file_system]: New member.
* src/rm.c (rm_option_init): Initialize it.
(usage): Document the option.
* src/mv.c (rm_option_init): Likewise.
* src/remove.c (remove_dir): With --one-file-system and --recursive,
for each directory command line argument, do not affect a file system
different from that of the starting directory.  And give a diagnostic.
* src/rm.c (ONE_FILE_SYSTEM): New enum.
(main): Handle new option.
* tests/rm/one-file-system: Test the above.
* tests/rm/Makefile.am (TESTS): Add one-file-system.
* tests/Makefile.am (check-root): Add the rm/one-file-system
test to the list.
(EXTRA_DIST): Add other-fs-tmpdir.

* tests/mv/setup: Removed.  Renamed to...
* tests/other-fs-tmpdir: ...this new file.
* tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
* tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
* tests/mv/backup-is-src: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/to-symlink: Likewise.
* tests/mv/into-self-2: Likewise.

[doc/ChangeLog]
* coreutils.texi (rm invocation): Describe --one-file-system.
2006-10-25 00:01:33 +02:00
Jim Meyering
ba6b1acefd Don't let a failure in one test stop "make -k".
* tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
(check-root): Depend on them, rather than executing the five
commands in a single rule.  Reported by Greg Schafer.
2006-10-24 08:46:25 +02:00
Jim Meyering
a3c4e0b94c * Makefile.maint (alpha beta major): Use a better log message.
Suggested by Bob Proulx.
2006-10-23 18:51:29 +02:00
Jim Meyering
7e4eef7e40 * tests/misc/pwd-long: Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
clean-up code isn't run.
2006-10-23 12:22:15 +02:00
Jim Meyering
a002111341 * tests/misc/pwd-long: Undo last change, since it made Perl invoke
pwd via a shell.  Instead, ensure that the absolute name of the
pwd binary consists solely of reasonable characters.
2006-10-23 11:52:48 +02:00
Jim Meyering
0fdbf2e8c7 * NEWS: Add a line for 6.5-cvs.
* configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
2006-10-23 07:59:04 +02:00
Jim Meyering
9b17e1d7d4 . 2006-10-22 23:55:14 +02:00
Jim Meyering
7054512f14 Remove -cvs suffix here, too. 2006-10-22 23:41:05 +02:00
Jim Meyering
479648040d add snprintf-related files to .gitignore 2006-10-22 23:39:45 +02:00
Jim Meyering
0c0121ed20 Version 6.4.
* NEWS: Record the 6.4 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-10-22 22:21:26 +02:00
Jim Meyering
33d52dbc43 * Makefile.maint: Complete the adaptation to function with a working
directory that is using git (rather than cvs) for version control.
2006-10-22 22:16:37 +02:00
Jim Meyering
9b34202141 * tests/chmod/c-option: Double-quote instances of `$abs_srcdir'.
* tests/cp/cp-parents: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
2006-10-22 22:12:13 +02:00
Jim Meyering
2457af43cf * tests/sample-test: Quote variables containing absolute build
tree paths.  In the cleanup trap, make sure `cd' succeeds before
`chmod'ing and `rm'ing the temporary files.
* tests/chgrp/basic: Likewise.
* tests/chgrp/deref: Likewise.
* tests/chgrp/no-x: Likewise.
* tests/chgrp/posix-H: Likewise.
* tests/chgrp/recurse: Likewise.
* tests/chmod/c-option: Likewise.
* tests/chmod/equal-x: Likewise.
* tests/chmod/equals: Likewise.
* tests/chmod/inaccessible: Likewise.
* tests/chmod/no-x: Likewise.
* tests/chmod/octal: Likewise.
* tests/chmod/setgid: Likewise.
* tests/chmod/umask-x: Likewise.
* tests/chmod/usage: Likewise.
* tests/chown/basic: Likewise.
* tests/chown/deref: Likewise.
* tests/chown/separator: Likewise.
* tests/cp/acl: Likewise.
* tests/cp/backup-1: Likewise.
* tests/cp/backup-dir: Likewise.
* tests/cp/backup-is-src: Likewise.
* tests/cp/cp-HL: Likewise.
* tests/cp/cp-deref: Likewise.
* tests/cp/cp-i: Likewise.
* tests/cp/cp-mv-backup: Likewise.
* tests/cp/cp-parents: Likewise.
* tests/cp/deref-slink: Likewise.
* tests/cp/dir-rm-dest: Likewise.
* tests/cp/dir-slash: Likewise.
* tests/cp/dir-vs-file: Likewise.
* tests/cp/fail-perm: Likewise.
* tests/cp/into-self: Likewise.
* tests/cp/link: Likewise.
* tests/cp/link-no-deref: Likewise.
* tests/cp/link-preserve: Likewise.
* tests/cp/no-deref-link1: Likewise.
* tests/cp/no-deref-link2: Likewise.
* tests/cp/no-deref-link3: Likewise.
* tests/cp/perm: Likewise.
* tests/cp/preserve-2: Likewise.
* tests/cp/r-vs-symlink: Likewise.
* tests/cp/same-file: Likewise.
* tests/cp/slink-2-slink: Likewise.
* tests/cp/sparse: Likewise.
* tests/cp/special-bits: Likewise.
* tests/cp/src-base-dot: Likewise.
* tests/cp/symlink-slash: Likewise.
* tests/dd/not-rewound: Likewise.
* tests/dd/skip-seek2: Likewise.
* tests/dd/unblock-sync: Likewise.
* tests/du/2g: Likewise.
* tests/du/8gb: Likewise.
* tests/du/basic: Likewise.
* tests/du/deref: Likewise.
* tests/du/deref-args: Likewise.
* tests/du/exclude: Likewise.
* tests/du/fd-leak: Likewise.
* tests/du/hard-link: Likewise.
* tests/du/inaccessible-cwd: Likewise.
* tests/du/long-from-unreadable: Likewise.
* tests/du/long-sloop: Likewise.
* tests/du/no-deref: Likewise.
* tests/du/no-x: Likewise.
* tests/du/restore-wd: Likewise.
* tests/du/slash: Likewise.
* tests/du/slink: Likewise.
* tests/du/trailing-slash: Likewise.
* tests/du/two-args: Likewise.
* tests/fmt/long-line: Likewise.
* tests/install/basic-1: Likewise.
* tests/install/create-leading: Likewise.
* tests/install/d-slashdot: Likewise.
* tests/install/trap: Likewise.
* tests/ln/misc: Likewise.
* tests/ln/target-1: Likewise.
* tests/ls/color-dtype-dir: Likewise.
* tests/ls/dangle: Likewise.
* tests/ls/dired: Likewise.
* tests/ls/file-type: Likewise.
* tests/ls/follow-slink: Likewise.
* tests/ls/infloop: Likewise.
* tests/ls/inode: Likewise.
* tests/ls/m-option: Likewise.
* tests/ls/no-arg: Likewise.
* tests/ls/recursive: Likewise.
* tests/ls/rt-1: Likewise.
* tests/ls/stat-dtype: Likewise.
* tests/ls/stat-failed: Likewise.
* tests/ls/stat-vs-dirent: Likewise.
* tests/misc/cat-proc: Likewise.
* tests/misc/close-stdout: Likewise.
* tests/misc/csplit: Likewise.
* tests/misc/date-sec: Likewise.
* tests/misc/false-status: Likewise.
* tests/misc/head-c: Likewise.
* tests/misc/head-pos: Likewise.
* tests/misc/mknod: Likewise.
* tests/misc/nl: Likewise.
* tests/misc/nohup: Likewise.
* tests/misc/pathchk1: Likewise.
* tests/misc/printf: Likewise.
* tests/misc/printf-hex: Likewise.
* tests/misc/pwd-long: Likewise.
* tests/misc/shuf: Likewise.
* tests/misc/sort-rand: Likewise.
* tests/misc/split-a: Likewise.
* tests/misc/split-fail: Likewise.
* tests/misc/split-l: Likewise.
* tests/misc/stat-fmt: Likewise.
* tests/misc/tac-continue: Likewise.
* tests/misc/wc-files0: Likewise.
* tests/mkdir/concurrent-1: Likewise.
* tests/mkdir/p-1: Likewise.
* tests/mkdir/p-2: Likewise.
* tests/mkdir/p-3: Likewise.
* tests/mkdir/p-slashdot: Likewise.
* tests/mkdir/p-thru-slink: Likewise.
* tests/mkdir/p-v: Likewise.
* tests/mkdir/parents: Likewise.
* tests/mkdir/perm: Likewise.
* tests/mkdir/t-slash: Likewise.
* tests/mv/acl: Likewise.
* tests/mv/atomic: Likewise.
* tests/mv/backup-dir: Likewise.
* tests/mv/childproof: Likewise.
* tests/mv/diag: Likewise.
* tests/mv/dir-file: Likewise.
* tests/mv/dir2dir: Likewise.
* tests/mv/dup-source: Likewise.
* tests/mv/hard-2: Likewise.
* tests/mv/hard-3: Likewise.
* tests/mv/hard-4: Likewise.
* tests/mv/hard-link-1: Likewise.
* tests/mv/hard-verbose: Likewise.
* tests/mv/i-2: Likewise.
* tests/mv/i-3: Likewise.
* tests/mv/i-4: Likewise.
* tests/mv/i-5: Likewise.
* tests/mv/i-link-no: Likewise.
* tests/mv/into-self-4: Likewise.
* tests/mv/leak-fd: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/no-target-dir: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/part-hardlink: Likewise.
* tests/mv/part-rename: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mv/partition-perm: Likewise.
* tests/mv/perm-1: Likewise.
* tests/mv/reply-no: Likewise.
* tests/mv/trailing-slash: Likewise.
* tests/mv/update: Likewise.
* tests/od/od-N: Likewise.
* tests/od/x8: Likewise.
* tests/readlink/can-e: Likewise.
* tests/readlink/can-f: Likewise.
* tests/readlink/can-m: Likewise.
* tests/readlink/rl-1: Likewise.
* tests/rm/cycle: Likewise.
* tests/rm/dangling-symlink: Likewise.
* tests/rm/deep-1: Likewise.
* tests/rm/dir-no-w: Likewise.
* tests/rm/dir-nonrecur: Likewise.
* tests/rm/dot-rel: Likewise.
* tests/rm/empty-inacc: Likewise.
* tests/rm/f-1: Likewise.
* tests/rm/fail-2eperm: Likewise.
* tests/rm/hash: Likewise.
* tests/rm/i-1: Likewise.
* tests/rm/i-no-r: Likewise.
* tests/rm/ignorable: Likewise.
* tests/rm/inaccessible: Likewise.
* tests/rm/interactive-always: Likewise.
* tests/rm/interactive-once: Likewise.
* tests/rm/ir-1: Likewise.
* tests/rm/isatty: Likewise.
* tests/rm/no-give-up: Likewise.
* tests/rm/r-1: Likewise.
* tests/rm/r-2: Likewise.
* tests/rm/r-3: Likewise.
* tests/rm/r-4: Likewise.
* tests/rm/readdir-bug: Likewise.
* tests/rm/rm1: Likewise.
* tests/rm/rm2: Likewise.
* tests/rm/rm3: Likewise.
* tests/rm/rm4: Likewise.
* tests/rm/rm5: Likewise.
* tests/rm/sunos-1: Likewise.
* tests/rm/unread2: Likewise.
* tests/rm/unread3: Likewise.
* tests/rmdir/fail-perm: Likewise.
* tests/rmdir/t-slash: Likewise.
* tests/shred/exact: Likewise.
* tests/shred/remove: Likewise.
* tests/sum/sysv: Likewise.
* tests/tail-2/append-only: Likewise.
* tests/tail-2/assert: Likewise.
* tests/tail-2/assert-2: Likewise.
* tests/tail-2/big-4gb: Likewise.
* tests/tail-2/fflush: Likewise.
* tests/tail-2/infloop-1: Likewise.
* tests/tail-2/proc-ksyms: Likewise.
* tests/tail-2/start-middle: Likewise.
* tests/tail-2/tail-n0f: Likewise.
* tests/tee/basic: Likewise.
* tests/tee/dash: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/no-create-missing: Likewise.
* tests/touch/not-owner: Likewise.
* tests/touch/obsolescent: Likewise.
* tests/touch/read-only: Likewise.
* tests/touch/relative: Likewise.
2006-10-22 19:37:31 +02:00
Jim Meyering
f5417daca0 ignore po/*.po; sort .gitignore files 2006-10-22 19:00:38 +02:00
Jim Meyering
b1289b8716 * NEWS: (cp --backup fix): Fix a typo. 2006-10-22 18:59:58 +02:00
Jim Meyering
dcf5b47708 * .gitignore: Remove some references to files in subdirectories.
* build-aux/.gitignore, doc/.gitignore, lib/.gitignore: New files.
* m4/.gitignore, po/.gitignore, src/.gitignore: Likewise.
2006-10-21 19:50:47 +00:00
Jim Meyering
46775398f2 * src/copy.c (copy_internal): Add a comment saying why we prefer
mknod over mkfifo.
2006-10-21 07:16:19 +00:00
Jim Meyering
a75684d6ea Enable an fts optimization (call lstat only for directories,
on some file system types) also with the --preserve-root option
of chown or chgrp.
* src/chown-core.c (change_file_owner): Compare fts_statp-based
dev/ino against root dev/ino only for directories.
(chown_files): Don't let the root_dev_ino setting influence whether
we use FTS_NOSTAT: fts always sets *fts_statp for a directory.
2006-10-20 23:01:59 +00:00
Jim Meyering
86719b3cd8 * src/od.c (usage): Change description of default to use "-w16",
not the now-invalid "-w 16" syntax.  From Dan Jacobson.
2006-10-20 15:31:11 +00:00
Jim Meyering
8d8af1248d * bootstrap: Add names to each .gitignore file (if it exists)
as well as to .cvsignore.
2006-10-20 10:08:05 +00:00
Jim Meyering
64e75cf0ed . 2006-10-19 11:54:43 +00:00
Jim Meyering
e116c805bf * POTFILES.in: Also include lib/regcomp.c, since it too uses gettext. 2006-10-19 08:54:01 +00:00
Jim Meyering
76a7aea9b6 * Makefile.maint (po-check): This rule didn't detect the new use
of "gettext" (as opposed to the use of "_" everywhere else) in
lib/xstrtol.h.  Adjust the grep regexp so that now it does.
2006-10-19 08:51:27 +00:00
Jim Meyering
14f131ea57 typo 2006-10-19 08:49:30 +00:00
Paul Eggert
177913f5b8 * POTFILES.in: Add lib/xstrtol.h. 2006-10-19 07:53:42 +00:00
Paul Eggert
86823158eb * src/copy.c (copy_reg): Rewrite slightly to avoid duplicte code
when opening dst_name.
(copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
(SYSCALL) to test for failure in a system call.
2006-10-19 05:22:54 +00:00
Paul Eggert
81afea0110 * src/copy.c (copy_internal): Use mknod rather than mkfifo to copy
a fifo.  This preserves the special mode bits on Solaris 10, which
is compatible with what Solaris 10 cp -R does.
2006-10-18 22:33:06 +00:00
Paul Eggert
7bc17873e5 * src/copy.c (copy_internal): Remove redundant and confusing local
variable src_type.
2006-10-18 21:02:27 +00:00
Paul Eggert
11cf1d39f2 * src/copy.c (copy_internal): Don't pass mkdir a mode greater than
7777.  This matches historical 'cp' behavior and avoids some
(though not all) implementation-defined behavior of mkdir.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (copy_internal): Don't pass 'open' a mode greater
than 777.  This is required by POSIX.  It doesn't make any difference
in actual behavior on any host that I know of.
2006-10-18 20:56:38 +00:00
Jim Meyering
f594f1fb38 *** empty log message *** 2006-10-17 20:12:05 +00:00
Jim Meyering
a186e9eda6 * src/dd.c (usage): Use two spaces (not one) to separate the
"fdatasync" option string from its description, so help2man formats
the derived man page properly.  Reported by Samuel Thibault
in <http://bugs.debian.org/393649>.
2006-10-17 13:51:47 +00:00
Jim Meyering
d1ea87316f *** empty log message *** 2006-10-17 13:48:27 +00:00
Jim Meyering
8029cc8b5a * .x-sc_trailing_blank: Remove names of files that are no longer
version-controlled.
2006-10-16 20:20:03 +00:00
Paul Eggert
7a0f8b0487 * src/groups.sh (version): Reword message to match the other programs.
Problem reported by Eric Blake.
2006-10-16 16:53:22 +00:00
Paul Eggert
dd8398a3c6 [m4/ChangeLog]
* sha512.m4 (gl_SHA512): Add u64.h to AC_LIBSOURCES.
[lib/ChangeLog]
Port sha512sum to hosts where uintmax_t is only 32 bits, e.g.,
HP/Tandom NonStop OSS circa 2005 has 32-bit uintmax_t, 64-bit intmax_t.
* u64.h: New file.
* sha512.c (SWAP, sha512_init_ctx, sha384_init_ctx, sha512_read_ctx):
(sha384_read_ctx, sha512_conclude_ctx, sha512_process_bytes):
(sha512_round_constants, F2, F1, sha512_process_block):
(S0, S1, SS0, SS1, M, R):
Rewrite to use u64.h instead of assuming uint64_t.
* sha512.h: Include u64.h rather than stdint.h.
(rol64): Remove; moved to u64.h and renamed to u64rol.
2006-10-15 06:17:45 +00:00
Jim Meyering
443d509578 * Makefile.maint (headers_with_interesting_macro_defs): Define.
(.re-defmac, sc_always_defined_macros): New rules.
2006-10-14 12:17:24 +00:00
Jim Meyering
e0b2cb892a *** empty log message *** 2006-10-14 12:15:13 +00:00
Jim Meyering
ebcf61da0f * tests/cp/Makefile.am (TESTS): Add backup-dir. 2006-10-14 12:14:53 +00:00
Jim Meyering
1491ae9ceb * src/system.h (EXIT_FAILURE, EXIT_SUCCESS): Remove definitions.
Instead, include "exit.h".  This hereby retires the work-around for
"Sony NEWS-OS Release 4.0C"'s bug due to "#define EXIT_FAILURE 0".
2006-10-14 12:12:44 +00:00
Jim Meyering
f3fbb64189 * src/cksum.c (uint_fast32_t): Don't define.
Instead, include <stdint.h>.
2006-10-14 12:04:31 +00:00
Jim Meyering
32cfc1ffec clean up 2006-10-14 12:03:50 +00:00
Jim Meyering
46693ba15b * src/pinky.c: Don't include stat-macros.h; system.h already does it. 2006-10-14 12:02:14 +00:00
Jim Meyering
269263a5f7 * src/pinky.c (S_IWGRP): Don't define.
Instead, include "stat-macros.h".
2006-10-14 10:38:54 +00:00
Jim Meyering
34b35b1a3e [ChangeLog]
* Makefile.cfg: Remove cruft that's now handled via bootstrap.
* Makefile.maint: Likewise, remove these targets/rules/variables:
(local_updates, update, cvs-update, wget_files, get-targets): Remove.
(cvs_files, wget-update, automake_repo): Likewise.
Move the comment about cvsu to build-aux/vc-list-files,
where cvsu is actually used.
[build-aux/ChangeLog]
* vc-list-files: Add a comment about cvsu.
2006-10-14 09:51:58 +00:00
Jim Meyering
e2c177710a * Makefile.maint (cvs-update): Use $(CVS), not "cvs". 2006-10-14 09:39:34 +00:00
Jim Meyering
8a2e111207 * vc-list-files: Don't filter git-ls-files output through cut. 2006-10-14 09:31:27 +00:00
Jim Meyering
095c1c83eb Work also when the working directory (with e.g. coreutils sources)
is version controlled with git, rather than CVS.
* bootstrap (CVS_only_file): Test for the existence of README-cvs,
rather than CVS.
In messages and comments, say e.g., "checked-out sources",
rather than "CVS sources".
(version_controlled_file): New function.  Work for git as well as
for CVS.  Don't use grep's -q option.
(slurp): Call it here, in place of CVS-specific code.
2006-10-14 08:51:27 +00:00
Jim Meyering
0dc7f78986 * NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2
to dir1/dir2~.
* src/copy.c (copy_internal): Although we do create a backup of each
destination directory when in move mode, don't do that when copying.
Reported by Peter Breitenlohner, in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616>.
* tests/cp/backup-dir: New file.  Test for the above.
2006-10-14 05:20:27 +00:00
Jim Meyering
779168820b *** empty log message *** 2006-10-14 05:06:38 +00:00
Jim Meyering
965232b5b9 More chown/chgrp dereferencing-related fixes.
* src/chown-core.c (change_file_owner): Don't use fts_statp if
we're dereferencing symlinks.
Reverse conjuncts, so that we use dereference file_stats
(aka ent->fts_statp) only *after* we've confirmed that
chopt->affect_symlink_referent is true.  Otherwise, we might
use ent->fts_statp uninitialized.
Don't turn on FTS_NOSTAT when dereferencing symlinks.
* tests/chown/deref: Update the expected diagnostic, now that
this test case (trying to use "chown --dereference ..." on a
dangling symlink) takes a different code path.
2006-10-13 21:11:53 +00:00
Paul Eggert
5dea5d07cd Sync from Bison, as follows:
2006-10-01  Paul Eggert  <eggert@cs.ucla.edu>

Fix problems with translating English-language diagnostics.
* bootstrap: Fix bug introduced in recent bootstrap changes, with
respect to bison-runtime pot generation.  The YY_ stuff
wasn't being captured.
2006-10-13 19:07:21 +00:00
Jim Meyering
f2c088fa10 * NEWS: Mention the above. 2006-10-13 19:05:07 +00:00
Jim Meyering
dc9790379c * src/chown-core.c (change_file_owner): Use fstatat, not stat,
now that we're using fts_open with FTS_CWDFD.
* tests/chgrp/posix-H: Add --preserve-root to an invocation of
chgrp, to exercise the above fix.
2006-10-13 18:51:08 +00:00
Jim Meyering
8552234cb5 * src/du-tests: Clean up a little, though it's still not portable. 2006-10-13 15:25:37 +00:00
Jim Meyering
b985c478d6 * .vg-suppressions: Add 3 more for debian unstable. 2006-10-13 14:40:34 +00:00
Jim Meyering
1471e1e61f * tests/ls/Test.pm: Remove long-unused file.
Suggestions from Bruno Haible.
2006-10-13 14:16:39 +00:00
Jim Meyering
8dda1ae431 * Makefile.am (EXTRA_DIST): Add bootstrap.conf.
Suggestion from Bruno Haible.
2006-10-13 14:13:24 +00:00
Jim Meyering
c0b262550c * Makefile.am (libcoreutils_a_LIBADD): Append $(LIBOBJS),
to accommodate the latest version of gnulib-tool.
(libcoreutils_a_DEPENDENCIES): Likewise.
From Bruno Haible.
2006-10-12 21:13:24 +00:00
Jim Meyering
bad80a7223 * Makefile.am (THANKS-to-translators): Add missing $(srcdir).
(MAINTAINERCLEANFILES): Add .kludge-stamp.
* man/Makefile.am (MAINTAINERCLEANFILES): Typo $(dist_man_MANS)
instead of $(man_MANS).

2006-10-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2006-10-12 21:10:43 +00:00
Jim Meyering
9f70d6021b * configure.ac: Avoid compiler warnings about default return
type in function definitions and unused variables in tests.
* src/who.c (print_user) [HAVE_UT_HOST]: hostlen is only needed
if this is #defined.
2006-10-12 20:39:33 +00:00
Jim Meyering
5f60ffcfcf [ChangeLog]
* configure.ac: Reflect s/gl_MACROS/coreutils_MACROS/ renaming.
Call gl_INIT directly, rather than through the above.
[m4/ChangeLog]
* jm-macros.m4 (coreutils_MACROS): Rename from gl_MACROS, now that
most of the gnulib macros have migrated into gnulib.
Don't call gl_INIT here (now it's called from configure.ac, directly).
2006-10-12 20:37:02 +00:00
Paul Eggert
90224c6639 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
variable was sometimes used without being initialized.  This
messed up the installation of the INSTALL file in some cases.
2006-10-11 23:03:55 +00:00
Jim Meyering
8202f4d6d5 *** empty log message *** 2006-10-11 05:46:25 +00:00
Jim Meyering
e3e4f829a1 * src/ls.c (usage): Correct description of -s, --size.
It works even without -l.  Suggestion from Karl Berry.
2006-10-11 05:44:41 +00:00
Paul Eggert
e245a66054 * src/ls.c (quote_name): Use initializer rather than memset to
initialize an object to zero.  This is easier to read and is less
likely to introduce an runtime error due to a mixup.  It causes
gcc -W to issue a warning, but you can work around this by
appending -Wno-missing-field-initializers.
* src/pathchk.c (portable_chars_only): Likewise.
* src/shred.c (main): Likewise.
* src/stty.c (main): Likewise.
* src/tr.c (card_of_complement): Likewise.
* src/wc.c (wc): Likewise.
2006-10-10 22:57:07 +00:00
Paul Eggert
489ff7f0cd * src/sort.c (usage): Mention again that sort fields are origin 1. 2006-10-09 23:26:33 +00:00
Paul Eggert
2983bf7c85 * NEWS: Fix typo: iso-8602 -> iso-8601. Problem reported by
Bob Proulx.
2006-10-09 20:38:56 +00:00
Paul Eggert
34d0ffbce4 * bootstrap (usage, main program, symlink_to_gnulib): Add option
--copy.  Inspired by a suggestion from Bruno Haible.
2006-10-09 20:33:38 +00:00
Jim Meyering
6089facdc3 Avoid a compiler warning.
* src/pathchk.c (portable_chars_only): Initialize variable of type
mbstate_t via memset, rather than via '{0}'.  Patch from Bruno Haible.
2006-10-09 11:56:40 +00:00
Jim Meyering
181428d653 * jm-macros.m4 (gl_MACROS): Remove use of AC_CONFIG_LIBOBJ_DIR(lib).
It is no longer needed, and was causing dependencies to appear
in lib/lib/.deps, which provoked a "make distcheck" failure.
2006-10-07 15:53:03 +00:00
Paul Eggert
4b86e52050 Give credit to Lars Wendler. 2006-10-07 07:12:12 +00:00
Paul Eggert
dc52b433ef * src/install.c (make_ancestor): New arg COMPONENT.
* src/mkdir.c (make_ancestor): Likewise.
* tests/install/basic-1: Check for install -Dv bug.
2006-10-07 07:08:29 +00:00
Paul Eggert
4767fc607e Fix bug reported today by Mike Frysinger: mkdir -pv is logging the
wrong file name in some cases.
* src/install.c (struct install_options): New type.
(install_file_in_file_parents, main):
Use it instead of struct cp_options.
(process_dir): Remember the full name.
(announce_mkdir, make_ancestor): Use the full name in announcements.
* src/mkdir.c (struct mkdir_options): Add full_name member.
(make_ancestor): Use the full name in announcements.
(process_dir): Remember the full name.
* tests/mkdir/Makefile.am (TESTS): Add p-v.
* tests/mkdir/p-v: New file, to test this bug.
2006-10-06 20:44:31 +00:00
Jim Meyering
0fc6edb714 Avoid a compiler warning: const'ify and remove a cast.
* randread.c (struct randread_source) [handler]: Make parameter "const".
[handler_arg]: Add "const" attribute.
(randread_error): Make parameter "const".
(simple_new, randread_set_handler, randread_set_handler_arg): Likewise.
(randread_new): Remove now-unnecessary cast.
* randread.h: Adjust prototypes.
2006-10-06 14:37:48 +00:00
Jim Meyering
c620aeeb90 * src/c99-to-c89.diff: Update to reflect new offsets. 2006-10-06 14:24:09 +00:00
Paul Eggert
2a8efc2647 * src/chgrp.c: Don't include lchown.h; no longer needed.
* src/chown.c: Likewise.
2006-10-05 22:40:55 +00:00
Paul Eggert
08984eef49 * tests/ls/stat-dtype: Use a dynamic test to decide whether the
current file system has useful d_type info.
2006-10-05 22:10:08 +00:00
Paul Eggert
1fa3b50140 * src/dd.c (flags): noatime and nofollow now depend on
HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW, too.
(usage): Output info about noatime and nofollow only if
they are known to work.
* src/remove.c (AD_push): Inspect HAVE_WORKING_O_NOFOLLOW rather
than O_NOFOLLOW, when testing whether it's possible to avoid a
race condition reliably.
2006-10-05 21:39:12 +00:00
Jim Meyering
d78ad5cacc * tests/install/basic-1: Skip the latter part of this test if the
just-built dd binary is not readable.  Otherwise, this test would fail
when binaries were created as root.  Reported by Bauke Jan Douma in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8433>.
2006-10-05 08:43:24 +00:00
Paul Eggert
c5bccf11cc * src/system.h (ST_BLKSIZE): Ceiling at SIZE_MAX / 8 + 1, not at 4
MiB, since XFS hosts can legitimately have large values of
st_blksize.  Problem reported by Tony Ernst in
<http://savannah.gnu.org/bugs/?17903>.
2006-10-03 22:25:51 +00:00
Jim Meyering
1d4ac49f9d * NEWS: Update here, too. 2006-10-03 22:07:36 +00:00
Jim Meyering
a1da4a039d * src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
Paul Eggert pointed out that the specified file may exist,
in spite of such an errno value.
* tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long.
* tests/rm/ignore-name-too-long: Remove file.
2006-10-03 22:06:31 +00:00
Jim Meyering
184dcf2caf * tests/rm/fail-eperm: Report failure also if rm is terminated by
a signal.
2006-10-03 13:57:26 +00:00
Jim Meyering
41011fa81d * src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
and one in shred.c -- that were added before coreutils-6.3.
Reported by Michael Deutschmann.
2006-10-03 13:57:04 +00:00
Jim Meyering
2f7025ad2a * src/c99-to-c89.diff: Update to reflect new offsets. 2006-10-03 13:40:36 +00:00
Jim Meyering
9ac369c2bd * src/remove.c (remove_entry): With -f, exit successfully in spite
of a missing file under some very unusual conditions (with errno
being any of ENOENT, ENOTDIR, ENAMETOOLONG).
2006-10-03 13:32:55 +00:00
Jim Meyering
da9541f18e With --force (-f), rm no longer fails for ENOTDIR.
* src/remove.c (ignorable_missing): New function.
Use it everywhere, rather than open-coding the test.
Andreas Schwab reported the ENOTDIR problem.
(ignorable_missing): Similarly, don't fail for ENAMETOOLONG.
* NEWS: Mention the bug fix.
* tests/rm/ignorable: New file.  Test for the ENOTDIR case.
* tests/rm/ignore-name-too-long: New file. Test for ENAMETOOLONG.
* tests/rm/Makefile.am (TESTS): Add the new file names.
2006-10-03 13:13:09 +00:00
Jim Meyering
d2e7358a9b * NEWS: Add a line for 6.4-cvs.
* configure.ac (AC_INIT): Bump to 6.4 and add "-cvs" suffix.
2006-10-02 11:47:48 +00:00
Jim Meyering
d8086bc220 * bootstrap: Undo last change to this file, since now gnulib-tool
sticks with the automake default in generating dependencies.
2006-10-02 11:47:35 +00:00
Jim Meyering
2244cc1456 . 2006-09-30 17:37:25 +00:00
Jim Meyering
10688306fa Version 6.3.
* NEWS: Record the 6.3 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.

* NEWS: Mention Paul's Solaris 8 vs. 10 work-around.
2006-09-30 07:43:21 +00:00
Jim Meyering
af8862ae29 * src/c99-to-c89.diff: Update offsets. 2006-09-30 07:37:07 +00:00
Paul Eggert
37986655cf * .cvsignore: Add openat-proc.c. 2006-09-30 00:42:06 +00:00
Paul Eggert
f7ecea33e4 * tests/rm/readdir-bug: Don't use $(...) in a shell script,
as it doesn't work with Solaris /bin/sh.
2006-09-30 00:19:29 +00:00
Jim Meyering
e245139e46 * NEWS: Mention Paul's fix (to gnulib's canon-host.c) for
the pinky segfault.
2006-09-29 21:37:18 +00:00
Jim Meyering
2e328b0196 * tests/seq/basic [neg-2, eq-wid-2]: Comment out tests that
use .1 as the increment.  Actual output varies too much.
[eq-wid-3]: New, commented out test.
2006-09-29 16:52:59 +00:00
Jim Meyering
a38becce97 * src/shuf.c (read_input): Fix an off-by-one error that
would cause an infloop for piped input of 8KB or more.
* NEWS: Mention the fix.
* tests/misc/shuf: Test for the above fix.
2006-09-29 16:52:48 +00:00
Jim Meyering
31c77a2fde [ChangeLog]
Since any system may be affected by the Darwin readdir bug,
perform the extra rewinddir unconditionally.  The performance
impact of rewinding a directory is negligible.
* src/remove.c (NEED_REWIND): Define to use
CONSECUTIVE_READDIR_UNLINK_THRESHOLD unconditionally.
[m4/ChangeLog]
* readdir.m4: Remove file once again.
* jm-macros.m4: Remove reference to gl_FUNC_READDIR.
2006-09-29 15:58:04 +00:00
Jim Meyering
af46184a80 * tests/seq/basic: Use .11 as the upper bound, in case the ".1"
increment translates to a slightly larger value.
This corrects a test failure on FreeBSD 6.1 reported by Nelson Beebe.
The final expected value wasn't being printed.
2006-09-29 11:30:48 +00:00
Jim Meyering
a4d470409f Work around a readdir bug in Darwin 7.9.0 (MacOS X 10.3.9) on HFS+
and NFS, whereby rm would not remove all files in a directory.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Reduce to 10.
(NEED_REWIND): New macro, so that we incur the cost of the work-around
rewinddir only on afflicted systems.
* NEWS: Clarify and correct.
* tests/rm/readdir-bug: New file.  Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add it.
Prompted by testing and analysis from Bruno Haible:
http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00326.html
2006-09-29 09:54:24 +00:00
Jim Meyering
344c446776 fix typo: s/dignostic/diagnostic/ 2006-09-28 23:08:20 +00:00
Paul Eggert
f2d5658c08 * tests/rm/fail-eperm: Unset BASH_ENV, CDPATH, and ENV, too;
suggested for Debian stable, which uses Perl 5.8.4.
2006-09-28 22:07:42 +00:00
Jim Meyering
0bc935e209 * readdir.m4: Increment serial number. 2006-09-28 21:03:58 +00:00
Jim Meyering
b15b6fa192 * jm-macros.m4: Require the new macro.
* readdir.m4 (gl_FUNC_READDIR): Rename from GL_FUNC_READDIR.
2006-09-28 21:03:15 +00:00
Jim Meyering
665b228730 * readdir.m4: Revivify this file.
We need it to work around a bug on Darwin 0.7.x.
2006-09-28 21:00:30 +00:00
Jim Meyering
d37c3b8c6d Automatically generated dependencies are important even
when all of the sources in a directory come from gnulib.
* bootstrap (gnulib_tool): Remove the "no-dependencies" automake
option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2006-09-28 18:33:19 +00:00
Jim Meyering
ec3554cd95 * tests/rm/fail-eperm: Enable Perl's (-T) taint checking.
Ensure that IFS is set properly and unset PATH.
Sanitize inputs.
Work properly even when the name of the selected file starts with "-".
Invoke rm via "../../src/rm", and adjust expected output.
Prompted by a patch from Tim Waugh.
2006-09-28 13:31:57 +00:00
Jim Meyering
c2de7816d8 * README-cvs: Add Bison to the list of required packages. 2006-09-28 07:10:53 +00:00
Jim Meyering
0747af4b18 * src/c99-to-c89.diff: Update offsets. 2006-09-26 22:57:51 +00:00
Jim Meyering
a86a56f7d1 * NEWS: rm works around a bug in Darwin 8.6.1 w/NFS that kept
it from removing a directory containing 188 or more entries.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Decrease by
20, go work around the buggy readdir on Darwin 8.6.1 with NFS.
Reported by Matthew Woehlke.
2006-09-26 20:42:43 +00:00
Paul Eggert
b7c315cdda [ChangeLog]
* NEWS: "groups user" no longer outputs "user :"; you need at least
two users.  "groups" now processes options like --help more compatibly.
* src/groups.sh: Implement the option-processing change.
Handle user and group names with special characters more robustly.
Report write errors instead of exiting silently with status 1.
[doc/ChangeLog]
* coreutils.texi (groups invocation): "groups" no longer prefixes
the output with "user :" unless more than one user is specified.
2006-09-26 19:11:25 +00:00
Jim Meyering
412a3ca0b0 * README: Warn not to run autoreconf manually. Use bootstrap instead. 2006-09-26 13:03:03 +00:00
Jim Meyering
bbab62fd27 * src/groups.sh: When invoked with 0 or 1 argument, just exec "id".
Rewrite to avoid using temporary, $status.
2006-09-26 09:46:35 +00:00
Jim Meyering
5f65d05616 * NEWS: Mention the bug fix.
* src/groups.sh: Don't hide a write failure.
Reported by Iain Calder <ic56@rogers.com>.
2006-09-26 09:28:17 +00:00
Jim Meyering
509febe18b *** empty log message *** 2006-09-26 09:18:20 +00:00
Paul Eggert
3d524d9ab2 * .cvsignore: Add fchmodat.c. 2006-09-26 05:21:55 +00:00
Jim Meyering
1cd04b34dd * fchmodat.c: Remove file. gnulib's copy is identical. 2006-09-25 16:58:53 +00:00
Jim Meyering
d3c6206631 * src/chown.c (usage): Clarify --dereference description.
* src/chgrp.c (usage): Likewise.  Suggestion from Jamie McClelland.
2006-09-25 06:28:34 +00:00
Jim Meyering
f951057414 *** empty log message *** 2006-09-25 06:22:35 +00:00
Jim Meyering
e05de760c2 * NEWS: Mention these fixes.
* src/copy.c (copy_reg): With --verbose (-v), print
"removed `file_name'" just after unlinking a file.
(copy_internal): Likewise, in three more places.
Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
2006-09-24 19:28:25 +00:00
Jim Meyering
de88ea4c5d . 2006-09-24 19:27:02 +00:00
Jim Meyering
af5967eae2 * tests/mv/hard-verbose: New file. Test for the above fix.
* tests/mv/Makefile.am (TESTS): Add hard-verbose.
2006-09-24 16:55:13 +00:00
Jim Meyering
6649f01059 * tests/help-version (sync_args): Don't call sync, since it spins up
disks that I've deliberately caused to spin down (but not unmounted).
2006-09-24 16:46:41 +00:00
Jim Meyering
200aa48e15 * NEWS: Mention the improvement to sort. 2006-09-24 11:44:16 +00:00
Jim Meyering
867251d725 * tests/tail-2/proc-ksyms: Require that /proc/ksyms be readable
as well as existing.
2006-09-24 07:29:44 +00:00
Jim Meyering
b4963a7f70 * tests/ls/stat-dtype: Don't use tmpfs on linux-2.4 or older,
since that predated addition of d_type support.
2006-09-24 07:27:00 +00:00
Jim Meyering
453c215003 * Makefile.am (EXTRA_DIST): Sort file names.
Add bootstrap and gl/modules/getloadavg.diff
2006-09-23 17:00:29 +00:00
Jim Meyering
328efced8b remove trailing blanks 2006-09-23 17:00:08 +00:00
Jim Meyering
7c8dece8c6 * gl/modules/getloadavg.diff: New file. Work around the way the latest
version of the getloadavg module interacts with our bootstrap script.
* bootstrap (gnulib_tool_options): Add "--local-dir gl".
2006-09-23 16:51:53 +00:00
Paul Eggert
5ffeefb1ab * bootstrap: Add support for --force.
(usage): New function.  Describe usage less tersely.
(CVS_only_file): New var.
2006-09-20 21:28:26 +00:00
Paul Eggert
2a01141018 * NEWS: Document fix for cp -i and mv -i.
* src/copy.c (copy_internal): With -i, prompt even if the source
is a directory and the destination is not.  This is required by
POSIX and gives the user a chance to bail out before failing.
* tests/cp/Makefile.am (TESTS): Add cp-i.
* tests/cp/cp-i: New file.
* tests/mv/Makefile.am (TESTS): Add i-5.
* tests/mv/i-5: New file.
2006-09-20 17:32:14 +00:00
Jim Meyering
fae30e1af9 * NEWS: Mention the chmod bug fix. 2006-09-20 13:30:55 +00:00
Jim Meyering
2c83d42320 *** empty log message *** 2006-09-20 12:41:20 +00:00
Jim Meyering
396a52f790 * tests/chmod/inaccessible: New test.
* tests/chmod/Makefile.am (TESTS): Add inaccessible.
2006-09-20 12:38:22 +00:00
Jim Meyering
05ce3b2986 Fix the 2006-09-18 bug differently.
* src/chmod.c: (process_file): Upon FTS_NS for a top-level file,
tell fts_read to stat the file again, in case it has become
accessible since the initial fts_open call.
* src/chown-core.c (change_file_owner): Likewise.
2006-09-20 11:50:46 +00:00
Jim Meyering
1671b056a5 * src/chmod.c: Revert last change. There is a better way.
* src/chown-core.c: Likewise.
2006-09-20 11:26:18 +00:00
Paul Eggert
856443a97d * coreutils.texi (Disk usage): Clarify intro. Problem reported by Van Ly. 2006-09-19 22:39:38 +00:00
Paul Eggert
7889cfbbc7 * src/ln.c (target_directory_operand): Rewrite to avoid porting
problem on Tandem reported by Matthew Woehlke in
<https://savannah.gnu.org/bugs/?17172>.
2006-09-19 22:11:38 +00:00
Paul Eggert
90616d3a8f (cp invocation): Clarify cp -i a bit more. 2006-09-19 21:54:01 +00:00
Paul Eggert
f544d8dd1a * coreutils.texi (cp invocation): Say that -i and -f are
independent.  Clarify -i's behavior.
2006-09-19 16:49:06 +00:00
Paul Eggert
0e3b87195a Fix bug where chmod, chown, and chgrp did not process operands
left-to-right in some cases.
* src/chmod.c (wd_errno): New var.
(chmod_file): New function, with most of the contents of the
old prcess_file function.
(process_files): Use it.  This gives file names to fts one
at a time, so that they are processed left-to-right as POSIX
requires.
* src/chown-core.c (wd_errno, chown_files): Likewise.
(chown_file): New function.
* tests/install/basic-1: Redo test so as to not workaround
the chmod bug, thereby testing for it.
2006-09-18 22:09:49 +00:00
Paul Eggert
bebf83d0fd * src/shuf.c (main): Quote the entire range when reporting an
invalid one, rather than just the part that contained the error.
2006-09-18 20:38:54 +00:00
Paul Eggert
46dd4b1a8e * tests/stty/row-col-1: Rewrite to avoid temporary file that is
sometimes left behind if the test is skipped or interrupted.
2006-09-18 20:34:50 +00:00
Paul Eggert
058f319e6d * bootstrap (symlink_to_gnulib): New function.
(cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
to copies-of-gnulib.
(cp_mark_as_generated, slurp, gnulib_files):
Avoid making a copy if it's the same as the old version.
(gnulib_files): Add support for this variable (used by Bison).
2006-09-18 20:20:03 +00:00
Paul Eggert
87353aebd8 * tests/ls/stat-vs-dirent: Fix quoting problem in diagnostic
indicating flaw in kernel.  Reword to say that the flaw isn't
serious for coreutils, since the flaw does affect ls -i.
2006-09-18 16:34:27 +00:00
Paul Eggert
5a73ad8c63 Fix bug in test case exposed by building on
Solaris 8 in a setgid directory.  The test case incorrectly
assumed that 'symlink' would be in group $g1.
2006-09-18 16:11:00 +00:00
Jim Meyering
c9c0dc7bc6 * NEWS: Add a line for 6.3-cvs.
* configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2006-09-18 13:01:09 +00:00
Jim Meyering
9c57927ad1 . 2006-09-18 08:09:54 +00:00
Jim Meyering
8cd9d29cfe duh 2006-09-18 07:51:48 +00:00
Jim Meyering
97f9240eaa *** empty log message *** 2006-09-18 07:51:33 +00:00
Jim Meyering
500fdd0af9 *** empty log message *** 2006-09-18 07:51:07 +00:00
Jim Meyering
7da3ac75c2 Version 6.2.
* NEWS: Record the 6.2 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-09-18 05:58:55 +00:00
Jim Meyering
db2e7255ab * tests/chgrp/basic: On an OpenBSD system, rather than failing
due to a known problem, merely warn about it.
Rewrite to avoid testing output of chgrp --verbose and chgrp -c.
Instead, use stat to test file system for desired results, directly.
* tests/chgrp/Makefile.am (TESTS_ENVIRONMENT): Set host_triplet.
2006-09-17 20:58:34 +00:00
Jim Meyering
1c904f14ea * tests/envvar-check: Add more variable names to the list of those
that can affect these programs and tests: _POSIX2_VERSION, COLUMNS,
QUOTING_STYLE, TABSIZE, TERM, TMPDIR.
2006-09-17 20:29:05 +00:00
Jim Meyering
1fd966436a . 2006-09-17 20:15:52 +00:00
Paul Eggert
b67faf329c * NEWS: Document that mkdir -p and install -d now fork on occasion.
* bootstrap.conf (gnulib_modules): Add savewd.
* src/install.c: Include savewd.h.
(process_dir): New function.
(main, install_file_in_file_parents): Use it, along with the new
savewd module, to avoid some race conditions.
* src/mkdir.c: Include savewd.h.
(struct mkdir_options): New members make_ancestor_function, mode,
mode_bits.
(make_ancestor): Return 1 if the resulting directory is not readable.
(process_dir): New function.
(main): Use it, along with new savewd module, to avoid some
race conditions.  Fill in new slots of struct mkdir_options, so
that callees get the values.
* tests/install/basic-1: Test for coreutils 5.97 bug that was
fixed in coreutils 6.0, and which should still be fixed with
this change.
* tests/mkdir/p-3: Likewise.
2006-09-16 20:03:56 +00:00
Jim Meyering
adbad7626c * Makefile.maint (sc_require_config_h, sc_prohibit_assert_without_use):
Discard stdout from the new use of grep.
2006-09-16 08:44:18 +00:00
Jim Meyering
f944211020 * bootstrap.conf (gnulib_modules): Add rename-dest-slash.
The 2006-09-08 changes made it so "mv dir new-name/" would
fail on NetBSD 1.6.  This makes it work once again.
2006-09-15 14:11:39 +00:00
Jim Meyering
32d83cf587 * src/mv.c (main): Remove unnecessary (always-true) test for 2 <= n.
Instead, since it's a little fragile, assert the condition.
(target_directory_operand): Update comment to reflect latest change.
2006-09-14 10:06:42 +00:00
Paul Eggert
33f1b50fca (print_user): Rewrite to avoid warning from GCC 4.1.1 with -Wall. 2006-09-12 23:32:16 +00:00
Jim Meyering
e1fb2a80bb * tests/mv/atomic: Check for specific strace output, rather than
simply nonempty.  RHEL AS 4 would fail this test due to strace
generating "[ Process PID=14434 runs in 32 bit mode. ]".
Reported by Nelson Beebe.
2006-09-12 09:33:40 +00:00
Jim Meyering
fb15bc880a * src/c99-to-c89.diff: Add another set of curly braces. 2006-09-11 13:56:15 +00:00
Jim Meyering
75b99e8f20 * src/remove.c (remove_dir): Move new cache_stat_init call onto
it's own line.
(rm_1): Move declaration of "st" and new cache_stat_init call
"down" to nearer where they're used.
2006-09-11 13:22:04 +00:00
Paul Eggert
d28b0d4de8 (eval6): Fix buffer overrun, or bad performance, if
substr's last operand is very large.  Performance problem reported
by Sebastian Kreft.
2006-09-11 04:56:43 +00:00
Jim Meyering
6f2530cf3a * Makefile.maint (sc_prohibit_assert_without_use): Likewise. 2006-09-09 16:18:57 +00:00
Jim Meyering
77d7a11b2f * Makefile.maint (sc_require_config_h): Skip this test if there are no version-
controlled .c files.
2006-09-09 15:58:36 +00:00
Jim Meyering
5feb482bc3 . 2006-09-09 15:32:03 +00:00
Jim Meyering
1e7e9cd16e restore leading "@" 2006-09-09 14:59:37 +00:00
Jim Meyering
cc29b366aa * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
are no .m4 files.
2006-09-09 14:59:11 +00:00
Jim Meyering
262296271d * bootstrap: Export CVS_RSH separate from its assignment, to work
even with Solaris 10's /bin/sh.  Suggestion from Mark D. Baushke.
2006-09-08 19:28:46 +00:00
Paul Eggert
5c81574ed5 tail now ignores the -f option if POSIXLY_CORRECT is set,
no file operand is given, and standard input is any FIFO.
2006-09-08 17:19:51 +00:00
Jim Meyering
d7619b5fe8 mv and "cp -r" no longer fail when invoked with two arguments
where the first one names a directory and the second name ends in
a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
now succeeds, once more. This reverts part of the 2004-06-27
change for 5.3.0.
* NEWS: Say the above.
* src/mv.c (target_directory_operand): Don't require (here)
that the target operand "look like" a directory.  This change
pushes the test down to the rename syscall level, where a
"mv dir existing-non-dir/" will mistakenly succeed on older systems
that ignore trailing slashes in the rename destination argument.
* src/cp.c (target_directory_operand): Likewise, but for cp.
* tests/mv/trailing-slash: Exercise the above fixes.
* tests/cp/trailing-slash: New file.
* tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2006-09-08 17:08:53 +00:00
Jim Meyering
fc1e25cfa5 * bootstrap: Use the previously unused variable, $src,
to avoid repeating "$GNULIB_SRCDIR/$file".
2006-09-08 08:59:31 +00:00
Jim Meyering
926e64e021 * bootstrap (cp_mark_as_generated): Don't use "local", to
accommodate ancient "/bin/sh".  Suggested by Ralf Wildenhues.
Rename now-global "$src" and "$dst" to have cp_ prefix.
Safer, and avoids confusion.
2006-09-08 08:57:45 +00:00
Jim Meyering
c4e65d56c1 * bootstrap: Fix last-minute typo. 2006-09-08 08:01:17 +00:00
Jim Meyering
80799ead41 * bootstrap (cp_mark_as_generated): Don't add C-style comments for .l or .y files. 2006-09-08 07:57:21 +00:00
Jim Meyering
af2c5a4ab0 * bootstrap (cp_mark_as_generated): New function.
(slurp): Use it to prepend editor hints and a warning that
the file we're copying is generated.
Suggestion from Bruce Korb.
2006-09-08 06:52:24 +00:00
Jim Meyering
a3ebb3f3d1 * bootstrap: Revert last change. There are less disruptive ways
to mark these generated files as read-only.
2006-09-07 21:00:58 +00:00
Jim Meyering
0212b962b4 * src/c99-to-c89.diff: Update to have proper offsets. 2006-09-07 09:21:00 +00:00
Jim Meyering
36422ec95c Ensure that some gnulib-tool-generated files are read-only.
* bootstrap (slurp): Put the body of this function in a sub-shell,
with "umask a-w" so that all new files are read-only.  Remove each
file before we write to it, in case it's read-only.
Make po/Makevars and runtime-po/Makevars read-only, too.
2006-09-06 22:00:15 +00:00
Jim Meyering
ef2071bc67 * tests/cp/acl: Skip this test when cp lacks ACL support.
* tests/cp/Makefile.am (TESTS_ENVIRONMENT): Set $(CONFIG_HEADER).
2006-09-05 11:50:56 +00:00
Jim Meyering
fe99a4f8c8 * src/c99-to-c89.diff (remove.c): Adapt one hunk to match the new
context from change of 2006-09-02.
2006-09-05 11:12:06 +00:00
Jim Meyering
2809bfb8f7 (Infrastructure changes): make wording more accurate 2006-09-04 07:50:16 +00:00
Jim Meyering
ce5b2a6ec4 * README-cvs: Fix typo in update command. 2006-09-04 07:44:56 +00:00
Jim Meyering
5e451b260f * NEWS: Tweak the wording in the new change description so that
no one can think this change causes e.g., `rm -fr foo../' to fail.
2006-09-03 20:16:38 +00:00
Jim Meyering
fbb234c2a7 Use $CONFIG_HEADER, rather than hard-coding it.
* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Set $CONFIG_HEADER.
2006-09-03 07:22:08 +00:00
Jim Meyering
31ca1f9aec * tests/rm/inaccessible: Adjust for movement of config.h to lib/. 2006-09-03 07:18:52 +00:00
Paul Eggert
ae325b5b97 rm now rejects attempts to remove /, ./, and ../. 2006-09-03 02:56:51 +00:00
Paul Eggert
aff5a4f2ab (Treating / specially): --preserve-root is
now the default for rm.
(rm invocation): Likewise.  Also, document that you can't
remove `.' or `..'.  Use the POSIX term "root directory"
rather than the more-ambiguous "file system root".
2006-09-03 02:56:34 +00:00
Paul Eggert
0b5f3463b3 New file. 2006-09-03 02:55:32 +00:00
Paul Eggert
b438e7548e (TESTS): Add r-4. 2006-09-03 02:55:20 +00:00
Paul Eggert
e5fc4f24aa Don't include dirname.h, since system.h does it now.
(cache_fstatat, cache_stat_init): New functions.
(cache_statted, cache_stat_ok): New functions.
(write_protected_non_symlink): Remove struct stat ** buf_p arg,
which is no longer needed with the new functions.  All callers
changed.
(prompt, is_dir_lstat, remove_entry, remove_dir):
New struct stat * arg.  All callers changed.
(write_protected_non_symlink, prompt, is_dir_lstat, remove_entry):
(remove_cwd_entries, remove_dir, rm_1):
Use and maintain the file status cache.
(prompt, remove_entry): Omit the first "directory" in the diagnostic
"Cannot remove directory `foo': is a directory".  This causes "rm"
to pass a test case that it would otherwise fail now that it
"knows" more about its argument.  I think the diagnostic is better
without the first "directory" anyway.
(prompt): Remove the no-longer-needed IS_DIR arg; all callers changed.
(rm_1): Reject attempts to remove /, ./, or ../.
2006-09-03 02:54:51 +00:00
Paul Eggert
fcf498b1b4 Fix comment. 2006-09-03 02:54:16 +00:00
Paul Eggert
89ffaa1990 Don't include dirname.h, since system.h does it now.
(usage, main): --preserve-root is now the default.
2006-09-03 02:53:58 +00:00
Paul Eggert
963d29f916 Include "dirname.h", since dot_or_dotdot needs it
now.
(dot_or_dotdot): Succeed even if "." or ".." is followed by a
slash.
2006-09-03 02:53:37 +00:00
Paul Eggert
d8049d7478 Don't include dirname.h, since system.h does it now. 2006-09-03 02:53:16 +00:00
Paul Eggert
b539762854 rm now rejects attempts to remove /, ./, and ../. 2006-09-03 02:50:41 +00:00
Paul Eggert
670a4672c9 Fix typo in previous change; an unsigned int wasn't converted to
uintmax_t at the right time.  Problem reported by Bruno.
2006-09-01 22:07:18 +00:00
Paul Eggert
8251826ef0 Update to match current gnulib. 2006-09-01 19:44:43 +00:00
Paul Eggert
93c30a24c4 * m4/jm-macros.m4 (gl_MACROS): Call cu_PREREQ_STAT_PROG rather
than AC_REQUIREing, so that sys/mount.h isn't tested for after
the test result.  I'm not sure why this fix is needed, but it
works.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Revamp to reflect better
what stat.c actually needs.
* src/stat.c: Include <stddef.h>
(alignof): New macro.
(HAVE_STRUCT_STATXFS_F_FSID___VAL, HAVE_STRUCT_STATXFS_F_FSID_VAL):
Remove.
(STRUCT_STATXFS_F_FSID_IS_INTEGER): New macro.
(FSID_VAL): Remove.
(print_statfs): If f_fsid isn't an integer, grab its words one
at a time in little-endian order.  This is a bit easier to configure
and should avoid a compilation failure on MacOS reported by Bruno
Haible.
2006-09-01 19:40:46 +00:00
Paul Eggert
ddb97ab3b1 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
work around a Mac OS X porting problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>.
(print_statfs): Use them.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val
components of fsid.  Omit some checks that stat.c doesn't care about.
2006-08-29 21:53:29 +00:00
Paul Eggert
bc7aa2329c * bootstrap.conf (gnulib_modules): Add isapipe.
* src/tail.c: Include isapipe.h.
(IS_PIPE_LIKE_FILE_TYPE): Remove.
(IS_TAILABLE_FILE_TYPE): Just list both FIFOs and sockets as
tailable, since this seems to be portable.
(main): Use isapipe, to fix a bug on MacOS X reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00304.html>.
2006-08-29 20:50:21 +00:00
Paul Eggert
1b6b9ac6ee * src/system.h (LOCALEDIR): Remove, since configmake.h now defines
it for us.
2006-08-29 14:26:52 +00:00
Paul Eggert
1b8c1afd70 (main): Don't test whether macros like
S_ISLNK are defined, since they're always defined now.
2006-08-29 00:32:33 +00:00
Paul Eggert
25aebae77d * src/copy.c (copy_internal): Don't test whether macros like
S_ISLNK are defined, since they're always defined now.
* src/cp.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/ls.c (get_link_name, make_link_name): Likewise.
* src/mkfifo.c (usage): Likewise.
* src/who.c (S_IWGRP): Likewise.
2006-08-28 23:29:38 +00:00
Paul Eggert
023c88aaa0 Adjust to recent gnulib changes for the gnulib module.
* bootstrap.conf (gnulib_modules): Add fcntl.
* src/system.h (SEEK_SET, SEEK_CUR, SEEK_END): Remove.  Other code
is already assuming these macros are defined.
(O_DIRECT, O_DIRECTORY, O_DSYNC, O_NDELAY, O_NOATIME, O_NONBLOCK):
(O_NOCTTY, O_NOFOLLOW, O_NOLINKS, O_RSYNC, O_SYNC, O_BINARY, O_TEXT):
Remove; the fcntl module now handles these.
2006-08-28 23:05:13 +00:00
Paul Eggert
a66840f18d Adjust to recent gnulib changes for the inttypes module.
* bootstrap.conf (gnulib_modules): Remove stdint; add inttypes.
(excluded_files): Don't exclude m4/inttypes-h.m4 or m4/inttypes-pri.m4.
* src/system.h: Don't bother to include <stdint.h>, since we can
now assume inttypes.h does the equivalent of including stdint.h.
2006-08-28 20:51:56 +00:00
Jim Meyering
ba663fc190 Use http://, not https:// for savannah.gnu.org bug URLs. 2006-08-27 19:59:15 +00:00
Jim Meyering
e7573e15d9 * NEWS: Mention this. 2006-08-27 19:46:26 +00:00
Jim Meyering
520a954d7e * src/copy.c (copy_internal): Don't make a backup if the last
component of the source name is "." or "..".
Reported by Andreas Schwab in https://savannah.gnu.org/bugs/?17540.
* tests/cp/src-base-dot: New file.  Test for the above fix.
* tests/cp/Makefile.am (TESTS): Add src-base-dot.
2006-08-27 19:41:04 +00:00
Jim Meyering
0744662509 * src/system.h (DOT_OR_DOTDOT): Remove macro. Rewrite as a...
(dot_or_dotdot): ...new static inline function.
* src/remove.c (rm_1): Reflect this renaming.
* src/ls.c (basename_is_dot_or_dotdot): Likewise.
2006-08-27 19:34:28 +00:00
Jim Meyering
0a94897cfe Two of those comments apply only when "moving" (not when copying).
Correct them.
2006-08-27 16:29:11 +00:00
Jim Meyering
7f535c46a6 * src/copy.c (copy_internal): Add comments. 2006-08-27 16:20:52 +00:00
Paul Eggert
ddf6238830 (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
since Automake supplies them for us.  It always did -I$(srcdir),
and with the recent change to AC_CONFIG_HEADERS in configure.ac it
is now also doing -I../lib.
2006-08-27 06:03:02 +00:00
Paul Eggert
bc94006bd5 Fix typo in previous bootstrap change; WGET_COMMAND is needed by sh. 2006-08-27 03:35:09 +00:00
Paul Eggert
be5edb4b0c .cvsignore: Add config-h.m4. 2006-08-27 03:34:42 +00:00
Jim Meyering
e9bf9a6ecc This test was failing in some environments.
* tests/ls/color-dtype-dir: Don't rely on eval "`dircolors -b`"
to set LS_COLORS in the environment.
* tests/envvar-check: Instead, ensure that LS_COLORS is not set.
Reported by Bob Proulx.
2006-08-26 18:44:52 +00:00
Paul Eggert
2ace7e1eee * bootstrap (get_translations): Skip this if WGET_COMMAND is empty.
Fail if the first "echo" fails.  Suppress diagnostics from "ls po/*.po"
since there might not be any .po files.
(WGET_COMMAND): Set to empty if wget doesn't
seem to be available.  Don't export; shouldn't be needed.
2006-08-26 18:33:08 +00:00
Jim Meyering
fd52fdf603 * tests/mv/Makefile.am (TESTS): Add backup-dir. 2006-08-26 17:13:49 +00:00
Jim Meyering
96940eb05b * src/c99-to-c89.diff: Remove hunk for copy.c; no longer needed. 2006-08-26 16:21:15 +00:00
Jim Meyering
c8e02f478f s/c98/c89/ in file name. 2006-08-26 16:20:59 +00:00
Jim Meyering
7bd66e88ca * Makefile.am (EXTRA_DIST): Remove these files here, too:
.x-sc_no_if_have_config_h, .x-sc_prohibit_assert_without_use,
.x-sc_two_space_separator_in_usage.
2006-08-26 16:18:04 +00:00
Jim Meyering
146af5fb13 Fix "mv --verbose --backup" so its output includes the
" (backup: foo.~1~)" suffix also when backing up a directory.
* NEWS: Report this bug fix.
* src/copy.c (emit_verbose): New function, factored out of...
(copy_internal): ...here.  Use the new function.
* tests/mv/backup-dir: Test for the above fix.
2006-08-26 15:53:24 +00:00
Paul Eggert
8f8f1d0188 Include <config.h> unconditionally, since we now assume config.h exists. 2006-08-26 06:55:57 +00:00
Jim Meyering
967e0c11ea "ls --color" would highlight other-writable and sticky directories
no differently than regular directories on a file system with
dirent.d_type support.
* NEWS: Say the above.
* src/ls.c (gobble_file): With --color, also stat the file when
we know it is a directory.
Derived from an anonymous one-line fix and bug report:
<https://savannah.gnu.org/bugs/?15043>.
* tests/ls/color-dtype-dir: New file.  Test for the above fix.
* tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2006-08-26 06:46:17 +00:00
Paul Eggert
0d41cd8f29 * .cvsignore: Remove stamp-h1. Add coreutils-*, to ignore
tarballs.
* bootstrap.conf: Add configmake, verify.
* lib/.cvsignore: Add configmake.h, stamp-h1.
* src/.cvsignore: Remove localedir.h.
* src/Makefile.am (localedir, DISTCLEANFILES, localedir.h): Remove;
subsumed by configmake.
* src/system.h: Include configmake.h rather than localedir.h
(LOCALEDIR): New macro.
2006-08-25 23:30:57 +00:00
Paul Eggert
1a5c74f01a Fix typo in previous checkin; a "&" went missing. 2006-08-25 23:12:01 +00:00
Paul Eggert
db3f6c256b Rewrite to avoid some unnecessary casts, macros, literals.
(DEFAULT_PASSES, VERBOSE_UPDATE): Now constants, not macros.
(SECTOR_SIZE, SECTOR_MASK): New constants.
(fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
and use the SECTOR_* constants when applicable.  Check for size <
0 rather than size == -1, since negative-size files are a sign of
trouble anyway.

(dopass): Assume a continuable error if EIO even if the current
position is not a multiple of 512.
2006-08-25 23:08:58 +00:00
Jim Meyering
03a5310540 * src/stat.c (print_statfs): Fix typo: remove extra "sizeof". 2006-08-24 21:47:37 +00:00
Paul Eggert
69fdccfb29 * src/stat.c (HAVE_STRUCT_STATXFS_F_FSID___VAL): Define. This
macro was being used without being defined.
(SB_F_NAMEMAX): Remove cast.
(f_fsid) [BeOS]: Likewise.
(OUT_NAMEMAX): Renamed from NAMEMAX_FORMAT, with a new meaning.
All uses changed.
(out_string, out_int, out_uint, out_uint_o, out_uint_x): New
functions.
(xstrcat): Remove.  All uses changed to use the above functions.
(print_statfs, print_stat): 2nd arg is now the prefix len, not the
buffer len.  All uses changed.  Output '?', not '*', for unknown
data or errors.  Do not assume signed values can be interchanged
with unsigned when printing.
(print_statfs): For %i, print the fsid as a single int, not as a
pair.
(print_it): Quote invalid format better.
(STRUCT_STATVFS, statfs, f_fsid, f_blocks, f_bfree) [BeOS]:
(f_bavail, f_bsize, STATFS_FRSIZE, f_files, f_ffree) [BeOS]:
(STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME) [BeOS]: Define.
2006-08-23 23:40:21 +00:00
Paul Eggert
882c0d8d35 * NEWS: printf supports the I flag.
* src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2006-08-23 23:38:27 +00:00
Paul Eggert
5f61923564 (SA_RESTART): Fallback define. 2006-08-23 19:19:01 +00:00
Paul Eggert
f5017cb0f6 * src/system.h (EDQUOT): Define if not already defined. 2006-08-23 19:14:25 +00:00
Paul Eggert
7b1ba27c95 * .cvsignore: Remove config.h, config.hin, as they are now
in lib.
* configure.ac (AC_CONFIG_HEADERS): Move config.h and config.hin
to lib.
* lib/.cvsignore: Add config.h, config.hin.
* lib/Makefile.am (AM_CPPFLAGS): Remove; we no longer need '-I..'.
* src/Makefile.am (AM_CPPFLAGS): Remove '-I..'; no longer needed.
2006-08-23 18:37:27 +00:00
Paul Eggert
2f1ed196eb No need to define gl_LOCK. 2006-08-23 18:09:40 +00:00
Paul Eggert
81a3cd6df6 * bootstrap (slurp): Also put in a dummy definition for
gl_LOCK_EARLY, introduced recently into gnulib.
2006-08-23 18:06:48 +00:00
Paul Eggert
d75da2a555 Add gnupload. 2006-08-23 17:08:09 +00:00
Jim Meyering
2594cd456d * NEWS: Mention the sweeping infrastructure changes. 2006-08-23 09:17:14 +00:00
Paul Eggert
0b38c6af07 * bootstrap.conf (gnulib_modules): Add gnupload.
* Makefile.maint (emit_upload_commands): gnupload is now
in build-aux.
* gnupload: Remove from CVS, since it's now a gnulib module.
2006-08-22 19:36:22 +00:00
Paul Eggert
0d35f28695 * bootstrap (bootstrap_conf_cleanup): Remove.
(excluded_files): New var.
* bootstrap.conf: Likewise.
* bootstrap (slurp): Exclude files early if they're in the
excluded_files list.  That way, their names don't get put into
.cvsignore.
2006-08-22 19:19:57 +00:00
Paul Eggert
711f81145e Add aclocal.m4, config.hin, configure to .cvsignore. 2006-08-22 18:59:02 +00:00
Paul Eggert
6d124bf98a * aclocal.m4, config.hin, configure:
Remove from CVS, since ./bootstrap generates them automatically.
* .cvsignore: Add INSTALL, Makefile.in, *.cache, *.lineno, *.log.
Remove more-specific entries.  This catches files like configure.lineno.
* man/.cvsignore: Add Makefile.in.
* src/.cvsignore: Add Makefile.in.
Remove .version, dir.c, install, mvdir, stamp-v, vdir.c, version.c.

For .cvsignore file under the tests directory:
Add Makefile.in.  Sort entries if necessary.  Remove *.I, *.E,
*.X, *.O, *-tests, build-script, mk-script if they're never
created in this directory.

* build-aux/.cvsignore: New file.
* doc/.cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf,
coreutils.ps, coreutils.tps.  Remove coreutils.cm (dunno what it
is, but the makefile doesn't mention it).  Remove coreutils.info
as it is subsumed by coreutils.info*.
* lib/.cvsignore: Add Makefile.in, getdate.tab.h.
Remove stat.c, sysexit.h.
* m4/.cvsignore: Remove Makefile, dev-ino.m4, glibc2.m4, intdiv0.m4,
inttypes-h.m4, inttypes-pri.m4, jm-glibc-io.m4, lcmessage.m4,
lock.m4, printf-posix.m4, same-inode.m4, size_max.m4,
uintmax_t.m4, ulonglong.m4, visibility.m4, xsize.m4.  Many of
these are put in automatically by ../bootstrap, but that's a
bootstrap bug that I plan to fix shortly.
* po/.cvsignore: More ../bootstrap-related fixes, plus remove old
cruft.  Add *.po, LINGUAS, Makevars.  Remove *.cat, *.msg,
cat-id-dbl.c, messages.mo, stamp-cat-id.
2006-08-22 18:50:24 +00:00
Paul Eggert
cafb7947b5 BeOS portability.
* src/uptime.c: Include OS.h if it exists.
(print_uptime): On BeOS, use the get_system_info function (actually a
macro). Loop through utmp entries only if utmp.h or utmpx.h exists.
(uptime): Call read_utmp only if utmp.h or utmpx.h exists.
* m4/boottime.m4 (GNULIB_BOOT_TIME): Test also for utmp.h, utmpx.h,
OS.h. Don't require to have utmp.h or utmpx.h. Enable boottime
support if <OS.h> is found.
2006-08-22 17:42:21 +00:00
Jim Meyering
0797e95b8a * .cvsignore: Add files that are now generated by ../bootstrap. 2006-08-22 11:01:23 +00:00
Jim Meyering
112606d80f [ChangeLog]
* .cvsignore: Add ABOUT-NLS.
[lib/ChangeLog]
* .cvsignore: Add files that are now generated by ../bootstrap.
[m4/ChangeLog]
* .cvsignore: Add files that are now generated by ../bootstrap.
[po/ChangeLog]
* .cvsignore: Add files that are now generated by ../bootstrap.
2006-08-22 10:44:40 +00:00
Jim Meyering
cf7d6fe7bf Move the check-AUTHORS rule to be run as part of "make distcheck",
rather than "make check".
* src/Makefile.am (check): Don't depend on check-AUTHORS; it would
cause "make check" to fail on systems unable to build all binaries.
* Makefile.maint (check-AUTHORS): New rule.
(local-checks-available): Add it here.
Reported by Bruno Haible.  Needed for BeOS.
2006-08-22 10:13:37 +00:00
Paul Eggert
86e1642541 (LDADD): Restore this line; it is still needed for
t-fpending on platforms without __fpending.
2006-08-22 07:00:51 +00:00
Paul Eggert
56795d3ea4 Remove df -mP. 2006-08-22 04:00:01 +00:00
Paul Eggert
e2e9b7d2ee (print_header, show_dev): Use a column width that
depends on the block size of -P is specified and not autoscaling.
2006-08-22 03:59:14 +00:00
Paul Eggert
3413a41528 Remove argmatch.m4 from CVS, since ../bootstrap generates it automatically. 2006-08-21 22:09:48 +00:00
Jim Meyering
1d6853a7bc * tests/dircolors/simple (a): Don't fail with an unexpected diagnostic
when the shell variable, SHELL, is not set.
Trigger the failure with "(unset SHELL; make check TESTS=simple)".
Reported by Sven Joachim in <http://bugs.debian.org/355368>.
2006-08-21 17:28:09 +00:00
Jim Meyering
76407d035c * src/od.c: Now that HAVE_UNSIGNED_LONG_LONG is no longer defined
in config.h, change the uses to HAVE_UNSIGNED_LONG_LONG_INT.
Otherwise, on a system with 4-byte longs, "od -t u8" fails with this:
od: invalid type string `u8';
this system doesn't provide a 8-byte integral type
FIXME: add a test for this, but skip it when sizeof uintmax < 8.
2006-08-21 13:54:04 +00:00
Jim Meyering
71e3d8bbf6 Done: convert to use gnulib-tool 2006-08-21 08:11:55 +00:00
Paul Eggert
05e03fc656 Add a bootstrap procedure, so that the CVS version contains fewer
files and we bootstrap the rest from gnulib, gettext, etc.
* README-cvs: New file.
* bootstrap: New file.
* bootstrap.conf: New file.
* .x-sc_trailing_blank: Remove config-log, .gdb-history.  Add .po.
* configure.ac (AC_PREREQ): Move here from m4/*.m4, for benefit
of gnulib-tool.
(gl_DEFAULT_POSIX2_VERSION, gl_USE_SYSTEM_EXTENSIONS, gl_PERL):
(gl_IGNORE_UNUSED_LIBRARIES): Remove; now done by gnulib.
(gl_EARLY): Add.
(gl_MACROS): Call just after gl_EARLY, just for clarity.
* src/c99-to-c98.diff: Remove patch to ls.c; no longer needed.
* src/kill.c (strtoimax): Remove decl.
* src/ls.c: Include "wcwidth.h" instead of rolling it ourselves.
* src/wc.c: Likewise.
* src/ls.c (sort_files): Rewrite to avoid need for C99-style
declaration, so that we don't need to patch this file.
* src/printf.c (strtoimax, strtoumax): Remove decls.
* src/su.c: Include getpass.h.
(getpass): remove.
* src/system.h: Include mempcpy.h, stpcpy.h, strpbrk.h.
Include inttypes.h unconditionally; remove decls it handles.
* lib/Makefile.am: include gnulib.mk, so that we can remove most of
this file.
(AM_CPPFLAGS): Don't mention -I$(srcdir), since that's now done
for us.
(noinst_LIBRARIES, LDDADD, DEFS): Remove.
(libcoreutils_a_SOURCES): Trim down greatly, just to the files
that aren't in gnulib.
Remove defns gnulib does for us.
* m4/check-decl.m4 (gl_CHECK_DECLS):
Don't include stdio.h, string.h, stdlib.h, unistd.h, sys/time.h,
time.h.  Use AC_CHECK_DECLS_ONCE for free, getenv, geteuid, getlogin,
getuid, lseek, malloc, memchr, realloc.  Don't check for getutent,
memrchr, nanosleep, stpcpy, strndup, strnlen, strstr, strtoul,
strtoull.
(_gl_DECL_HEADERS): Remove; all uses removed.
* m4/jm-macros.m4 (gl_MACROS): Move AC_PREREQ into configure.ac
for the benefit of gnulib-tool.  Call gl_INIT.
Do not call or require macros that gnulib will handle for us.
Don't check for fchmod, hasmntopt, isascii, lchown, listmntent,
mempcpy, realpath, wcrtomb, tzset.
(gl_CHECK_ALL_HEADERS): Don't check for sys/statvfs.h, sys/vfs.h,
sys/mount.h.
(gl_CHECK_ALL_TYPES): Require AC_TYPE_UNSIGNED_LONG_LONG_INT.
Don't check for struct stat.st_blksize.
Don't require AC_STRUCT_ST_DM_MODE, gt_TYPE_SSIZE_T,
gl_AC_TYPE_UINT32_T, gl_AC_TYPE_UINTMAX_T, gl_AC_TYPE_UINTPTR_T,
gl_AC_TYPE_UNSIGNED_LONG_LONG.
* m4/prereq.m4 (gl_PREREQ): Require gl_FUNC_XFTS, gl_ROOT_DEV_INO.
Don't require macros that gnulib does for us.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Don't check for
sys/sysmacros.h.  Don't check for statvfs.  Use AC_CHECK_HEADERS_ONCE
for netinet/in.h, nfs/nfs_clnt.h, nfs/vfs.h.
Don't require gl_AC_TYPE_LONG_LONG, gt_HEADER_INTTYPES_H.
2006-08-21 07:30:45 +00:00
Paul Eggert
0f7a044109 Remove from CVS, since the bootstrap script generates them automatically. 2006-08-21 07:26:38 +00:00
Jim Meyering
11fd62b008 add -cvs suffix 2006-08-20 15:53:11 +00:00
Paul Eggert
b57f08306e the patch from 2006-08-18 broke on cygwin. 2006-08-20 15:17:27 +00:00
Jim Meyering
1227e8c08b * NEWS: Add a line for 6.2-cvs.
* configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2006-08-20 14:23:38 +00:00
Jim Meyering
e74a18b16d . 2006-08-19 21:03:14 +00:00
Jim Meyering
73496017cc . 2006-08-19 20:49:45 +00:00
Jim Meyering
befcbddff1 * tests/Makefile.am (EXTRA_DIST): Add sparse-file. 2006-08-19 20:34:57 +00:00
Jim Meyering
e71ebc5213 . 2006-08-19 20:34:31 +00:00
Jim Meyering
c65dbcbc14 . 2006-08-19 20:17:21 +00:00
Jim Meyering
0785c007d1 remove trailing blanks, again 2006-08-19 19:36:44 +00:00
Jim Meyering
929910e100 remove -cvs suffix, too 2006-08-19 19:35:28 +00:00
Jim Meyering
03ffc923e9 . 2006-08-19 19:34:16 +00:00
Paul Eggert
0cb751080f Import from Translation Project, with obvious corrections for plural forms. 2006-08-19 19:00:41 +00:00
Jim Meyering
7b88d1ba67 * Version 6.1.
* NEWS: Record the 6.1 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-19 18:33:50 +00:00
Jim Meyering
77c8f5b5c2 Avoid test failure when `make check' is run through debuild.
* tests/help-version: Ensure that $SHELL is set to some value
and exported.  Patch from Sven Joachim.  For details, see
<http://bugs.debian.org/355368>.
2006-08-19 18:30:04 +00:00
Jim Meyering
6a15128cef *** empty log message *** 2006-08-19 17:37:28 +00:00
Jim Meyering
674311d6d7 * tests/ls/stat-dtype: Test for the 2006-08-17 `ls -CF' fix. 2006-08-19 17:19:12 +00:00
Jim Meyering
0bcaab0b0d Change FIXME comment to fwd ref. 2006-08-19 17:17:49 +00:00
Jim Meyering
5dd3168eed Capitalize the P in Pre-C99. 2006-08-19 16:52:41 +00:00
Jim Meyering
a075864c29 * README: Describe potential "pre-C99 build failure", and work-around. 2006-08-19 16:23:17 +00:00
Jim Meyering
9b3bb934bc Some of my 2006-07-03 changes to tests/*/Makefile.am were being
backed out due to updates provoked by the copyright changes.
* tests/Makefile.am.in (PATH): Prepend $(VG_PATH_PREFIX), so that
it propagates to the derived Makefile.am files.
($(srcdir)/Makefile.am): Mark generated .am files as read-only,
so we don't mistakenly edit them again.
* tests/cut/Makefile.am: Regenerate.
* tests/head/Makefile.am: Likewise.
* tests/join/Makefile.am: Likewise.
* tests/pr/Makefile.am: Likewise.
* tests/sort/Makefile.am: Likewise.
* tests/tac/Makefile.am: Likewise.
* tests/tail/Makefile.am: Likewise.
* tests/test/Makefile.am: Likewise.
* tests/tr/Makefile.am: Likewise.
* tests/uniq/Makefile.am: Likewise.
* tests/wc/Makefile.am: Likewise.
2006-08-19 16:02:11 +00:00
Jim Meyering
b35bd50ce6 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
when the file's apparent size is not a multiple of its block size.
* src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
For some file sizes, writing that single byte would unnecessarily
waste a few file blocks.  That write may have been necessary in the
early days of Linux, but now, removing it should be safe.
Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
* tests/cp/sparse: New test for the above.
* tests/cp/Makefile.am (TESTS): Add sparse.

* tests/sparse-file: New file, essence factored out of...
* tests/du/8gb: ... here.  Use the new script.
2006-08-19 14:01:29 +00:00
Paul Eggert
5f57935678 Add support for NetBSD 3.0.
* src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field
f_fstypename.
(STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs'
has a field f_fstypename.
This undoes the 2006-08-15 to src/stat.c.
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
(ME_DUMMY): Treat "kernfs" as a dummy.
(read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
sys/statvfs.h. When getmntinfo was found, check its declaration and
set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Test also for f_fstypename
in struct statvfs.
2006-08-18 18:36:04 +00:00
Paul Eggert
47c8512a6f * src/system.h (select_plural): Reduce by 1000000, not 1000, since
the CVS gettext manual now suggests 1000000.
2006-08-18 18:12:47 +00:00
Jim Meyering
16901dd5fb * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for CLOCK_REALTIME,
since gethrxtime may revert to using clock_gettime via gettime.c.
Gabor Z. Papp reported that gethrxtime-using programs failed to
link due to unresolved clock_gettime on a linux-2.4.x system.
2006-08-18 09:04:12 +00:00
Jim Meyering
1ff9be72d4 back out last patch 2006-08-18 08:24:46 +00:00
Jim Meyering
f0703928e4 * gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Reverse sense of test for
CLOCK_MONOTONIC.  Otherwise, linking a gethrxtime-using program
with $(LIB_GETHRXTIME) could fail due to unresolved clock_gettime.
Reported by Gabor Z. Papp.
2006-08-18 07:34:06 +00:00
Jim Meyering
22d4295325 * Makefile.am (EXTRA_DIST): Reflect doclicense.texi->fdl.texi renaming. 2006-08-17 20:55:32 +00:00
Paul Eggert
5129debc41 Remove; no longer needed. 2006-08-17 20:09:22 +00:00
Paul Eggert
218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Jim Meyering
23f176cae6 ls -CF would misalign columns in some cases.
* src/ls.c (get_type_indicator): New function.  extracted from...
(print_type_indicator): ...here.  Use it.
(length_of_file_name_and_frills): Use it here, too, rather than
assuming stat.st_mode is valid.
Reported by Andreas Schwab, here:
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7774>
FIXME: add a test for this: FYI, I did ls -CF /proc and visually
inspected the result.
2006-08-17 15:46:56 +00:00
Jim Meyering
1b3ac49f0e * src/copy.c (copy_internal, same_file_ok): Adjust comments not
to mention the now-removed cp_options.xstat member.
2006-08-17 15:34:59 +00:00
Jim Meyering
2c84e99ee4 regenerate 2006-08-17 11:49:08 +00:00
Jim Meyering
ef1c94bcd6 (AC_INIT): Bump to 6.1 and add "-cvs" suffix. 2006-08-17 11:47:53 +00:00
Jim Meyering
9aa695174d * Makefile.maint (patch-check): Adapt to work now that the patch
modifies more than one file in src/.
2006-08-17 10:03:05 +00:00
Jim Meyering
a771318b59 With this patch, permit building with Solaris cc on Solaris 7.
* src/c99-to-c89.diff: Add diffs to convert more c99-isms.
This integrates patches from Bruno Haible.
2006-08-17 09:50:24 +00:00
Paul Eggert
9842bf8278 * tests/chmod/setgid (abs_srcdir): Remove; not used or needed.
Skip this test if "chmod g+s d" silently does nothing.
2006-08-16 21:58:48 +00:00
Jim Meyering
0142be6908 * tests/cp/Makefile.am: Don't mark "acl" as XFAIL.
* tests/cp/acl: Instead, skip the test if either setfacl
or getfacl fails.
2006-08-16 21:53:56 +00:00
Paul Eggert
60d8c89529 Skip this test suite if we can't set up files
properly for the setuid-etc test.
2006-08-16 21:46:36 +00:00
Paul Eggert
aacbc75155 * tests/lang-default (LC_ALL): Set to "C", so we get
English-language diagnostics.  Unset the other variables.
2006-08-16 20:11:42 +00:00
Paul Eggert
b96f5ea492 Fix bugs when printing plurals of numbers that are not
unsigned long int values.
* src/system.h (select_plural): New function.
* src/md5sum.c (digest_check): Use select_plural to avoid bug.
* src/uptime.c (print_uptime): Likewise.
* src/dd.c (print_stats): Likewise.  Also, don't use ngettext to
print a floating point number, as reducing to 0 or 1 doesn't work
for some languages.  Instead, just use "s" for seconds since it
doesn't need a plural form.
2006-08-16 19:36:46 +00:00
Paul Eggert
f048f049e7 (memcoll): Set errno = 0 in the shortcut case, too. 2006-08-16 17:24:35 +00:00
Jim Meyering
061a90d68a * fts.c (fts_children): Remove obsolete "// FIXME ..." comment.
Reported by Bruno Haible.
2006-08-16 13:45:27 +00:00
Jim Meyering
72d1188040 Explain why gzip --help's stderr output matters. 2006-08-16 12:55:18 +00:00
Jim Meyering
1e77e830cc 2006-08-16 Bruno Haible <bruno@clisp.org>
* Makefile.maint (gzip_rsyncable): Throw away stderr output of "gzip --help".
2006-08-16 12:37:34 +00:00
Jim Meyering
a8914bd966 2006-08-16 Andreas Schwab <schwab@suse.de>
* tests/cp/acl: Don't use non-portable == operator for test.
2006-08-16 10:00:07 +00:00
Jim Meyering
734afd5f62 *** empty log message *** 2006-08-16 09:55:48 +00:00
Jim Meyering
481113d551 * tests/ls/stat-dtype: Use stat to test file system type, rather
than df -T, in case /etc/mtab lies.  Reported by Michael Stone.
2006-08-16 09:44:55 +00:00
Jim Meyering
4ce3538865 add URL for HU-translation problem report 2006-08-16 06:06:23 +00:00
Jim Meyering
93d6fb1488 *** empty log message *** 2006-08-16 06:05:20 +00:00
Paul Eggert
9e2b97bf35 * NEWS: Mention that df exits with nonzero status if it generates
no output.  This change was in 6.0 but inadvertently unmentioned.
* doc/coreutils.texi (df invocation): df exits nonzero if it outpus
nothing.
* src/df.c (file_systems_processed): Renamed from n_valid_args, and now
a boolean.
(show_dev): Don't set it until we actually output something.
Print the header if this is the first output.
(main): Don't print a header, as that is now show_dev's job.
* tests/misc/Makefile.am (TESTS): Add df.
* tests/misc/df: New file.
2006-08-15 23:41:24 +00:00
Paul Eggert
5ce0b45a43 (USE_STATVFS): Define to 0 if f_type is needed, but
statvfs.f_type not present.
2006-08-15 23:23:28 +00:00
Paul Eggert
7b0f6f1559 * src/dd.c (print_stats): Don't substitute "1" for number, as this
causes confusion for the Hungarian translators.  Problem reported
by Egmont Koblinger.
2006-08-15 20:50:22 +00:00
Jim Meyering
2ee444b5fe [./]
* .x-sc_require_config_h: Add lib/at-func.c.
[lib/]
* at-func.c: New file, with the logic of all emulated at-functions.
* openat-priv.h: Include <errno.h> and define ENOSYS,
in support of the EXPECTED_ERRNO macro.
* openat.c (fstatat, unlinkat, fchownat): Remove function definitions.
Instead, define the appropriate symbols and include "at-func.c".
* mkdirat.c (mkdirat): Likewise.
* fchmodat.c (fchmodat): Likewise.
(ENOSYS): Remove definition.
* openat.c: Don't include <errno.h>, now that "openat-priv.h" does it.
Don't include "unistd--.h" -- it wasn't ever used.
[m4/]
* openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
2006-08-15 19:17:30 +00:00
Jim Meyering
d8139747b1 * NEWS: Add a line for 6.1-cvs.
* configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2006-08-15 17:00:00 +00:00
Jim Meyering
0ae904e03d . 2006-08-15 12:30:26 +00:00
Jim Meyering
2df18658dc * Makefile.maint (alpha beta major): Fix syntax error. 2006-08-15 12:13:04 +00:00
Jim Meyering
22ce855eb6 *** empty log message *** 2006-08-15 12:06:10 +00:00
Jim Meyering
e5b0d0aa85 . 2006-08-15 12:05:34 +00:00
Jim Meyering
3b3a4c3b20 Don't mention "stable" on Version line. 2006-08-15 11:26:17 +00:00
Jim Meyering
a23eb4a58c tweak syntax of "Version ..." line. 2006-08-15 11:25:13 +00:00
Jim Meyering
987f3b383a * TODO: Add an item (convert to use gnulib-tool), add to the plan
for id-vs-getgrouplist, and remove a few completed items.
2006-08-15 11:23:44 +00:00
Jim Meyering
3a246cc314 * Version 6.0 [unstable].
* NEWS: Record the 6.0 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-15 11:12:07 +00:00
Jim Meyering
a0fcf62767 commit, for the record. May never be used. 2006-08-15 11:08:03 +00:00
Jim Meyering
5ad9cd982c do not set $path
Use --leak-check=full, not --quiet.
Emit "--" after $vg.
2006-08-15 11:05:50 +00:00
Jim Meyering
1289d06809 update from gnulib 2006-08-15 09:14:36 +00:00
Paul Eggert
1a00d99c2f (memcoll): Optimize for the common case where the
arguments are bytewise equal.
2006-08-14 16:20:49 +00:00
Jim Meyering
418a7c8c43 * src/shred.c (usage): Don't indent the second line of an item.
Otherwise, help2man would misformat the output.
Reported by Adam Buchbinder in <https://launchpad.net/bugs/48917>.
2006-08-13 21:21:52 +00:00
Paul Eggert
3244e9a493 * pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
2006-08-11 20:28:42 +00:00
Paul Eggert
80886a8db3 (AM_GNU_GETTEXT): Upgrade to need-formatstring-macros. 2006-08-11 18:40:41 +00:00
Paul Eggert
ba79117e35 (re_string_skip_chars): Don't assume WEOF fits in wchar_t. 2006-08-11 18:29:06 +00:00
Paul Eggert
0154d1876b Fix typo in previous checkin: len -> lenbuf. 2006-08-11 17:47:40 +00:00
Paul Eggert
78bc0d8366 (snprintf): memcpy LEN bytes, not SIZE - 1, when
LEN is smaller than SIZE.  Suggested by Bruno Haible.
Also, help the compiler to keep LEN in a register.
2006-08-11 17:41:11 +00:00
Jim Meyering
9236b6befc * tests/ls/stat-vs-dirent: Too many (losing) systems trigger the
failure that this test checks for (stat/dirent inode mismatch at
a mount point), so continue to give a diagnostic about the failure,
but don't actually count it as a failure.
2006-08-11 08:40:11 +00:00
Paul Eggert
cfbf64e087 Undo latest change; I was confused about gettext versus gcc. 2006-08-10 22:53:24 +00:00
Paul Eggert
16d5b9133a Undo latest change; I was confused about xgettext versus gcc. 2006-08-10 22:52:57 +00:00
Paul Eggert
c84d9ff0d1 Adjust some files for gettext 0.15. 2006-08-10 22:51:06 +00:00
Paul Eggert
9d302e0729 Import from gettext 0.15. 2006-08-10 22:50:40 +00:00
Paul Eggert
fa2b1fe3bc (XGETTEXT_OPTIONS): Add pass-c-format flags for
_ and N_, so that we get format checking even when --enable-nls.
Add c-format flags for error, error_at_line, asprintf, vasprintf,
asnprintf, vasnprintf, wrapf.
(USE_MSGCTXT): New macro.
2006-08-10 22:50:17 +00:00
Paul Eggert
ead8494d04 (my-distcheck): Don't bother with --disable-nls,
as it shouldn't be needed with gettext 0.15.
2006-08-10 22:49:50 +00:00
Paul Eggert
023d6ad752 (AM_GNU_GETTEXT_VERSION): Update from 0.13.1 to 0.15. 2006-08-10 22:49:26 +00:00
Paul Eggert
8397326569 Import from gettext 0.15 2006-08-10 22:49:06 +00:00
Paul Eggert
f073139b52 (struct control): Remove fastmap member.
(extract_regexp): Allocate fastmap separately, since otherwise
it might move due to a realloc.
2006-08-10 20:53:32 +00:00
Paul Eggert
4a16cc52e0 Import regex changes from libc via gnulib. 2006-08-10 20:49:28 +00:00
Paul Eggert
037836e29f Update cycle-check from gnulib. 2006-08-10 19:26:39 +00:00
Paul Eggert
2869cbffcf Accommodate new getaddrinfo implementation in gnulib.
(gl_PREREQ): Require gl_FUNC_SNPRINTF, gl_GETADDRINFO,
gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_SYS_SOCKET,
gl_INET_NTOP, gl_TYPE_SOCKEN_T.
2006-08-10 19:10:52 +00:00
Paul Eggert
9afbf11b76 Accommodate new getaddrinfo implementation in gnulib.
(libcoreutils_a_SOURCES): Add inet_ntop.h, snprintf.h.
(MOSTLYCLEANDIRS): New macro.
(BUILT_SOURCES): Add $(ARPA_INET_H), $(SYS_SOCKET_H), $(NETINET_IN_H).
(arpa/inet.h, netinet/in.h, sys/socket.h): New rules.
(MOSTLYCLEANFILES): Add arpa/inet.h, arpa/inet.h-t, netinet/in.h,
netinet/in.h-t, sys/socket.h, sys/socket.h-t.
(EXTRA_DIST): Add socket_.h.
2006-08-10 19:10:26 +00:00
Paul Eggert
ffafcd2998 Import from gnulib, to support new getaddrinfo implementation of gnulib. 2006-08-10 19:09:33 +00:00
Paul Eggert
01dddfef2a Add snprintf.h, socket_.h. 2006-08-10 19:08:58 +00:00
Jim Meyering
db7ffe5582 * tests/ls/stat-dtype: If "." is tmpfs, skip this test unless uname -s
reports "Linux".  This avoids a failure on Solaris 10's tmpfs.
Redirect both stdout and stderr of df invocations.
2006-08-10 09:22:33 +00:00
Jim Meyering
6d1d2c0068 * src/dircolors.hin: Add a TERM directive for each of the following:
ansi, color-xterm, gnome, konsole, kterm, rxvt-cygwin,
rxvt-cygwin-native, screen.linux, xterm-256color.
Sort the TERM directives.
From Mike Frysinger.
2006-08-10 08:50:37 +00:00
Jim Meyering
407ff38d94 add a comment 2006-08-10 08:25:03 +00:00
Paul Eggert
ade68b234a Regenerate. 2006-08-09 23:46:10 +00:00
Paul Eggert
8c0eb21023 Regenerate. 2006-08-09 23:44:56 +00:00
Paul Eggert
decc2e1f87 Sync from gnulib. 2006-08-09 23:44:30 +00:00
Paul Eggert
93f90065f3 Sync from gnulib. 2006-08-09 23:42:26 +00:00
Paul Eggert
d24265f965 Warn about oflag=append without conv=notrunc. 2006-08-09 21:16:28 +00:00
Paul Eggert
433a1eac7f Add mlterm, rxvt-unicode; this fixes Debian bug 317503. 2006-08-09 20:56:15 +00:00
Paul Eggert
acaeed035b Regenerate. 2006-08-09 20:24:38 +00:00
Paul Eggert
4e9733c2e1 Regenerate. 2006-08-09 20:23:36 +00:00
Paul Eggert
4cf3358407 Add shuf. 2006-08-09 20:23:07 +00:00
Paul Eggert
15c54c0b83 * LINGUAS: Add ro, sr, uk, wa.
* ro.po, sr.po, uk,po, wa.po: New files.
Regenerate other translations.
2006-08-09 20:11:12 +00:00
Paul Eggert
87bfb896c6 Remove the po-update procedure; it doesn't
work with the new repository on http://www.iro.umontreal.ca/.
For now I guess we'll have to fix things by hand.
(do-po-update, po-update): Remove.  All references removed.
2006-08-09 20:06:14 +00:00
Paul Eggert
4ab47a295f Fix too-long line in 2006-08-08 checkin, and an encoding error
in 2006-07-19 checkin.
2006-08-09 20:05:18 +00:00
Paul Eggert
adcb60e9d8 (my-distcheck): Compile with -Wpointer-arith
to detect this sort of problem automatically in the future.
2006-08-09 18:08:06 +00:00
Paul Eggert
b1a2656bdb (next_line): New function.
(read_input): Use it, to avoid relying on GCC-specific behavior
with void * arithmetic.
2006-08-09 18:07:43 +00:00
Jim Meyering
a5e7cc0811 Add a compile-time check to ensure that filetype
and filetype_letter have the same number of elements.
2006-08-09 09:45:17 +00:00
Jim Meyering
ff7f318ae1 Remove use of --seed=S. 2006-08-09 08:24:37 +00:00
Jim Meyering
aa4f6c56c7 Include <config.h>. 2006-08-09 08:13:36 +00:00
Jim Meyering
a402cb33ba Add lib/randread.c, lib/xmemxfrm.c, and src/shuf.c. 2006-08-09 08:12:27 +00:00
Paul Eggert
5e56a8e861 Fix typo in latest changelog entry: restrict.m4 wasn't logged right. 2006-08-08 22:41:15 +00:00
Paul Eggert
dc64059426 Add shuf, better random number generation, and fix sort -R in
funny locales.
2006-08-08 22:28:00 +00:00
Paul Eggert
cd321e4660 Remove, since we no longer need gl_RESTRICT. 2006-08-08 22:26:44 +00:00
Paul Eggert
7c4b2e2a5c Remove; its contents are now in ../lib/rand-isaac.c. 2006-08-08 22:23:11 +00:00
Paul Eggert
73742c2566 New file, introduced for shuf, sort -R, and/or shred. 2006-08-08 22:22:47 +00:00
Paul Eggert
f2f8ea1001 (TESTS): Add shuf. 2006-08-08 22:20:59 +00:00
Paul Eggert
f8abf03c3f Use new random-number interface rather than rand-isaac.c.
Don't include rand-isaac.c; include randint.h and randread.h instead.
(RANDOM_SOURCE_OPTION): New enum.
(long_opts, usage, main): New option --random-source.
Include md5.h, randread.h, xmemxfrm.h.
(longopts, usage, main): Remove undocumented --seed option;
it's now replaced by --random-source.
(rand_state, get_hash): Remove.
(randread_source): New static var.
(random_state, cmp_hashes, compare_random): New functions; they guarantee
no collisions in the random hash function.
(keycompare): Use compare_random for -R; don't fall back on comparing
via memcoll, since compare_random does the right thing.
2006-08-08 22:20:12 +00:00
Paul Eggert
65533e1b09 Use new random-number interface rather than rand-isaac.c.
Don't include rand-isaac.c; include randint.h and randread.h instead.
(RANDOM_SOURCE_OPTION): New enum.
(long_opts, usage, main): New option --random-source.
(struct irand_state, irand_init, irand32, irand_mod): Remove.
All callers changed to use randint interface.
(fillrand): Remove.  All callers changed to use randread interface.
(dopass): Remove dependency on ISAAC buffer size.
(genpattern): Don't wipe the random state here.
(randint_source): New static var.
(clear_random_data): New function.
(main): Allocate random source, and arrange to wipe it on exit.
2006-08-08 22:19:39 +00:00
Paul Eggert
129e7756b9 (bin_PROGRAMS): Add shuf.
(EXTRA_DIST): Remove rand-isaac.c.
(shuf_LDADD): New macro.
2006-08-08 22:19:03 +00:00
Paul Eggert
8cfbf68782 (dist_man_MANS): Add shuf.1.
(shuf.1): New dependency.
2006-08-08 22:18:39 +00:00
Paul Eggert
c678c40671 Add shuf.1. 2006-08-08 22:18:20 +00:00
Paul Eggert
36ed13bc2f (gl_TIME_R): Use AC_C_RESTRICT, not
gl_C_RESTRICT, since we assume recent Autoconf.
2006-08-08 22:17:56 +00:00
Paul Eggert
14f6099f6e (gl_PREREQ_REGEX): Use AC_C_RESTRICT, not gl_C_RESTRICT, since we
assume recent Autoconf.
2006-08-08 22:17:20 +00:00
Paul Eggert
2409478e37 (gl_PREREQ): Require gl_MEMXFRM, gl_RANDINT, gl_RANDPERM,
gl_RANDREAD.
2006-08-08 22:16:51 +00:00
Paul Eggert
a7537e5f07 (gl_PREREQ_GETADDRINFO): Use AC_C_RESTRICT, not
gl_C_RESTRICT, since we assume recent Autoconf.
2006-08-08 22:16:18 +00:00
Paul Eggert
7e5863463c (libcoreutils_a_SOURCES): Add xmemxfrm.c, xmemxfrm.h. 2006-08-08 22:12:21 +00:00
Paul Eggert
0d98074403 (shuf invocation, Random sources): New sections.
(Operating on sorted files): Add shuf.
(sort invocation, shred invocation): New option --random-source.
(sort invocation): Fix typo: -R -> -r.
2006-08-08 22:11:49 +00:00
Paul Eggert
f0992c673c Add shuf. 2006-08-08 22:11:18 +00:00
Paul Eggert
6767712f7e Add shuf. Mention new --random-source option for shred and sort.
Move "sort +1 -2" notice to the appropriate section, and clarify its
role with respect to POSIXLY_CORRECT.
2006-08-08 22:10:39 +00:00
Paul Eggert
d578d8a8be Add shuf. 2006-08-08 22:10:05 +00:00
Paul Eggert
528fe6e504 (set_author): Preserve the st_author field via the
file descriptor dest_desc.
2006-07-29 17:13:28 +00:00
Paul Eggert
aa24517b5f chmod 0755 DIR and chmod 755 DIR are now equivalent. 2006-07-28 07:28:56 +00:00
Paul Eggert
6eb119a91e chmod now preserves setuid and setgid bits on directories
if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
2006-07-28 07:27:56 +00:00
Paul Eggert
e7583d05d3 Clear setuid and setuid bits on directory, in case the build
directory has them set and they're inherited.
2006-07-28 07:27:20 +00:00
Paul Eggert
1e7c68d3fc Use symbolic mode so that we clear
setgid bit more reliably on directories.
2006-07-28 07:26:39 +00:00
Paul Eggert
aaa8e4f378 Remove obsolete comment about masks. 2006-07-28 07:26:06 +00:00
Paul Eggert
fa78395b2a (mode_compile): Numeric modes now affect setuid and
setgid on directories only if they set these bits.
2006-07-28 07:25:44 +00:00
Paul Eggert
b8bbece57a (Changing Special Mode Bits): Clarify u+s versus
a+s versus +s, and likewise for g+s.
(Numeric Modes): Bring back example of 0055 == 55.  4755 no
longer clears setgid bit on directories.
(Directory Setuid and Setgid): Numeric modes now affect setuid
and setgid on directories only if they set these bits.  This
is so that leading 0 has no effect on numeric modes.
2006-07-28 07:21:03 +00:00
Paul Eggert
82e0ce4d8b (install invocation, mkdir invocation):
Add cross-references to Directory Setuid and Setgid.
(install-invocation): The default mode is no longer equivalent to 755.
2006-07-28 07:20:28 +00:00
Jim Meyering
667f225c08 * src/chgrp.c (usage): Use correct grammar in description of the --reference option
* src/chown.c (usage): Likewise.
2006-07-27 09:11:08 +00:00
Jim Meyering
256d18e81b * src/copy.c (set_author) [HAVE_STRUCT_STAT_ST_AUTHOR]:
Correctly access SRC_SB's element ST_AUTHOR.
2006-07-26 14:43:00 +00:00
Jim Meyering
2f418ef97d * tests/ls/stat-failed: Adapt to match new expected output.
From Paul Eggert.
2006-07-26 14:35:19 +00:00
Jim Meyering
d2c6ae7fbc * src/ls.c (print_color_indicator): Test for S_IFREG first, rather
than having the code test for all of the other types first.
Hoist the set-uid/gid-testing code "up" into this new block.
Classify any other type of file (e.g., S_TYPEISSHM, etc.) as
C_ORPHAN, not as C_FILE.

* doc/coreutils.texi (What information is listed): Mention that missing
pieces of information are marked with "?".  From Paul Eggert.
2006-07-26 14:06:57 +00:00
Jim Meyering
2465b478fd Checking in a change from Paul.
2006-07-25  Paul Eggert  <eggert@cs.ucla.edu>

* src/ls.c (DT_INIT): Remove.  All uses removed.
(enum filetype): Use an ordinary enum rather than trying to keep
the values in sync with DT_FIFO etc.  That way, we don't have
to make special assumptions about them.  All uses changed.
(whiteout): New constant member of enum filetype.
(filetype_letter): New constant, for use with enum filetype.
(FILETYPE_INDICATORS): New initializer list.
(print_dir): Add case for DT_WHT.
(gobble_file): If stat fails, don't discard information from
readdir; instead, preserve it so it can be printed.
(print_long_format): Fall back on readdir result if stat info
is not available.  Use "?" to denote each unknown mode char,
instead of an overall "?", since we now know some of the mode
typically.
(print_type_indicator): Now that MODE isn't necessarily
useful, guard all uses.
Now that two blocks in the type-checking tree can set "type = C_FILE",
move the suffix-handling code out and down.
2006-07-26 13:47:41 +00:00
Jim Meyering
efb40f6b0f Prepare for the above change.
* src/ls.c [struct fileinfo] (stat_ok): Rename from stat_failed,
and adjust uses.  From a patch by Paul Eggert.
2006-07-26 13:33:07 +00:00
Jim Meyering
03d872537a * src/ls.c: Correct indentation/formatting in a few places. 2006-07-26 09:52:43 +00:00
Paul Eggert
b7f9a7ed05 Clarify the "chmod 0500" news, and correct the vague
statements about compatibility with BSD.
2006-07-25 18:38:58 +00:00
Paul Eggert
97e1e9019d Use "chmod 0500" rather than "chmod 500". 2006-07-25 18:38:25 +00:00
Paul Eggert
5637c1634f (Directory Setuid and Setgid): Explain that this is a
GNU extension, and that other systems behave differently here.
2006-07-25 18:37:55 +00:00
Jim Meyering
0b34021d6d * src/ls.c (gobble_file): When handling a stat-failed entry,
print the entry name not the absolute_name -- to be consistent
with the usual case.
* tests/ls/stat-failed: Update accordingly.
2006-07-25 16:35:59 +00:00
Jim Meyering
995cbf7830 * tests/ls-2/tests (no-a-isdir-b): Update to reflect addition
of "cannot access " to diagnostic.
2006-07-25 15:40:02 +00:00
Jim Meyering
2a287ee69b *** empty log message *** 2006-07-25 15:36:07 +00:00
Jim Meyering
fd991bcc57 * src/dircolors.hin: Mention that ORPHAN refers not just to dangling symlinks. 2006-07-25 15:34:58 +00:00
Jim Meyering
ef79e4ea3b * src/dircolors.hin: Mention that ORPHAN refers not just to dangling symlinks. 2006-07-25 15:33:57 +00:00
Jim Meyering
c04a374bb0 Get --dired offsets right when handling stat-failed entries.
* src/ls.c (print_long_format): Be careful to increment P by the
appropriate amount, even when inode_number_width and nlink_width
are zero.
* tests/ls/stat-failed: Test for the above.
2006-07-25 15:30:27 +00:00
Jim Meyering
5a06d062c7 * src/ls.c (gobble_file) [USE_ACL]: Don't use-uninitialized the
have_acl member.  That would happen for a directory with both a
non-stat'able entry and one with an ACL.
2006-07-25 15:25:37 +00:00
Jim Meyering
3a208b1404 * src/ls.c (gobble_file): Make it so failure to stat a
non-command-line file provokes an exit status of 1, not 0.
Say "cannot access" rather than "cannot stat".
* tests/ls/stat-failed: New file/test, for the above.
* tests/ls/Makefile.am (TESTS): Add stat-failed.
2006-07-25 15:23:59 +00:00
Jim Meyering
a321dfb09d * src/ls.c: Declare stat_failed to be "bool", not "int" everywhere. 2006-07-25 15:13:56 +00:00
Jim Meyering
1827b515aa * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
Replace all occurrences of "type == command_line" with the
equivalent, "command_line_arg".
2006-07-25 15:12:26 +00:00
Jim Meyering
ccb1883fcd * src/ls.c: Apply the stat-failed parts of Red Hat's
coreutils-selinux.patch.  From Ulrich Drepper.
This makes it so files not mentioned on the command line (e.g.,
names read from a directory that *is* mentioned on the command
line) for which stat fails are still listed.  With --color,
such files are colored just like ORPHANs (aka dangling symlinks).
2006-07-25 15:09:56 +00:00
Jim Meyering
427a636ae3 . 2006-07-25 14:34:39 +00:00
Jim Meyering
0ff7cb7f69 vc-list-files: Handle git repositories, too. 2006-07-25 14:10:12 +00:00
Jim Meyering
627f9b7fb1 * src/df.c (n_valid_args): Declare global to be static. 2006-07-25 14:06:21 +00:00
Jim Meyering
f2641bb9f7 Skip this test on reiserfs, since that file system lacks d_type support. 2006-07-24 14:02:35 +00:00
Paul Eggert
7192610528 Update to reflect recent changes to coreutils.texi. 2006-07-23 01:27:27 +00:00
Paul Eggert
bdcc26e24b (Mode Structure, Symbolic Modes, Numeric Modes): Be more careful
about distinguishing file mode bits from permissions bits,
and about execute versus search permission.  The FreeBSD command
is chflags, not chrflags.
2006-07-23 01:26:56 +00:00
Paul Eggert
a29aa4faa6 (Mode Structure): The restricted deletion flag
restricts only unprivileged users.
2006-07-22 23:42:19 +00:00
Paul Eggert
e27208b635 (What information is listed): Clarify that the restricted deletion
flag is another name for the sticky bit.
2006-07-22 23:41:43 +00:00
Paul Eggert
e718c61a7c Split closeout into close-stream and closeout. 2006-07-22 22:28:53 +00:00
Paul Eggert
554d94c647 (close_stdout): Use new function close_stream. 2006-07-22 22:27:17 +00:00
Paul Eggert
2df2295d68 Initial revision. 2006-07-22 22:26:04 +00:00
Paul Eggert
0971f7f44a (gl_PREREQ): Require gl_CLOSE_STREAM. 2006-07-22 22:23:43 +00:00
Jim Meyering
c6a13a3354 * src/su.c (usage): Correct typo in --help output: s/commmand/command/
Reported by Tim Waugh.
Also remove the comment duplicating much of --help output.
2006-07-21 13:32:40 +00:00
Jim Meyering
680bd6f6dd *** empty log message *** 2006-07-21 09:14:43 +00:00
Jim Meyering
a1eae84aed (FILE_TYPE_INDICATOR_OPTION): Reposition this new name so the list remains alphabetized. 2006-07-21 09:14:39 +00:00
Jim Meyering
2c5f6e6e2c mention yesterday's other ls bugfix 2006-07-21 08:58:00 +00:00
Jim Meyering
eb12ed1aa7 *** empty log message *** 2006-07-21 08:57:47 +00:00
Jim Meyering
9e0a095be6 Fix another bug: ls --indicator-style=file-type would call
stat for a symlink, even though it wasn't always needed.
In some cases, that unnecessary stat would cause ls to fail.
* src/ls.c (gobble_file): Don't treat symlinks specially (in
requiring a stat syscall).  Remove the offending exclusion.
* NEWS: Mention the fix.
* tests/ls/stat-dtype: New file/test, for the above fix.
Also exercises the new df feature, below.
2006-07-21 08:49:24 +00:00
Jim Meyering
2060c55141 * src/df.c (main): Fail and don't print the headers if no
file system is processed.  This makes it easy to test whether
a specified directory is on a file system of a given type or types.
Otherwise, applications would have had to parse df's output.
E.g., is "." either ext3 or reiserfs: df -t ext3 -t reiserfs .
2006-07-20 15:42:26 +00:00
Jim Meyering
6ad7eac04f *** empty log message *** 2006-07-20 10:31:48 +00:00
Jim Meyering
492f011795 (file-type): New test:
For 5.97 and earlier, --file-type acted like --indicator-style=slash.
2006-07-20 10:30:42 +00:00
Jim Meyering
3ddfde6897 Fix a bug: ls --file-type worked like --indicator-style=slash,
rather than like --indicator-style=file-type.

(FILE_TYPE_INDICATOR_OPTION): New enum member.
(long_options): Map "file-type" to FILE_TYPE_INDICATOR_OPTION,
not to 'p'.
(decode_switches): Handle new case: FILE_TYPE_INDICATOR_OPTION.
2006-07-20 10:20:23 +00:00
Jim Meyering
aa91e4fe34 *** empty log message *** 2006-07-20 08:34:22 +00:00
Jim Meyering
6e41860c41 [ME_REMOTE]: Filter out cifs.
Reported by Toralf Frster in <http://bugs.gentoo.org/141012>.
2006-07-20 08:34:15 +00:00
Jim Meyering
6e31234fbb *** empty log message *** 2006-07-20 08:33:19 +00:00
Jim Meyering
84d2889e40 *** empty log message *** 2006-07-20 07:57:10 +00:00
Jim Meyering
db42e50e5e (ME_REMOTE): Compare strchr's result to NULL, not 0, for better readability. 2006-07-20 07:57:06 +00:00
Jim Meyering
7d97c337a7 * src/ls.c (print_dir): Give a better diagnostic for failed opendir. 2006-07-19 10:36:02 +00:00
Jim Meyering
30e6fc491f *** empty log message *** 2006-07-19 09:56:03 +00:00
Jim Meyering
865bf3e4ff (EXTRA_DIST): Add build-aux/vc-list-files. 2006-07-19 09:54:53 +00:00
Jim Meyering
603da96fbd *** empty log message *** 2006-07-19 09:54:32 +00:00
Jim Meyering
6f91fb9595 Command line args correspond to an "include" list, not an exclude list. 2006-07-19 09:54:28 +00:00
Jim Meyering
76d82ec5cc tweak spacing to align backslashes 2006-07-19 08:43:27 +00:00
Paul Eggert
f8e8d8dd69 In comment: bits bits -> bits. 2006-07-17 05:56:28 +00:00
Paul Eggert
a58ac00556 Regenerate. 2006-07-17 03:52:18 +00:00
Paul Eggert
16f64d42ba Regenerate. 2006-07-17 03:51:25 +00:00
Paul Eggert
6d62ac46ce Fix typo in previous checkin; some file names were wrong. 2006-07-17 03:35:18 +00:00
Paul Eggert
628c7baa85 chmod, install, and mkdir now leave setgid and setuid bits
of directories alone unless you specify them explicitly.
install and mkdir now implement X correctly.
install now creates parent directories with mode 755, without
changing their owner or group.
2006-07-17 03:13:14 +00:00
Paul Eggert
d847e28b37 Add a test for the X bug. 2006-07-17 03:12:44 +00:00
Paul Eggert
01014bb951 Remove re_protect case that no longer applies.
GNU chmod now behaves like other versions of chmod.
2006-07-17 03:12:22 +00:00
Paul Eggert
4d9d2da4a8 Do the setgid test instead of bailing. 2006-07-17 03:11:51 +00:00
Paul Eggert
577faf65e3 (main): Adjust to new mode_adjust API. 2006-07-17 03:11:01 +00:00
Paul Eggert
1d396d7008 (main): Adjust to new mode_adjust API. 2006-07-17 03:10:29 +00:00
Paul Eggert
76b12f0005 (struct mkdir_options): New struct.
(announce_mkdir, make_ancestor): New functions.
(main): Use them.  Adjust to mode_adjust API change.  Stick with
umask 0.  Use make_dir_parents for all the work.
2006-07-17 03:10:10 +00:00
Paul Eggert
83978a5654 Include mkancesdirs.h.
(announce_mkdir, make_ancestor): New functions.
(DEFAULT_MODE): New macro, specifying initial value of 'mode'.
(mode): Use it.
(dir_mode, dir_mode_bits): New vars.
(main): Set dir modes separately from nondir, so that the X
op of -m works correctly.
(main): Remove cwd_errno cruft, since make_dir_parents no longer
affects cwd.  Adjust to new make_dir_parents API.
(install_file_in_file_parents): 2nd arg is now char *, not char
const *.  Use mkancesdirs instead of rolling our own code.
(change_attributes): Don't worry about AFS, since that kludge
should not be needed any more.
2006-07-17 03:09:49 +00:00
Paul Eggert
8401b6ae54 (process_file): Adjust to mode_adjust API change. 2006-07-17 03:09:26 +00:00
Paul Eggert
c09c4070ff (gl_PREREQ): Require gl_MKANCESDIRS. 2006-07-17 03:09:09 +00:00
Paul Eggert
6060142d89 (gl_MKDIR_PARENTS): Mention dirchownmod.c, dirchownmod.h.
Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER; no longer needed.
Require gl_FUNC_LCHOWN, since dirchownmod.c needs it.
2006-07-17 03:08:42 +00:00
Paul Eggert
1d5f7fa081 Remove; no longer needed. 2006-07-17 03:08:18 +00:00
Paul Eggert
b2bc8fd0fd (gl_MACROS): Remove gl_AFS. 2006-07-17 03:08:04 +00:00
Paul Eggert
86e8a6b15e (mode_adjust): New API. 2006-07-17 03:07:41 +00:00
Paul Eggert
44ba013923 (octal_to_mode): New function.
(struct mode_change): New member mentioned.
(make_node_op_equals): New arg mentioned.  All callers changed.
(mode_compile): Keep track of which mode bits the user has explicitly
mentioned.
(mode_adjust): New arg DIR, so that we implement the X op correctly.
New arg PMODE_BITS, to keep track of which mode bits the user
mentioned; it treats S_ISUID and S_ISGID speciall.
All callers changed.
2006-07-17 03:07:23 +00:00
Paul Eggert
9a1ed6fbf9 Adjust to new make_dir_parents API. 2006-07-17 03:07:04 +00:00
Paul Eggert
a60cc14aed Don't include alloca.h, stdio.h, sys/types.h,
unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
(make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
callers changed.  Revamp internals significantly, by not
attempting to create directories that are temporarily more
permissive than the final results.  Do not attempt to use
save_cwd/restore_cwd; it isn't worth it for mkdir and install.
This removes some race conditions, fixes some bugs, and simplifies
things.  Use new dirchownmod function to do owner and mode changes.
2006-07-17 03:06:48 +00:00
Paul Eggert
e9b48653e2 (Mode Structure): Modernize the explanation of the
setuid and setgid bits on directories.
(Changing Special Mode Bits): Mention that a implies both u and g
for s.  Cross reference to new node.
(Numeric Modes): Don't claim that 0055 is the same as 55; this isn't
true any more.  Mention new node.
4755 is now like u=rwxs,go=rx,g-s, not like u=rwxs,go=rx.
(Directory Setuid and Setgid): New node.
2006-07-17 03:06:25 +00:00
Paul Eggert
3a10b32994 Change GNU to @acronym{GNU} in a few places.
Use "set-user-ID" and "set-group-ID" a bit more consistently.
Use "appropriate privileges" rather than "super-user" a bit
more consistently.
(install invocation): Parent directories are now 755 without uid
or gid changing.  The default mode is now 0755, not 755.
(mkdir invocation): Rewrite the top-level usage description, since
I couldn't easily follow the old one.  It's now 3 lines not 8.
For -m, describe file permission bits versus other bits, and note
that mkdir is atomic if you don't mention special bits.
(chmod invocation): Mention what chmod does to setgid and setuid bits.
2006-07-17 03:06:03 +00:00
Paul Eggert
f25ddb12c6 Initial version. 2006-07-17 03:05:23 +00:00
Paul Eggert
999eeed90f chmod, install, and mkdir now leave setgid and setuid bits
of directories alone unless you specify them explicitly.
install and mkdir now implement X correctly.
install now creates parent directories with mode 755, without
changing their owner or group.
2006-07-17 03:02:45 +00:00
Jim Meyering
c5b6394401 * userspec.c (parse_with_separator): Say "invalid spec" rather than
the sometimes erroneous "cannot get the login group of a numeric UID"
for a spec like "not-a-username:" or "1:".  Reported by
suckfish@ihug.co.nz in https://bugzilla.redhat.com/bugzilla/199027.
2006-07-16 07:13:07 +00:00
Paul Eggert
77c9d9a009 (do_decode): Output to parameter OUT, not to stdout. 2006-07-14 17:54:54 +00:00
Jim Meyering
a283f2df1a * Makefile.maint (CVS_LIST): Use new file, build-aux/vc-list-files,
rather than open-coding it.  Now supports mercurial, too.
* .hgignore: New file.
* Makefile.am (EXTRA_DIST): Add .hgignore, which ignores nearly
all generated files, including ones like configure and po/*.po
that are currently version-controlled in cvs.
* build-aux/vc-list-files: New file.
2006-07-14 14:42:27 +00:00
Jim Meyering
01e7d49a3b * Makefile.am (EXTRA_DIST): Add a few more .??* files.
They've been in CVS, just haven't been distributed before this.
Distribute ChangeLog-2005, too.
(MAINTAINERCLEANFILES): Add THANKS-to-translators.
2006-07-14 14:27:38 +00:00
Paul Eggert
d6697c60c3 Assume <dirent.h> exists, since gnulib assumes this now as well. 2006-07-11 17:22:15 +00:00
Paul Eggert
2b6236d156 Sync from gnulib. 2006-07-11 17:19:48 +00:00
Paul Eggert
888ee9b8d9 (gl_STDINT_H): Like yesterday's change to
absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
"no/such/file/stdint.h" when there is no such file, so that
the resulting C code can be parsed by dodgy compilers.
Problems reported by Bob Proulx.
2006-07-11 03:29:56 +00:00
Paul Eggert
6e1e9cd9b4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
around the absolute name, to work around a problem with the HP-UX
11.23 native C compiler, reported by Bob Proulx.
2006-07-10 04:37:33 +00:00
Jim Meyering
86f86c121b *** empty log message *** 2006-07-09 17:49:28 +00:00
Jim Meyering
6eb562ad35 (TESTS): Add dir2dir. 2006-07-09 17:49:24 +00:00
Jim Meyering
04463c3a6f *** empty log message *** 2006-07-09 17:48:13 +00:00
Jim Meyering
159f930158 Adjust so failing with ENOTEMPTY is ok, too.
That happens with Linux/tmpfs.
2006-07-09 17:48:08 +00:00
Paul Eggert
914c8674a5 Regenerate. 2006-07-09 17:20:26 +00:00
Paul Eggert
f354f3be02 Adjust to recent updates from gnulib. 2006-07-09 17:09:48 +00:00
Paul Eggert
197b96d069 Adjust to today's renaming changes in system.h. 2006-07-09 17:08:55 +00:00
Paul Eggert
b3e1ad7a5d (print_it): Don't assume char is unsigned. 2006-07-09 17:07:12 +00:00
Paul Eggert
b35b31b0f8 (print_esc): Don't assume char is unsigned. 2006-07-09 17:06:35 +00:00
Paul Eggert
20c336e6d2 (create_fullname): Don't assume char is unsigned. 2006-07-09 17:06:06 +00:00
Paul Eggert
2b001e3490 (is_blank): Remove; no longer needed. All uses
replaced by isblank (to_uchar (...)).
2006-07-09 17:05:33 +00:00
Paul Eggert
c7a6c4014f (unexpand): Don't assume that isprint etc. return
booleans (needed for pre-C99 hosts).
2006-07-09 17:05:13 +00:00
Paul Eggert
8c572b86f6 (is_char_class_member): Don't assume that isprint etc. return
booleans (needed for pre-C99 hosts).
2006-07-09 17:04:48 +00:00
Paul Eggert
613b3f819c (initialize_regex, fix_output_parameters): Don't assume that isprint
etc. return booleans (needed for pre-C99 hosts).
(SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
(copy_unescaped_string): Don't assume char is unsigned.
2006-07-09 17:04:06 +00:00
Paul Eggert
925076c5d6 (check_punctuation): Don't assume that isprint etc. return
booleans (needed for pre-C99 hosts).
2006-07-09 17:03:20 +00:00
Paul Eggert
55755b03cd (expand): Don't assume that isprint etc. return
booleans (needed for pre-C99 hosts).
2006-07-09 17:02:53 +00:00
Paul Eggert
1ee1c4d4a3 (inittables): Use toupper rather than
islower followed by toupper; it's simpler and typically
faster now that we assume at least C89 semantics.  Similarly
for tolower.
2006-07-09 17:02:17 +00:00
Paul Eggert
7c3fd7cbec (apply_translations): Use toupper rather than
islower followed by toupper; it's simpler and typically
faster now that we assume at least C89 semantics.  Similarly
for tolower.
2006-07-09 17:01:38 +00:00
Paul Eggert
d740f05066 (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
convenience on GNU systems.  All uses changed.  Don't bother
looking for any dirent.h substitute other than ndir.h.
(D_INO): Remove unnecessary parentheses.
(IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
(ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
(ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove.  All uses changed
to ctype.h equivalents.
(isblank): Renamed from ISBLANK.  Check for HAVE_DECL_ISBLANK too.
All uses changed.
2006-07-09 17:01:13 +00:00
Paul Eggert
fbb436b3f8 Update from gnulib. 2006-07-09 16:59:35 +00:00
Paul Eggert
cb052e4f6c Update from gnulib. 2006-07-09 16:59:05 +00:00
Paul Eggert
28edf6a75e (stdint.h): FULL_PATH_STDINT_H -> ABSOLUTE_STDINT_H,
to accommodate update from gnulib.
2006-07-09 16:57:35 +00:00
Paul Eggert
533793f35c Update from gnulib. 2006-07-09 16:57:00 +00:00
Jim Meyering
ba6a5af063 remove doubled "in" 2006-07-09 09:49:10 +00:00
Jim Meyering
62f3c3097c fix typo: remove doubled "each" 2006-07-09 09:47:20 +00:00
Jim Meyering
75f0b1e2da New file, test for 2006-07-05 fix in copy.c. 2006-07-08 21:52:24 +00:00
Jim Meyering
7d65513654 * regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a comment. 2006-07-08 12:08:59 +00:00
Jim Meyering
00318b60c9 * link-follow.m4: Remove one of two adjacent "whether"s in a comment. 2006-07-08 11:28:05 +00:00
Jim Meyering
7ea443fa86 Remove one of two adjacent "your"s in a comment. 2006-07-08 11:27:07 +00:00
Jim Meyering
a3752970c9 Remove one of two adjacent "can"s in a comment. 2006-07-08 11:25:18 +00:00
Jim Meyering
ecdb09854e (getndelim2): Remove doubled "after" in comment. 2006-07-08 09:58:13 +00:00
Jim Meyering
2d9ebdc8ae * tests/Coreutils.pm: Remove one of two adjacent "then"s in a comment. 2006-07-08 07:37:16 +00:00
Jim Meyering
d80c390842 * Makefile.maint (sc_the_the): New rule. 2006-07-08 06:08:34 +00:00
Jim Meyering
6b535b03bb * src/dd.c (skip): Remove one of two adjacent "the"s in a comment. 2006-07-08 06:04:18 +00:00
Jim Meyering
24ec8f28bb * coreutils.texi (Squeezing): Separate doubled "the", so typo-checkers
don't complain.
2006-07-08 06:03:50 +00:00
Jim Meyering
a56e9c5a4d * Makefile.am (check-texinfo): Enforce the zeros vs. zeroes consistency. 2006-07-08 05:31:59 +00:00
Jim Meyering
38fbc11f7b * coreutils.texi: Fix some typos. Use `zeros' consistently (both
`zeros' and `zeroes' are correct).
2006-07-08 05:28:39 +00:00
Jim Meyering
1ac491f062 * NEWS: Mention that mv can now remove an empty destination directory,
and give an example.  Prompted by a report from Florent Bayle.
2006-07-07 06:38:36 +00:00
Jim Meyering
b544360dab * src/ls.c (usage): Correct the description of -G: it is useful
only in a long listing.  Reported by Martin Pool in
<https://launchpad.net/distros/ubuntu/+source/coreutils/+bug/51653>.
2006-07-05 10:17:24 +00:00
Jim Meyering
2a7f886e47 * man/chmod.x: Correct the description of the sticky bit. Reported
by Chris Moore via Ian Jackson in <http://bugs.debian.org/376745>.
2006-07-05 10:03:55 +00:00
Jim Meyering
36a288e41a * src/copy.c (copy_internal): Don't work around old NFS clients like
SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
ENOTEMPTY upon failed rename.  Otherwise, we risk misinterpreting
a banal failure as a recursive move-into-self failure.
Reported by Florent Bayle in <http://bugs.debian.org/376749>.
2006-07-05 09:08:42 +00:00
Jim Meyering
7669f3998d . 2006-07-05 06:57:09 +00:00
Jim Meyering
21f0c888a2 Regenerate, to remove fuzz. 2006-07-05 06:57:00 +00:00
Jim Meyering
addbdadf16 Really add wcwidth.h. 2006-07-04 07:28:57 +00:00
Jim Meyering
2880a90019 *** empty log message *** 2006-07-04 07:28:45 +00:00
Jim Meyering
ba761d685f *** empty log message *** 2006-07-04 07:23:10 +00:00
Jim Meyering
ab4ed7f7f1 Really add wcwidth.m4. 2006-07-04 07:17:34 +00:00
Paul Eggert
6a97405672 Sync from gnulib. 2006-07-04 05:39:07 +00:00
Paul Eggert
8e19f6282b Sync from gnulib. Also:
(gt_FUNC_SETENV): Undo private change that added an
AC_LIBSOURCES line here, since Bruno didn't buy it back.  Instead,
update ../lib/Makefile.am to mention the files explicitly.
2006-07-04 05:38:32 +00:00
Paul Eggert
d380605f01 (gl_PREREQ): Require gl_FUNC_WCWIDTH, to accommodate
sync from gnulib.
2006-07-04 05:37:58 +00:00
Paul Eggert
71e6c80352 (libcoreutils_a_SOURCES): Add setenv.h, wcwidth.h,
to accommodate sync from gnulib.
2006-07-04 05:37:11 +00:00
Paul Eggert
948ca71450 Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
MacOS X 10.4.6.  Don't mention <sys/int_types.h>.
2006-07-04 04:50:34 +00:00
Jim Meyering
a9cf203e2d Plug another unusual leak.
(AD_mark_helper): Free malloc'd filename if hash_insert says
that string is already in the hash table.
2006-07-03 17:38:20 +00:00
Jim Meyering
1a29d221b8 * cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
macro is used before the first cycle_check call.
2006-07-03 15:20:23 +00:00
Jim Meyering
a47c5ca291 The dev/inode of the topmost directory in each hierarchy were not
being recorded.
* src/remove.c (remove_cwd_entries): Don't call cycle_check here.
(AD_push): Call it from here instead.
2006-07-03 15:10:35 +00:00
Jim Meyering
2741ffb8b4 Fix two small leaks.
* src/remove.c (AD_stack_clear): New function.
(rm_1): Use it.
(AD_pop_and_chdir): Free *prev_dir just before longjmp.
2006-07-03 13:14:01 +00:00
Jim Meyering
ae87c86b4a * tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-07-03 12:55:25 +00:00
Jim Meyering
d67693ced9 . 2006-07-03 09:10:36 +00:00
Jim Meyering
20592da66e * tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.
* tests/Makefile.am (evar-check): Remove rule.
(EXTRA_DIST): Remove .env-warn.
* tests/.env-warn: Remove file.  No longer used.
Suggestion from Eric Blake.
2006-07-03 08:37:50 +00:00
Jim Meyering
c4a674722c *** empty log message *** 2006-07-03 07:42:30 +00:00
Jim Meyering
f483ac253e (gl_FUNC_FTRUNCATE): Adjust diagnostic to recommend
./configure SKIP_FTRUNCATE_CHECK=yes, rather than env ... ./configure.
Suggestion from Ralf Wildenhues.
2006-07-03 07:42:27 +00:00
Paul Eggert
001f33d478 (intmax_t, uintmax_t): Prefer long to long long if
both are 64 bits.
2006-07-02 09:15:08 +00:00
Paul Eggert
2789dcc1b9 (gl_STDINT_H): Use more-mnemonic identifiers for
test cases, so that config.log is a bit easier to follow.
2006-07-02 09:14:28 +00:00
Jim Meyering
85e93ac1bf *** empty log message *** 2006-07-02 08:29:30 +00:00
Jim Meyering
b1f0257390 New file, from gnulib. Required by stdint.m4. 2006-07-02 08:29:26 +00:00
Paul Eggert
58df3afc50 Include <stdint.h> unconditionally, since we
now assume the stdint module.
2006-07-02 07:09:25 +00:00
Paul Eggert
047839ffb4 Sync stdint module from gnulib. 2006-07-02 07:08:50 +00:00
Paul Eggert
31acf81fa0 With no operand, 'tail -f' now silently ignores the '-f'
only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2006-07-01 23:53:05 +00:00
Paul Eggert
2d33a9301b (f-pipe-1): Renamed from f-1.
(test_vector): Set POSIXLY_CORRECT for the f-pipe-* tests.
2006-07-01 23:50:46 +00:00
Paul Eggert
7b49a25b50 (main): With no operand, 'tail -f' now silently ignores the '-f'
only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2006-07-01 23:50:15 +00:00
Paul Eggert
0830b1b82a (tail invocation): With no operand, 'tail -f' now
silently ignores the '-f' only if standard input is a FIFO or pipe
and POSIXLY_CORRECT is set.
2006-07-01 23:49:46 +00:00
Jim Meyering
aa9b173531 * src/ln.c (do_link): Use new, shorter URL, for ag-review link. 2006-07-01 07:04:52 +00:00
Jim Meyering
530a8d72cc Add ^lib/xstrtold\.c$, so make distcheck passes once again. 2006-07-01 06:50:30 +00:00
Jim Meyering
8939a957c7 *** empty log message *** 2006-07-01 06:44:22 +00:00
Paul Eggert
69f1a97138 seq defaults to a minimal fixed point format that does not lose
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.

seq now lets you use %a, %A, %E, %F, and %G formats.

seq now uses long double internally rather than double.
2006-07-01 00:11:23 +00:00
Paul Eggert
248c092226 (seq invocation): seq now uses long double
internally rather than double.  It now defaults to a minimal fixed
point format if possible.  It lets you use %a, %A, %E, %F, %G.
Don't assume printf doesn't work for numbers that fit in 64 but
not 32 bits; typically they work these days.  Improve discussion
of large integers and update the rounding-error numbers.
2006-07-01 00:10:21 +00:00
Paul Eggert
3964d508e2 (XSTRTOD, DOUBLE): New macros, so that we can support
both double and long double versions.
(XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
2006-07-01 00:09:56 +00:00
Paul Eggert
42ae65127f (xstrtold): New decl. 2006-07-01 00:09:22 +00:00
Paul Eggert
507aaa0037 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
want to require the building of c-strtod.o.
2006-07-01 00:08:56 +00:00
Paul Eggert
6b2cf24aac (cu_LIB_CHECK): Remuve SEQ_LIBM, since seq no longer
needs -lm directly.
2006-07-01 00:08:31 +00:00
Paul Eggert
0f39955197 (gl_PREREQ): Require gl_C_STRTOD and gl_XSTRTOLD. 2006-07-01 00:08:05 +00:00
Paul Eggert
1d30cbe7df (gl_XSTRTOLD): New macro. 2006-07-01 00:07:48 +00:00
Paul Eggert
37fe2d4d3e (seq_LDADD): Remove $(SEQ_LIBM); add $(POW_LIB). 2006-07-01 00:07:26 +00:00
Paul Eggert
6c5f11fbfe Don't include <math.h> or <xstrtol.h>; no longer needed.
(isfinite) [!defined isfinite]: New macro.
(separator, terminator): Now points to const.
(first, step, last): Remove.
(usage): Update to match new behavior.
(struct operand, operand): New type.
(scan_arg): Renamed from scan_double_arg, since we no longer use double.
All uses changed.
Compute and return a value of type operand, not double.
(long_double_format): Renamed from valid_format, and now returns a
new format with an "L" added if needed, if the original format was
valid.  Allow %a, %A, %E, %F, and %G formats.
(print_numbers): Take numeric values as args rather than from globals.
Print long double, not double.
(get_width_format): Remove.
(get_default_format): New function.
(main): Implement new way of calculating default format.
Don't worry about locale's representation of the decimal point, since
the arguments are always processed in the C locale.
2006-07-01 00:07:06 +00:00
Paul Eggert
75a229e3a3 (neg-2): Adjust to new default format.
(eq-wid-1, eq-wid-2): Resurrect these tests, since the new
implementation should do the right thing.
2006-07-01 00:06:35 +00:00
Paul Eggert
74d539a32f Initial revision. 2006-07-01 00:06:11 +00:00
Jim Meyering
28b3cf0a5c * tests/stty/basic-1: Work around an intermittent test failure
on HP-UX 11.11.  Report and analysis from Bob Proulx.
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
2006-06-30 10:31:42 +00:00
Jim Meyering
2e63aaa8a9 From Derek R. Price:
* lib/strftime.c: Assume strftime exists.
* m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
2006-06-29 21:45:51 +00:00
Paul Eggert
4a8016db69 * src/sort.c (main): Support obsolete usages like "sort +1 -2" even when
conforming to POSIX 1003.1-2001, since this is a pure extension to
POSIX.
2006-06-28 23:51:13 +00:00
Paul Eggert
59e82cb266 * coreutils.texi (sort invocation): 'sort +1 -2' is now supported
even when conforming to POSIX 1003.1-2001.
2006-06-28 23:50:40 +00:00
Paul Eggert
5b3614ac91 (sort invocation): 'sort +1 -2' is now supported
even when conforming to POSIX 1003.1-2001, since this is a pure
extension to POSIX.
2006-06-28 23:50:21 +00:00
Paul Eggert
3869e29196 Support obsolete usages like "sort +1 -2" even when conforming to
POSIX 1003.1-2001.
2006-06-28 23:49:58 +00:00
Paul Eggert
ab621d9fa1 (CLOSEDIR): Remove. All uses changed to closedir. 2006-06-28 22:24:54 +00:00
Paul Eggert
699d9c460e * savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement. 2006-06-28 22:24:14 +00:00
Paul Eggert
0b24b84044 * src/system.h (CLOSEDIR): Remove. All uses changed to closedir. 2006-06-28 22:21:48 +00:00
Paul Eggert
3eaec256b7 Fix attribution again. 2006-06-28 22:04:56 +00:00
Paul Eggert
d54ac21e44 Fix attribution for last patch. 2006-06-28 22:04:12 +00:00
Paul Eggert
41872b2d6b Don't require AC_C_CONST, since it's obsolete.
Require Autoconf 2.60.
2006-06-28 22:00:33 +00:00
Paul Eggert
c1f8b7eba9 (gl_FUNC_GNU_STRFTIME): Don't require AC_C_CONST, since it's obsolete. 2006-06-28 22:00:13 +00:00
Paul Eggert
84ab5b148f (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since it's obsolete. 2006-06-28 21:59:41 +00:00
Paul Eggert
4333e76636 (gl_CHECK_ALL_TYPES): Don't require AC_C_CONST, since it's obsolete. 2006-06-28 21:59:07 +00:00
Jim Meyering
78e532a9e4 * src/c99-to-c89.diff: Regenerate, to remove fuzz. 2006-06-28 07:01:42 +00:00
Jim Meyering
0e0f6e1050 * tests/mv/i-link-no: Work around HP-UX /bin/sh tracing problem
(set -x when VERBOSE=yes) when stderr is redirected before stdout
causing shell tracing of the stdout redirection to be written to
the stderr file.  Avoid problem and test failure on HP-UX by
redirecting stderr last.
* tests/dd/unblock-sync: Order shell file redirections for
stderr and stdout in the common style.
tests/acl: Likewise.
2006-06-28 06:51:06 +00:00
Jim Meyering
c4d2d39cf8 .PHONY: sc_tight_scope 2006-06-27 21:22:15 +00:00
Jim Meyering
05d3db5c60 * coreutils.texi (wc invocation): Remove ./ prefix from example.
From Padraig Brady.
2006-06-27 20:26:12 +00:00
Jim Meyering
df96ded8ae * tests/misc/cat-proc: Try to avoid any spurious numeric
differences in frequently-changing /proc/cpuinfo.
Reported by Nelson Beebe.
2006-06-27 18:43:58 +00:00
Jim Meyering
80059da4ca * coreutils.texi (wc invocation): Spell out `--files0-from' in
the example. Suggestion from Bob Proulx.
2006-06-26 15:34:19 +00:00
Jim Meyering
7590adf9b9 Attempt rmdir (actually, unlinkat-with-AT_REMOVEDIR) upon any
fd_to_subdirp failure, not just when errno == EACCES.
* src/remove.c (remove_dir): Use unlinkat-with-AT_REMOVEDIR, not
rmdir, here, even though rmdir may happen to be adequate.
2006-06-26 13:29:48 +00:00
Jim Meyering
78b166d1b1 * NEWS: rm no longer fails to remove an empty, unreadable directory
* src/remove.c (remove_cwd_entries): If we can't open a directory,
and the failure is not being ignored, try to remove the directory
with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
Problem report and test case from Paul Eggert in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
* tests/rm/empty-inacc: New test, for the above.
2006-06-26 13:02:01 +00:00
Jim Meyering
9cabe37ac9 * coreutils.texi (wc invocation): Document new --files0-from option. 2006-06-26 10:33:09 +00:00
Jim Meyering
5cd6710f08 now, trunk passes tests on openbsd 2006-06-26 09:12:35 +00:00
Jim Meyering
6def7f6227 Avoid a segfault for wc --files0=- < /dev/null.
* src/wc.c (compute_number_width): Return right away if nfiles == 0.
2006-06-26 08:39:59 +00:00
Jim Meyering
d77808bb40 remove wc --files0-from item 2006-06-25 20:45:32 +00:00
Jim Meyering
59bafa5a0c tweak grammar in comment 2006-06-25 19:27:19 +00:00
Jim Meyering
cc70571401 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
contains a list of NUL-separated file names.

* src/wc.c: Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
* tests/misc/wc-files0: New tests, for the above.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/Makefile.am (TESTS): Add wc-files0.
2006-06-25 18:26:09 +00:00
Jim Meyering
b2657ecc6a (sleep invocation): Document that accepting
multiple arguments and suffixes are extensions.
Reported by Dan Jacobson.
2006-06-25 06:55:07 +00:00
Jim Meyering
99fb2bfe1f * src/md5sum.c (DIGEST_BUFFER): Remove now-unused definitions. 2006-06-24 05:31:41 +00:00
Jim Meyering
b505087420 * src/tee.c (tee_files): Rename from tee, to avoid conflict with
the function in glibc's <fcntl.h>.  Reported by Andreas Schwab.
2006-06-22 12:50:32 +00:00
Paul Eggert
9d5fbcc019 (openat): Use ?:, not if, to work around GCC bug 4210. 2006-06-20 19:20:25 +00:00
Jim Meyering
8280381dd7 fix typo in comment: s/nerrower/narrower/ 2006-06-20 10:19:40 +00:00
Paul Eggert
c88873d3a4 (gl_IGNORE_UNUSED_LIBRARIES):
Use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
cc merely issues a bunch of annoying warnings for --as-needed
(this problem was reported by Bob Proulx).  Also, try linking with
-lm to detect a bug in binutils 2.16 (this problem was reported
by Ralf Wildenhues).
2006-06-20 05:59:16 +00:00
Jim Meyering
d5a9087fb1 *** empty log message *** 2006-06-19 19:13:04 +00:00
Jim Meyering
bee8bb4c9b Apply this change from gnulib:
2006-06-16  Eric Blake  <ebb9@byu.net>
* unsetenv.c [!defined errno]: Assume errno.h declares errno.
2006-06-19 19:13:00 +00:00
Paul Eggert
050ec5cb29 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
--as-needed option if available.
2006-06-19 07:19:00 +00:00
Jim Meyering
ed91e298a4 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
so this check is not run as part of "make distcheck".
2006-06-18 22:06:42 +00:00
Jim Meyering
48d2f62213 Test for a bug that causes glibc's getcwd to suffer a failed assertion.
* getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and macro.
* getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
also check for glibc-2.4's abort-inducing bug.
2006-06-18 21:52:03 +00:00
Jim Meyering
a40e199756 *** empty log message *** 2006-06-18 17:08:52 +00:00
Jim Meyering
0b1dce2485 Fix typo (s/neq/ne/) in previous change. 2006-06-18 17:08:50 +00:00
Jim Meyering
bf24627b4f * getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
Low-probability clean-up should be to use rmdir to get rid of
the just-created directory, not unlink.
2006-06-18 14:29:29 +00:00
Jim Meyering
0399d3ff5f * ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
configure fail, and request a bug report to inform us about it.
Add a comment that, barring reports to the contrary, in 2007 we'll
assume ftruncate is universally available.
2006-06-18 14:00:34 +00:00
Jim Meyering
89c21e7043 make error output a little clearer 2006-06-18 06:31:25 +00:00
Jim Meyering
ef8e124bb2 * tests/rm/inaccessible: Skip this test on systems without openat support.
Reported by Bob Proulx.
2006-06-17 17:46:33 +00:00
Jim Meyering
a49a6bfe1b . 2006-06-16 09:57:36 +00:00
Jim Meyering
3afe316b52 add these two files (a and b) so that I can remove them -- in the eyes of cvsps 2006-06-16 09:57:11 +00:00
Jim Meyering
a2b4ccc56a remove the files once and for all, so that tools like cvsps (and even 'cvs update') don't think they're still around 2006-06-16 09:54:29 +00:00
Paul Eggert
585d681783 Improve permission checks to handle
running mkdir test in set-gid directories.
2006-06-15 17:35:00 +00:00
Jim Meyering
e48234f842 tests/du/basic: Revamp not to hard-code file system block sizes. 2006-06-14 08:45:33 +00:00
Jim Meyering
61691e8f40 tests/du/Makefile.am (TESTS_ENVIRONMENT): Pass $(PERL), for the files0-from test. 2006-06-12 20:35:55 +00:00
Paul Eggert
3807c8d93d (check-texinfo): Use $(_W) and $(W_) instead of
assuming grep -w (which is not portable).
2006-06-12 20:10:25 +00:00
Jim Meyering
b50d64f0ad Makefile.am (EXTRA_DIST): Add .gitignore. 2006-06-11 10:03:09 +00:00
Jim Meyering
966a2f95a3 *** empty log message *** 2006-06-11 08:43:28 +00:00
Jim Meyering
ba2948b764 Setting TIME_STYLE=long-iso in the environment would make the
cp/same-file test fail.
* tests/envvar-check (vars): Add TIME_STYLE to the list.
* tests/cp/same-file: Revert last change.
Source the envvar-check script, to ensure that TIME_STYLE
settings don't affect these tests.
2006-06-11 08:12:37 +00:00
Paul Eggert
13d0cd669e * tests/cp/same-file: Execute 'ls' in the C locale, so that it
uses POSIX time stamp formats.  Problem reported by John Nixon in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.
2006-06-11 07:59:16 +00:00
Paul Eggert
ff276995ff (__attribute__): Don't define if already defined. 2006-06-11 07:11:31 +00:00
Jim Meyering
d9f0cce0f4 Mention the AIX-strndup-bug vs. dircolors workaround. 2006-06-10 09:41:39 +00:00
Jim Meyering
949ed19da0 Apply this change from gnulib:
2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
	    Bruno Haible  <bruno@clisp.org>

* strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
2006-06-10 09:10:12 +00:00
Jim Meyering
a8ee9bcfb3 Apply this change from gnulib:
2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
	    Bruno Haible  <bruno@clisp.org>

* strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
check for the declaration of strnlen and a run test that exposes the
AIX 5.1 strnlen bug.  In the failure case, #define strndup to
rpl_strndup.
2006-06-10 09:01:41 +00:00
Jim Meyering
82f9a230aa *** empty log message *** 2006-06-10 07:58:09 +00:00
Jim Meyering
ea7ded281d Require a "Version N.M" line at the top of the ChangeLog
file only when making the actual release, not when running
"make distcheck".

(maintainer-distcheck): Don't depend on
changelog-check.
(alpha beta major): Depend on it here, instead.
2006-06-10 07:58:05 +00:00
Jim Meyering
790892db65 Ensure that cat works with any of the options, -A -v -e -E -T,
when applied to files in /proc and /sys, even when the FIONREAD
ioctl produces nonsensical results.  Before this change, cat would
produce no output (or truncated output), for some linux kernels.

* src/cat.c (write_pending): New function, factored out of cat.
(cat): Also interpret a negative ioctl/FIONREAD count as indicating
that there are bytes to read.  Some versions of linux-2.6.16 do that.
Write any pending output before returning.
Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
* NEWS: Mention this bug fix.
* tests/misc/cat-proc: New file.  Test for the above.
* tests/misc/Makefile.am (TESTS): Add cat-proc.
2006-06-08 20:13:37 +00:00
Paul Eggert
cad27cdc2e (eval4): Detect overflow properly when multiplying INTMAX_MIN * -1. 2006-06-08 02:53:25 +00:00
Paul Eggert
0eef2e1e8b Don't claim x86 behavior is erroneous in a comment. 2006-06-07 05:58:57 +00:00
Paul Eggert
8863262663 The 'expr' command now detects and reports integer overflow. 2006-06-07 05:52:41 +00:00
Paul Eggert
dea306fe78 (integer_overflow): New function.
(eval4, eval3): Check for integer overflow.
2006-06-07 05:52:27 +00:00
Paul Eggert
0038f24b9a The 'expr' command now detects and reports integer overflow. 2006-06-07 05:52:07 +00:00
Paul Eggert
8ef928100b Fix problems when building with Solaris/SVR4/etc. make, which uses a
different and somewhat bogus implementation of VPATH.
2006-06-05 20:05:26 +00:00
Paul Eggert
856e93df76 Rename file to avoid bugs with VPATH builds and Solaris 'make'. 2006-06-05 20:05:00 +00:00
Paul Eggert
8818e69748 Don't assign to PROG; no longer needed
now that Makefile.am sets PROG to the basename.
2006-06-05 20:03:52 +00:00
Paul Eggert
0d82817eb4 (PROG): Take the basename of $$tst,
in case Solaris make has prepended the directory.
(TESTS): Adjust to test script renamings.
2006-06-05 20:03:27 +00:00
Paul Eggert
f9265a7efe * regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
reported by Andreas Schwab.
2006-06-05 05:21:46 +00:00
Jim Meyering
53ca379fa3 *** empty log message *** 2006-06-03 09:04:26 +00:00
Jim Meyering
4c7979f7c2 Make `cp --link --no-dereference' work also on systems where the
link system call cannot create a hard link to a symbolic link.

(copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
the link syscall on a symlink when it would do the wrong thing.
Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2006-06-03 09:04:22 +00:00
Jim Meyering
6293c4ae50 `cp --link --no-dereference' now works also on systems where the
link system call cannot create a hard link to a symbolic link.
2006-06-03 09:04:05 +00:00
Jim Meyering
09024704ab Test for this:
Make `cp --link --no-dereference' work also on systems where the
  link system call cannot create a hard link to a symbolic link.
  * src/copy.c (copy_internal) [LINK_FOLLOWS_SYMLINKS]: Don't use
  the link syscall on a symlink when it would do the wrong thing.
  Based on the patch by Aurelien Jarno: <http://bugs.debian.org/329451>
2006-06-03 09:03:19 +00:00
Jim Meyering
db5756af29 (TESTS): Add link-no-deref. 2006-06-03 09:02:53 +00:00
Jim Meyering
593453d7bf *** empty log message *** 2006-06-03 08:29:28 +00:00
Paul Eggert
cfa91bfde8 Fix some HP-UX 11.23 porting bugs. 2006-06-01 07:10:48 +00:00
Paul Eggert
8cf6d1850d Don't assume that >&- works. 2006-06-01 07:10:34 +00:00
Paul Eggert
42314d3303 Don't assume that >&- works. Add a /dev/full test. 2006-06-01 07:10:15 +00:00
Paul Eggert
5d3b41a84a Don't assume that \< \> works in sed. 2006-06-01 07:09:51 +00:00
Jim Meyering
558b3aacbe *** empty log message *** 2006-05-30 06:22:20 +00:00
Jim Meyering
d641a6ad5d (usage): Add `v' to the list of sorting-related options.
From Justin Pryzby.
2006-05-30 06:22:16 +00:00
Jim Meyering
90407bb522 Update from gnulib. 2006-05-29 06:55:36 +00:00
Jim Meyering
a143307078 *** empty log message *** 2006-05-28 12:12:47 +00:00
Jim Meyering
84abb198a2 Source lang-default. From Ralf Wildenhues. 2006-05-28 12:11:35 +00:00
Jim Meyering
9af6ea12a1 *** empty log message *** 2006-05-28 09:33:00 +00:00
Jim Meyering
8542aa6622 AIX 4.3.3 gives a different diagnostic.
Recognize it, too.  Reported by Ralf Wildenhues, in
http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00192.html
2006-05-28 09:32:54 +00:00
Paul Eggert
59985f42e6 (gl_C99_STRTOLD): Use a link test rather than a
compile test, for Tru64 4.0D.
2006-05-28 09:16:57 +00:00
Jim Meyering
9602351980 *** empty log message *** 2006-05-28 09:03:12 +00:00
Jim Meyering
fe7323d6cf *** empty log message *** 2006-05-28 09:02:42 +00:00
Jim Meyering
206844c0c4 *** empty log message *** 2006-05-27 15:51:23 +00:00
Jim Meyering
837d12dd60 Use `AM_MAKEINFOFLAGS' rather than
overwriting `MAKEINFO', so that `missing' can do its job.
2006-05-27 15:51:19 +00:00
Jim Meyering
17fc4cd8ab *** empty log message *** 2006-05-27 15:13:35 +00:00
Jim Meyering
3dc0c35710 *** empty log message *** 2006-05-27 15:12:05 +00:00
Jim Meyering
df91a82135 chgrp now supports --preserve-root, --no-preserve-root 2006-05-27 15:01:36 +00:00
Jim Meyering
6f12bb8b21 *** empty log message *** 2006-05-27 15:00:22 +00:00
Jim Meyering
d3ff52d9e2 *** empty log message *** 2006-05-27 14:44:44 +00:00
Jim Meyering
19c28b06a0 Support new options: --preserve-root and --no-preserve-root.
Somehow this program was skipped when those options were added to chown,
chmod, and rm.  Reported by vaqflabuopac@spammotel.com in
<http://bugs.debian.org/365656>.
2006-05-27 14:44:41 +00:00
Jim Meyering
83e40cc849 *** empty log message *** 2006-05-27 13:43:12 +00:00
Jim Meyering
35e7e45ccd (check-texinfo): Use literal `{' only in brackets, i.e., [{] or [}],
to avoid triggering an error from Solaris 2.6's grep.
2006-05-27 13:43:07 +00:00
Jim Meyering
ff2009280e *** empty log message *** 2006-05-27 13:32:10 +00:00
Jim Meyering
b854d91281 Use $(EGREP)' instead of grep -E'. 2006-05-27 13:32:04 +00:00
Paul Eggert
e9eb2ad579 (small_open, large_open): New macros.
(__open, __open64) [!_LIBC]: Remove.
(__gen_tempname): Use small_open and large_open instead of __open
and __open64.  This fixes a portability bug on HP-UX 11.11i
reported by Simon Wing-Tang in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
2006-05-25 21:57:22 +00:00
Paul Eggert
32cea0d8ae Remove mention of --seed. 2006-05-25 16:48:05 +00:00
Paul Eggert
5002b0ba79 (usage): Remove mention of --seed. 2006-05-25 16:47:43 +00:00
Jim Meyering
066e22e537 *** empty log message *** 2006-05-24 07:35:32 +00:00
Jim Meyering
850b999dbb Require autoconf-2.59d, for its fixed version
of AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2006-05-24 07:35:28 +00:00
Paul Eggert
8ebe82ae29 Fix misspelling. 2006-05-23 07:48:31 +00:00
Paul Eggert
bd52082675 Note problem with string.h. 2006-05-23 07:48:12 +00:00
Paul Eggert
41f08b2239 filemode.c: Don't include <string.h>. 2006-05-23 07:47:51 +00:00
Paul Eggert
82008e43bd Don't include <string.h>; this include was
inadvertantly put into the previous patch.
2006-05-23 07:47:32 +00:00
Paul Eggert
c512471974 * filemode.c (setst): Remove.
(strmode): Rewrite to avoid setst.  This makes the code shorter,
(arguably) clearer, and the generated code is a bit smaller on my
Debian GNU/Linux stable x86 host.
2006-05-22 20:11:45 +00:00
Paul Eggert
900b6598d1 Document the internals better. Most of this change
was written by Bruno Haible.
2006-05-22 18:01:48 +00:00
Jim Meyering
d523a83be5 *** empty log message *** 2006-05-21 22:04:34 +00:00
Jim Meyering
3e3aff9926 *** empty log message *** 2006-05-20 22:18:20 +00:00
Jim Meyering
8fb9de41d5 (fts_open): Fail with EINVAL if a caller violates this rule:
Either FTS_LOGICAL or FTS_PHYSICAL must be provided to the
fts_open() function.
2006-05-20 22:18:16 +00:00
Jim Meyering
6776bb7d30 *** empty log message *** 2006-05-20 19:00:46 +00:00
Jim Meyering
ae5d9079f9 (main): Use FTS_PHYSICAL here, too. 2006-05-20 17:27:07 +00:00
Jim Meyering
20c78772b3 *** empty log message *** 2006-05-20 07:20:03 +00:00
Jim Meyering
c58e7ee1cc (main): Rename local, s/symlink_deref_bit/symlink_deref_bits/
and arrange for -D to set fts' FTS_PHYSICAL bit as well as
FTS_COMFOLLOW.  Spotted by Justin Pryzby.
2006-05-20 07:19:53 +00:00
Jim Meyering
c11a92383d *** empty log message *** 2006-05-19 22:30:55 +00:00
Jim Meyering
ccea9e8650 Merge changes from automake, retaining the ""--to...
kludge to placate overzealous `make distcheck' check.
2006-05-19 22:30:27 +00:00
Paul Eggert
86873e5082 Sync nanosleep from gnulib. 2006-05-19 18:03:25 +00:00
Jim Meyering
7e9a2a1429 *** empty log message *** 2006-05-19 12:36:36 +00:00
Jim Meyering
4e5f6a5b5e (main): Don't let -D, -L, or -P turn off the internal
FTS_TIGHT_CYCLE_CHECK directory traversal option.
Reported by Justin Pryzby in http://bugs.debian.org/367691
2006-05-19 12:36:18 +00:00
Jim Meyering
197f7d766e mention cp -p vs. no-/proc fix 2006-05-16 17:27:04 +00:00
Jim Meyering
e06a5a5cc7 (usage): Correct description of -a: s/-dpR/-dpPR/. From Tomas Pospisek. 2006-05-15 20:19:02 +00:00
Jim Meyering
58f42eb607 *** empty log message *** 2006-05-15 20:18:49 +00:00
Jim Meyering
db19f3df8b *** empty log message *** 2006-05-15 13:28:28 +00:00
Jim Meyering
212ffe61af (xfts_open): Always use FTS_CWDFD. 2006-05-15 13:28:24 +00:00
Jim Meyering
06918c9589 *** empty log message *** 2006-05-15 10:59:15 +00:00
Jim Meyering
63deb75831 Avoid the expense of an fstat, when possible.
(O_NOFOLLOW, STREQ): Define.
(diropen_fd): Remove function.  Merge it into sole caller...
(diropen): ...here.  Use O_NOFOLLOW when appropriate.
(fts_safe_changedir): Call fstat for dev/inode check, only if the
previous open/openat call may have opened the wrong directory.
2006-05-15 10:59:10 +00:00
Jim Meyering
ad17714291 *** empty log message *** 2006-05-15 10:00:30 +00:00
Jim Meyering
7729ee5e68 Restore the parts of fts that were removed on 2006-01-17, so that
it's easier for legacy applications designed for the version
of fts in glibc or BSD to convert to this more robust version.
Add a new mode, FTS_CWDFD, by which to enable the improved
(openat- based -- aka no-chdir) semantics.

* fts_.h (FTS_CWDFD): Define.  Callers must use this fts_open
option to enable the more robust behavior.
(FTS_OPTIONMASK): Widen accordingly.
* fts.c: Restore removed code, reverting the default behavior.
2006-05-15 10:00:16 +00:00
Paul Eggert
48138763f0 (AC_HEADER_STDBOOL): Fix overly-picky
test for C99 conformance; (bool) 0.5 is an integer constant
expression, but (bool) -0.5 is not.  Problem reported by Fedor
Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
2006-05-15 03:17:08 +00:00
Jim Meyering
3c51d8f36f *** empty log message *** 2006-05-13 08:41:37 +00:00
Jim Meyering
4e4cb620fb *** empty log message *** 2006-05-13 08:41:06 +00:00
Jim Meyering
9f1c534949 Test two more cases. 2006-05-13 08:41:02 +00:00
Jim Meyering
b54dfec827 update from gnulib 2006-05-12 07:18:08 +00:00
Jim Meyering
0e3dfb2439 *** empty log message *** 2006-05-11 19:44:47 +00:00
Jim Meyering
3b136eec7b (sha1_buffer): Correct comment: s/MD5/SHA1/. From James Lemley. 2006-05-11 19:44:42 +00:00
Jim Meyering
03b02874a7 . 2006-05-11 08:58:23 +00:00
Jim Meyering
ccafe4292f Mention that:
mv -T DIR EMPTY_DIR no longer fails unconditionally
2006-05-11 08:57:45 +00:00
Jim Meyering
5a55ecfac3 *** empty log message *** 2006-05-11 08:57:32 +00:00
Jim Meyering
af5ca358b9 *** empty log message *** 2006-05-11 08:55:08 +00:00
Jim Meyering
156459c2f5 mv -T DIR EMPTY_DIR no longer fails
(copy_internal): Don't manually prohibit a move where
the destination is an existing directory.  Sometimes doing that is
valid.  Let the rename system call enforce the rules.  That is
allowed only when the source is a directory and the destination
directory (to be replaced) is empty.  Reported by Eric Blake.
2006-05-11 08:55:04 +00:00
Jim Meyering
8ebce3d9a5 *** empty log message *** 2006-05-11 08:54:30 +00:00
Jim Meyering
54d36f3dc2 (TESTS): Add no-target-dir. 2006-05-11 08:54:23 +00:00
Jim Meyering
b7c2ae47f0 ensure that mv did what it's supposed to 2006-05-11 08:18:34 +00:00
Jim Meyering
96a2e1be04 . 2006-05-11 07:53:25 +00:00
Jim Meyering
c70ad7aa27 *** empty log message *** 2006-05-11 07:51:17 +00:00
Jim Meyering
6ccf57e3b9 (TESTS): Add atomic. 2006-05-11 07:51:05 +00:00
Jim Meyering
40b5d67c1f New file/test for yesterday's fix. 2006-05-11 07:50:55 +00:00
Jim Meyering
f79fbe2212 *** empty log message *** 2006-05-11 07:33:10 +00:00
Jim Meyering
f1d1ee9121 (copy_internal): Don't explicitly unlink the destination
when moving a symlink into the place of an existing non-directory.
Reported by Joshua Hudson.
2006-05-11 07:33:00 +00:00
Jim Meyering
029057a361 Avoid harmless `ambiguous redirect' diagnostic. 2006-05-11 07:29:53 +00:00
Jim Meyering
6dd69d3281 *** empty log message *** 2006-05-10 13:39:30 +00:00
Jim Meyering
b8b7669b3e update from gnulib 2006-05-08 07:22:19 +00:00
Jim Meyering
d4d3446bab (patch-check): Correct reversed sense of `test -s' test.
Work around the fact that patch always outputs `patching file ...'.
2006-05-07 17:46:57 +00:00
Jim Meyering
6af864de67 *** empty log message *** 2006-05-07 17:25:25 +00:00
Jim Meyering
194a26ac5c *** empty log message *** 2006-05-07 17:21:01 +00:00
Jim Meyering
c8a85eda8c Adjust to reflect new offsets. 2006-05-07 17:20:49 +00:00
Jim Meyering
f7e3e90916 mention the df fix of 2006-01-24 2006-05-07 15:53:25 +00:00
Jim Meyering
89745f895e mention the df improvement from 2006-01-24 2006-05-07 15:37:38 +00:00
Jim Meyering
afbf453a82 *** empty log message *** 2006-05-06 21:09:35 +00:00
Jim Meyering
a44d1cdd38 *** empty log message *** 2006-05-06 18:56:46 +00:00
Jim Meyering
e0beb8aab5 mention the shred-segfault fix 2006-05-06 16:03:20 +00:00
Jim Meyering
23e6a454b4 remove stray stat-related line 2006-05-06 16:01:39 +00:00
Jim Meyering
9980147451 . 2006-05-06 15:52:56 +00:00
Jim Meyering
f3e78aa999 *** empty log message *** 2006-05-06 15:44:25 +00:00
Jim Meyering
cc86eaf147 Expand to test broken links encountered
implicitly, favoring Solaris 9 and OpenBSD 3.4 behavior.
2006-05-06 15:44:19 +00:00
Jim Meyering
b68ddecba7 Expand to test inode from readdir case. 2006-05-06 15:44:01 +00:00
Jim Meyering
439be6d613 *** empty log message *** 2006-05-06 15:29:49 +00:00
Jim Meyering
1cf31b9cb6 (TESTS): Add stat-vs-dirent. 2006-05-06 15:29:44 +00:00
Jim Meyering
c5a425ef3d *** empty log message *** 2006-05-06 15:29:20 +00:00
Jim Meyering
8840dfb071 *** empty log message *** 2006-05-06 15:27:38 +00:00
Jim Meyering
7704c7d7cb *** empty log message *** 2006-05-06 14:23:38 +00:00
Jim Meyering
29f7820bba Work even on case-insensitive file system. 2006-05-06 14:23:31 +00:00
Jim Meyering
aa02687360 *** empty log message *** 2006-05-06 14:17:31 +00:00
Jim Meyering
8b13a959ae (gl_GETADDRINFO): Fix caching error. 2006-05-06 14:17:21 +00:00
Jim Meyering
b5497557d3 update from gnulib 2006-05-05 18:51:44 +00:00
Jim Meyering
06ba3a2237 *** empty log message *** 2006-05-04 12:55:54 +00:00
Jim Meyering
d98da55f1d (Examples of date): Give example of @seconds. 2006-05-04 12:55:08 +00:00
Jim Meyering
72049d2e2e *** empty log message *** 2006-05-04 10:33:39 +00:00
Jim Meyering
db0ab05030 *** empty log message *** 2006-05-04 10:02:54 +00:00
Jim Meyering
6c63d830b4 *** empty log message *** 2006-05-04 10:01:43 +00:00
Jim Meyering
aac1ddf240 mention pwd fix 2006-05-04 10:00:40 +00:00
Paul Eggert
c1f85fb9e1 (head invocation, tail invocation, sort invocation):
Give advice about porting to hosts that support only obsolete syntax.
2006-05-03 23:10:04 +00:00
Jim Meyering
b400a630ae Include "same-inode.h". 2006-05-03 10:13:07 +00:00
Jim Meyering
c139c9a58b . 2006-05-03 10:11:25 +00:00
Jim Meyering
1e4bc06b2e *** empty log message *** 2006-05-03 10:11:05 +00:00
Jim Meyering
c37b81a6fa *** empty log message *** 2006-05-03 10:10:00 +00:00
Jim Meyering
1f350a9d34 (DEFINE_SORT_FUNCTIONS, LIST_SORTFUNCTION_VARIANTS):
Use better macro parameter names: s/basename/key_name/,
s/basefunc/key_cmp_func.  Fix typo in comment.
2006-05-03 10:07:36 +00:00
Jim Meyering
a99440c4ee (main): On systems with d_type, directories_first only
implies format_needs_type, not format_needs_stat.
2006-05-03 10:03:58 +00:00
Jim Meyering
f0562bdf48 (xstrcoll_df_version, rev_xstrcoll_df_version): Add space after comma
in arg list, from Eric Blake.
2006-05-03 09:36:03 +00:00
Paul Eggert
972d0198a9 (get_date): When adding relative date, start with the
initial time, not with the result of the first mktime call.
2006-04-25 10:29:47 +00:00
Paul Eggert
dfef85e753 (relative-3): New test, derived from a bug report by John Thomas McDole. 2006-04-25 10:29:10 +00:00
Paul Eggert
9f0b994993 Remove typo in previous checkin. 2006-04-24 17:51:56 +00:00
Paul Eggert
d02ad57764 * unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
to define main with arguments, for C++.  Reported by Eric Blake.
* c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
Prefer 'int main ()' to 'int main (void)', for C++.
* getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
* fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
for 'main', for C99 and C++.
2006-04-24 17:50:24 +00:00
Paul Eggert
779532f556 Don't assume that 'exit' is declared for us.
Don't assume that you can exit with status -1.
(import from gnulib)
2006-04-24 07:40:00 +00:00
Jim Meyering
79aba863ce *** empty log message *** 2006-04-23 21:48:27 +00:00
Jim Meyering
02207e6a72 *** empty log message *** 2006-04-23 21:47:00 +00:00
Jim Meyering
972fa947d1 (Which files are listed): Describe new option: --group-directories-first. 2006-04-23 21:46:54 +00:00
Jim Meyering
db6a912f8c [New features]: Mention ls's new option, --group-directories-first 2006-04-23 21:38:32 +00:00
Jim Meyering
513c5ec411 (sort_type): Rearrange to use as an array index when
choosing sort function; added new sort_numtypes member for
compile-time check.
(time_type): Add new time_numtypes member for compile-time check.
(directories_first): New global variable.
(GROUP_DIRECTORIES_FIRST_OPTION): New enum.
(long_options): Add --directories-first.
(main): Support new option.
(is_directory): New function.
(extract_dirs_from_files): Use it.
(DIRFIRST_CHECK, DEFINE_SORT_FUNCTIONS)
(LIST_SORTFUNCTION_VARIANTS): New macros.
(sort_functions): New global variable.
(sort_files): Use it.
(usage): Document new option.
2006-04-23 21:35:04 +00:00
Paul Eggert
5bbcc061d8 Change 'shred' to not use alloca. 2006-04-19 06:28:11 +00:00
Paul Eggert
43d487b711 (fillrand): The assertion was way too weak, due to
what must be a typo.  Strengthen it to its intended value.
(dopass): Don't use alloca; it's not worth the aggravation here,
since it's used only to get a page-aligned buffer, and page
alignment doesn't buy us much here.  I'm suspicious that alloca
causes problems on some hosts, due to a recent bug report by Adam
Waltman.
2006-04-19 06:27:43 +00:00
Jim Meyering
f3bacff51f *** empty log message *** 2006-04-18 14:59:27 +00:00
Jim Meyering
332498c318 Add new programs, base64, sha224sum, sha256sum, sha384sum, sha512sum. 2006-04-18 14:59:22 +00:00
Paul Eggert
ae5252e393 Document filemode changes. 2006-04-17 23:24:49 +00:00
Paul Eggert
d918aff890 (human_access): Use (new) filemodestring rather than
(old) mode_string, so that we get more file types right, at least
in theory.  Adjust to filemode changes.
2006-04-17 23:23:43 +00:00
Paul Eggert
58d7770a00 (HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
(print_long_format): Use (new) filemodestring rather than
(old) mode_string, so that we get more file types right, at least
in theory.  Adjust to filemode changes.
2006-04-17 23:23:11 +00:00
Paul Eggert
137de3d3b6 (describe_change): Adjust to filemode changes. 2006-04-17 23:22:51 +00:00
Paul Eggert
54cf93b996 (gl_FILEMODE): Check for strmode declaration. 2006-04-17 23:22:16 +00:00
Paul Eggert
99277ba7c6 Don't undef S_ISDOOR, since it's never buggy.
(S_ISDOOR): Don't bother with S_IFDOOR, since that code is never needed.
(S_ISPORT, S_ISWHT): New macros, if not already defined.
2006-04-17 23:22:01 +00:00
Paul Eggert
dc536fbed1 (HAVE_DECL_STRMODE): Include <string.h> for strmode.
(strmode): Renamed from mode_string.
(filemodestring): New decl.
2006-04-17 23:21:30 +00:00
Paul Eggert
ac2d45ce67 Include "filemode.h" first, to test the interface.
Assume that filemode.h includes sys/types.h and sys/stat.h.
(HAVE_ST_DM_MODE): New macro, moved here from ls.c.
(ftypelet): Reorder to put common cases first, for efficiency.
Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
to do 'M'.
(strmode): Renamed from mode_string, and now stores 12 bytes instead
of 10, for compatibility with FreeBSD.  All callers changed.
(filemodestring): Now stores 12 bytes instead of 10, and sets file types
that can't be deduced solely from st_mode.  First arg is now a const
pointer.
2006-04-17 23:21:14 +00:00
Paul Eggert
79cbf5925c (What information is listed): Add P for Solaris
10 ports.  Add commented-out entries for other types that POSIX
says are possible, or that I observed in FreeBSD documentation.
2006-04-17 23:20:53 +00:00
Jim Meyering
3280967bdb *** empty log message *** 2006-04-17 23:17:16 +00:00
Jim Meyering
1cdde80263 (main) [DEFAULT_IGNORE_FILE]: Remove code to use a default
ignore file.  This has never been enabled.  Reported by Eric Blake.
2006-04-17 23:17:11 +00:00
Jim Meyering
e4e04491a0 *** empty log message *** 2006-04-17 23:14:57 +00:00
Jim Meyering
0c13c770e3 (Input processing in ptx): Remove mention of the
default --ignore file, /usr/local/lib/eign.  That file has never been used.
Reported by Eric Blake.
2006-04-17 23:14:45 +00:00
Jim Meyering
58fab28670 *** empty log message *** 2006-04-17 21:07:53 +00:00
Jim Meyering
415dddb568 *** empty log message *** 2006-04-17 20:53:20 +00:00
Paul Eggert
ade4e95345 (openat_needs_fchdir) [defined __OPENAT_PREFIX]:
Turn this into a macro that always returns true.
2006-04-17 20:48:23 +00:00
Paul Eggert
39448a239a (futimens): glibc futimesat messes up if /proc isn't mounted. 2006-04-15 07:39:46 +00:00
Jim Meyering
ca094485f9 *** empty log message *** 2006-04-14 20:33:42 +00:00
Jim Meyering
52f9cd6688 remove SPACEs before TAB 2006-04-14 16:36:34 +00:00
Jim Meyering
ea26299816 *** empty log message *** 2006-04-14 16:35:44 +00:00
Jim Meyering
47d0eb8722 (fts_open): Don't allocate parent if *argv==NULL. Patch from glibc. 2006-04-14 16:35:41 +00:00
Jim Meyering
8085d02998 (fts_build): Free `head' before returning NULL, in two places,
to avoid leaks.  Patch from glibc.
2006-04-14 16:26:15 +00:00
Jim Meyering
d657c35562 (fts_build): Remove just-#if-0'd code and the code that
declares and sets cderrno.
2006-04-14 16:21:21 +00:00
Jim Meyering
091c012089 (fts_build): #if-0-out a block of unused code. Patch via glibc. 2006-04-14 16:11:01 +00:00
Paul Eggert
52bb8bdd10 Don't use wchar_t or wctype_t; update comment. 2006-04-13 22:17:17 +00:00
Paul Eggert
3125c35bc7 (RE_DUP_MAX): Update comment to match current implementation. 2006-04-13 22:16:58 +00:00
Paul Eggert
372285b207 (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N
is not defined.  Problem reported by Mark D. Baushke via Derek R. Price.
2006-04-13 22:16:43 +00:00
Paul Eggert
eeac99af71 (What information is listed): Document 'ls' type letters. 2006-04-13 04:01:47 +00:00
Paul Eggert
e0637b5b68 Port to Interix. 2006-04-12 20:15:30 +00:00
Paul Eggert
00e67bf028 (sync) [!HAVE_SYNC]: New macro. 2006-04-12 20:15:08 +00:00
Paul Eggert
eda15d7cca (USE_STATVFS): New macro.
Include <sys/statvfs.h> and use statvfs only if USE_STATVFS.
(NAMEMAX_FORMAT): define a bit more clearly, now that the
statvfs-using code is a bit more regular.
2006-04-12 20:14:42 +00:00
Paul Eggert
2e16cd4302 (main) [! HAVE_SETGROUPS]: Don't call setgroups. 2006-04-12 20:14:19 +00:00
Paul Eggert
e26a29be00 (linkfunc): Remove. This method ran into a compiler/linker
bug in Interix.  Just call symlink or link directly.  All uses changed.
2006-04-12 20:14:01 +00:00
Paul Eggert
cec6e43aae (gl_MACROS): Check for setgroups and sync, since they
are not in Interix.
2006-04-12 20:13:34 +00:00
Paul Eggert
2fc455e2d5 Include <inttypes.h> and <stdint.h> if they exist. 2006-04-12 20:13:13 +00:00
Paul Eggert
368bc94656 Don't include <inttypes.h> or <stdint.h>, since
fsusage.h now does that.  Include fsusage.h first, to test interface.
Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
at most one method (the old code could have generated decls that
didn't conform to C89, not that this was ever exercised).
2006-04-12 20:13:00 +00:00
Paul Eggert
dfe1ede00d csplit, nl, expr now conform to POSIX better, and are
more-compatible with traditional Unix, with respect to regular
expressions.
2006-04-12 07:49:34 +00:00
Paul Eggert
ce1f8e6ecd (expr invocation): expr exit status is 3 only for
internal errors now; 2 is also for invalid values in expressions.
2006-04-12 07:47:11 +00:00
Paul Eggert
7e17831f0a Clear the RE_NO_EMPTY_RANGES re syntax option, as this is a less intrusive
change from the old (Emacs) behavior, and POSIX allows us to treat [z-a]
as an empty range.
2006-04-12 07:37:11 +00:00
Paul Eggert
79b051c610 expr, csplit, nl patches to conform better to POSIX and/or traditional
behavior.  Port tests to Solaris 8.
2006-04-12 07:18:11 +00:00
Paul Eggert
93305ed5f9 Use \{...\} in test RE, to test that we're conforming to POSIX. 2006-04-12 07:17:26 +00:00
Paul Eggert
661b506c3d (fail-a): Adjust exit status to match new expr behavior, for status 2 versus 3.
(anchor): New test.
(bre1, bre2, bre3, bre4, bre5, bre6, bre7, bre8, bre9, bre10):
(bre11, bre12, bre13, bre14, bre15, bre16, bre17, bre18, bre19, bre20):
(bre21, bre22, bre23, bre24, bre25, bre26, bre27, bre28, bre29, bre30):
(bre31, bre32, bre33, bre34, bre35, bre36, bre37, bre38, bre39, bre40):
(bre41, bre42, bre43, bre44, bre45, bre46, bre47, bre48, bre49, bre50):
(bre51, bre52, bre53, bre54, bre55, bre56, bre57, bre58, bre59, bre60):
(bre61, bre62): New tests.
2006-04-12 07:17:02 +00:00
Paul Eggert
110970f622 (docolon): Set re_syntax_options to a value that is compatible with
what POSIX requires.  Also, don't let anchors match
newline; this fixes an incompatibility with tradition and with POSIX.
Don't warn about leading ^.  POSIX says it is unspecified whether
^ is a special character, which means that implementations can
either treat it as special or not, but either way a warning is not
allowed (unless the regexp is otherwise invalid).  Instead, anchor
the expression but treat ^ as an anchor; this is the traditional
behavior (e.g., Solaris 10).
(eval4, eval3, eval2): Treat non-numeric args, division by zero,
and the like as invalid expressions (exit status 2), not as
failure of 'expr' (exit status 3).  This is more consistent with
how Solaris behaves.
2006-04-12 07:16:20 +00:00
Paul Eggert
6fd9c6f98e (build_type_arg): Set re_syntax_options to a value that is compatible
with what POSIX requires.
2006-04-12 07:15:21 +00:00
Paul Eggert
2a75bb4ae0 (extract_regexp): Set re_syntax_options to a
value that is compatible with what POSIX requires.
2006-04-12 07:14:53 +00:00
Paul Eggert
f666da6f32 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and time_r.h. 2006-04-12 07:11:52 +00:00
Paul Eggert
1ff52c6a54 Do not assume that 'sed' can handle long, newline-free input.
Evaluate expr once, not $n times.
2006-04-12 07:07:55 +00:00
Paul Eggert
0dfc08bf3a Solaris 8 sh doesn't understand "if !". Do not assume that 'sed' can
handle long, newline-free input.
2006-04-12 07:07:32 +00:00
Paul Eggert
9066275509 Adjust to new regex.h API (with new fastmap type), and clean
up the regex storage allocation a bit.
2006-04-11 00:52:16 +00:00
Paul Eggert
1f1ff10b0c (compiled_separator_fastmap): New ver.
(main): Use it.  Don't bother allocating a buffer.
2006-04-11 00:52:01 +00:00
Paul Eggert
8745735aaf (context_regex_string, word_regex_string): Remove.
(context_regex, word_regex): New vars, replacing the above.
All uses changed.
(struct regex_data): New type.
(compile_regex): Renamed from alloc_and_compile_regex, since
we no longer allocate storage.  Arg is now a struct regex_data *,
not a const char *.  All uses changed.  Don't allocate the fastmap;
instead, take it from the caller.  Don't convert size_t to int,
to avoid arithmetic overflow problems.  Don't bother freeing
storage afterwards; it's not worth the aggravation.
2006-04-11 00:51:42 +00:00
Paul Eggert
fad52643e0 (body_fastmap, header_fastmap, footer_fastmap):
New vars.
(build_type_arg): New fastmap arg.  All uses changed.
Don't bother allocating a buffer, but set a fastmap.
2006-04-11 00:51:23 +00:00
Paul Eggert
2a124564c7 (docolon): Allocate and use a fastmap.
Don't bother allocating a buffer.
2006-04-11 00:50:56 +00:00
Paul Eggert
87bd526828 Update copyright year. 2006-04-11 00:50:33 +00:00
Paul Eggert
ff652937b0 (struct control): Put re_compiled member at the
end, since it's large.  Change regexpr member from char * to bool;
all uses changed.  Add new member fastmap.
(extract_regexp): regexp arg is now char const *, not char *.
Don't bother duplicating the regular expression; it's not needed.
Set fastmap from new fastmap member.  Don't bother allocating
a buffer, as the regexp code does a better job than we do.
2006-04-11 00:49:59 +00:00
Jim Meyering
ba75c95164 remove useless spaces before TABs 2006-04-10 19:15:08 +00:00
Paul Eggert
72021730a8 Import latest regex module from gnulib. 2006-04-10 06:46:07 +00:00
Paul Eggert
1fe38016fa Add 'hostid' to System context menu line. 2006-04-09 07:55:05 +00:00
Paul Eggert
dd175a9f41 (Top): Fix typo in System context menu entry: hostid wasn't mentioned. 2006-04-09 07:52:33 +00:00
Jim Meyering
38433b219d (iwrite): Remove assignment without effect.
Reported by Felix Rauch Valenti.
2006-03-30 13:47:57 +00:00
Jim Meyering
568eec4a9d *** empty log message *** 2006-03-30 13:26:59 +00:00
Jim Meyering
6809ff6910 *** empty log message *** 2006-03-28 09:48:26 +00:00
Jim Meyering
b1aecc319f (General options in ptx): Undocument --copyright. 2006-03-28 09:48:15 +00:00
Jim Meyering
2fdcdc90f0 *** empty log message *** 2006-03-28 09:47:56 +00:00
Jim Meyering
1ae249fba2 (usage): Remove mention of --copyright/-C.
(main): Alias --copyright to --version plus a deprecation warning.
2006-03-28 09:47:28 +00:00
Jim Meyering
5378e090da deprecate ptx's --copyright (-C) option 2006-03-28 09:46:38 +00:00
Jim Meyering
4e5755ff74 *** empty log message *** 2006-03-27 14:08:04 +00:00
Jim Meyering
ce88154fd8 (dirname invocation): Macro in previous patch was too broad. 2006-03-27 14:08:00 +00:00
Jim Meyering
120d34efe1 version: 5.94 2006-03-27 10:30:34 +00:00
Jim Meyering
c5e8364536 . 2006-03-27 07:35:23 +00:00
Jim Meyering
20e2d352c0 (uptime_LDADD): Add $(POW_LIB), for uptime's use of strtod.
Tiny patch from Nickolai Zeldovich.
2006-03-27 07:34:48 +00:00
Jim Meyering
1c952c4d7d *** empty log message *** 2006-03-27 07:32:44 +00:00
Jim Meyering
a35fc49153 . 2006-03-26 12:33:28 +00:00
Jim Meyering
fa9be79b41 *** empty log message *** 2006-03-26 12:30:45 +00:00
Jim Meyering
3c7ab9f144 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT. 2006-03-26 12:30:37 +00:00
Jim Meyering
d5a462a196 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
(FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
2006-03-26 12:30:07 +00:00
Jim Meyering
665ede556d new file from Eric Blake 2006-03-26 12:22:44 +00:00
Jim Meyering
864c4c28af *** empty log message *** 2006-03-26 12:20:59 +00:00
Jim Meyering
8773d59d55 (base_name): New semantics - malloc the result.
Preserve // when it is special.
Preserve relative files that look like drive letters.
(base_len): Preserve // when it is special.
(last_component): New method, similar to old base_name semantics.
2006-03-26 12:20:46 +00:00
Jim Meyering
8132c6e76e (dir_len): Determine when drive letters need a subsequent slash.
Preserve // when it is special.
(dir_name): Don't append dot when drive letter is absolute.
[TEST_DIRNAME]: Move into a full-blown gnulib test.
2006-03-26 12:20:24 +00:00
Jim Meyering
ba0f1e7d7f (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
[FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a drive prefix.
(IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
(last_component): New method.
2006-03-26 12:20:06 +00:00
Jim Meyering
7029f979e5 (strip_trailing_slashes): Use last_component, not base_name.
Strip redundant slashes from ///.
2006-03-26 12:18:51 +00:00
Jim Meyering
cb916337dc (file_name_concat): s/base_name/last_component/ 2006-03-26 12:16:11 +00:00
Jim Meyering
bfbe80d004 (check_extension, numbered_backup): s/base_name/last_component/ 2006-03-26 12:15:59 +00:00
Jim Meyering
4ecf233b95 (same_name): s/base_name/last_component/ 2006-03-26 12:14:16 +00:00
Jim Meyering
ee660c455a (basename invocation, dirname invocation):
Improve documentation to match recent // patches.
2006-03-26 12:11:40 +00:00
Jim Meyering
bbee8a57b0 *** empty log message *** 2006-03-26 12:09:09 +00:00
Jim Meyering
0ad9592c12 *** empty log message *** 2006-03-26 12:08:27 +00:00
Jim Meyering
1225a53068 (log_su, run_shell): Use new last_component, in place of base_name. 2006-03-26 12:08:20 +00:00
Jim Meyering
b828255717 (next_file_name): Use new last_component, in place of base_name. 2006-03-26 12:08:10 +00:00
Jim Meyering
d4d9a40b82 (wipename): Use new last_component, in place of base_name. 2006-03-26 12:07:59 +00:00
Jim Meyering
0cabfe4b6d (rm_1): Use new last_component, in place of base_name. 2006-03-26 12:07:47 +00:00
Jim Meyering
00f103b6d1 (target_directory_operand, movefile): Use new last_component, in place of base_name. 2006-03-26 12:07:34 +00:00
Jim Meyering
811ecf9284 (basename_is_dot_or_dotdot): Use new last_component, in place of base_name. 2006-03-26 12:07:20 +00:00
Jim Meyering
02b8c9a452 (target_directory_operand, main): Use new last_component, in place of base_name. 2006-03-26 12:07:04 +00:00
Jim Meyering
9c3afb4a64 (target_directory_operand, install_file_in_dir): Use new last_component, in place of base_name. 2006-03-26 12:06:45 +00:00
Jim Meyering
a1935760e5 (guess_shell_syntax): Use new last_component. 2006-03-26 12:06:05 +00:00
Jim Meyering
c3965052fe (target_directory_operand): Use new last_component.
(ASSIGN_BASENAME_STRDUPA): Likewise.  Reduce time spent
traversing the string.
2006-03-26 12:05:51 +00:00
Jim Meyering
a9e9c226da (main): Don't strip suffix from file system roots. 2006-03-26 11:59:58 +00:00
Jim Meyering
ba3419a626 Improvements to dirname/basename handling on platforms like
cygwin with distinct // and with drive letters.
2006-03-26 11:59:31 +00:00
Jim Meyering
a538c18d7a (AC_CONFIG_FILES): Remove tests/basename. 2006-03-26 11:58:57 +00:00
Jim Meyering
fdecd2cfcd . 2006-03-26 11:56:09 +00:00
Jim Meyering
82142e155d remove this entire directory 2006-03-26 11:55:38 +00:00
Jim Meyering
06ada66861 remove this entire directory 2006-03-26 11:54:50 +00:00
Jim Meyering
1f16c42214 (SUBDIRS): Remove basename. 2006-03-26 11:52:47 +00:00
Jim Meyering
8ebb9e3154 (TESTS): Sort. Add basename, dirname. 2006-03-26 11:48:19 +00:00
Jim Meyering
1a032f1114 new file -- from Eric Blake 2006-03-26 11:47:51 +00:00
Jim Meyering
c170f9ca79 Move to ../misc/basename 2006-03-26 11:47:24 +00:00
Jim Meyering
c794482058 Moved from ../basename/basic.
Add some tests, including fixed behavior for //.
2006-03-26 11:46:46 +00:00
Paul Eggert
14c720faab (gl_REGEX): Fix a longstanding typo in the
implementation of Spencer ERE test #75 from grep 2.3.  Problem
reported by Emanuele Giaquinta.  Also, change sense of cached
variable, so that the message makes sense.
2006-03-25 09:49:24 +00:00
Paul Eggert
cd70d37ee3 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
glibc names.
2006-03-25 09:10:28 +00:00
Jim Meyering
f6d592cbb2 version: 5.94 2006-03-25 08:43:48 +00:00
Paul Eggert
195689e7c7 (main): Ignore fd_reopen return value when ignoring input, since
we've closed input at that point so we are ignoring input.
2006-03-23 23:56:34 +00:00
Paul Eggert
7a88cb696f nohup diagnostics are now more precise, and nohup now
redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2006-03-23 23:47:37 +00:00
Paul Eggert
6fe4cc7f91 Test the new nohup behavior. 2006-03-23 23:35:32 +00:00
Paul Eggert
9b109290de (main): nohup diagnostics are now more precise, and nohup now
redirects stderr to nohup.out if stdout is closed and stderr
is a tty.
2006-03-23 23:35:13 +00:00
Paul Eggert
29360166ff (nohup invocation): nohup now redirects stderr to
nohup.out if stdout is closed and stderr is a tty.
2006-03-23 23:34:42 +00:00
Paul Eggert
9f6b2d2548 nohup diagnostics are now more precise, and nohup now
redirects stderr to nohup.out if stdout is closed and stderr is a tty.
2006-03-23 23:34:22 +00:00
Jim Meyering
4de8dde339 update from gnulib 2006-03-22 15:59:58 +00:00
Jim Meyering
7cf97ab1ff *** empty log message *** 2006-03-19 18:27:55 +00:00
Jim Meyering
164d936ac2 Work even in a chroot where d_ino values for entries in "/"
don't match the stat.st_ino values for the same names.

(__getcwd): When no d_ino value matches the target inode
number, iterate through all entries again, using lstat instead.
Reported by Kenshi Muto in http://bugs.debian.org/355810.
2006-03-19 18:27:51 +00:00
Jim Meyering
e233777dbe (__getcwd): Clarify a comment.
Use memcpy in place of a call to strcpy.
2006-03-19 17:18:32 +00:00
Jim Meyering
57a06e9966 . 2006-03-17 16:41:30 +00:00
Jim Meyering
ca29b9b803 *** empty log message *** 2006-03-17 10:12:37 +00:00
Jim Meyering
9589cc5c57 (gl_REGEX): Fix typo in last change:
s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
2006-03-17 10:07:28 +00:00
Jim Meyering
97530a0a35 remove trailing space 2006-03-17 08:35:50 +00:00
Paul Eggert
7202bc0610 regex fixes for future POSIX and --without-included-regex. 2006-03-17 07:35:25 +00:00
Paul Eggert
d01c74cabd (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
Typedef to long int, not to off_t, as POSIX will likely change
in that direction.
2006-03-17 07:33:40 +00:00
Paul Eggert
f7bc3c2bfc (gl_REGEX): Don't check for off_t, since the code
no longer needs it.  Instead, check that regoff_t is as least
as wide as ptrdiff_t.

Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
so that our regex.h stays compatible with the installed regex.
This is helpful for installers who configure --without-included-regex.
Problem reported by Emanuele Giaquinta.
2006-03-17 07:33:06 +00:00
Jim Meyering
2379e76856 version: 5.94 2006-03-16 10:33:28 +00:00
Jim Meyering
bfae88c97b update from gnulib 2006-03-15 06:53:11 +00:00
Jim Meyering
09674e1952 update from gnulib 2006-03-15 06:52:39 +00:00
Jim Meyering
e22fdec364 *** empty log message *** 2006-03-12 22:52:51 +00:00
Jim Meyering
fd1628cb1c (set_author): Rename function, from preserve_author. 2006-03-12 22:52:46 +00:00
Jim Meyering
de33c6c49d . 2006-03-12 22:47:35 +00:00
Jim Meyering
c079c60598 *** empty log message *** 2006-03-12 22:21:12 +00:00
Jim Meyering
d0c89246d0 (AD_pop_and_chdir): Use new macro,
CYCLE_CHECK_REFLECT_CHDIR_UP, rather than open-coding it.
2006-03-12 22:21:05 +00:00
Jim Meyering
4798c23152 *** empty log message *** 2006-03-12 22:05:59 +00:00
Jim Meyering
b1bb68d5b1 *** empty log message *** 2006-03-12 22:05:18 +00:00
Jim Meyering
435f331bee (gl_ROOT_DEV_INO): Add same-inode.h to the list. 2006-03-12 22:05:12 +00:00
Jim Meyering
f497e71465 *** empty log message *** 2006-03-12 22:03:37 +00:00
Jim Meyering
5ff988ec22 (leave_dir): If cycle-check's saved dev-ino pair matches
that of the current directory (which we're about to chdir ".." out of),
then save the dev-ino of the parent, instead.
2006-03-12 22:03:17 +00:00
Jim Meyering
ac1e215dc2 *** empty log message *** 2006-03-12 22:02:12 +00:00
Jim Meyering
275d9242ff (SAME_INODE): Remove definition. 2006-03-12 22:02:03 +00:00
Jim Meyering
fa44d25fdb Include "same-inode.h".
(CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
2006-03-12 22:01:29 +00:00
Jim Meyering
6ae28d0eb5 (SAME_INODE): Remove definition.
Include "same-inode.h", instead.
2006-03-12 21:59:55 +00:00
Jim Meyering
1ccf35a5e3 (SAME_INODE): Remove definition.
Include "same-inode.h", instead.
2006-03-12 21:59:29 +00:00
Jim Meyering
a0d7555ba0 *** empty log message *** 2006-03-12 21:50:12 +00:00
Jim Meyering
9dbfaca637 (gl_SAME): Add same-inode.h to the list. 2006-03-12 21:49:48 +00:00
Jim Meyering
34401c51f9 (gl_CYCLE_CHECK): Add same-inode.h to the list. 2006-03-12 21:48:52 +00:00
Jim Meyering
eb5f5d091d (gl_CHDIR_SAFER): Add same-inode.h to the list. 2006-03-12 20:46:36 +00:00
Jim Meyering
dc73889ce6 (SAME_INODE): New file/macro. 2006-03-12 20:45:31 +00:00
Jim Meyering
9c8902a290 *** empty log message *** 2006-03-12 20:45:10 +00:00
Jim Meyering
90be59547e (SAME_INODE): Remove definition.
Include "same-inode.h", instead.
2006-03-12 20:45:04 +00:00
Jim Meyering
801f6fc44e . 2006-03-12 19:24:52 +00:00
Paul Eggert
99db964248 Remove asctime_r, ctime_r, and let m4 specify the sources. 2006-03-12 08:07:34 +00:00
Paul Eggert
66314b605e Add time_r.m4. 2006-03-12 08:07:09 +00:00
Paul Eggert
c9d6c40b73 (gl_PREREQ): Require gl_TIME_R. 2006-03-12 08:06:49 +00:00
Paul Eggert
be8d40f7e7 (asctime_r, ctime_r): Remove. 2006-03-12 08:06:00 +00:00
Paul Eggert
9c4784e50e (libcoreutils_a_SOURCES): Remove time_r.c, time_r.h,
as this is now done in m4.
2006-03-12 08:05:22 +00:00
Paul Eggert
13431ec5b0 New file, from gnulib. 2006-03-12 08:04:42 +00:00
Jim Meyering
7384af3482 *** empty log message *** 2006-03-11 20:40:23 +00:00
Jim Meyering
28bffbc6fe (robust_getcwd): Prepend only one slash, not two. 2006-03-11 20:40:18 +00:00
Jim Meyering
76d20d82dd Fix a bug whereby a user with write access to a directory being removed
could cause the removal of that directory to fail with an erroneous
diagnostic about a directory cycle.  Reported by Vineet Chadha.

(AD_pop_and_chdir): If the directory we're about to
leave (and try to rmdir) is the one whose dev_ino is being used to
detect a cycle, reset cycle_check_state.dev_ino to that of the parent.
2006-03-10 21:47:34 +00:00
Jim Meyering
6754d7a74f *** empty log message *** 2006-03-10 21:44:30 +00:00
Jim Meyering
b72303e7e6 mention today's rm -r fix. 2006-03-10 21:31:53 +00:00
Jim Meyering
bf46e04149 *** empty log message *** 2006-03-10 21:24:38 +00:00
Paul Eggert
90b915c863 Handle dd's file-creation flags even on file descriptors. Improve
test cases and documentation for these flags.
2006-03-08 18:58:39 +00:00
Paul Eggert
12565180f4 Add test cases for append, nofollow, directory,
and nolinks flags.  Simplify redirection to /dev/null in some cases.
2006-03-08 18:57:55 +00:00
Paul Eggert
cf40950274 (set_fd_flags): Handle file-creation flags on file
descriptors, rather than ignoring them.
2006-03-08 18:57:39 +00:00
Paul Eggert
e190228997 Document dd's new 'directory' and 'nolinks' flags. 2006-03-08 18:57:21 +00:00
Paul Eggert
c66e95f41f iflags->iflag. This fixes a typo that meant the
noatime test never tested anything.
2006-03-08 18:21:54 +00:00
Jim Meyering
4e96bd9131 *** empty log message *** 2006-03-06 15:27:56 +00:00
Jim Meyering
2810f3534b Add `SEE ALSO' references to syscalls from utilities of the same name. 2006-03-06 15:27:50 +00:00
Paul Eggert
ca6207e2f9 Describe dd, ls changes. Convert from Latin-1 to UTF-8. 2006-03-06 07:22:02 +00:00
Paul Eggert
7c7486d168 (dd invocation): New flags directory, nolinks.
Alphabetize nofollow.
2006-03-06 07:21:40 +00:00
Paul Eggert
c21aeb1bd8 (O_NOLINKS): Define to 0 if not already defined. 2006-03-06 07:20:35 +00:00
Paul Eggert
82a7e80d5b (flags, usage): New flags directory, nolinks. 2006-03-06 07:20:19 +00:00
Paul Eggert
78006af421 (usage): Mention that -f disables --color. 2006-03-06 07:02:39 +00:00
Jim Meyering
64e8ade1fa *** empty log message *** 2006-03-05 17:29:13 +00:00
Jim Meyering
103d096349 *** empty log message *** 2006-03-05 17:28:51 +00:00
Jim Meyering
2467cad537 Set SHELL, if not already set, in order to
avoid failure when `make check' is run through debuild;  dircolors
would fail due to lack of $SHELL.  Reported by Sven Joachim.
2006-03-05 17:28:42 +00:00
Jim Meyering
bda9edc1d5 . 2006-03-05 11:23:15 +00:00
Jim Meyering
0be41be0df *** empty log message *** 2006-03-05 11:20:57 +00:00
Jim Meyering
83e984547b Make `base64 --wrap=N' work for N=0, and for N larger than SIZE_MAX.
(wrap_write, do_encode, main): Change type of
parameters and locals, wrap_column, form size_t to uintmax_t.
(main): Adjust to use xstrtoumax, accordingly.
2006-03-05 11:20:53 +00:00
Jim Meyering
450dee8d8d add warning comment 2006-03-03 07:49:39 +00:00
Jim Meyering
158c715afd *** empty log message *** 2006-03-03 07:44:12 +00:00
Jim Meyering
d95fa804bb Don't fail when run from an environment with SHELL not a Bourne
shell, e.g. `env SHELL=/bin/csh make check' would fail this test.

Invoke each non-failing test with -b.
Reported by Michael Stone.
2006-03-03 07:44:02 +00:00
Paul Eggert
cdf8e464b0 Require gl_USE_SYSTEM_EXTENSIONS, not merely AC_GNU_SOURCE, for the
benefit of Solaris 10 when compiled pedantically.
2006-03-02 07:37:12 +00:00
Paul Eggert
d124b35e42 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test", not "==". 2006-03-02 03:42:49 +00:00
Jim Meyering
79e217821d *** empty log message *** 2006-02-27 14:40:58 +00:00
Jim Meyering
91473aec4c Derive --decode-using tests from the encode-based ones. 2006-02-27 14:40:49 +00:00
Jim Meyering
bf515ddf82 Factor out a long constant string.
Split lines to stay within 80 columns.
2006-02-27 13:46:09 +00:00
Jim Meyering
d447ec607f *** empty log message *** 2006-02-27 13:40:16 +00:00
Jim Meyering
909b7b12a2 (TESTS): Add base64. 2006-02-27 13:38:42 +00:00
Jim Meyering
f291424dd9 Test base64. From Simon Josefsson. 2006-02-27 13:38:22 +00:00
Jim Meyering
96a0a0857a *** empty log message *** 2006-02-27 13:31:17 +00:00
Jim Meyering
193f1a070a (do_decode): Use correct type for parameter, ignore_garbage: s/size_t/bool/. 2006-02-27 13:31:12 +00:00
Jim Meyering
4cfd2d742b *** empty log message *** 2006-02-27 11:06:29 +00:00
Jim Meyering
f89c9d724c Add src/base64.c. 2006-02-27 11:06:27 +00:00
Jim Meyering
60fc871dcd *** empty log message *** 2006-02-27 11:03:31 +00:00
Jim Meyering
2f18c53a7b base64 comes first 2006-02-27 11:03:12 +00:00
Jim Meyering
0c0d4f5707 . 2006-02-27 10:54:09 +00:00
Jim Meyering
aeacca612b Build base64.1. 2006-02-27 10:53:49 +00:00
Jim Meyering
d3ae5ba2b4 *** empty log message *** 2006-02-27 10:52:48 +00:00
Jim Meyering
51fd587ca6 *** empty log message *** 2006-02-27 10:52:01 +00:00
Jim Meyering
0374086247 *** empty log message *** 2006-02-27 10:51:36 +00:00
Jim Meyering
021990a737 (libcoreutils_a_SOURCES): Add base64.h and base64.c. 2006-02-27 10:49:40 +00:00
Jim Meyering
a4050e7a70 Add base64 to the list. 2006-02-27 10:48:35 +00:00
Jim Meyering
1d9604cdd6 *** empty log message *** 2006-02-27 10:48:04 +00:00
Jim Meyering
f3465b0ec6 mention new program: base64 2006-02-27 10:47:56 +00:00
Jim Meyering
5c86478c19 *** empty log message *** 2006-02-27 10:47:29 +00:00
Jim Meyering
63351bf602 Add base64 section. 2006-02-27 10:47:23 +00:00
Jim Meyering
3d1be95578 (bin_PROGRAMS): Add base64. 2006-02-27 10:44:34 +00:00
Jim Meyering
6b66f12ea8 *** empty log message *** 2006-02-27 10:43:01 +00:00
Jim Meyering
b4b3e819aa (wrap_write): Correct declaration syntax: s/size_t * V/size_t *V/. 2006-02-27 10:42:36 +00:00
Jim Meyering
ee5fbeafea Don't include .h files already included by system.h:
<string.h>, <stdlib.h>, <stdbool.h>, <limits.h>, <errno.h>.
Include "system.h" before the other lib/*.h header files.
Include <sys/types.h> before "system.h".
(wrap_write): Remove declaration of unused local, initial_column.
2006-02-27 10:41:03 +00:00
Jim Meyering
cec76053e7 *** empty log message *** 2006-02-27 10:35:37 +00:00
Jim Meyering
7561654142 (NOT_AN_INODE_NUMBER, D_INO): Define (moved here from pwd.c). 2006-02-26 10:03:17 +00:00
Jim Meyering
083f6ad61c (NOT_AN_INODE_NUMBER, D_INO): Move definitions to system.h 2006-02-26 10:02:49 +00:00
Jim Meyering
af7863c36c *** empty log message *** 2006-02-26 10:01:05 +00:00
Jim Meyering
33eb3efe9f In ls, avoid calling stat for --inode (-i), when possible.
(main): Prefer dirent.d_ino to stat when possible.
(gobble_file): Add inode argument.
(print_dir): Pass inode if available.
(usage): Remove inaccuracy.
2006-02-26 10:01:00 +00:00
Jim Meyering
256239cd3d update from gnulib 2006-02-24 20:06:29 +00:00
Jim Meyering
b16a67a7c9 *** empty log message *** 2006-02-24 07:24:24 +00:00
Jim Meyering
963120cb52 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and gl_CHDIR_SAFER. 2006-02-24 07:24:18 +00:00
Jim Meyering
1bb24c3039 *** empty log message *** 2006-02-23 14:57:17 +00:00
Jim Meyering
9d9d11937b Update/correct some obsolete entries. 2006-02-23 14:57:08 +00:00
Paul Eggert
6870eeeaff (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
AT_FDCWD exceeds INT_MAX.
2006-02-21 06:42:29 +00:00
Paul Eggert
362e0d7bd1 Mention `sort -k 1b,1'. 2006-02-21 02:56:21 +00:00
Paul Eggert
0e3c5842ad (usage): Mention `sort -k 1b,1'. 2006-02-21 02:55:31 +00:00
Paul Eggert
5bc9231e76 (join invocation): Mention `sort -k 1b,1'. 2006-02-21 02:55:10 +00:00
Jim Meyering
33637fa804 *** empty log message *** 2006-02-20 16:50:14 +00:00
Jim Meyering
cdc9fa3b0c (rm invocation): Fix typo in last patch.
(paste invocation): Fix whitespace.
2006-02-20 16:50:11 +00:00
Jim Meyering
77ab7a182c Update documentation to match previous patch. 2006-02-20 16:49:27 +00:00
Jim Meyering
e8bf2b837f *** empty log message *** 2006-02-20 13:01:56 +00:00
Jim Meyering
0aed496787 (rm invocation): Document new -I option, and new --interactive behavior. 2006-02-20 13:01:51 +00:00
Jim Meyering
5db7689366 *** empty log message *** 2006-02-20 13:01:20 +00:00
Jim Meyering
3f7e0c2173 . 2006-02-20 13:00:54 +00:00
Jim Meyering
ed5113ea27 . 2006-02-20 13:00:16 +00:00
Jim Meyering
81e3b9d698 Remove entry for implementing rm -I 2006-02-20 13:00:03 +00:00
Jim Meyering
f97b02c197 New option for rm: --interactive=once (-I).
Document it, along with change to rm --interactive.
2006-02-20 12:50:38 +00:00
Jim Meyering
9d07927d52 tests for new, -I, option 2006-02-20 12:49:54 +00:00
Jim Meyering
2e1677873a (TESTS): Add interactive-always and interactive-once. 2006-02-20 12:49:14 +00:00
Jim Meyering
1a301edfc7 (INTERACTIVE_OPTION): New enum value.
(interactive_type): New enum.
(long_opts): Let interactive take an optional argument.
(interactive_args, interactive_types): New option arguments.
(usage): Document -I, --interactive=WHEN.  Use program_name
instead of a basename.
(main): New -I option, new behavior to --interactive.
[From Eric Blake]
2006-02-20 12:48:11 +00:00
Jim Meyering
da3340fab1 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:45:27 +00:00
Jim Meyering
703b835b47 *** empty log message *** 2006-02-18 07:44:22 +00:00
Jim Meyering
d6342e9352 (sc_two_space_separator_in_usage): Make the regular
expression match more of the target lines, e.g., those that start with
`-S,' (short option followed by a comma) or that include `=[...]'.
Patch by Nicolas Franois.
2006-02-18 07:40:51 +00:00
Jim Meyering
e7771c1161 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:23:05 +00:00
Jim Meyering
8c232ab86f (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-18 07:21:50 +00:00
Paul Eggert
4492bcd9ef Sync from gnulib. 2006-02-16 23:34:00 +00:00
Jim Meyering
74699a2b52 *** empty log message *** 2006-02-16 23:10:27 +00:00
Jim Meyering
1ec610ba19 Include lstat.h, so that uses of lstat are converted
to uses of rpl_lstat, e.g., on Solaris 9.  Otherwise, programs like
du (which now uses the openat-enabled fts and hence fstatat) would
mistakenly fail to dereference a symlink-to-directory specified
with a trailing slash.
2006-02-16 23:10:01 +00:00
Jim Meyering
ec2631dee1 . 2006-02-16 20:39:10 +00:00
Jim Meyering
9955ae4cc5 . 2006-02-16 20:28:32 +00:00
Jim Meyering
d2462f8a1b *** empty log message *** 2006-02-15 08:51:52 +00:00
Jim Meyering
1442d8987d (alpha beta major): For `make major', ensure that the
version string is of the form N.N[.N]*, where N is one or more digits.
2006-02-15 08:51:47 +00:00
Paul Eggert
05e61daca4 Sync from gnulib. 2006-02-14 23:08:59 +00:00
Jim Meyering
83dcf2436f fix typo in diagnostic 2006-02-14 22:21:56 +00:00
Jim Meyering
6d35aa2e6e *** empty log message *** 2006-02-14 20:23:23 +00:00
Jim Meyering
907ec598fc update from gnulib 2006-02-14 20:23:07 +00:00
Jim Meyering
2ceb43fd7a update from gnulib 2006-02-14 12:27:35 +00:00
Paul Eggert
87f3f6a09a Clarify wording in the light of later comments from the Open Group
and from rms.
2006-02-13 23:30:58 +00:00
Jim Meyering
be54312178 *** empty log message *** 2006-02-13 18:29:31 +00:00
Jim Meyering
c45d1385a9 (all): Emit diagnostics to stderr, not stdout. 2006-02-13 18:29:24 +00:00
Jim Meyering
158f8bac05 *** empty log message *** 2006-02-12 15:15:32 +00:00
Jim Meyering
2f1ac790d9 (patch-check): New target.
(local-checks-available): Add to the list.
2006-02-12 15:15:06 +00:00
Jim Meyering
a3057b4382 *** empty log message *** 2006-02-12 08:48:46 +00:00
Jim Meyering
8a52d68a72 (Character sets): Don't say that an unknown
backslash-escape causes an error message -- it doesn't.
Mention that `\' also removes any special significance, so
is useful for [, ], *, -.  Prompted by Richard Neill in
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=14937
2006-02-12 08:48:42 +00:00
Jim Meyering
398c7ab669 (Character sets): Don't say that an unknown
backslash-escape causes an error message -- it doesn't.
2006-02-12 08:41:18 +00:00
Jim Meyering
4eb8760272 fix typo in comment 2006-02-12 07:55:38 +00:00
Jim Meyering
f99aab89d3 . 2006-02-11 20:58:28 +00:00
Jim Meyering
724f97cee2 *** empty log message *** 2006-02-11 20:58:09 +00:00
Jim Meyering
0d26303c37 *** empty log message *** 2006-02-11 20:57:30 +00:00
Jim Meyering
6c71cff47b *** empty log message *** 2006-02-11 20:56:08 +00:00
Jim Meyering
29dc2a0dfc Adjust two expected diagnostics, now that they're
a tiny bit less precise: cannot remove `a/1': ... instead of
cannot open directory `a/1': ...
2006-02-11 20:55:58 +00:00
Jim Meyering
15ee70a510 . 2006-02-11 20:54:42 +00:00
Jim Meyering
048e85c751 *** empty log message *** 2006-02-11 20:53:33 +00:00
Jim Meyering
8b8f569619 *** empty log message *** 2006-02-11 20:53:01 +00:00
Jim Meyering
3d2111620b . 2006-02-11 20:52:49 +00:00
Jim Meyering
86dd36850a *** empty log message *** 2006-02-11 20:45:22 +00:00
Jim Meyering
2365901176 *** empty log message *** 2006-02-11 20:45:20 +00:00
Jim Meyering
3693f5cc94 (EXTRA_DIST): Add c99-to-c98.diff. 2006-02-11 20:45:15 +00:00
Jim Meyering
420e8bfc35 *** empty log message *** 2006-02-11 20:44:05 +00:00
Jim Meyering
abe70265ce *** empty log message *** 2006-02-11 20:43:24 +00:00
Jim Meyering
a98c1e15eb (EXTRA_DIST): Add .x-po-check. 2006-02-11 20:43:20 +00:00
Jim Meyering
afbc8353e7 *** empty log message *** 2006-02-11 20:42:27 +00:00
Jim Meyering
9754f53054 *** empty log message *** 2006-02-11 20:41:41 +00:00
Jim Meyering
db4e4b670c *** empty log message *** 2006-02-11 20:40:49 +00:00
Jim Meyering
0e58927dd9 *** empty log message *** 2006-02-11 19:25:29 +00:00
Jim Meyering
8bb7d21a7c Bug fix:
rm -r must remove an empty directory, even if it is inaccessible.
2006-02-11 19:25:26 +00:00
Jim Meyering
3b79c6d912 rm -r must remove an empty directory, even if it is inaccessible.
(close_preserve_errno): New function.
(fd_to_subdirp): Don't print a diagnostic in this function.
Do it from the callers instead, unless rmdir succeeds.
(remove_cwd_entries, remove_dir): Adjust callers.
2006-02-11 19:25:02 +00:00
Jim Meyering
f00751ef19 (TESTS): Add empty-inacc. 2006-02-11 18:03:52 +00:00
Jim Meyering
be39ded889 # Ensure that rm -rf removes an empty-and-inaccessible directory. 2006-02-11 18:03:29 +00:00
Jim Meyering
870179fcd8 add a comment 2006-02-11 07:38:25 +00:00
Jim Meyering
bcaa48a0e3 *** empty log message *** 2006-02-11 07:36:16 +00:00
Jim Meyering
ea05edb822 (syntax-check-rules): Automatically derive this list of sc_-prefixed rule names. 2006-02-11 07:36:10 +00:00
Paul Eggert
be8d11b9ed Makefile.maint import from Bison. 2006-02-11 06:05:39 +00:00
Paul Eggert
8018407342 (CVS_LIST): Don't assume cvsu is available.
(CVS_LIST_EXCEPT): New macro, to simplify exception-processing.
Most uses of CVS_LIST changed to use CVS_LIST_EXCEPT.
(syntax-check-rules): Bring back sc_changelong.  (Hmm, why did it
go away? was that an accident?)
(sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
(sc_cast_of_alloca_return_value, sc_space_tab, sc_prohibit_atoi_atof):
(sc_error_exit_success, sc_file_system, sc_no_if_have_config_h):
(sc_system_h_headers, sc_sun_os_names, sc_trailing_blank):
(sc_two_space_separator_in_usage, sc_unmarked_diagnostics):
(sc_obsolete_symbols, sc_changelog, sc_prohibit_jm_in_m4):
(sc_useless_cpp_parens, makefile-check, m4-check, po-check):
(author_mark_check, makefile_path_separator_check):
Output line numbers, to simplify navigation of Emacs *compilation*
buffers.
(sc_prohibit_atoi_atof, sc_file_system):
Rework slightly so that Makefile.maint doesn't get reported as a
violation of its own syntax rules.
(sc_dd_max_sym_length): Use ifneq to do nothing, instead of doing
it at run-time (which didn't work with Bison).  Fix a makefile typo,
caught by Makefile.maint itself: spaces where a tab should be.
(po-check): Check lib/*.[ch] even if not in CVS; used by Bison,
which copies from ../gnulib/lib/*.[ch] to lib/*.[ch].
Ignore djgpp and man subdirectories, to avoid false matches with
Bison and coreutils, respectively.  Use sort -u to remove the
resulting duplicates.
2006-02-11 06:05:23 +00:00
Paul Eggert
eedf8c2d7d Rework slightly to avoid bogus warning from
sc_two_space_separator_in_usage.
2006-02-11 06:04:56 +00:00
Paul Eggert
de107e9110 Fix typo in previous checkin: I deleted a '2' by mistake. 2006-02-11 00:36:08 +00:00
Jim Meyering
9d5e0e26db *** empty log message *** 2006-02-10 17:47:24 +00:00
Jim Meyering
6ceaaa02dc Use gzip's --rsyncable option only if it's available.
(gzip_rsyncable): New variable.
(GZIP_ENV): Use it.
2006-02-10 17:47:16 +00:00
Jim Meyering
321f772415 *** empty log message *** 2006-02-08 12:44:45 +00:00
Jim Meyering
dd8d8b4be1 (local-checks-available): Define in terms of
the expansion, $(syntax-check-rules), rather than the single,
top-level target `syntax-check', so that it's easier to exclude
individual rules (via $(local-checks-to-skip)).
(tgz-md5, tgz-sha1, ...): Remove now-unused definitions.
2006-02-08 12:44:36 +00:00
Paul Eggert
b455780a19 (close_stdout): Don't assume 'bool' converts nonzero
ints to 0 or 1, as this isn't true for the stdbool.h substitute.
2006-02-08 00:08:38 +00:00
Jim Meyering
f90c6bf22e *** empty log message *** 2006-02-07 22:33:01 +00:00
Jim Meyering
781167fbe1 (!defined O_DIRECT): If O_DIRECTIO is defined (as it is on Tru64),
define O_DIRECT to that.  Patch From James Lemley.
2006-02-07 22:32:50 +00:00
Jim Meyering
cabedb13fd *** empty log message *** 2006-02-07 09:21:27 +00:00
Jim Meyering
2f26574a5d *** empty log message *** 2006-02-07 09:18:46 +00:00
Jim Meyering
6b43f36dcb (expected_failure_status_vdir):
Redirect an expected disk-full diagnostic to /dev/null.
2006-02-07 09:18:28 +00:00
Jim Meyering
6f4ae95f06 *** empty log message *** 2006-02-07 08:40:58 +00:00
Jim Meyering
82959f79fe Mention the `cp -RL' bug fix. 2006-02-06 12:42:13 +00:00
Jim Meyering
b564d5e88f *** empty log message *** 2006-02-06 12:41:55 +00:00
Jim Meyering
2489dfb646 *** empty log message *** 2006-02-06 12:37:47 +00:00
Jim Meyering
c501fbc346 *** empty log message *** 2006-02-06 09:06:50 +00:00
Jim Meyering
bfd6ff089f . 2006-02-06 09:05:29 +00:00
Jim Meyering
32d3c24ad6 (sc_two_space_separator_in_usage): New rule.
(syntax-check-rules): Add it.
2006-02-06 08:57:49 +00:00
Jim Meyering
c4ae842f9e *** empty log message *** 2006-02-06 08:46:06 +00:00
Jim Meyering
0c7caf6d13 *** empty log message *** 2006-02-06 08:01:46 +00:00
Jim Meyering
21b19ab75b (usage): Use two spaces (not one) to separate the --no-preserve-root option
string from its description, so help2man formats the derived man page properly.
2006-02-06 08:00:23 +00:00
Jim Meyering
ca51e71b96 (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
2006-02-06 07:58:53 +00:00
Jim Meyering
4c448c6245 (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage. 2006-02-06 07:56:05 +00:00
Jim Meyering
811ae088ec *** empty log message *** 2006-02-06 07:40:35 +00:00
Jim Meyering
c446eceb9c (usage): Use two spaces (not one) to separate the
option string from its description, so help2man formats the
derived man page properly.  Patch from Nicolas Franois
in http://bugs.debian.org/351601.
2006-02-06 07:39:37 +00:00
Paul Eggert
3ff73ab0a9 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
__EXTENSIONS__ if this causes compilation to fail.
2006-02-06 05:22:12 +00:00
Jim Meyering
130dd0656d (copy_internal): cp -RL no longer fails when encountering
the same directory more than once in the hierarchy beneath a single
command-line argument.  That is legitimate, e.g. when there are
two or more symbolic links, each pointing to some directory that
would not otherwise be copied.  Reported by Christophe LYON.
2006-02-04 10:49:21 +00:00
Jim Meyering
ee84ffc695 *** empty log message *** 2006-02-04 10:48:00 +00:00
Jim Meyering
6e7b489f51 *** empty log message *** 2006-02-04 10:45:44 +00:00
Jim Meyering
4fdce04c94 *** empty log message *** 2006-02-04 10:44:39 +00:00
Jim Meyering
ec1f8579a0 tweak comment 2006-02-04 10:44:19 +00:00
Jim Meyering
76a9394075 add a comment 2006-02-04 09:40:13 +00:00
Jim Meyering
77c01d6dfb (TESTS): Add cp-deref. 2006-02-04 09:37:41 +00:00
Jim Meyering
c11d87154a New file. Test for today's fix. 2006-02-04 09:37:32 +00:00
Jim Meyering
20d6e394fe *** empty log message *** 2006-02-03 14:40:38 +00:00
Jim Meyering
cacbb7434a Require automake-1.9.6, not 1.8.3. 2006-02-03 14:40:35 +00:00
Jim Meyering
4ccc271adf regenerate, as usual 2006-02-03 14:09:53 +00:00
Jim Meyering
9a8fc54523 *** empty log message *** 2006-02-02 21:25:10 +00:00
Jim Meyering
b88d20f978 Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
failure on deficient systems, and simplify gnulib lgpl dependencies.

(rpl_lstat): Rewrite to use stat() in place of the
xmalloc/lstat combination.  Based on a patch from Bruno Haible.
2006-02-02 21:25:06 +00:00
Paul Eggert
32c694b908 (od invocation): Warn that -t a ignores the high order bit. 2006-02-02 07:45:21 +00:00
Paul Eggert
2741d9b096 (usage): Mention that -t a ignores high order bit. 2006-02-02 07:44:57 +00:00
Jim Meyering
944a17de32 *** empty log message *** 2006-02-01 14:43:29 +00:00
Jim Meyering
81b5d8af5f (find_dir_entry): Remove unused local, `ent_sb_valid'. 2006-02-01 14:43:24 +00:00
Jim Meyering
f7617f0b4d *** empty log message *** 2006-01-31 16:05:42 +00:00
Jim Meyering
07fcda028e Update from gnulib. 2006-01-31 16:05:23 +00:00
Paul Eggert
6fa9bd80b9 Use better diagnostics for "head -3 -4" and likewise for tail. 2006-01-31 01:39:44 +00:00
Paul Eggert
4b4cc17d42 (parse_options): Use a better diagnostic when someone uses a trailing
numeric option in an invalid way.
2006-01-31 01:39:10 +00:00
Paul Eggert
e7000e0118 (main): Use a better diagnostic when someone uses a
trailing numeric option in an invalid way.
2006-01-31 01:38:30 +00:00
Paul Eggert
251468f113 (tail invocation): In the obsolete usage, the
count is optional, so put square brackets around it.
2006-01-31 01:38:05 +00:00
Jim Meyering
8d5ba536cf *** empty log message *** 2006-01-30 21:11:12 +00:00
Jim Meyering
7fb7a2d271 Include `count' keyword in man page synopsis,
per suggestion from http://bugs.debian.org/181585.
2006-01-30 21:11:06 +00:00
Paul Eggert
32aba5ac50 (L_): Renamed from L. All uses changed. 2006-01-27 18:41:50 +00:00
Paul Eggert
da953b9d22 Sync stdbool from gnulib. 2006-01-26 21:01:56 +00:00
Paul Eggert
a768b3ebec Merge stdbool from gnulib; we're still not quite there yet. 2006-01-25 18:32:46 +00:00
Paul Eggert
1a9e9d670d (true, false) [defined __BEOS__]: undef, as before.
(_Bool) [!@HAVE__BOOL@ && defined __GNUC__]: Use an enum
rather than a #define.
2006-01-25 18:32:19 +00:00
Paul Eggert
f3c2752caa (AC_HEADER_STDBOOL): Add some comments. 2006-01-25 18:31:56 +00:00
Jim Meyering
3423599809 . 2006-01-25 08:11:25 +00:00
Jim Meyering
e2c3daca96 . 2006-01-25 08:05:45 +00:00
Jim Meyering
14e53291e3 Remove this:
^lib/readutmp.h
2006-01-25 07:44:47 +00:00
Jim Meyering
292e0cdfa6 Remove useless parentheses in cpp directive. 2006-01-25 07:44:28 +00:00
Jim Meyering
900cc884d6 remove fileblocks.c 2006-01-25 07:43:38 +00:00
Jim Meyering
0a42446129 *** empty log message *** 2006-01-25 07:43:20 +00:00
Jim Meyering
d433382eaa Remove useless parentheses in cpp directive. 2006-01-25 07:43:17 +00:00
Paul Eggert
5b917cfa59 (show_dev): If the file system claims to have more available than total
blocks, report the number of used blocks as being total - available
(a negative number) rather than as garbage.
2006-01-24 23:30:46 +00:00
Jim Meyering
0efb6d171e *** empty log message *** 2006-01-24 22:56:03 +00:00
Jim Meyering
79dc4ea61d New file. Test for today's fix. 2006-01-24 22:55:59 +00:00
Jim Meyering
b80418f744 (TESTS): Add append-only. 2006-01-24 22:55:38 +00:00
Jim Meyering
b4440fe269 (check-root): Add tail-2/append-only 2006-01-24 22:54:49 +00:00
Jim Meyering
b11079e168 *** empty log message *** 2006-01-24 19:14:07 +00:00
Jim Meyering
1f6beea8e9 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
Reported by Mark D. Baushke.
2006-01-24 19:13:41 +00:00
Jim Meyering
8e3fd3cc7a tweak wording so as to pass `remedial English class' :-) 2006-01-24 15:26:56 +00:00
Jim Meyering
d99e1c3342 tail -f once again works on a file with the append-only
attribute (affects at least Linux ext2, ext3, xfs file systems)
2006-01-24 10:36:28 +00:00
Jim Meyering
b2c30f765b *** empty log message *** 2006-01-24 10:36:18 +00:00
Jim Meyering
8c905f8349 *** empty log message *** 2006-01-24 10:32:40 +00:00
Jim Meyering
0cc660d1fe (tail_forever): Don't exit-nonzero when an attempt
to put a regular file in O_NONBLOCK mode fails with EPERM.
That happens on Linux when using tail -f on a file with the
append-only attribute.  Reported by Dean Gaudet.  For details,
see http://savannah.gnu.org/bugs/?func=detailitem&item_id=15473.
2006-01-24 10:32:32 +00:00
Paul Eggert
a30a9a3ec4 Import from gnulib. 2006-01-24 07:52:03 +00:00
Jim Meyering
529ecbddcc *** empty log message *** 2006-01-23 20:13:44 +00:00
Jim Meyering
4cf7d77126 *** empty log message *** 2006-01-23 15:06:42 +00:00
Jim Meyering
e17e330140 Remove unused definition of N_. 2006-01-23 15:06:37 +00:00
Jim Meyering
791e40357b . 2006-01-22 08:53:59 +00:00
Paul Eggert
7c364b54fc (quotearg_buffer_restyled): Add "default: break;"
to pacify gcc -Wswitch-default.
2006-01-22 08:46:54 +00:00
Jim Meyering
3173cb27dd . 2006-01-21 11:17:19 +00:00
Jim Meyering
abfc689b07 *** empty log message *** 2006-01-21 11:16:46 +00:00
Jim Meyering
af1885b91f Mention fts-related improvements and bug fixes. 2006-01-21 11:16:43 +00:00
Paul Eggert
4393cb56ca * lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
rather than -Xlinker -z -Xlinker ignore, as it's more portable.
2006-01-21 07:59:38 +00:00
Paul Eggert
5a85d9f93f (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
rather than -Xlinker -z -Xlinker ignore, as it's more portable.
2006-01-21 07:59:22 +00:00
Jim Meyering
911776e965 *** empty log message *** 2006-01-19 20:58:26 +00:00
Jim Meyering
a74a458f5f (pfx-1, pfx-2): New tests, to demonstrate the bug
reported as http://bugs.debian.org/147577.  Forwarded by Thomas Hood.
2006-01-19 20:58:22 +00:00
Jim Meyering
f8655e1804 *** empty log message *** 2006-01-18 06:29:21 +00:00
Jim Meyering
d848382c2f (TESTS): Add long-from-unreadable. 2006-01-18 06:29:14 +00:00
Jim Meyering
42629c4629 . 2006-01-17 19:57:26 +00:00
Jim Meyering
d55e2d8528 (openat_needs_fchdir): New function. 2006-01-17 17:43:10 +00:00
Jim Meyering
88df081621 *** empty log message *** 2006-01-17 17:42:57 +00:00
Jim Meyering
264f1bc3cd (openat_needs_fchdir): Declare it. 2006-01-17 17:42:53 +00:00
Jim Meyering
debc171df3 *** empty log message *** 2006-01-17 17:27:32 +00:00
Jim Meyering
b517279580 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT. 2006-01-17 17:27:27 +00:00
Jim Meyering
ba19fb9f38 *** empty log message *** 2006-01-17 17:26:39 +00:00
Jim Meyering
5c184343b8 New test, to exercise one small corner of fts.c. 2006-01-17 17:26:32 +00:00
Jim Meyering
0ca8bc4273 Include "openat.h".
Don't include "lchown.h".
(restricted_chown): Accept a new parameter, CWD_FD, and use it in
calling openat, lchownat, chownat, rather than open, lchown, chown.
Update caller.
2006-01-17 17:26:15 +00:00
Jim Meyering
c97a36e2d9 Now that fts no longer changes the current working directory, adjust
its clients accordingly -- note that du.c uses fts but doesn't need
any adjustment, since it doesn't operate on the actual files,
but rather just uses the stat buffers provided by fts.

Include "openat.h".
(process_file): Use chmodat (fts->fts_cwd_fd,... in place of chmod (...
2006-01-17 17:25:42 +00:00
Jim Meyering
e9f0c42afc *** empty log message *** 2006-01-17 17:24:38 +00:00
Jim Meyering
a28b096d7f [struct FTS] (fts_cwd_fd): New member.
[struct FTS] (fts_rft): Remove now-unused member.
[struct FTS] (fts_cycle.state): Improve comment.
2006-01-17 17:24:29 +00:00
Jim Meyering
c1994c16c2 Rewrite fts.c not to change the current working directory,
by using openat, fstatat, fdopendir, etc..

[! _LIBC]: Include "openat.h" and "unistd--.h".
(HAVE_OPENAT_SUPPORT): Define.
[_LIBC] (fchdir): Don't undef or define; no longer used.
(FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
Now, this `function' always succeeds, and consumes its file descriptor
parameter -- so callers must not close such FDs.  Update callers.
(diropen_fd, opendirat, cwd_advance_fd): New functions.
(diropen): Add parameter, SP.  Adjust all callers.
Implement using diropen_fd, rather than open.
(fts_open): Initialize new member, fts_cwd_fd.
Remove fts_rft-setting code.
(fts_close): Close fts_cwd_fd, if necessary.
(__opendir2): Define in terms of opendir or opendirat,
depending on whether the FST_NOCHDIR flag is set.
(fts_build): Since fts_safe_changedir consumes its FD, and since
this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
and close the dup'd file descriptor upon failure.
(fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
(fts_safe_changedir): Tweak semantics to reflect that this function
now calls cwd_advance_fd and hence consumes its FD argument.
2006-01-17 17:24:14 +00:00
Paul Eggert
739de8914f (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as it's not portable
and it doesn't work with cross-compiles.  Fix missing-$ typo in 'test
"gl_cv_ignore_unused_libraries" ...' that prevented -zignore from being
used with Sun's C compiler.
2006-01-17 07:21:48 +00:00
Jim Meyering
b88411cca3 *** empty log message *** 2006-01-13 13:55:53 +00:00
Jim Meyering
9f43b7e39d (SUBDIRS): Add comments discouraging the
addition of new directories under tests/.
2006-01-13 13:55:49 +00:00
Jim Meyering
a25795c926 *** empty log message *** 2006-01-13 13:38:45 +00:00
Jim Meyering
583cd919cc Redirect stdin to /dev/null. Otherwise, FreeBSD 5.0's getfacl would hang. 2006-01-13 13:38:39 +00:00
Jim Meyering
153a886d6d *** empty log message *** 2006-01-13 13:35:31 +00:00
Jim Meyering
6c1675394f (AC_FUNC_GETMNTENT): Invoke AC_CHECK_FUNCS(getmntent)
unconditionally so that tests of $ac_cv_func_getmntent (e.g., in
gl_LIST_MOUNTED_FILE_SYSTEMS) need not double-quote uses that variable,
to accommodate the rare case in which getmntent is available in none
of the libraries checked.  This happens at least on FreeBSD 5.0.
2006-01-13 13:35:26 +00:00
Jim Meyering
86d43d3826 *** empty log message *** 2006-01-12 18:08:42 +00:00
Jim Meyering
8e6c26e593 Adjust not to hard-code the expected
diagnostic corresponding to ELOOP.  Solaris' diagnostic differs
from that of Linux/libc.  Reported by Paul Eggert.
2006-01-12 18:08:18 +00:00
Jim Meyering
d56050cc6f Create final file *after* the loop. 2006-01-12 14:45:15 +00:00
Jim Meyering
2a8499e09f Create file at end of symlink chain. 2006-01-12 14:31:02 +00:00
Jim Meyering
9d7a6ee0f3 skip the test on a system that can handle this many symlinks in a file name, 2006-01-12 09:25:33 +00:00
Jim Meyering
7dabfc7e73 . 2006-01-12 08:40:34 +00:00
Jim Meyering
8d75ee59e0 whoops. traps were commented out. 2006-01-12 08:00:17 +00:00
Jim Meyering
c27afc1a04 *** empty log message *** 2006-01-12 07:55:40 +00:00
Jim Meyering
b78b7818af Remove useless parentheses in cpp directives, so that
this file passes coreutils' `make syntax-check' tests.
2006-01-12 07:55:36 +00:00
Jim Meyering
e4c3f364f3 fix typo: s/stdint.h.m4/stdint.m4/ 2006-01-12 07:48:36 +00:00
Jim Meyering
e9a7b49342 from gnulib 2006-01-12 07:45:26 +00:00
Jim Meyering
395cb7a6b9 *** empty log message *** 2006-01-12 07:22:36 +00:00
Jim Meyering
d80a835f4a (TESTS): Add test. 2006-01-12 07:22:18 +00:00
Jim Meyering
41a358ec88 New file, with a test for one of the
bugs fixed by yesterday's test.c changes.
2006-01-12 07:22:00 +00:00
Paul Eggert
9b6eae76de Import from gnulib. 2006-01-12 07:21:34 +00:00
Paul Eggert
ea58c1150c Add stdint_.h. 2006-01-12 07:21:19 +00:00
Paul Eggert
518d041db8 Adjust to md5 changes in gnulib, and make sha1 etc. more consistent
with md5.
2006-01-12 07:19:50 +00:00
Paul Eggert
59a8b22268 (gl_PREREQ): Require gl_STDINT_H. 2006-01-12 07:19:00 +00:00
Paul Eggert
3f83336726 (struct sha512_ctx): Use a word buffer, not a byte buffer, so that we
don't need to worry about alignment.
2006-01-12 07:18:39 +00:00
Paul Eggert
a60af3a64f (struct sha256_ctx): Use a word buffer, not a byte buffer, so that we
don't need to worry about alignment.  All uses changed.
2006-01-12 07:18:13 +00:00
Paul Eggert
25962cd489 (struct sha1_ctx): Use a word buffer, not a byte buffer,
so that we don't need to worry about alignment.  All uses changed.
This merges the 2005-10-28 md5 change into sha1.
2006-01-12 07:17:51 +00:00
Paul Eggert
1834ba06ac Fix commentary to match md5 better. Adjust to .h file changes. 2006-01-12 07:17:25 +00:00
Paul Eggert
3024d13d7e (__attribute__): Remove; unused. 2006-01-12 07:16:33 +00:00
Paul Eggert
7354a360be Fix commentary typos.
(alignof, UNALIGNED_P): No need for a GCC-specific version.
2006-01-12 07:16:21 +00:00
Paul Eggert
71b4960878 (BUILT_SOURCES, EXTRA_DIST, stdint.h, MOSTLYCLEANFILES):
Add gnulib snippet.
2006-01-12 07:16:07 +00:00
Paul Eggert
aa038250c3 Add stdint.h. 2006-01-12 07:15:48 +00:00
Jim Meyering
4eafb9d163 *** empty log message *** 2006-01-11 22:11:49 +00:00
Jim Meyering
50114df430 *** empty log message *** 2006-01-11 21:32:56 +00:00
Jim Meyering
aa990c11dd *** empty log message *** 2006-01-11 21:31:41 +00:00
Jim Meyering
3ff0576f2b *** empty log message *** 2006-01-11 21:29:20 +00:00
Jim Meyering
d7210c4542 Test for today's fts.c bug fix. 2006-01-11 21:29:06 +00:00
Jim Meyering
a45c0f4168 (TESTS): Add long-sloop. 2006-01-11 21:21:52 +00:00
Jim Meyering
108b46760a *** empty log message *** 2006-01-11 21:00:42 +00:00
Jim Meyering
cf6281916b (fts_stat): When following a symlink-to-directory,
don't interpret all stat-fails+lstat-succeeds as indicating a
dangling symlink.  That can also happen at least for ELOOP.
The fix: return FTS_SLNONE only when the stat errno is ENOENT.
2006-01-11 21:00:36 +00:00
Jim Meyering
e51c87a604 Mark Joerg Sonnenberger's change as tiny. 2006-01-11 20:32:42 +00:00
Paul Eggert
b5d36033f1 * src/test.c (test_syntax_error): Append a newline. 2006-01-11 19:30:58 +00:00
Paul Eggert
bfbe450d32 (test_syntax_error): Append a newline. All callers
changed, except for the ones that didn't already append a newline.
2006-01-11 19:29:47 +00:00
Jim Meyering
f9574570b3 *** empty log message *** 2006-01-11 16:30:08 +00:00
Jim Meyering
08e4a9a00e (fts_open): Put new (2006-01-04) maxarglen declaration and uses in their
own block, so pre-c99 compilers don't object.
2006-01-11 16:29:35 +00:00
Jim Meyering
f84dc6ccfc *** empty log message *** 2006-01-11 16:19:06 +00:00
Jim Meyering
614235c849 [!_LIBC]: Include "fcntl--.h", to map open to open_safer. 2006-01-11 16:18:39 +00:00
Jim Meyering
dc15b27c50 *** empty log message *** 2006-01-11 15:25:36 +00:00
Jim Meyering
32b8a61ecf (gl_FUNC_OPENAT): Require and compile fchmodat.c.
Check for the lchmod function.
2006-01-11 15:25:30 +00:00
Jim Meyering
dc9da6bde0 *** empty log message *** 2006-01-11 13:33:03 +00:00
Jim Meyering
0e42486491 (fchmodat, fchownat): Declare.
(chmodat, lchmodat): Define convenience functions.
(chownat, lchownat): Likewise.
2006-01-11 13:32:47 +00:00
Jim Meyering
9cbd6c0366 (fchownat): New function. 2006-01-11 13:32:03 +00:00
Jim Meyering
c6749127ca (fchmodat): New file and function. 2006-01-11 13:30:31 +00:00
Jim Meyering
06df842f61 *** empty log message *** 2006-01-11 10:07:22 +00:00
Jim Meyering
d1fe298155 (OP): Remove useless space-before-TAB. 2006-01-11 10:07:13 +00:00
Jim Meyering
20f53c8aac *** empty log message *** 2006-01-11 08:22:43 +00:00
Jim Meyering
6b8b2183e7 (X2NREALLOC): Now that verify_true is no longer void,
cast its result to void, to avoid gcc's warning that
``left-hand operand of comma expression has no effect''.
(DECIMAL_DIGIT_ACCUMULATE, X2REALLOC): Likewise.
2006-01-11 08:22:34 +00:00
Paul Eggert
b5284da0c0 Sync from gnulib. 2006-01-11 07:39:40 +00:00
Jim Meyering
d5dcff8362 *** empty log message *** 2006-01-10 21:48:19 +00:00
Paul Eggert
e06993903e Sync from gnulib. 2006-01-10 20:13:35 +00:00
Paul Eggert
388f158acf Update copyright year. 2006-01-10 20:05:53 +00:00
Paul Eggert
00eeaec5f2 Remove stray "lib/"s in previous change. 2006-01-10 20:01:34 +00:00
Paul Eggert
d11af4159e Sync from gnulib. 2006-01-10 17:47:56 +00:00
Jim Meyering
71520b31c0 *** empty log message *** 2006-01-10 11:55:20 +00:00
Jim Meyering
58e925ce5f Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.

(fts_read): After a failed fchdir, update sp->fts_cur
before returning.  Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
Reported by Stavros Passas.
2006-01-10 11:55:13 +00:00
Jim Meyering
f26f53be9c Add a test for today's fts.c fix. 2006-01-10 11:52:52 +00:00
Jim Meyering
e774de2be6 *** empty log message *** 2006-01-10 10:23:27 +00:00
Jim Meyering
6757e33c92 *** empty log message *** 2006-01-10 09:16:10 +00:00
Jim Meyering
0f07bd690c *** empty log message *** 2006-01-10 07:33:30 +00:00
Jim Meyering
c0ac40d98f Also include <stdio.h>, for Dragonfly.
Patch by Joerg Sonnenberger.
2006-01-10 07:33:22 +00:00
Jim Meyering
b6541058ce *** empty log message *** 2006-01-10 07:31:49 +00:00
Jim Meyering
f09a4ffe18 (gobble_file): Use DTTOIF only if it's defined.
This is necessary for Dragonfly.  Patch by Joerg Sonnenberger.
2006-01-10 07:31:21 +00:00
Jim Meyering
0cb6f1cc82 fix typo in comment 2006-01-09 20:32:08 +00:00
Jim Meyering
52b94c3e57 *** empty log message *** 2006-01-08 20:48:04 +00:00
Jim Meyering
28a712f205 (usage): Adjust the formatting of the entries for
%::z and %:::z (separate with two spaces, not one) so that help2man
formats them properly.  Reported by Philip Rowlands.
2006-01-08 20:45:54 +00:00
Paul Eggert
cbd0078fcf * lib-ignore.m4: New file. 2006-01-07 01:56:13 +00:00
Paul Eggert
9145f2798c * configure.ac (gl_IGNORE_UNUSED_LIBRARIES): Add. 2006-01-07 01:56:01 +00:00
Paul Eggert
f17c770dfe (gl_IGNORE_UNUSED_LIBRARIES): Add. 2006-01-07 01:55:49 +00:00
Paul Eggert
56e7ad3001 Initial version. 2006-01-07 01:55:27 +00:00
Jim Meyering
55e0a76ddc *** empty log message *** 2006-01-06 16:49:15 +00:00
Jim Meyering
7e140557e9 (copyright-check): Use date +%Y in place of hard-coded 2005. 2006-01-06 16:49:10 +00:00
Jim Meyering
00d069f7d9 *** empty log message *** 2006-01-06 16:48:27 +00:00
Jim Meyering
ea20facd90 (COPYRIGHT_YEAR): Update to 2006. 2006-01-06 16:48:24 +00:00
Jim Meyering
7dcf7e3788 *** empty log message *** 2006-01-06 10:14:30 +00:00
Jim Meyering
01ab0b79a1 (rm_1): Remove static' attribute on local status'.
First off, the attribute should have been `volatile' (not static)
to avoid longjmp-related risk of clobber.  Secondly, now there is
no longer any risk of a local variable being clobbered, so there's
no need for any attribute at all.
2006-01-06 10:14:19 +00:00
Jim Meyering
de0f11596d *** empty log message *** 2006-01-05 14:31:22 +00:00
Jim Meyering
955fbf3211 Give a few functions the inline attribute.
(AD_pop_and_chdir): Use gotos to avoid some duplication.
(AD_push): Rewrite an assertion so that the entire computation
goes away when assertions are turned off.
2006-01-05 14:28:52 +00:00
Jim Meyering
4b980c0877 *** empty log message *** 2006-01-05 10:30:21 +00:00
Jim Meyering
a12500ecac Add a FIXME comment. 2006-01-05 10:30:17 +00:00
Jim Meyering
15556eed38 *** empty log message *** 2006-01-05 10:29:47 +00:00
Jim Meyering
91be6f4495 (ENOSYS) [!defined ENOSYS]: Don't define here.
It's already defined in "system.h".
2006-01-05 10:27:03 +00:00
Jim Meyering
084903a2b1 . 2006-01-04 21:06:39 +00:00
Paul Eggert
15954c3753 (tzname): Don't declare if it is already #defined. 2006-01-04 18:57:24 +00:00
Jim Meyering
72631a7b41 *** empty log message *** 2006-01-04 18:28:46 +00:00
Jim Meyering
6b9ee559f0 . 2006-01-04 18:27:03 +00:00
Jim Meyering
07fa3b9baa fix typo 2006-01-04 16:09:03 +00:00
Jim Meyering
757b8d0edd *** empty log message *** 2006-01-04 16:07:17 +00:00
Jim Meyering
8f0572299a change comment and temp file name: s/openat/fdopendir/ 2006-01-04 16:07:11 +00:00
Jim Meyering
7b22d09fba change comments and temp file name: s/openat/fdopendir/ 2006-01-04 16:06:59 +00:00
Jim Meyering
63028c863d Also allow a slightly different diagnostic -- the
one you get when using openat-enabled fts.c and du (coming soon).
2006-01-04 16:06:30 +00:00
Jim Meyering
0aea37a1b3 *** empty log message *** 2006-01-04 07:13:10 +00:00
Jim Meyering
27ab46340c Merge from glibc.
(fts_open): Avoid function call in MAX macro use.
2006-01-04 07:12:22 +00:00
Paul Eggert
a2fa57b24c (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
long int, not int, for nanosecond counts, so that people who are
used to POSIX struct timespec won't be surprised.
2006-01-03 23:21:38 +00:00
Jim Meyering
8692feeacc *** empty log message *** 2006-01-03 21:59:07 +00:00
Jim Meyering
39a400feeb Also allow a slightly different diagnostic -- the
one you get when using openat-enabled fts.c and du (coming soon).
2006-01-03 21:59:02 +00:00
Jim Meyering
035a7af4a6 *** empty log message *** 2006-01-03 14:12:21 +00:00
Jim Meyering
8e702fc759 Also allow a slightly different diagnostic -- the
one you get when using openat-enabled fts.c and du (coming soon).
2006-01-03 14:12:16 +00:00
Jim Meyering
b9c62b6747 correct first-line comment 2006-01-03 10:29:58 +00:00
Jim Meyering
2b9a6ee886 *** empty log message *** 2006-01-03 07:41:12 +00:00
Jim Meyering
6a845acf0f (O_DIRECTORY) [!defined O_DIRECTORY]: Define. 2006-01-03 07:41:03 +00:00
Paul Eggert
f6f906808d Make sure we can change the group of inaccessible files. 2006-01-03 06:20:25 +00:00
Paul Eggert
7126eb3216 (RC_do_ordinary_chown): New enum value.
(restricted_chown): Return it, if the file cannot be accessed due
to EPERM, or if no uid or gid are required, or if the file is
neither a directory nor a regular file.  Rewrite to avoid gotos.
(change_file_owner): Handle RC_do_ordinary_chown case.
Rewrite to avoid gotos.
2006-01-03 06:20:06 +00:00
Paul Eggert
6023a62148 (General date syntax): Invalid dates are rejected.
(Time of day items): Mention the possibility of leap seconds.
Problem reported by Dr. David Alan Gilbert.
2006-01-03 06:00:10 +00:00
Paul Eggert
d290c45ca9 Explain date %g, %G, and %V a bit better. 2006-01-03 00:48:29 +00:00
Paul Eggert
e1acba3234 Explain date %g, %G a bit better. 2006-01-03 00:46:11 +00:00
Paul Eggert
818f1e37c1 Use @acronym around "ISO" uniformly.
(Date conversion specifiers): Explain %g, %G, and %V a bit better.
2006-01-03 00:45:06 +00:00
Paul Eggert
7d9fe7fa8e (usage): Explain %g, %G, and %V a bit better. 2006-01-03 00:43:19 +00:00
Jim Meyering
ba05f7eeff *** empty log message *** 2006-01-02 21:35:00 +00:00
Jim Meyering
7f8d61f03e (set_owner): Correct a comment. 2006-01-02 21:34:53 +00:00
Jim Meyering
8298ae989a *** empty log message *** 2006-01-02 19:11:27 +00:00
Jim Meyering
f59d4713e5 (parse_options): Change warning to say that --retry
is useful `mainly' (not `only') when following by name.
Reported here: http://bugs.debian.org/273781
2006-01-02 19:11:22 +00:00
Jim Meyering
5dc67d68b6 *** empty log message *** 2006-01-02 19:10:45 +00:00
Jim Meyering
f78f184a14 (tail invocation): Say that --retry
is useful `mainly' (not `only') when following by name.
2006-01-02 19:10:39 +00:00
Paul Eggert
6aab791a58 Fix typo in previous change. 2006-01-02 07:42:35 +00:00
Paul Eggert
c0dac69808 New approach to safer chmod. 2006-01-02 07:30:27 +00:00
Paul Eggert
ab21036d6d Clarify file mode bits versus file permission bits. 2006-01-02 07:29:46 +00:00
Paul Eggert
885cd884d4 Update copyright year. 2006-01-02 07:29:24 +00:00
Paul Eggert
9c2fded343 Clarify file mode bits versus file permission bits.
(mkfifo invocation, mknod invocation): -m affects only file permission bits.
2006-01-02 07:28:38 +00:00
Paul Eggert
70efb5ac20 Document that mkfifo and mknod -m no longer set special bits. 2006-01-02 07:28:08 +00:00
Paul Eggert
bee93bd060 No longer used. 2006-01-02 07:18:30 +00:00
Paul Eggert
862fbc427b (usage): Clarify -m's operation.
(main): If -m is given, don't invoke chmod; use umask 0 instead.
Report an error if -m asks for bits outside the 777 range.

Undo 2005-12-19 changes.
2006-01-02 06:39:06 +00:00
Paul Eggert
4ff2e46dde Update copyright year. 2006-01-02 06:38:33 +00:00
Paul Eggert
a8c545ea74 (usage): Clarify -m's operation.
(main): If -m is given, don't invoke chmod; use umask 0 instead.
Report an error if -m asks for bits outside the 777 range.
2006-01-02 06:38:06 +00:00
Paul Eggert
51050b62c8 Include lchmod.h.
(usage): Clarify -m's operation.
(main): Use lchmod rather than chmod.  Don't use lchmod unless the
new mode contains bits outside the 777 range.
2006-01-02 06:37:36 +00:00
Paul Eggert
4aff81e69a Include lchmod.h.
(re_protect, make_dir_parents_private): Use lchmod rather than chmod.
2006-01-02 06:36:55 +00:00
Paul Eggert
faac2ccac5 Include lchmod.h.
(copy_internal): Use lchmod rather than chmod.
2006-01-02 06:36:10 +00:00
Paul Eggert
e59703a1d6 New file. 2006-01-02 06:34:32 +00:00
Paul Eggert
968bee81e8 (gl_MACROS): Require gl_FUNC_LCHMOD.
Don't require gl_CHDIR_SAFER.
2006-01-02 06:34:13 +00:00
Paul Eggert
c225633528 Include lchmod.h, lchmod.c.
(make_dir_parents): Use lchown rather than chown, and
lchmod rather than chmod.
2006-01-02 06:33:12 +00:00
Paul Eggert
c432136c3c (sort invocation): Clarify that by default a blank is a space or a tab. 2005-12-29 21:45:32 +00:00
Paul Eggert
b4c0a12e3b (sort invocation): Clarify that a blank is a space
or a tab.
2005-12-29 21:44:35 +00:00
Jim Meyering
00b8d64531 add src/system.h 2005-12-29 15:03:57 +00:00
Jim Meyering
c414f983b4 . 2005-12-28 10:27:47 +00:00
Jim Meyering
72f81e727d *** empty log message *** 2005-12-28 10:27:34 +00:00
Jim Meyering
aac8ce8261 (EXTRA_DIST): Add .x-sc_prohibit_assert_without_use. 2005-12-28 10:26:58 +00:00
Jim Meyering
04354518e1 (sc_obsolete_symbols): Prohibit use of O_NDELAY.
(sc_prohibit_assert_without_use): New rule.
(syntax-check-rules): Add it to the list.

(CVS_LIST): Define in terms of $(srcdir).
2005-12-28 10:26:10 +00:00
Jim Meyering
67e065e79d Don't include <assert.h>; it wasn't used. 2005-12-28 10:22:41 +00:00
Paul Eggert
eb330d2584 chdir-related fixes 2005-12-27 08:00:42 +00:00
Paul Eggert
3f11d67a56 (wipename): Use similar open flags to other places we open directories.
Don't bother trying to open dir for writing, since POSIX prohibits it.
2005-12-27 08:00:12 +00:00
Paul Eggert
40ea51a322 (fd_to_subdirp): Open with O_DIRECTORY | O_NOCTTY
| O_NOFOLLOW too, for consistency with other dir-openers.
Use POSIX-preferred O_NONBLOCK rather than O_NDELAY.
(is_empty_dir): Likewise.
2005-12-27 07:59:27 +00:00
Paul Eggert
da4c548bbb (restricted_chown):
Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
2005-12-27 07:59:00 +00:00
Paul Eggert
97fe820f88 (save_cwd): Don't bother trying to open directory
for write access: POSIX says that must fail.
2005-12-27 07:57:14 +00:00
Paul Eggert
ee7334652f (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
Fall back on chown if open failed with EACCES.
2005-12-27 07:56:33 +00:00
Paul Eggert
0d7468cabd (defined_S_IFMT): New macro.
Include stat-macros.h.
Include stdlib.h, for abort().
Don't include stdio.h or assert.h; no longer needed.
(same_file_type): Don't assume S_IFMT is defined, as POSIX
does not require this.  Don't assume S_IFCHR and S_IFBLK have
their usual sort of bit pattern.
(fchmod_new): Open with O_NOCTTY for as well, for minor
improvement on hosts where that matters.  Don't bother to assert,
since the caller (in this source file) checks the same thing.
Discard any errno from a close failure, for consistency with other
code.
2005-12-27 07:55:50 +00:00
Paul Eggert
cc4d59e9cd (diropen): Don't bother trying to open directory for write access:
POSIX says that must fail.
2005-12-27 07:55:03 +00:00
Paul Eggert
8846a6bfdd (chdir_no_follow): Don't bother trying to open directory for write
access: POSIX says that must fail.
2005-12-27 07:54:37 +00:00
Paul Eggert
a2c8ec26a4 (cdb_free): Don't bother trying to open directory
for write access: POSIX says that must fail.
(cdb_free): Open with O_NOCTTY | O_NONBLOCK as
well, for minor improvements on hosts that lack O_DIRECTORY.
2005-12-27 07:53:50 +00:00
Jim Meyering
edf69af317 (chdir_no_follow): Move declaration of local,
sb2, `down' into the scope where it is used.
Note that on some systems this function also fails when DIR
is a writable-yet-unreadable directory.
2005-12-26 18:53:58 +00:00
Jim Meyering
078800a00b *** empty log message *** 2005-12-26 18:53:46 +00:00
Paul Eggert
7cffc5f20e chdir-safer.c still needs unistd.h 2005-12-25 21:40:01 +00:00
Paul Eggert
f7a0d07623 Whoops; don't remove the include for unistd.h, since it defines fchdir. 2005-12-25 21:38:43 +00:00
Paul Eggert
11eedd84d3 chdir-safer cleanup 2005-12-25 21:35:51 +00:00
Paul Eggert
8b9f6b163a (chdir_no_follow): Don't include stdio.h, assert.h,
unistd.h, fcntl--.h; not needed.
(O_DIRECTORY): Define if not already defined.
(chdir_no_follow): Revamp describing comment to match code more
closely.  Redo use of internal vars to avoid lint complaints.
Work even if directory is writeable but not readable.
Open with O_DIRECTORY | O_NOCTTY, for benefit of hosts that
don't have O_NOFOLLOW.  Use O_NONBLOCK (POSIX spelling) rather
than O_NDELAY.  Don't bother invoking fstat if open does not
dereference symlink, since the result isn't used then.
Don't assume file descriptor is positive; it might be zero
now that we no longer include fcntl--.h (we don't need fcntl--.h
since we immediately close the descriptor).
2005-12-25 21:35:38 +00:00
Paul Eggert
532cf2ac33 (FCHMOD_SAFER_H): Remove: it was misnamed, and wasn't needed anyay. 2005-12-25 21:35:21 +00:00
Jim Meyering
735fb62c0f *** empty log message *** 2005-12-25 17:34:04 +00:00
Jim Meyering
d789e78a75 (chdir_no_follow): Remove unnecessary test of S_ISDIR (sb_init.st_mode). 2005-12-25 17:33:57 +00:00
Jim Meyering
f9f6078432 (TESTS): Add p-thru-slink 2005-12-23 18:17:39 +00:00
Jim Meyering
dc217ce9c2 New file. Test for today's mkdir-p.c fix. 2005-12-23 18:16:40 +00:00
Jim Meyering
7916560259 *** empty log message *** 2005-12-23 18:15:38 +00:00
Jim Meyering
5d3118175f (make_dir_parents): Use chdir_no_follow only
if we've just created the directory.
2005-12-23 18:15:33 +00:00
Jim Meyering
bdf801ef29 *** empty log message *** 2005-12-23 17:14:37 +00:00
Jim Meyering
7616f9171a *** empty log message *** 2005-12-23 12:00:37 +00:00
Jim Meyering
2eab9d93fc (chdir_no_follow): Rewrite to use fchdir even
when O_NOFOLLOW is not defined.  Suggested by Eric Blake.
2005-12-23 12:00:26 +00:00
Jim Meyering
867dbd1591 *** empty log message *** 2005-12-23 08:28:19 +00:00
Jim Meyering
bd80c2e5a7 (O_NOFOLLOW): Define, if necessary. 2005-12-23 08:28:14 +00:00
Jim Meyering
6ed15904b1 (O_NOFOLLOW): Define. 2005-12-23 08:27:44 +00:00
Jim Meyering
bda1fc0aa4 *** empty log message *** 2005-12-22 15:43:25 +00:00
Jim Meyering
23490f81f8 *** empty log message *** 2005-12-22 15:42:17 +00:00
Jim Meyering
b5bfbe2385 redirect stderr to /dev/full, too (to suppress write error diagnostic) 2005-12-22 15:40:00 +00:00
Jim Meyering
2bd65173c2 *** empty log message *** 2005-12-22 14:36:22 +00:00
Jim Meyering
b6c621211b Include "fcntl--.h" and "unistd--.h", to map open
and dup to open_safer and dup_safer, respectively.
(openat_permissive): Fix typo in comment.
2005-12-22 14:34:20 +00:00
Jim Meyering
1e1938032b . 2005-12-21 10:23:51 +00:00
Jim Meyering
3114855498 *** empty log message *** 2005-12-21 10:21:20 +00:00
Jim Meyering
9eb2e69d62 Require gl_CHDIR_SAFER. 2005-12-21 10:21:04 +00:00
Jim Meyering
05eb4556c8 . 2005-12-21 09:48:41 +00:00
Jim Meyering
a7c7b483f1 *** empty log message *** 2005-12-21 09:43:44 +00:00
Jim Meyering
2956eb272c like chdir(2), but safer, if possible 2005-12-21 09:42:36 +00:00
Jim Meyering
3108671902 *** empty log message *** 2005-12-20 14:23:25 +00:00
Jim Meyering
d0344cfc55 (RW_USR): Remove definition.
(make_dir_parents): Use S_IRWXU, now that read access is also required.

Avoid a race condition, on systems where open honors O_NOFOLLOW.

(make_dir_parents): Include chdir-safer.h.
Use chdir_no_follow in place of chdir.
2005-12-20 14:23:20 +00:00
Jim Meyering
0b7757fac4 *** empty log message *** 2005-12-20 10:28:58 +00:00
Jim Meyering
cf02d3c6f6 (make_dir_parents): Remove unnecessary casts of alloca,
since now it's guaranteed to be (void *).
2005-12-20 10:28:53 +00:00
Jim Meyering
ddb24aa9fb *** empty log message *** 2005-12-20 10:24:43 +00:00
Jim Meyering
7be64dd68f (fchmod_new): Don't try to close fd if it's < 0. 2005-12-20 10:24:37 +00:00
Jim Meyering
07d7677196 . 2005-12-19 18:21:11 +00:00
Jim Meyering
3d49eb721b . 2005-12-19 18:19:38 +00:00
Jim Meyering
a8b913cfdd (TESTS): Add mknod. 2005-12-19 18:18:57 +00:00
Jim Meyering
fa6cfcb9ce (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each
mknod call uses a mode including at least owner-read access.

(main): When `-m MODE' is specified, exit nonzero if
the subsequent chown (or equivalent open,fchown,close) fails.
2005-12-19 18:18:03 +00:00
Jim Meyering
52893ffd2a (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each
mkdir call uses a mode including at least owner-read access.
2005-12-19 18:17:16 +00:00
Jim Meyering
17f521adfd (main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each mknod/mkfifo
call uses a mode including at least owner-read access.
2005-12-19 18:16:07 +00:00
Jim Meyering
e0029290b8 . 2005-12-19 18:13:00 +00:00
Jim Meyering
89276658f2 . 2005-12-19 18:12:30 +00:00
Jim Meyering
457167610f . 2005-12-19 18:05:55 +00:00
Jim Meyering
1e4cd701dc Require gl_CHMOD_SAFER. 2005-12-19 18:05:11 +00:00
Jim Meyering
5df3b1a078 *** empty log message *** 2005-12-17 13:46:34 +00:00
Jim Meyering
46f3108c99 (is_empty_dir): Open with O_NDELAY, so we don't hang, e.g., on a named pipe.
(OPEN_NO_FOLLOW_SYMLINK): Remove definition.  Use O_NOFOLLOW in
place of all uses, since it is guaranteed (system.h) to be defined.
2005-12-17 13:46:27 +00:00
Jim Meyering
eb931cda05 *** empty log message *** 2005-12-17 10:56:25 +00:00
Jim Meyering
88d381bada Add lib/acl.c. 2005-12-17 10:56:22 +00:00
Jim Meyering
26f5a6e03e *** empty log message *** 2005-12-17 10:50:04 +00:00
Jim Meyering
88c3a9be50 (stat invocation) [--printf]: Describe new option.
[--format]: Add example.  Distinguish from --printf.
Sort option descriptions.
2005-12-17 10:50:00 +00:00
Jim Meyering
c99e1d2cb6 . 2005-12-17 10:48:30 +00:00
Jim Meyering
c4a1355047 *** empty log message *** 2005-12-17 10:48:12 +00:00
Jim Meyering
2862dc7af9 *** empty log message *** 2005-12-17 10:47:37 +00:00
Jim Meyering
01a5f3830f (ls): Clarify the Alternate Access Method description.
(cp): Clarify that --preserve=mode also preserves acls.
2005-12-17 10:46:57 +00:00
Jim Meyering
7b08fdb1eb (cp_option_init): Don't set umask_kill member. 2005-12-17 10:46:23 +00:00
Jim Meyering
eee9e3d072 (cp_option_init): Don't set umask_kill member. 2005-12-17 10:45:54 +00:00
Jim Meyering
406a9d3636 (cp_option_init) [umask_kill]: Remove member. 2005-12-17 10:43:12 +00:00
Jim Meyering
fdffb6bb48 (umask_kill): With default acls, the umask is not to be applied.
Remove umask_kill, don't change the process umask, and let the kernel
apply the umask where appropriate.
(make_dir_parents_private): Fix logic for POSIX ACLs.
2005-12-17 10:40:10 +00:00
Jim Meyering
4fb20524d7 (dir_LDADD, ls_LDADD, vdir_LDADD, cp_LDADD, mv_LDADD, ginstall_LDADD):
On systems with an ACL library, arrange
to link with it via $(LIB_ACL), for the utilities that need it.
2005-12-17 10:37:47 +00:00
Jim Meyering
f634e88445 (get_dest_mode): Remove; it is obsolete after removing umask_kill.
(copy_reg, copy_internal): Use copy_acl and set_acl
instead of fchown/chown. Fix the logic for POSIX ACLs.
(chown_succeded): Remove; we now always copy acls and
preserve S_ISUID, S_ISGID, and S_ISVTX when needed, no matter if we
did a chown before or not.
2005-12-17 10:33:33 +00:00
Jim Meyering
e6ece7ba6c Switch back from HAVE_ACL to USE_ACL: The acl() syscall
is no requirement for ACL support; particularly, it does not exist
on systems that have POSIX ACLs.
2005-12-17 10:33:08 +00:00
Jim Meyering
3c0d9bc513 *** empty log message *** 2005-12-17 10:31:37 +00:00
Jim Meyering
4a12f5ebcf (acl_entries): Add fallback implementation for POSIX ACL
systems other than Linux.
(chmod_or_fchmod): New function: use fchmod when possible,
and chmod otherwise.
(file_has_acl): Add a POSIX ACL implementation, with a
Linux-specific subcase.
(copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
S_ISVTX from one file to another.  Fall back to fchmod/chmod when
acls are unsupported.
(set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
are unsupported.
2005-12-17 10:31:33 +00:00
Jim Meyering
9566c9c9d3 (copy_acl, set_acl): Add declarations. 2005-12-17 10:31:15 +00:00
Jim Meyering
2eb8cbd948 *** empty log message *** 2005-12-17 10:30:13 +00:00
Jim Meyering
f69fb2f533 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests. 2005-12-17 10:30:09 +00:00
Paul Eggert
1833362111 remove/openat cleanup 2005-12-17 06:56:19 +00:00
Paul Eggert
25c49ccc1c (OPENAT_CWD_RESTORE__REQUIRE): Remove.
(OPENAT_CWD_RESTORE__ALLOW_FAILURE): Likewise.
(fd_to_subdirp): Remove openat_cwd_restore_allow_failure arg; its
value is now signified by whether cwd_errno is null.
(fd_to_subdirp, remove_dir, rm_1); Change cwd failure indicator from
pointer-to-bool to pointer-to-errno-value.  All callers changed.
(rm_1): Don't bother setting a local cwd failure flag and then
ORing it into the caller's.  Just set the caller's.
(rm): Use cwd failure errno value to print a slightly-better
diagnostic.
2005-12-17 06:55:54 +00:00
Paul Eggert
3f86aaadcf Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
"gettext.h"; either no longer needed or are guaranteed by openat.h.
(_): Remove; no longer needed.
(openat): Renamed from rpl_openat; no need for rpl_openat
since openat.h renames openat for us.
Replace most of the body with a call to openat_permissive,
to avoid duplicate code.
Port to (probably hypothetical) environments were mode_t is
wider than int.
(openat_permissive): Require mode arg, so that we can check
types better.  Put it just after flags.  Change cwd failure
indicator from pointer-to-bool to pointer-to-errno-value.
All callers changed.
Invoke openat_save_fail and/or openat_restore_fail if
cwd_errno is null, so that openat can call us.
(openat_permissive, fdopendir, fstatat, unlinkat):
Simplify errno handling to avoid some duplicate code,
as it's OK to set errno on success.
2005-12-17 06:55:32 +00:00
Paul Eggert
1c5cebe703 Revamp code so that function macros depend on
__OPENAT_PREFIX only, not also on AT_FDCWD.
(openat_ro): Remove.  Caller changed to use openat_permissive.
(openat_permissive): Now a macro, if not a function.
(openat_restore_fail, openat_save_fail): Now always functions,
since mkdirat needs them even if __OPENAT_PREFIX is defined.
2005-12-17 06:55:01 +00:00
Jim Meyering
0ae5a45fcb *** empty log message *** 2005-12-15 20:16:03 +00:00
Jim Meyering
ce79c562f6 (print_it): Properly handle a backslash at the
end of a --printf format string.  Reported by Paul Eggert.
2005-12-15 20:15:20 +00:00
Jim Meyering
41e95465a6 (print_it): Properly handle a backslash at the
end of a --printf format string.  Reported by Paul Eggert.

(end-bs): Add a test for the above.
2005-12-15 20:15:05 +00:00
Paul Eggert
c1c8e668de Fix typo in previous change 2005-12-15 19:01:00 +00:00
Paul Eggert
a025357bd6 tests/acl porting fixes 2005-12-15 18:58:47 +00:00
Paul Eggert
b7c426c0ab Port to pre-POSIX shells like Solaris 8 /bin/sh.
Don't assume /etc/passwd contains user names; use 'id' instead.
2005-12-15 18:58:20 +00:00
Paul Eggert
6dcd2807d7 Regenerate. 2005-12-15 18:24:35 +00:00
Jim Meyering
a37438984f Add Kinyarwanda (rw).
Add Croatian (hr).
2005-12-15 14:49:00 +00:00
Jim Meyering
fee8c3985a . 2005-12-15 14:48:48 +00:00
Jim Meyering
049a807bc6 . 2005-12-15 14:47:36 +00:00
Jim Meyering
6e7efd30f0 *** empty log message *** 2005-12-15 12:25:04 +00:00
Jim Meyering
5124a296ab stat: revert behavior of --format=FMT (-c)
stat: add new option: --printf=FMT
2005-12-15 12:24:54 +00:00
Jim Meyering
8768b88913 revert behavior of --format=FMT (-c)
add new option: --printf=FMT

(isodigit, octtobin, hextobin): Define.
(PRINTF_OPTION): Define.
(interpret_backslash_escapes, trailing_delim): New globals.
(usage): Document them.  Alphabetize on long option names.
(print_esc_char): New function.
(print_it): Rewrite, in order to handle backslash escapes.
(main): Handle new option.  Set globals for --format, too.
2005-12-15 12:24:30 +00:00
Jim Meyering
7383c9a1a3 (TESTS): Add stat-printf. 2005-12-15 12:23:57 +00:00
Jim Meyering
d1f5df777f Test --printf and --format. 2005-12-15 12:23:36 +00:00
Jim Meyering
2a390dea1f *** empty log message *** 2005-12-15 08:37:14 +00:00
Paul Eggert
cd42358418 Diagnose "sort -c -o FILE". 2005-12-15 00:00:02 +00:00
Paul Eggert
e18c4ff172 (incompatible_options): New function.
(check_ordering_compatibility, main): Use it.
(main): Check for -c and -o.
Don't bother with a usage message for
"sort -c a b", for consistency with other error diagnostics.
2005-12-14 23:59:23 +00:00
Paul Eggert
4382b8ce00 (incompat4): New test. 2005-12-14 23:58:20 +00:00
Paul Eggert
1dbd70442d sort now reports incompatible options. 2005-12-14 22:46:17 +00:00
Paul Eggert
56805cd202 (check_ordering_compatibility): New function.
(main): Use it.
2005-12-14 22:46:02 +00:00
Paul Eggert
ce1be021a7 (incompat1, incompat2, incompat3): New tests. 2005-12-14 22:45:29 +00:00
Jim Meyering
b0cee61e23 *** empty log message *** 2005-12-14 20:37:24 +00:00
Jim Meyering
bd78a76886 (libcoreutils_a_SOURCES): Remove fprintftime.c
and fprintftime.h.  Now they're pulled in via the .m4 file.
2005-12-14 20:37:06 +00:00
Jim Meyering
0d58d63090 *** empty log message *** 2005-12-14 20:36:20 +00:00
Jim Meyering
85fba4dc43 Require gl_FPRINTFTIME. 2005-12-14 20:36:14 +00:00
Paul Eggert
82944b0300 Undo previous change to cat.c. 2005-12-14 18:12:44 +00:00
Paul Eggert
dcc1bc1759 Undo previous change. 2005-12-14 18:09:04 +00:00
Paul Eggert
6d577b6fb4 * src/cat.c (main): Check for close (STDOUT_FILENO) failure. 2005-12-14 01:40:19 +00:00
Paul Eggert
f5e1bca49d (main): Check for close (STDOUT_FILENO) failure. 2005-12-14 01:39:46 +00:00
Paul Eggert
3463531cd0 One other stdbool.m4 change. 2005-12-14 01:17:51 +00:00
Paul Eggert
8bf7f49616 (AM_STDBOOL_H): Substitue HAVE__BOOL again, reverting
2005-11-25 change.
2005-12-14 01:17:28 +00:00
Paul Eggert
23b2b5c660 * Makefile.am (stdbool.h): Resurrect the 'sed' that goes along
with '#if !@HAVE_BOOL@".
2005-12-14 00:09:23 +00:00
Paul Eggert
a6caba2509 (stdbool.h): Resurrect the 'sed' that goes along with '#if !@HAVE_BOOL@". 2005-12-14 00:08:54 +00:00
Paul Eggert
706c4369de Sync from gnulib. 2005-12-13 23:58:55 +00:00
Paul Eggert
4170c66d45 (_Bool): Resurrect the "#if !@HAVE__BOOL@" check, to
work around compilers that have a (possibly-broken) _Bool but lack
a working <stdbool.h>.
2005-12-13 19:42:27 +00:00
Paul Eggert
eaebfec990 (AC_HEADER_STDBOOL): Check for buggy compiler that
has _Bool but mishandles _Bool |= _Bool.
2005-12-13 19:41:57 +00:00
Paul Eggert
a867264a18 Install a more-conservative approach for sort -R. 2005-12-12 22:47:57 +00:00
Paul Eggert
c5174f6fb2 (struct irand_state, irand_init, irand32, irand_mod): Moved back here,
from rand-isaac.c.
2005-12-12 22:43:16 +00:00
Paul Eggert
b22d6cc592 (struct irand_state, irand_init, irand32, irand_mod): Move to shred.c. 2005-12-12 22:42:58 +00:00
Paul Eggert
d2af4ddbeb (EXTRA_DIST): Add rand-isaac.c. 2005-12-12 22:42:37 +00:00
Paul Eggert
9df4b20557 (sort invocation): Clarify explanation of
--random-sort, and use a simpler example.
2005-12-12 22:42:16 +00:00
Paul Eggert
1f20820f7e Clarify sort -R. 2005-12-12 22:41:56 +00:00
Paul Eggert
6078d7175d Add src/rand-isaac.c. 2005-12-12 22:41:42 +00:00
Paul Eggert
0abb871873 Remove. All uses now simply include rand-isaac.c. 2005-12-12 22:16:30 +00:00
Paul Eggert
021921a712 Mention shred_SOURCES and sort_SOURCES, too. 2005-12-12 22:16:02 +00:00
Paul Eggert
55173eaa9e Use a more-conservative but slower approach for sort -R. 2005-12-12 22:09:56 +00:00
Paul Eggert
dee72c1194 Include rand-isaac.c rather than rand-isaac.h.
Don't include md5.h; it wasn't needed.
(struct keyfield): Rename random_hash to random, for consistency
with the other member names.  All uses changed.
(usage): Tweak wording to mention STRING for --seed option.
(short_options): Rorder for consistency with other programs.
(rand_state): Now a struct, not a pointer to one.  All uses changed.
(HASH_WORDS, HASH_SIZE): Remove.
(get_hash): Remove comments around resbuf size, since we can assume C89.
Use a "more-kosher" (but slower) approach of invoking isaac_refill.
(keycompare): Adjust to the new get_hash.
Add a FIXME.
(badfieldspec): Omit recently-introduced comment; it isn't needed.
(main): Don't set need_random simply because gkey has it set; that
doesn't necessarily mean we'll need random numbers.
Redo seeding to match new get_hash approach.
2005-12-12 22:09:27 +00:00
Paul Eggert
30e44dd014 Include rand-isaac.c rather than rand-isaac.h.
(fillrand, dopass, main): Undo previous change.
2005-12-12 22:08:50 +00:00
Paul Eggert
f7a86b7734 Revert to what used to be in shred.c, without
changing it to allow for varying numbers of words in the state.
Alter so that we include rand-isaac.c directly rather than
compiling it and linking to it.  Don't include config.h or
system.h; that's the includer's responsibility.
(ISAAC_LOG, ISAAC_WORDS, ISAAC_BYTES, struct isaac_state, ind):
(isaac_step, struct irand_state):
Resurrect these, with the same defns that used to be in shred.c.
(ISAAC_SIZE, isaac_new, isaac_copy): Remove.
(isaac_refill, isaac_seed_start, isaac_seed_data, irand_init, irand32):
static again.
(struct isaac_state, isaac_refill, isaac_mix, isaac_init):
(isaac_seed_start, isaac_seed_data, isaac_seed_finish, isaac_seed):
(irand_init, irand32, irand_mod):
Number of words is constant again.
2005-12-12 22:08:14 +00:00
Paul Eggert
67ee303724 (noinst_HEADERS): Remove rand-isaac.h. 2005-12-12 22:07:51 +00:00
Jim Meyering
8340fb2805 *** empty log message *** 2005-12-10 22:54:40 +00:00
Jim Meyering
09227c31dd (noinst_HEADERS): Add rand-isaac.h. 2005-12-10 22:54:31 +00:00
Jim Meyering
2a6eef20f5 *** empty log message *** 2005-12-10 22:10:59 +00:00
Jim Meyering
d5978ad190 Cleaner:
Make the local an `int' instead.
2005-12-10 22:10:53 +00:00
Jim Meyering
437a569c53 *** empty log message *** 2005-12-10 21:58:28 +00:00
Jim Meyering
dfacfaf971 Avoid shred segfault on 64-bit systems.
(isaac_refill): Don't try to negate a
local of type uint32_t.  Convert it to int32_t first.
2005-12-10 21:58:23 +00:00
Jim Meyering
3199892488 *** empty log message *** 2005-12-10 21:10:26 +00:00
Jim Meyering
2f33661051 Mention sort's new options. 2005-12-10 21:10:21 +00:00
Jim Meyering
df4dc0666d *** empty log message *** 2005-12-10 10:18:18 +00:00
Jim Meyering
41c0ee3fe4 * src/rand-isaac.h (isaac_mix): Remove declaration. 2005-12-10 10:18:10 +00:00
Jim Meyering
dbfc16effb * src/rand-isaac.c (isaac_mix): Declare to be static.
Mark all other functions as `extern' so the tight-scope
part of `make distcheck' passes once again.
* src/rand-isaac.h (isaac_mix): Remove declaration.
2005-12-10 10:18:01 +00:00
Jim Meyering
c4666a397d *** empty log message *** 2005-12-10 10:05:27 +00:00
Jim Meyering
ea947bc7f0 *** empty log message *** 2005-12-10 10:04:18 +00:00
Jim Meyering
fbaa8e9719 (get_hash): Change position of `*' in parameter type to conform with convention.
(main): Split a long line so it fits in 80 columns.
2005-12-10 10:04:12 +00:00
Jim Meyering
beb862ee9c *** empty log message *** 2005-12-10 10:02:32 +00:00
Jim Meyering
d6482a9ac2 Don't include gethrxtime.h. No longer needed. 2005-12-10 10:02:24 +00:00
Jim Meyering
a2b661352b (keycompare): Remove stray SPACE before TAB that was
causing `make distcheck' to fail.
2005-12-10 09:44:00 +00:00
Jim Meyering
e2b9d79b9c *** empty log message *** 2005-12-10 09:38:17 +00:00
Jim Meyering
d65090198c (TESTS): Add sort-rand. 2005-12-10 09:38:07 +00:00
Jim Meyering
9967cd6a63 *** empty log message *** 2005-12-10 09:37:46 +00:00
Jim Meyering
7de48ccced Add a basic test of the new options. 2005-12-10 09:37:21 +00:00
Paul Eggert
f9b90d0739 Add sort -R. 2005-12-10 09:08:55 +00:00
Paul Eggert
e076a77851 (sort invocation): Add --random-sort (-R) and --seed. 2005-12-10 08:10:20 +00:00
Paul Eggert
569c4876bc (short_options, long_options, WORDS, keycompare, main):
(usage): Add options --random-sort and --seed to implement a random
shuffle.
Include md5.h and rand-isaac.h.
(get_hash): New function.
(rand_state): New var.
(HASH_WORDS, HASH_SIZE): New macros.
2005-12-10 08:09:42 +00:00
Paul Eggert
4013c49f1b Include rand-isaac.h. Move ISAAC code to rand-isaac.c.
(fillrand, main): Adjust to the fact that the state size is now
runtime-configurable.
2005-12-10 08:09:20 +00:00
Paul Eggert
7c2beeafd7 (sort_LDADD): Add $(LIB_GETHRXTIME).
(shred_SOURCES, sort_SOURCES): New macros, so we compile rand-isaac.c.
2005-12-10 08:08:52 +00:00
Paul Eggert
71bc739b35 New file, containing ISAAC code that was in shred.c.
Make state size runtime-configurable.
(isaac_new, isaac_copy): New functions.
2005-12-10 08:08:05 +00:00
Paul Eggert
a237792d66 Move ISAAC code out of shred.c. 2005-12-10 08:07:36 +00:00
Jim Meyering
078b4f861c add comments 2005-12-09 21:52:50 +00:00
Paul Eggert
4713202758 Add test for dd iflags=noatime. 2005-12-09 21:48:38 +00:00
Jim Meyering
467d73aac9 *** empty log message *** 2005-12-09 16:28:28 +00:00
Jim Meyering
99f35425a7 (usage): Mention white space vs -b and -t options.
From The Wanderer.
2005-12-09 16:28:17 +00:00
Jim Meyering
55897502a6 *** empty log message *** 2005-12-09 16:27:26 +00:00
Jim Meyering
e83af19449 *** empty log message *** 2005-12-09 16:22:27 +00:00
Jim Meyering
843efb8e3b (main): Fix misleading comment. 2005-12-09 16:22:24 +00:00
Jim Meyering
bbfe621405 . 2005-12-08 18:34:21 +00:00
Paul Eggert
8b43cfcc59 Add dd noatime. 2005-12-07 21:12:38 +00:00
Paul Eggert
88afdc99f2 (flags, usage): Add support for noatime flag. 2005-12-07 21:12:12 +00:00
Paul Eggert
cb65d67c2a (O_NOATIME): Define to 0 if not already defined. 2005-12-07 21:11:45 +00:00
Paul Eggert
f2ced93400 * coreutils.texi (dd invocation): New noatime flag. 2005-12-07 21:11:27 +00:00
Paul Eggert
0e91392981 (dd invocation): New noatime flag. 2005-12-07 21:11:14 +00:00
Paul Eggert
d17f5073fc Mention dd's new noatime flag. 2005-12-07 21:10:33 +00:00
Paul Eggert
5ea987eade * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
porting problem reported by Georg Schwarz in
<http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
* m4/stat-time.m4 (gl_STAT_TIME): Likewise.
2005-12-07 18:22:05 +00:00
Jim Meyering
c25ad39393 *** empty log message *** 2005-12-07 16:23:43 +00:00
Jim Meyering
df621389b0 (EXTRA_DIST): Add build-aux/cvsu. 2005-12-07 16:22:24 +00:00
Jim Meyering
24bf7fd4ad (CVS_LIST): Use build-aux/cvsu, now that we have our own copy of cvsu. 2005-12-07 16:10:51 +00:00
Jim Meyering
96d80f5f4a *** empty log message *** 2005-12-07 16:09:54 +00:00
Jim Meyering
db3375452d From Debian unstable: /usr/bin/cvsu. 2005-12-07 16:09:38 +00:00
Jim Meyering
88f5132b30 *** empty log message *** 2005-12-07 16:09:09 +00:00
Jim Meyering
907c710b9a *** empty log message *** 2005-12-07 08:08:15 +00:00
Jim Meyering
5dd8839716 exit-77 before the trap, not after, if we fail
to create a temporary directory on another partition.
2005-12-07 08:08:08 +00:00
Jim Meyering
45daa1a04d *** empty log message *** 2005-12-06 07:14:11 +00:00
Jim Meyering
de69f524a6 Cross-reference to dirname and readlink. 2005-12-06 07:14:04 +00:00
Jim Meyering
bed3e0c42e Cross-reference to basename and readlink. 2005-12-06 07:13:49 +00:00
Paul Eggert
19af464ef3 Mention reporters for "none" and "proc" mounts. 2005-12-05 17:46:22 +00:00
Jim Meyering
e1c945b363 *** empty log message *** 2005-12-04 23:43:55 +00:00
Jim Meyering
f517ded11a *** empty log message *** 2005-12-04 23:34:19 +00:00
Jim Meyering
c837e0038d (fchown) [!HAVE_FCHOWN]: Define fchown(...) to -1.
(set_owner, preserve_author): New functions, factored out of copy_reg.
(copy_reg): Use them.
(copy_internal): Use them here, too.
From Andreas Gruenbacher.
2005-12-04 23:34:14 +00:00
Jim Meyering
5e36a5a28f *** empty log message *** 2005-12-04 22:00:18 +00:00
Jim Meyering
6a33c69c49 (EXPECTED_ERRNO): Add ENOSYS, for Solaris 8.
Paul Eggert reported that unlink/rmdir vs. e.g., /proc/self/fd/N/FILE
fails with ENOSYS.  This makes openat revert to using save-cwd.c
functions in that case.
2005-12-04 22:00:14 +00:00
Jim Meyering
9333b3a359 *** empty log message *** 2005-12-04 09:58:40 +00:00
Jim Meyering
f390052b80 (usage): Say what happens with two or more arguments. 2005-12-04 09:58:34 +00:00
Jim Meyering
ca88a482a5 *** empty log message *** 2005-12-03 23:24:51 +00:00
Jim Meyering
a936ac291c (print_uptime): Move decl of local `upsecs' into scope where it's used. 2005-12-03 23:24:46 +00:00
Jim Meyering
b3e300393e . 2005-12-03 23:19:58 +00:00
Jim Meyering
e12e1864fc *** empty log message *** 2005-12-03 22:24:31 +00:00
Jim Meyering
b867d3fcfb *** empty log message *** 2005-12-03 22:23:40 +00:00
Jim Meyering
08a0a7291f (long_options): Change the name of each undocumented, for-
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
2005-12-03 22:23:23 +00:00
Jim Meyering
43233c319e (long_opts): Change the name of each undocumented, for-
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
2005-12-03 22:23:09 +00:00
Jim Meyering
616fc42b4f Update uses of undocumented, for- testing-only --presume* options
to start with `---'.
2005-12-03 22:16:24 +00:00
Paul Eggert
448d523897 Mention change to jm-macros.m4. 2005-12-02 18:35:33 +00:00
Paul Eggert
6d28d2c738 (gl_MACROS): Adjust to renaming of gl_SOCKLEN_T to gl_TYPE_SOCKLEN_T. 2005-12-02 18:35:19 +00:00
Paul Eggert
48f08b4f53 Fix typo in previous log entry. 2005-12-02 18:23:42 +00:00
Paul Eggert
feb302b9f2 * (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
Use implementation from Albert Chin, with some
comments/corrections by Stepan Kasal and myself.
2005-12-02 18:22:10 +00:00
Jim Meyering
e4f62b9fcf *** empty log message *** 2005-12-02 07:49:12 +00:00
Paul Eggert
76bebf24a5 Import from gnulib. 2005-12-02 00:42:52 +00:00
Paul Eggert
b3c0bca1f8 (gl_REGEX): Check whether off_t can be used in a switch
statement, to work around an HP-UX 10.20 compiler bug reported by
Peter O'Gorman.
2005-12-02 00:29:02 +00:00
Jim Meyering
82ff869140 *** empty log message *** 2005-11-30 17:42:36 +00:00
Jim Meyering
be3ef12b92 Add a comment about cvsu. 2005-11-30 17:42:33 +00:00
Jim Meyering
46679371cb *** empty log message *** 2005-11-30 13:05:08 +00:00
Jim Meyering
ea2a4f2658 (gl_FUNC_OPENAT): Require openat-priv.h. 2005-11-30 13:05:03 +00:00
Jim Meyering
798f577bec Include openat-priv.h.
Remove definitions of macros defined therein.
2005-11-30 13:04:26 +00:00
Jim Meyering
07c80bab50 Define macros used by mkdirat.c and openat.c. 2005-11-30 13:03:21 +00:00
Jim Meyering
48a8638c23 *** empty log message *** 2005-11-30 12:40:12 +00:00
Jim Meyering
29a3f2f810 (mkdirat): Declare. 2005-11-30 12:40:09 +00:00
Jim Meyering
3f23bf599c *** empty log message *** 2005-11-30 12:39:30 +00:00
Jim Meyering
2e72b76fd3 (mkdirat): New file and function. 2005-11-30 12:39:14 +00:00
Jim Meyering
76b8c64505 *** empty log message *** 2005-11-30 12:38:05 +00:00
Jim Meyering
7214c0bf70 (gl_FUNC_OPENAT): Require and compile mkdirat.c. 2005-11-30 12:38:02 +00:00
Paul Eggert
fc0fa751c4 Log today's changes. 2005-11-26 07:53:39 +00:00
Paul Eggert
7c69f05221 (df invocation): Document treatment of dummy file
systems better.
2005-11-26 07:52:43 +00:00
Paul Eggert
1e20020bb8 (ME_DUMMY): "none" and "proc" file systems are dummies
too.
2005-11-26 07:52:11 +00:00
Paul Eggert
e9c8be100e (show_point): Ignore inaccessible file systems.
(usage): -a includes dummy file systems, not size-0 file systems.
2005-11-26 07:51:45 +00:00
Paul Eggert
bb14284481 df updates for "none", "proc", inaccessible file systems. 2005-11-26 07:51:27 +00:00
Paul Eggert
45ad3543a9 Include <limits.h>.
(dev_from_mount_options)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
New function.  It no longer assumes "dev=" has the System V meaning
on Linux (since it doesn't).  It also parses "dev=" more carefully.
(read_file_system_list)
[defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
dev= in that case.
2005-11-26 07:43:50 +00:00
Paul Eggert
9b539d8634 (unsigned_long_long_int): Renamed from ulonglong_t,
to avoid collision with POSIX name space.  All uses changed.
2005-11-26 07:29:48 +00:00
Paul Eggert
128bc21842 (MOSTLYCLEANFILES): Clean stdbool.h-t, not stdbool.ht. 2005-11-26 06:58:34 +00:00
Paul Eggert
b7fa297fa5 (stdbool.h): Fix typo in previous change. 2005-11-26 06:55:22 +00:00
Paul Eggert
dedcfff69c (stdbool.h): Just copy stdbool_.h; no need to sed any more. 2005-11-26 06:54:17 +00:00
Paul Eggert
e05c20ea7a no longer needed.
(gl_STDBOOL_H): New macro, from gnulib.
(AC_HEADER_STDBOOL): Sync with gnulib.
2005-11-26 06:37:52 +00:00
Paul Eggert
6771c1b415 Simplify greatly, under the assumption that these
days most people use C99-compatible compilers to debug, so it's
not worth worrying about catering to older compilers for that.
This works around some porting problems with HP-UX compilers.
(false, true) [defined __BEOS__]: Don't #undef; no longer needed.
(_Bool): typedef to bool if C++ or BeOS, and #define to signed char
otherwise.
2005-11-26 06:37:31 +00:00
Paul Eggert
c63680e87b (gettime) [!defined OK_TO_USE_1S_CLOCK]:
Report an error at compile-time if only a 1-second nominal clock
resolution is found.
2005-11-26 06:30:35 +00:00
Jim Meyering
1b7e4389dc *** empty log message *** 2005-11-24 17:25:11 +00:00
Jim Meyering
f85b578dbb (EXTRA_DIST): Add acl to the list. 2005-11-24 17:25:08 +00:00
Jim Meyering
2678a248bb Add `$0: ' prefix to diagnostics. 2005-11-24 17:24:36 +00:00
Jim Meyering
f36a979ac9 *** empty log message *** 2005-11-24 13:42:08 +00:00
Jim Meyering
5ee3356ed3 *** empty log message *** 2005-11-24 13:42:04 +00:00
Jim Meyering
f8f2c8b7b1 Add this:
^lib/buffer-lcm\.c$
2005-11-24 09:04:34 +00:00
Paul Eggert
211d43d85e Improve performance a bit with src/copy.c. 2005-11-24 06:50:11 +00:00
Paul Eggert
25719a3315 Improve performance a bit by optimizing away
unnecessary system calls and going to a block size of at least
8192 (on normal hosts, anyway).  This improved performance 5% on my
Debian stable host (2.4.27 kernel, x86, copying from root
ext3 file system to itself).
Include "buffer-lcm.h".
(copy_reg): Omit last argument.  All callers changed.
Use xmalloc to allocate rather than trusting alloca
(which is unwise with large block sizes).
Declare locals more locally, if possible.
Use uintptr_t words instead of int words, for a bit more speed
when looking for null blocks on 64-bit hosts.
Optimize away reads of zero bytes on regular files.
In the typical case, insist on 8 KiB buffers, at least.
Avoid unnecessary extra call to fstat when checking for sparse files.
Avoid now-unnecessary cast to off_t, and "0L".
Avoid unnecessary test of *new_dst when checking for same owner
and group.
2005-11-24 06:49:44 +00:00
Paul Eggert
757d7a8eb5 Add buffer-lcm. 2005-11-24 06:49:10 +00:00
Paul Eggert
ef774a082b (libcoreutils_a_SOURCES): Add buffer-lcm.c, buffer-lcm.h. 2005-11-24 06:48:55 +00:00
Paul Eggert
79eb35c4e5 Initial version 2005-11-24 06:48:36 +00:00
Paul Eggert
325619eb0d Initial version, from diffutils 2005-11-24 06:48:03 +00:00
Jim Meyering
1aab378857 tweak grammar in comments 2005-11-23 13:36:48 +00:00
Jim Meyering
694b9b330a *** empty log message *** 2005-11-23 13:35:15 +00:00
Jim Meyering
e8609798de (fdopendir): Don't change errno when returning non-NULL. 2005-11-23 13:35:09 +00:00
Paul Eggert
1000eb18b6 (rm): Don't assume C99 for-loop syntax. 2005-11-23 04:52:48 +00:00
Jim Meyering
32034e05b7 whoops. Add back decl/definition of n_lengths. 2005-11-22 21:12:28 +00:00
Jim Meyering
8f092ad8e8 *** empty log message *** 2005-11-22 21:03:43 +00:00
Jim Meyering
f076895070 (AD_push): Remove debugging cruft. 2005-11-22 21:03:36 +00:00
Jim Meyering
5ff678924e tweak comments 2005-11-22 20:05:48 +00:00
Jim Meyering
5db92fc43c *** empty log message *** 2005-11-22 16:23:21 +00:00
Jim Meyering
43f9368331 . 2005-11-22 16:00:04 +00:00
Jim Meyering
6e4cda39d3 *** empty log message *** 2005-11-22 15:59:38 +00:00
Jim Meyering
8c1debf168 Add lib/euidaccess-stat.c. 2005-11-22 15:59:35 +00:00
Jim Meyering
66878248f6 . 2005-11-22 15:33:39 +00:00
Jim Meyering
b5373161d0 Rewrite. Now, this module is reentrant on systems
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant.  This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
2005-11-22 15:33:26 +00:00
Jim Meyering
e76200e6fa *** empty log message *** 2005-11-22 15:32:30 +00:00
Jim Meyering
bc3d6c6e81 Put copyright dates all on one line so the
emacs function that updates them works properly.
2005-11-22 15:32:20 +00:00
Jim Meyering
8d8739a0c5 *** empty log message *** 2005-11-22 15:08:13 +00:00
Jim Meyering
ad1df12ba2 (rm): Change expected diagnostic, cannot open directory' to cannot remove',
to align with new version of rm.
2005-11-22 15:08:09 +00:00
Jim Meyering
901835b8bf *** empty log message *** 2005-11-22 15:06:38 +00:00
Jim Meyering
bf1de05827 Ensure that rm now continues removing entries even after certain types of failure. 2005-11-22 15:06:30 +00:00
Jim Meyering
d0a109b244 *** empty log message *** 2005-11-22 15:04:55 +00:00
Jim Meyering
b8616748f2 Rewrite. Now, this module is reentrant on systems
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant.  This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
2005-11-22 15:04:51 +00:00
Jim Meyering
9c14365b2a *** empty log message *** 2005-11-22 14:53:55 +00:00
Jim Meyering
d591c30293 (openat_permissive): Declare.
(openat_ro): Define.
2005-11-22 14:53:47 +00:00
Jim Meyering
2fa54245e1 (EXPECTED_ERRNO): New macro.
(openat_permissive): New function -- used in remove.c rewrite.
(all functions): Set errno just before returning, only if there
was an actual failure.
Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
2005-11-22 14:52:48 +00:00
Jim Meyering
026769d1ce add ^lib/euidaccess-stat\.c$ 2005-11-21 22:59:36 +00:00
Jim Meyering
2f6048508c *** empty log message *** 2005-11-20 18:54:09 +00:00
Jim Meyering
a2895948e9 Remove spurious space-before-TAB. 2005-11-20 18:52:15 +00:00
Jim Meyering
b99b6ac9ff *** empty log message *** 2005-11-20 14:07:13 +00:00
Jim Meyering
8b0e637515 (gl_EUIDACCESS_STAT): New file/macro. 2005-11-20 14:07:09 +00:00
Jim Meyering
75e3f2ecf2 *** empty log message *** 2005-11-20 09:10:35 +00:00
Jim Meyering
800af65fec . 2005-11-20 08:52:08 +00:00
Jim Meyering
18673b9f2d *** empty log message *** 2005-11-20 08:51:38 +00:00
Jim Meyering
e88132fa06 New file, mostly from euidaccess.c. 2005-11-20 08:51:10 +00:00
Jim Meyering
c0c83656d2 *** empty log message *** 2005-11-20 08:28:05 +00:00
Jim Meyering
6ec2bc2d61 Require gl_EUIDACCESS_STAT. 2005-11-20 08:26:38 +00:00
Jim Meyering
a1343d67f2 tweak grammar in a comment 2005-11-19 07:49:10 +00:00
Jim Meyering
fd907a33bd . 2005-11-18 23:12:06 +00:00
Paul Eggert
c7c0e0b0ed * configure.ac (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC. 2005-11-18 23:03:34 +00:00
Paul Eggert
1314a5e7d3 (AC_PROG_CC_STDC): Use this instead of AC_PROG_CC, so that
we get a standard-conforming compiler.  This relies on the new
m4/c.m4 file.  Note that it's a bit tricky, since c.m4 doesn't
define AC_PROG_CC_STDC; we are relying on Autoconf 2.59 internals.
m4/c.m4 can go away with Autoconf 2.60 comes out.
2005-11-18 23:03:11 +00:00
Paul Eggert
efe0b59c14 * c.m4: New file. 2005-11-18 23:02:48 +00:00
Paul Eggert
761440da1b New file, to work around bugs in AIX cc.
Problem reported by James Lemley.  This file can go away
after Autoconf 2.60 comes out.
2005-11-18 23:02:32 +00:00
Paul Eggert
b9267a07a8 * configure.ac (AM_PROG_CC_C_O): Add. 2005-11-18 19:46:19 +00:00
Paul Eggert
a6a99fdf5d (AM_PROG_CC_C_O): Add. Needed for CVS Automake.
Problem reported by Eric Blake.
2005-11-18 19:45:42 +00:00
Jim Meyering
a46640e980 s/filesystem/file system/ in a comment 2005-11-17 21:17:35 +00:00
Jim Meyering
4ace21e534 s/filesystem/file system/ 2005-11-17 21:17:28 +00:00
Jim Meyering
4b4233be05 *** empty log message *** 2005-11-17 20:17:53 +00:00
Jim Meyering
ca7cafb093 (AD_mark_helper): Make a char *' parameter const'.
(AD_mark_current_as_unremovable): Likewise, but for a local.
(rm_1): Likewise.
2005-11-17 20:17:47 +00:00
Jim Meyering
8ee6b05308 . 2005-11-17 20:05:46 +00:00
Jim Meyering
dfae63e27b *** empty log message *** 2005-11-17 20:03:14 +00:00
Jim Meyering
d80dfec1d6 remove commented-out lines 2005-11-17 19:53:07 +00:00
Jim Meyering
e663408a22 Let traps handle removing temporary directories. 2005-11-17 19:52:08 +00:00
Jim Meyering
b02d160c35 *** empty log message *** 2005-11-17 19:08:01 +00:00
Jim Meyering
422bcecd8a (XFAIL_TESTS): Add acl. 2005-11-17 19:06:55 +00:00
Jim Meyering
c5eaca325d (XFAIL_TESTS): Add acl. 2005-11-17 19:06:28 +00:00
Jim Meyering
43acd2b833 (TESTS): Add acl. 2005-11-17 18:38:14 +00:00
Jim Meyering
da2a1139b0 (TESTS): Add acl. 2005-11-17 18:37:47 +00:00
Jim Meyering
66f47a91d1 no need to do `cd $pwd; rm -rf $tmp'; the traps handle that 2005-11-17 18:24:41 +00:00
Jim Meyering
c9b1de9d5e split long line 2005-11-17 18:23:18 +00:00
Jim Meyering
e58e148e51 New tests, from Andreas Gruenbacher. 2005-11-17 18:21:31 +00:00
Jim Meyering
42bfe5a874 New tests, from Andreas Gruenbacher. 2005-11-17 18:21:11 +00:00
Jim Meyering
29eb8e66c2 *** empty log message *** 2005-11-17 18:19:12 +00:00
Jim Meyering
97de3a32b6 (basename_is_dot_or_dotdot): Correct wording in comment. 2005-11-17 12:28:34 +00:00
Jim Meyering
f360c113d5 *** empty log message *** 2005-11-17 12:28:27 +00:00
Paul Eggert
95c4014913 (tail invocation): Say that the obsolete form uses exactly one
option and at most one file.
2005-11-16 22:45:12 +00:00
Paul Eggert
9c0540b548 Improve quality of ln's diagnostics. 2005-11-16 22:33:37 +00:00
Paul Eggert
24ce72f635 (do_link, usage): Improve quality of ln's diagnostics.
(do_link): Don't use alloca on a buffer of unbounded size.
2005-11-16 22:32:45 +00:00
Paul Eggert
ace5616c61 (ln invocation): ln -v now outputs lines only for successful links. 2005-11-16 22:32:16 +00:00
Paul Eggert
114492b826 Improve quality of ln's diagnostics. 2005-11-16 22:31:44 +00:00
Jim Meyering
0278065f3f . 2005-11-16 09:31:07 +00:00
Jim Meyering
db604d8e8a *** empty log message *** 2005-11-16 09:30:25 +00:00
Jim Meyering
9a233da2ab Accommodate HPUX. It appears to fail with EACCES rather than EPERM.
Reported by Peter O'Gorman here:
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/5766
2005-11-16 09:29:32 +00:00
Paul Eggert
8645d522c0 Don't bother with #pragma STDC FENV_ACCESS ON, as
coreutils no longer futzes with rounding modes.
2005-11-15 18:30:28 +00:00
Jim Meyering
12fc258f9f *** empty log message *** 2005-11-15 18:03:26 +00:00
Jim Meyering
087fd33c32 *** empty log message *** 2005-11-15 17:21:12 +00:00
Jim Meyering
53d4c7bf09 *** empty log message *** 2005-11-15 07:24:45 +00:00
Jim Meyering
db5eb389ad Use #if !, not #ifndef, for AC_CHECK_DECLS. 2005-11-14 14:51:24 +00:00
Jim Meyering
6b869921fa *** empty log message *** 2005-11-14 14:51:21 +00:00
Jim Meyering
8d9ddc0c12 *** empty log message *** 2005-11-14 11:07:18 +00:00
Jim Meyering
f0afe32b84 (sort): Mention consequences of today's mkstemp-safer.c fix. 2005-11-14 10:54:07 +00:00
Jim Meyering
be5f6397eb *** empty log message *** 2005-11-14 10:53:58 +00:00
Jim Meyering
ab792811f5 . 2005-11-14 08:17:35 +00:00
Jim Meyering
a0d4d9ab95 (Mode Structure): Capitalize two sentences in an
enumerated list and fix a typo.  From Aaron Hawley.
2005-11-13 18:57:17 +00:00
Jim Meyering
fdbc317e46 *** empty log message *** 2005-11-13 18:57:03 +00:00
Jim Meyering
f4b8a25cb5 *** empty log message *** 2005-11-13 15:17:23 +00:00
Jim Meyering
3275aebb6a (announcement): Use new option and key. 2005-11-13 15:17:18 +00:00
Jim Meyering
233f9cae0c (gpg_key_ID): Define. 2005-11-13 15:17:00 +00:00
Jim Meyering
719d884ff9 Accept new option, --gpg-key-id=ID and
emit a blurb telling how to use the .sig files.
2005-11-13 15:16:40 +00:00
Jim Meyering
ff9382628e remove inadvertently committed hunk (use of new --gpg-key-id option) 2005-11-13 15:08:50 +00:00
Jim Meyering
315d88ac83 *** empty log message *** 2005-11-13 15:06:47 +00:00
Jim Meyering
b1fa77721e (EXTRA_DIST): Add .x-sc_require_config_h here, too. 2005-11-13 15:06:43 +00:00
Jim Meyering
9f9747fc1e New file listing exceptions to the above rule.
Some are legit, others are simply grandfathered in.
2005-11-13 15:06:05 +00:00
Jim Meyering
28c7ac000b *** empty log message *** 2005-11-13 15:05:51 +00:00
Jim Meyering
68943d27f8 Require that most .c files include <config.h>.
(sc_require_config_h): New rule.
(syntax-check-rules): Add it.
2005-11-13 15:05:45 +00:00
Jim Meyering
13e06b3243 *** empty log message *** 2005-11-13 14:07:11 +00:00
Jim Meyering
dcd8aa97f2 Include <config.h>, required for possible replacement of mkstemp. 2005-11-13 14:07:06 +00:00
Jim Meyering
353d44df02 . 2005-11-12 19:11:27 +00:00
Jim Meyering
d81b50dc88 Update from gnulib. 2005-11-12 19:11:17 +00:00
Jim Meyering
3fd87d8e73 *** empty log message *** 2005-11-12 10:16:50 +00:00
Jim Meyering
716377a20a *** empty log message *** 2005-11-12 10:06:34 +00:00
Jim Meyering
108429b83f Emulate openat-family functions using Linux's procfs, if possible.
Idea and some code from Ulrich Drepper's glibc changes.

(BUILD_PROC_NAME): New macro.
Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
(rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
before falling back on save_cwd and restore_cwd.
(fdopendir, fstatat, unlinkat): Likewise.
2005-11-12 10:06:29 +00:00
Jim Meyering
af3cabbf7f s/expensive/very expensive/ in a comment. 2005-11-12 08:54:17 +00:00
Jim Meyering
fd13239884 remove now-unused file 2005-11-12 08:39:27 +00:00
Jim Meyering
8f0753ece7 *** empty log message *** 2005-11-12 08:36:52 +00:00
Jim Meyering
38a1bfa703 . 2005-11-12 08:29:35 +00:00
Jim Meyering
2b46dc5403 *** empty log message *** 2005-11-11 17:16:30 +00:00
Jim Meyering
c0943d140a *** empty log message *** 2005-11-11 17:16:01 +00:00
Jim Meyering
f1126d2639 Mention `readlink -f' bug fix in 5.3.0 news.
Mention new readlink options in `New features' section.
2005-11-11 17:15:06 +00:00
Jim Meyering
7fdc7d4df9 *** empty log message *** 2005-11-10 23:20:09 +00:00
Jim Meyering
e5475103aa (fstatat, unlinkat): Perform the syscall directly,
skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
2005-11-10 23:20:05 +00:00
Paul Eggert
3afe2cd61c (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
or gettimeofday; no longer needed.
2005-11-10 20:21:07 +00:00
Paul Eggert
4c9fae6b88 gethrxtime now uses gettime 2005-11-10 20:20:51 +00:00
Paul Eggert
9d9e6430a3 Fix comment 2005-11-10 20:20:31 +00:00
Paul Eggert
163141255f Include "timespec.h" rather than the sys/time / time
business.
(gethrxtime) [! (HAVE_NANOUPTIME
|| (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
|| HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
our own approximation.
2005-11-10 20:20:20 +00:00
Paul Eggert
14f7ef9d17 gethrxtime now uses gettime 2005-11-10 20:20:02 +00:00
Jim Meyering
aad084f10f Use /dev/full if possible for descriptor 0 -- like glibc now does.
Fall back on /dev/null if opening /dev/full fails.
2005-11-09 20:53:41 +00:00
Jim Meyering
c5ad46e57f *** empty log message *** 2005-11-08 21:11:00 +00:00
Jim Meyering
8b5df58140 Merge in changes from b5_9x branch. 2005-11-08 21:10:52 +00:00
Paul Eggert
2aa901dadd ls now defaults to --time-style='locale', which in turn acts
like --time-style='posix-long-iso' if the locale settings are messed up.
2005-11-08 21:00:10 +00:00
Paul Eggert
6837183d42 (decode_switches): ls now defaults to --time-style='locale', which in
turn acts like --time-style='posix-long-iso' if the locale settings
are messed up.
2005-11-08 20:59:49 +00:00
Paul Eggert
9391b55213 (Formatting file timestamps): ls now defaults to
--time-style='locale', which in turn acts like
--time-style='posix-long-iso' if the locale settings are messed up.
2005-11-08 20:59:19 +00:00
Paul Eggert
de4224e5df ls now defaults to --time-style='locale'. 2005-11-08 20:58:57 +00:00
Jim Meyering
47d8cac561 *** empty log message *** 2005-11-08 08:20:04 +00:00
Jim Meyering
4c60a9a964 s/expensive/very expensive/ in a comment. 2005-11-08 08:19:57 +00:00
Jim Meyering
ce8f6d2bab *** empty log message *** 2005-11-07 21:42:30 +00:00
Jim Meyering
6d73e34764 *** empty log message *** 2005-11-07 21:42:26 +00:00
Jim Meyering
1ab59b0b84 (usage): Fix descriptions of --sort, --time. 2005-11-07 21:42:23 +00:00
Jim Meyering
59eb233924 *** empty log message *** 2005-11-07 21:39:40 +00:00
Jim Meyering
4413276c24 *** empty log message *** 2005-11-05 09:35:16 +00:00
Jim Meyering
a8d0fd4c1b Include filenamecat.c.
(FILE_BASENAME_CONCAT): Remove.
(do_link): Remove last arg DEST_IS_DIR.  All callers changed.
(main): Use file_name_concat, base_name, and strip_trailing_slashes
instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
the use of alloca.
2005-11-05 09:34:57 +00:00
Jim Meyering
fc7d5aa98a . 2005-11-04 10:15:01 +00:00
Jim Meyering
2c428e4487 . 2005-11-04 10:14:53 +00:00
Jim Meyering
e239238882 mention the du bug fix 2005-11-04 10:10:54 +00:00
Jim Meyering
3b9f405a99 *** empty log message *** 2005-11-04 10:10:36 +00:00
Jim Meyering
33dd08b37b *** empty log message *** 2005-11-04 10:08:54 +00:00
Jim Meyering
933576b440 (process_file): Don't overflow for files of size >= 2^31
on systems with stat.st_blocks of a signed 32-bit type.
This bug causes trouble on some AIX 5.1 systems.
Report and trivial patch from Paul Townsend:
<http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
2005-11-04 10:08:51 +00:00
Jim Meyering
cf18eb7ca4 fix typo in comment 2005-11-04 10:02:36 +00:00
Jim Meyering
ae7a1142ac *** empty log message *** 2005-11-04 09:58:29 +00:00
Jim Meyering
33c6233c8d Mark this test as `very-expensive' 2005-11-04 09:56:38 +00:00
Jim Meyering
58e8de7c4d mark this as a very-expensive test 2005-11-04 09:54:59 +00:00
Jim Meyering
63e0e4288b (TESTS): Add 2g. 2005-11-04 09:54:15 +00:00
Jim Meyering
8227fec80a Test for a bug that bites at least on AIX 5.1 systems. 2005-11-04 09:53:17 +00:00
Jim Meyering
149f1bbd10 just like expensive, but `very' 2005-11-04 09:52:09 +00:00
Jim Meyering
302043681f (EXTRA_DIST): Add very-expensive. 2005-11-04 09:51:42 +00:00
Paul Eggert
4b2069b57f rm -d no longer has any effect, and we plan to remove it (and maybe ln -d). 2005-11-02 21:56:49 +00:00
Paul Eggert
b38883ea2f (usage): Don't mention rm -d. 2005-11-02 21:53:20 +00:00
Paul Eggert
ce1d20289c (rm_option_init): Don't initialize unlink_dirs member, which went away. 2005-11-02 21:52:33 +00:00
Paul Eggert
11fc9bca5f (struct rm_options): Remove unlink_dirs. 2005-11-02 21:51:57 +00:00
Paul Eggert
784e24b06b (rm invocation): Don't mention --directory (-d). 2005-11-02 21:51:35 +00:00
Paul Eggert
162a2d69bc Mention that rm -d and maybe ln -d are scheduled for
removal in 2006.
2005-11-02 21:51:16 +00:00
Jim Meyering
8a64a8b127 *** empty log message *** 2005-11-02 21:29:32 +00:00
Jim Meyering
d8d9b43921 Fix typo in comment: s/fileutils/coreutils. 2005-11-02 21:29:28 +00:00
Jim Meyering
186bf114dd *** empty log message *** 2005-11-02 20:45:24 +00:00
Jim Meyering
812db65afa Redirect stderr to /dev/null so the
M+N records in/out don't pollute `make check' output.
2005-11-02 20:44:59 +00:00
Jim Meyering
ad1faa0f28 *** empty log message *** 2005-11-02 20:37:10 +00:00
Jim Meyering
a49c7ccfe1 (sk-seek4): New test, to exercise the bug
fixed on 2005-10-31.  This test uses the new, IN_PIPE specifier.
2005-11-02 20:36:36 +00:00
Jim Meyering
83743fc715 Accept a new type of input specifier: IN_PIPE,
to indicate that the input file should be piped into the command
under test (via `cat FILE | $prog ...').
2005-11-02 20:35:52 +00:00
Jim Meyering
e0b652c488 . 2005-11-02 10:04:14 +00:00
Jim Meyering
f626cd65cc *** empty log message *** 2005-11-02 09:58:43 +00:00
Jim Meyering
588df316d9 (remove_entry): Emit a better diagnostic when rm
(without -r) fails to remove a directory on a non-Linux system.
This change affects only newer Solaris systems (with priv_*
functions like priv_allocset).  Reported by Keith Thompson.
2005-11-02 09:47:39 +00:00
Jim Meyering
4db5b5cf11 test for today's fix 2005-11-02 09:38:38 +00:00
Jim Meyering
4df4047d35 (TESTS): Add dir-nonrecur. 2005-11-02 09:38:16 +00:00
Paul Eggert
4b15886f93 "touch 0101000000" now operates as POSIX 1002.1-2001 requires. 2005-11-01 23:43:38 +00:00
Paul Eggert
473a0d6209 Add y2000 test. 2005-11-01 23:42:57 +00:00
Paul Eggert
a2bacbdc9c (main): Pass PDS_PRE_2000 to posixtime. 2005-11-01 23:42:36 +00:00
Paul Eggert
71fa8dc28e (PDS_PRE_2000): New macro. 2005-11-01 23:42:16 +00:00
Paul Eggert
1a0a832ac8 (year): Arg is now syntax_bits rather than allow_century.
All usages changed.  Reject dates outside the range 1969-1999 if
PDS_PRE_2000 is used.
2005-11-01 23:41:56 +00:00
Paul Eggert
d6fa12c0f9 (touch invocation): The old usage works only for 1969-1999 now. 2005-11-01 23:41:33 +00:00
Paul Eggert
fd449d30a8 "touch 0101000000" now operates as POSIX 1003.1-2001 requires. 2005-11-01 23:41:13 +00:00
Paul Eggert
0287c32733 "tail -c 2 FILE" now operates as POSIX 1003.1-2001 requires. 2005-11-01 23:06:32 +00:00
Paul Eggert
407fb46c87 (c-2, c-2-minus, c2, c2-minus): New tests.
(test_vector): Add special cases for _POSIX2_VERSION, and
regularize the old ones a bit.
2005-11-01 23:05:52 +00:00
Paul Eggert
99f09784cc (parse_obsolete_option): Implement fix for "tail -c 2 FILE". 2005-11-01 23:05:29 +00:00
Paul Eggert
4fb9c70faf (tail invocation): Describe obsolete usages
like "tail -2" more precisely.
2005-11-01 23:05:00 +00:00
Paul Eggert
18eb295ec4 tail -c 2 FILE now operates as POSIX 1002.1-2001 requires. 2005-11-01 23:04:37 +00:00
Paul Eggert
a53513f142 * src/dd.c (skip): Fix off-by-one error. 2005-10-31 08:39:36 +00:00
Paul Eggert
91f8e15bff (skip): Fix off-by-one error reported by Theodoros V. Kalamatianos. 2005-10-31 08:39:14 +00:00
Paul Eggert
15d4c70e08 Trivial changes to support SCO systems. 2005-10-30 23:05:16 +00:00
Paul Eggert
a504db1780 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well as PATH_MAX.
Revamp wording and local variables to suggest the intended function of
the PATH_MAX check.
2005-10-30 23:04:55 +00:00
Paul Eggert
3103c9009b (gl_FUNC_FPENDING): Correct check for SCO systems,
where __ptr is null when no I/O is pending.
2005-10-30 23:04:17 +00:00
Paul Eggert
a54170c2a0 Fix porting problems reported by Theodoros V. Kalamatianos. 2005-10-30 21:46:00 +00:00
Paul Eggert
9b700d84f7 * tests/mkdir/p-3: Require that the test be run as non-root. 2005-10-30 21:45:45 +00:00
Paul Eggert
d9b19cac60 Require that the test be run as non-root. 2005-10-30 21:44:53 +00:00
Paul Eggert
9c9083d9a7 [defined HAVE_CONFIG_H]: Include <config.h>, so that large files can be opened. 2005-10-30 21:44:31 +00:00
Paul Eggert
9fb982e150 (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
Don't assume that futimes failing means we must fail.
2005-10-30 21:32:02 +00:00
Paul Eggert
b90c07efd8 (__getcwd): Don't assume that system calls after readdir
leave errno alone.  Problem reported by Dmitry V. Levin.
2005-10-30 01:31:32 +00:00
Paul Eggert
5648577df0 (savedir): Don't assume that xrealloc etc. leave errno alone. 2005-10-28 23:06:42 +00:00
Paul Eggert
cada888edd src/ln.c (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
boundary between DEST and SOURCE in the result.
2005-10-28 22:17:27 +00:00
Paul Eggert
50a6da201b (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
boundary between DEST and SOURCE in the result.
2005-10-28 22:17:00 +00:00
Jim Meyering
f6d480b0a7 *** empty log message *** 2005-10-27 19:44:45 +00:00
Jim Meyering
cc7c372176 *** empty log message *** 2005-10-27 16:27:15 +00:00
Jim Meyering
84131ca42b (main) [!O_BINARY]: Changed default read mode
back to text, to sync with documentation and for backwards compatibility.
2005-10-27 16:27:04 +00:00
Jim Meyering
9793cca908 Add these: sha224sum sha256sum sha384sum sha512sum 2005-10-26 21:46:24 +00:00
Jim Meyering
1828ebcc26 *** empty log message *** 2005-10-25 13:50:30 +00:00
Jim Meyering
c30dcb08eb . 2005-10-25 13:47:38 +00:00
Jim Meyering
55b84cf932 *** empty log message *** 2005-10-25 12:03:56 +00:00
Jim Meyering
47af602add *** empty log message *** 2005-10-25 12:00:55 +00:00
Jim Meyering
7a3af1eb39 (other-wr): Add an explicit test for
the dircolors bug (NULL-dereference) fixed yesterday.
2005-10-25 12:00:51 +00:00
Jim Meyering
91795f6fa2 (tac_file): When determining whether a file is seekable,
also test whether it is a tty.  Using only the lseek-based test would
give a false positive on Solaris.  Reported by Peter Fales.
2005-10-24 16:07:36 +00:00
Jim Meyering
b9165cb373 *** empty log message *** 2005-10-24 16:07:28 +00:00
Jim Meyering
8578313a4a . 2005-10-24 13:44:58 +00:00
Jim Meyering
0938dcec7b *** empty log message *** 2005-10-24 13:42:28 +00:00
Jim Meyering
075b283689 (TESTS): Add p-slashdot. 2005-10-24 13:42:21 +00:00
Jim Meyering
e082e26ce0 New test, for "mkdir -p" failure. 2005-10-24 13:42:02 +00:00
Jim Meyering
f169968735 (TESTS): Add d-slashdot. 2005-10-24 13:41:41 +00:00
Jim Meyering
465b852e3b New test, for "install -d" failure. 2005-10-24 13:41:17 +00:00
Jim Meyering
e928445598 *** empty log message *** 2005-10-24 13:36:03 +00:00
Jim Meyering
e8871a9516 (make_dir_parents): Like the code above it, don't rely
on mkdir failing with a particular errno value (EEXIST).
Based on a patch by Dmitry V. Levin.
2005-10-24 13:35:59 +00:00
Jim Meyering
30bf08a3da rename array_cardinality to array_len 2005-10-24 10:39:46 +00:00
Jim Meyering
d038ef379e *** empty log message *** 2005-10-24 10:22:19 +00:00
Jim Meyering
b8cedd257a (make_dir_parents): Make the preceding fix a little
more robust, e.g., when the final component is created as a non-
directory by another process just before `mkdir -p's final mkdir.
2005-10-24 10:22:10 +00:00
Jim Meyering
946e7dc930 *** empty log message *** 2005-10-24 10:03:51 +00:00
Jim Meyering
5b427ce7c3 A command like `mkdir -p nonexistent/.' would create the
directory but exit nonzero with a diagnostic.  This could also be
triggered with a non-`.' component, e.g., in a race with another
process running the same `mkdir -p nonexistent/sub' command.

(make_dir_parents): Handle the case of an existing final component.
Reported by Matthias Andree here:
http://savannah.gnu.org/bugs/?func=detailitem&item_id=14848
2005-10-24 10:03:47 +00:00
Jim Meyering
ce44b29901 *** empty log message *** 2005-10-24 09:55:13 +00:00
Jim Meyering
295bdba02c (ls_codes): Add missing comma.
Anonymous report and patch from
http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
2005-10-24 09:55:00 +00:00
Jim Meyering
b648b4af3d Add a compile-time assertion that the slack_codes
and ls_codes arrays have the same number of elements.  This would
have prevented the above-fixed bug.
2005-10-24 09:43:01 +00:00
Jim Meyering
4005639856 *** empty log message *** 2005-10-24 09:01:15 +00:00
Jim Meyering
91c0fe6767 (Makefile): Remove stray po-directories argument. 2005-10-24 09:01:02 +00:00
Jim Meyering
bc8ada5325 *** empty log message *** 2005-10-24 08:17:00 +00:00
Jim Meyering
5c0879b3ca Update from gettext cvs (0.15). 2005-10-24 08:13:39 +00:00
Jim Meyering
84aca29abf *** empty log message *** 2005-10-24 07:28:57 +00:00
Jim Meyering
57d5938b17 * src/expand.c (parse_tab_stops): Add comment to make this function
identical to the one in unexpand.c.

* src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
identical to the one in expand.c.
2005-10-24 07:28:39 +00:00
Jim Meyering
48e6b74278 *** empty log message *** 2005-10-24 07:18:25 +00:00
Jim Meyering
315b42ce8e (next_file): Don't assume fopen cannot return stdin. 2005-10-24 07:18:18 +00:00
Jim Meyering
d0889c6d10 . 2005-10-23 20:48:56 +00:00
Jim Meyering
d3a1d47934 *** empty log message *** 2005-10-23 16:05:32 +00:00
Jim Meyering
aa2165429c Document SHA-1 and SHA-2 utlities. 2005-10-23 16:05:26 +00:00
Jim Meyering
b7d83f310d *** empty log message *** 2005-10-23 16:01:21 +00:00
Jim Meyering
708c4e6682 . 2005-10-23 16:00:59 +00:00
Jim Meyering
79999f2e85 *** empty log message *** 2005-10-23 16:00:25 +00:00
Jim Meyering
f0b2494fa6 *** empty log message *** 2005-10-23 15:59:09 +00:00
Jim Meyering
441c8bd865 from David Madore 2005-10-23 15:58:59 +00:00
Jim Meyering
00ba9322af Remove no-longer-relevant comment. 2005-10-23 15:55:30 +00:00
Jim Meyering
e2cfa48b0f from David Madore 2005-10-23 15:53:55 +00:00
Jim Meyering
d294610a58 *** empty log message *** 2005-10-23 15:47:07 +00:00
Jim Meyering
c5795228dd test scripts from David Madore 2005-10-23 15:46:39 +00:00
Jim Meyering
1ad9207ebb (TESTS): Add new sha224sum, sha256sum, sha384sum, sha512sum test scripts
here rather that each in its own directory.
2005-10-23 15:46:14 +00:00
Jim Meyering
ac3fa5399b Add new sha* programs. 2005-10-23 15:37:53 +00:00
Jim Meyering
b6b139e070 *** empty log message *** 2005-10-23 15:37:04 +00:00
Jim Meyering
d45f1b2d27 Add gl_SHA256 and gl_SHA512. 2005-10-23 15:37:00 +00:00
Jim Meyering
2c91d95619 . 2005-10-23 15:36:49 +00:00
Jim Meyering
ce9b73cda4 *** empty log message *** 2005-10-23 15:36:09 +00:00
Jim Meyering
123571ad4d Add new programs: sha224sum, sha256sum, sha384sum, sha512sum.
Add their names to the list.
2005-10-23 15:31:44 +00:00
Jim Meyering
1974bccc56 (digest_check, main): Use ptr_align rather than
a dangerous pointer-value-to-`unsigned' cast.
2005-10-23 15:29:25 +00:00
Jim Meyering
5528d926f6 *** empty log message *** 2005-10-23 15:25:19 +00:00
Jim Meyering
c999d42c57 New file, used to build sha* programs from md5sum.c. 2005-10-23 15:25:14 +00:00
Jim Meyering
3b63180c8c (sha224sum, sha256sum, sha384sum, sha512sum): Rules for compiling sha-2 utilities
(noinst_HEADERS): Remove checksum.h.
2005-10-23 15:23:56 +00:00
Jim Meyering
61fa9f0cfe Provide framework for computing sha-2 hashes. 2005-10-23 15:22:02 +00:00
Jim Meyering
e849be6c8b *** empty log message *** 2005-10-23 15:18:48 +00:00
Jim Meyering
f4b517cb6d add sha-2 .x files 2005-10-23 15:18:13 +00:00
Jim Meyering
0ebfe3cf4b (dist_man_MANS): Add the corresponding .1 names.
(sha224sum.1, sha256sum.1, sha384sum.1, sha512sum.1): New dependencies.
2005-10-23 15:17:41 +00:00
Jim Meyering
426b5f6752 *** empty log message *** 2005-10-23 14:32:25 +00:00
Jim Meyering
4d895ec806 (million-a): Add the "million a's" test (one of the FIPS test vectors). 2005-10-23 14:32:18 +00:00
Jim Meyering
7ac64b812e . 2005-10-23 14:19:22 +00:00
Jim Meyering
b5c354ca15 *** empty log message *** 2005-10-23 10:42:16 +00:00
Jim Meyering
9db8ccf72a *** empty log message *** 2005-10-23 10:41:50 +00:00
Jim Meyering
7fc7e01a25 Use 6.0-cvs as the version string. 2005-10-23 10:41:18 +00:00
Jim Meyering
d5e98be935 . 2005-10-22 21:10:03 +00:00
Jim Meyering
b2bbe32f13 . 2005-10-22 20:59:27 +00:00
Jim Meyering
67e7f7d858 . 2005-10-22 18:15:06 +00:00
Jim Meyering
14a27f617b *** empty log message *** 2005-10-22 18:13:04 +00:00
Jim Meyering
8aa50018a0 Remove -cvs suffix from version string. 2005-10-22 18:12:57 +00:00
Jim Meyering
27ad9d14e9 *** empty log message *** 2005-10-22 18:12:23 +00:00
Jim Meyering
d0df944db9 *** empty log message *** 2005-10-22 18:11:07 +00:00
Jim Meyering
c3d97a0aa6 . 2005-10-20 14:30:53 +00:00
Jim Meyering
971b478896 *** empty log message *** 2005-10-20 14:29:41 +00:00
Jim Meyering
23d83ccba1 Mention this chmod fix as well as the dircolors one. 2005-10-20 14:29:38 +00:00
Jim Meyering
d87b9dfa10 (TESTS): Add octal. 2005-10-20 14:27:03 +00:00
Jim Meyering
eaecbde30d New file, to exercise today's lib/modechange.c fix. 2005-10-20 14:24:29 +00:00
Jim Meyering
1e12a6ad1e *** empty log message *** 2005-10-20 14:20:41 +00:00
Jim Meyering
a4667affc0 (mode_compile): Reject an invalid mode string that
starts with an octal digit.  From Andreas Gruenbacher.
2005-10-20 14:20:34 +00:00
Jim Meyering
7aff553950 . 2005-10-19 07:37:10 +00:00
Jim Meyering
dee664c8bb (append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
2005-10-19 07:32:14 +00:00
Jim Meyering
21735a5358 *** empty log message *** 2005-10-19 07:32:04 +00:00
Jim Meyering
36faf23911 *** empty log message *** 2005-10-19 07:30:58 +00:00
Jim Meyering
276ecc89de (quote): Add test for the above fix. 2005-10-19 07:30:48 +00:00
Jim Meyering
388bf87b8d *** empty log message *** 2005-10-18 09:20:32 +00:00
Jim Meyering
efad655ef4 Add a comment explaining (probably) why this
test fails on OpenBSD 3.2 when run in an NFS-mounted directory.
2005-10-18 09:14:36 +00:00
Jim Meyering
9353affeec *** empty log message *** 2005-10-17 15:23:21 +00:00
Jim Meyering
b09b33285a Use 5.92-cvs as the version string. 2005-10-17 15:23:17 +00:00
Jim Meyering
1f4f154e46 (my-distcheck): Depend on
$(release_archive_dir)/$(prev-tgz) here, so that if it's missing
we fail earlier.
2005-10-17 06:58:46 +00:00
Jim Meyering
b3665517eb . 2005-10-16 22:17:31 +00:00
Jim Meyering
9cfc53bf54 now it's the 17th 2005-10-16 22:07:00 +00:00
Jim Meyering
2bff118a36 typo 2005-10-16 21:01:48 +00:00
Jim Meyering
9c2e9b49d1 . 2005-10-16 12:28:06 +00:00
Jim Meyering
0652d12852 whoops. Don't put $$today inside single quotes. 2005-10-16 11:00:22 +00:00
Jim Meyering
8fe2b26799 *** empty log message *** 2005-10-16 10:58:02 +00:00
Jim Meyering
a7ffedd708 (VERSION_REGEXP): New variable.
(news-date-check, changelog-check): Use tighter regular expressions.
2005-10-16 10:57:58 +00:00
Jim Meyering
2487210cb4 remove -cvs suffix 2005-10-16 10:38:40 +00:00
Jim Meyering
f0e03c732d *** empty log message *** 2005-10-16 10:36:02 +00:00
Jim Meyering
7baaad040a . 2005-10-16 10:35:27 +00:00
Jim Meyering
284a97768e *** empty log message *** 2005-10-16 10:24:57 +00:00
Jim Meyering
dba603f83a Mention the `mkdir -p' bug fix. 2005-10-16 10:24:41 +00:00
Jim Meyering
2c12c963b1 Remove -cvs suffix from version string. For 5.91. 2005-10-16 09:51:04 +00:00
Jim Meyering
9385c40824 *** empty log message *** 2005-10-16 09:50:13 +00:00
Jim Meyering
d948c0308a (Top, General output formatting, dir invocation):
(vdir invocation): Don't document the old v and d commands.
2005-10-16 07:27:04 +00:00
Jim Meyering
13d8990203 *** empty log message *** 2005-10-16 07:26:42 +00:00
Jim Meyering
7fdc81ede5 *** empty log message *** 2005-10-15 15:23:36 +00:00
Jim Meyering
05da3cb908 *** empty log message *** 2005-10-15 15:01:28 +00:00
Jim Meyering
2fa2315d0c (usage): Undocument deprecated --idle (-i) option. 2005-10-15 15:01:22 +00:00
Jim Meyering
e418d03571 (who invocation): Remove documentation for deprecated --idle (-i). 2005-10-15 14:59:17 +00:00
Jim Meyering
c6ee1b3a32 . 2005-10-15 10:23:47 +00:00
Jim Meyering
b54de31c76 . 2005-10-15 10:21:39 +00:00
Jim Meyering
999a43859a *** empty log message *** 2005-10-15 10:15:56 +00:00
Jim Meyering
15e97882ff (main): Remove --link -l options.
You can use --dereference (-L) instead.
2005-10-15 10:15:48 +00:00
Jim Meyering
f90df192b4 (parse_options): Remove --allow-missing option.
You can use --retry instead.
2005-10-15 10:15:34 +00:00
Jim Meyering
69dc13717a (usage): Document -m, once again.
(main): Warn about use of deprecated long options: --kilobytes and --megabytes.
2005-10-15 10:14:13 +00:00
Jim Meyering
4ecdd8ce4c (decode_switches): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:21 +00:00
Jim Meyering
9624dcd0ee (main): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:03 +00:00
Jim Meyering
a7164e425a *** empty log message *** 2005-10-15 08:34:53 +00:00
Jim Meyering
22449f0d02 (du invocation): Document du's -m option, now that we've decided to keep it. 2005-10-15 08:34:48 +00:00
Jim Meyering
5e3bd56977 *** empty log message *** 2005-10-13 20:12:15 +00:00
Jim Meyering
03e3b41e75 Avoid a few overfull/underfull hboxes. 2005-10-13 20:12:10 +00:00
Jim Meyering
e08cff1ba5 *** empty log message *** 2005-10-13 20:06:11 +00:00
Jim Meyering
146465b816 Sync from gnulib. 2005-10-13 20:06:07 +00:00
Paul Eggert
2ec133706a (make_dir_parents): Don't report an error if an
intermediate directory is in a read-only file system.
2005-10-13 19:05:13 +00:00
Jim Meyering
71a4b4865c *** empty log message *** 2005-10-13 14:16:23 +00:00
Jim Meyering
757e44d875 Document dircolors change of 2005-09-05. 2005-10-13 14:16:19 +00:00
Jim Meyering
898e531c01 *** empty log message *** 2005-10-13 14:12:58 +00:00
Jim Meyering
74583cd9fb (.x.1): Remove temp directory first. 2005-10-13 14:12:51 +00:00
Jim Meyering
76890ff048 *** empty log message *** 2005-10-08 09:06:16 +00:00
Jim Meyering
40bf0efd47 (rpl_openat): Use the promoted type (int), not mode_t,
as second argument to va_arg.  Otherwise, some versions of gcc
warn that `if this code is reached, the program will abort'.
2005-10-08 09:05:08 +00:00
Jim Meyering
f754c25d4c *** empty log message *** 2005-10-07 22:07:36 +00:00
Jim Meyering
82ee4b140c Merge from gnulib.
(SIZE_MAX): New macro, if not already defined.
2005-10-07 22:07:27 +00:00
Jim Meyering
a9ede5e986 . 2005-10-07 19:42:03 +00:00
Jim Meyering
8f8a513667 *** empty log message *** 2005-10-07 19:30:26 +00:00
Jim Meyering
cb16682ede revert last change 2005-10-07 19:29:44 +00:00
Paul Eggert
bff08feb9b * stdbool.m4 (AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test. 2005-10-07 18:53:41 +00:00
Paul Eggert
25041cf0f9 (AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test,
since yesterday's attempt didn't work.
2005-10-07 18:53:20 +00:00
Paul Eggert
b17333e415 Redo previous change to sort.c. 2005-10-07 18:48:55 +00:00
Paul Eggert
4778617abc (sortlines_temp): Redo previous change, since I'm no longer confident
that the m4/stdbool.m4 patch suffices.
2005-10-07 18:48:28 +00:00
Paul Eggert
a0d42f7861 Generalize the patch for the AIX bool bug. 2005-10-06 16:42:22 +00:00
Paul Eggert
cb797070ce (AC_HEADER_STDBOOL): Check that bool
promotes to int, not unsigned int, to catch the AIX 5.3
compiler bug.
2005-10-06 16:40:36 +00:00
Paul Eggert
38ffebe4ac (sortlines_temp): Undo previous change, since
today's change to m4/stdbool.m4 should catch it.
2005-10-06 16:40:13 +00:00
Jim Meyering
028b5117d4 *** empty log message *** 2005-10-06 14:12:52 +00:00
Jim Meyering
e1cd990287 *** empty log message *** 2005-10-06 14:06:54 +00:00
Jim Meyering
84f1db3726 rm: add support for a -I option, like that from FreeBSD's rm. 2005-10-06 14:06:51 +00:00
Jim Meyering
132aaa2eac Add a comment to go with the last change. 2005-10-05 18:56:29 +00:00
Jim Meyering
b185a8b904 *** empty log message *** 2005-10-05 18:53:59 +00:00
Jim Meyering
111bac9943 (sortlines_temp): Declare temporary as `int' rather
than `bool' to work around AIX 5.3 compiler bug in 64-bit mode.
2005-10-05 18:53:55 +00:00
Jim Meyering
3614c42902 *** empty log message *** 2005-10-05 14:54:20 +00:00
Jim Meyering
05e1975d08 (libcoreutils_a_DEPENDENCIES): Remove definition.
Once it's gone, automake generates an equivalent one.
2005-10-05 14:54:17 +00:00
Jim Meyering
d3b8165328 Merge from gnulib. 2005-10-05 09:09:33 +00:00
Jim Meyering
df2b4d3451 *** empty log message *** 2005-10-05 09:09:27 +00:00
Jim Meyering
ed558df65b *** empty log message *** 2005-10-04 15:51:25 +00:00
Jim Meyering
4dffc10f08 Merge from gnulib.
Include sys/types.h before other headers.
2005-10-04 15:51:20 +00:00
Jim Meyering
2928a59fe5 . 2005-10-03 16:13:06 +00:00
Jim Meyering
70a7e357d6 *** empty log message *** 2005-10-03 12:12:21 +00:00
Jim Meyering
c7676c0b6b (MAX_N_FACTORS): Define in terms of sizeof (uintmax_t)
rather than hard-coding to 128.  From Thomas M.Ott.
2005-10-03 12:12:14 +00:00
Jim Meyering
314397e7c5 *** empty log message *** 2005-10-03 12:11:49 +00:00
Paul Eggert
ca7be84526 Import getdelim.c from gnulib (to fix unused var warnings) then
apply the following fixes:
Include getdelim.h first.  Include <limits.h>.
(SSIZE_MAX): New macro, if not already defined.
(getdelim): Fix buffer overrun on 64-bit hosts with lines longer
than 2 GiB.
2005-10-02 22:49:49 +00:00
Jim Meyering
fbc02ac784 *** empty log message *** 2005-10-02 10:09:18 +00:00
Jim Meyering
1cf46dda93 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
against `yes', rather than just testing for nonempty.
2005-10-02 10:09:14 +00:00
Jim Meyering
e7d6dd7451 *** empty log message *** 2005-10-02 06:29:31 +00:00
Jim Meyering
b0dcbf34a5 (sc_unmarked_diagnostics): Search only cvs-controlled files. 2005-10-02 06:29:26 +00:00
Jim Meyering
286411fd74 *** empty log message *** 2005-10-02 06:28:15 +00:00
Jim Meyering
8653e104a3 Add lib/euidaccess-stat.c. 2005-10-02 06:28:12 +00:00
Jim Meyering
994ae8ed47 Add .x-sc_unmarked_diagnostics. 2005-10-02 06:27:32 +00:00
Jim Meyering
e470936662 *** empty log message *** 2005-10-02 06:27:09 +00:00
Jim Meyering
e102280994 . 2005-10-02 06:22:00 +00:00
Jim Meyering
1f022b6b96 Include sys/types.h for sys/socket.h, on FreeBSD and Darwin. 2005-10-01 11:59:08 +00:00
Jim Meyering
a2a3fc0ac7 *** empty log message *** 2005-10-01 11:58:50 +00:00
Jim Meyering
adcbbb9946 . 2005-10-01 09:51:00 +00:00
Jim Meyering
22c2d2efaf *** empty log message *** 2005-10-01 09:50:09 +00:00
Jim Meyering
4a6b465285 *** empty log message *** 2005-10-01 09:49:40 +00:00
Jim Meyering
8050751a86 Protect #include's of sys/socket.h and netdb.h.
Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
AI_* and EAI_* definitions.  Protect function declarations.
2005-10-01 09:49:36 +00:00
Jim Meyering
e1170f4d9e *** empty log message *** 2005-10-01 09:49:14 +00:00
Jim Meyering
614623a670 (gl_PREREQ_GETADDRINFO): Use AC_GNU_SOURCE,
GNU declares only getaddrinfo as an (POSIX) extension.
Check for sys/types.h, sys/socket.h, and netdb.h too,
needed by getaddrinfo.h.
Check if getaddrinfo, freeaddrinfo and gai_strerror are
declared by the POSIX headers.
Check if struct addrinfo is declared.
2005-10-01 09:49:09 +00:00
Jim Meyering
5c8ecd2831 Add a test for this:
(main): Don't stop processing arguments upon the first invalid one.
2005-10-01 08:02:09 +00:00
Jim Meyering
9c06ae5cff *** empty log message *** 2005-10-01 08:01:40 +00:00
Jim Meyering
46f0e13d5b *** empty log message *** 2005-10-01 08:01:30 +00:00
Jim Meyering
157712c3cb (main): Don't stop processing arguments upon the first invalid one. 2005-10-01 08:01:25 +00:00
Jim Meyering
5664caead1 . 2005-10-01 07:44:04 +00:00
Jim Meyering
18794c7464 *** empty log message *** 2005-10-01 06:54:15 +00:00
Jim Meyering
b364a72c6b (gl_GETADDRINFO): Look for getservbyname in these
libraries [inet nsl socket xnet].  Nelson Beebe reported that with
native cc on Solaris 7, getaddrinfo.c requires -lsocket.
2005-10-01 06:54:11 +00:00
Jim Meyering
f9c10dab98 *** empty log message *** 2005-09-30 15:21:26 +00:00
Jim Meyering
9b1facc61f (gl_FUNC_OPENAT): Check for fdopendir. 2005-09-30 15:21:19 +00:00
Jim Meyering
03866dcfb9 (fdopendir): Do not define if HAVE_FDOPENDIR. 2005-09-30 15:19:47 +00:00
Jim Meyering
5230885d13 (fdopendir): Do not define if HAVE_FDOPENDIR.
Remove AT_FDCWD test.
Do not consume the fd unless successful.
2005-09-30 15:19:24 +00:00
Jim Meyering
e94c88d4a2 Use 5.91-cvs as the version string. 2005-09-30 05:46:48 +00:00
Paul Eggert
85f86d456d * src/dd.c (main): Don't assume size_t has the same width as unsigned long. 2005-09-30 05:07:49 +00:00
Paul Eggert
86b4df4f0d (main): Don't assume size_t has the same width
as unsigned long.  Problem reported by Eric Blake.
2005-09-30 05:07:11 +00:00
Paul Eggert
a93720f8ac Clarify "tail - f" example. 2005-09-30 04:50:48 +00:00
Jim Meyering
89e6ed115f . 2005-09-29 18:10:25 +00:00
1282 changed files with 41877 additions and 531180 deletions

View File

@@ -1,10 +1,13 @@
*.cache
*.lineno
*.log
.kludge-stamp
ABOUT-NLS
INSTALL
Makefile
Makefile.in
THANKS-to-translators
autom4te.cache
config.cache
config.h
config.log
aclocal.m4
config.status
config.status.lineno
stamp-h1
configure
coreutils-*

39
.gitignore vendored Normal file
View File

@@ -0,0 +1,39 @@
*.1
*.I[12]
*.[EIOX]
*.gmo
*.o
*/.deps
*~
.kludge-stamp
ABOUT-NLS
INSTALL
Makefile
Makefile.in
THANKS-to-translators
aclocal.m4
autom4te.cache
config.cache
config.h
config.hin
config.log
config.status
configure
coreutils-*.tar.bz2
coreutils-*.tar.bz2.sig
coreutils-*.tar.gz
coreutils-*.tar.gz.sig
coreutils-*.xdelta
coreutils-*.xdelta.sig
stamp-h1
tests/cut/cut-tests
tests/head/head-tests
tests/join/join-tests
tests/pr/pr-tests
tests/sort/sort-tests
tests/tac/tac-tests
tests/tail/tail-tests
tests/test/test-tests
tests/tr/tr-tests
tests/uniq/uniq-tests
tests/wc/wc-tests

147
.hgignore Normal file
View File

@@ -0,0 +1,147 @@
.*/Makefile$
.*/Makefile\.in$
.*/\.deps/
.*\.1$
.*\.o$
.*~$
^Makefile$
^Makefile\.in$
^THANKS-to-translators$
^aclocal\.m4$
^autom4te\.cache/
^config\.h$
^config\.hin$
^config\.log$
^config\.status$
^configure$
^doc/constants\.texi$
^doc/coreutils\.info$
^doc/stamp-vti$
^doc/version\.texi$
^lib/alloca\.h$
^lib/charset\.alias$
^lib/getdate\.c$
^lib/libcoreutils\.a$
^lib/ref-add\.sed$
^lib/ref-del\.sed$
^lib/t-fpending$
^po/.*\.gmo$
^po/.*\.po$
^po/POTFILES$
^po/stamp-po$
^po/remove-potcdate.sed$
^src/\[$
^src/base64$
^src/basename$
^src/cat$
^src/chgrp$
^src/chmod$
^src/chown$
^src/chroot$
^src/cksum$
^src/comm$
^src/cp$
^src/csplit$
^src/cut$
^src/date$
^src/dd$
^src/df$
^src/dir$
^src/dircolors$
^src/dircolors\.h$
^src/dirname$
^src/du$
^src/echo$
^src/env$
^src/expand$
^src/expr$
^src/factor$
^src/false$
^src/fmt$
^src/fold$
^src/fs\.h$
^src/ginstall$
^src/groups$
^src/head$
^src/hostid$
^src/hostname$
^src/id$
^src/join$
^src/kill$
^src/link$
^src/ln$
^src/localedir\.h$
^src/logname$
^src/ls$
^src/md5sum$
^src/mkdir$
^src/mkfifo$
^src/mknod$
^src/mv$
^src/nice$
^src/nl$
^src/nohup$
^src/od$
^src/paste$
^src/pathchk$
^src/pinky$
^src/pr$
^src/printenv$
^src/printf$
^src/ptx$
^src/pwd$
^src/readlink$
^src/rm$
^src/rmdir$
^src/seq$
^src/setuidgid$
^src/sha1sum$
^src/sha224sum$
^src/sha256sum$
^src/sha384sum$
^src/sha512sum$
^src/shred$
^src/sleep$
^src/sort$
^src/split$
^src/stat$
^src/stty$
^src/su$
^src/sum$
^src/sync$
^src/tac$
^src/tail$
^src/tee$
^src/test$
^src/touch$
^src/tr$
^src/true$
^src/tsort$
^src/tty$
^src/uname$
^src/unexpand$
^src/uniq$
^src/unlink$
^src/uptime$
^src/users$
^src/vdir$
^src/wc$
^src/wheel-size\.h$
^src/wheel\.h$
^src/who$
^src/whoami$
^src/yes$
^stamp-h1$
^tests/.*\.I[12]$
^tests/.*\.[EIOX]$
^tests/cut/cut-tests$
^tests/head/head-tests$
^tests/join/join-tests$
^tests/pr/pr-tests$
^tests/sort/sort-tests$
^tests/tac/tac-tests$
^tests/tail/tail-tests$
^tests/test/test-tests$
^tests/tr/tr-tests$
^tests/uniq/uniq-tests$
^tests/wc/wc-tests$

View File

@@ -1 +1 @@
5.3.0
6.4

View File

@@ -1,3 +1,22 @@
# Suppress valgrind diagnostics we don't care about.
# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
{
libc_dl_open
Memcheck:Cond
@@ -30,3 +49,31 @@
sigaction(act)
fun:__libc_sigaction
}
{
libc_expand_dynamic_string_token
Memcheck:Cond
fun:strlen
fun:expand_dynamic_string_token
obj:*
obj:*
obj:*
obj:*
obj:*
}
{
libc__dl_new_object
Memcheck:Cond
fun:strlen
fun:_dl_new_object
obj:*
obj:*
obj:*
obj:*
}
{
libc_fillin_rpath
Memcheck:Cond
fun:strlen
fun:fillin_rpath
}

4
.x-po-check Normal file
View File

@@ -0,0 +1,4 @@
ChangeLog(-[0-9]+)?$
^old/
^src/c99-to-c98\.diff$
^gl/.*

View File

@@ -3,3 +3,4 @@ Makefile.maint
config.hin
configure
m4/jm-macros.m4
src/system.h

View File

@@ -3,5 +3,6 @@ ChangeLog
^lib/mktime\.c$
^lib/getloadavg\.c$
^lib/euidaccess\.c$
^lib/euidaccess-stat\.c$
^lib/group-member\.c$
^Makefile\.maint$

28
.x-sc_require_config_h Normal file
View File

@@ -0,0 +1,28 @@
^lib/at-func\.c$
^lib/bcopy\.c$
^lib/buffer-lcm\.c$
^lib/c-strtold\.c$
^lib/fnmatch_loop\.c$
^lib/full-read\.c$
^lib/imaxtostr\.c$
^lib/mempcpy\.c$
^lib/memset\.c$
^lib/offtostr\.c$
^lib/regcomp\.c$
^lib/regex_internal\.c$
^lib/regexec\.c$
^lib/safe-write\.c$
^lib/strtoll\.c$
^lib/strtoul\.c$
^lib/strtoull\.c$
^lib/strtoumax\.c$
^lib/umaxtostr\.c$
^lib/xstrtold\.c$
^lib/xstrtoul\.c$
^src/false\.c$
^src/lbracket\.c$
^src/ls-dir\.c$
^src/ls-ls\.c$
^src/ls-vdir\.c$
^src/rand-isaac\.c$
^src/tac-pipe\.c$

View File

@@ -8,3 +8,4 @@ m4/lib-ld.m4
m4/lib-prefix.m4
m4/po.m4
aclocal.m4
src/c99-to-c89.diff

View File

@@ -1,5 +1 @@
^tests/pr/
Makefile\.in$
^config-log/
^build-aux/texinfo\.tex$
\.gdb-history$

View File

@@ -0,0 +1,2 @@
^lib/xstrtol\.h$
^build-aux/cvsu$

View File

@@ -1,14 +1,12 @@
^build-aux/config.guess
^configure
^lib/alloca.c
^lib/fileblocks.c
^lib/fts.c
^lib/getdate.c
^lib/getloadavg.c
^lib/gettext.h
^lib/getusershell.c
^lib/mbswidth.c
^lib/readutmp.h
^lib/strtod.c
^lib/xstrtol.c
^m4/

716
ABOUT-NLS
View File

@@ -1,716 +0,0 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project is
a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the programs
they contain can be made to speak your own native language. Most such
packages use GNU `gettext'. Other packages have their own ways to
internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your country by running the command
`locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of December
2003. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files am az be bg ca cs da de el en en_GB eo es
+-------------------------------------------+
a2ps | [] [] [] [] |
aegis | () |
ant-phone | () |
anubis | |
ap-utils | |
bash | [] [] [] [] |
batchelor | |
bfd | [] [] |
binutils | [] [] |
bison | [] [] [] |
bluez-pin | [] [] |
clisp | |
clisp | [] [] [] |
coreutils | [] [] [] [] |
cpio | [] [] [] |
darkstat | [] () [] |
diffutils | [] [] [] [] [] [] [] |
e2fsprogs | [] [] |
enscript | [] [] [] [] |
error | [] [] [] [] [] |
fetchmail | [] () [] [] [] [] |
fileutils | [] [] [] |
findutils | [] [] [] [] [] [] [] |
flex | [] [] [] [] |
fslint | |
gas | [] |
gawk | [] [] [] [] |
gbiff | [] |
gcal | [] |
gcc | [] [] |
gettext | [] [] [] [] [] |
gettext-examples | [] [] [] |
gettext-runtime | [] [] [] [] [] |
gettext-tools | [] [] [] |
gimp-print | [] [] [] [] [] |
gliv | |
glunarclock | [] [] |
gnubiff | [] |
gnucash | [] () [] [] |
gnucash-glossary | [] () [] |
gnupg | [] () [] [] [] [] |
gpe-aerial | [] |
gpe-beam | [] [] |
gpe-calendar | [] [] |
gpe-clock | [] [] |
gpe-conf | [] [] |
gpe-contacts | [] [] |
gpe-edit | [] |
gpe-go | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] |
gpe-taskmanager | [] [] |
gpe-timesheet | [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] [] |
gprof | [] [] [] |
gpsdrive | () () () |
gramadoir | [] |
grep | [] [] [] [] [] [] |
gretl | [] |
gtick | () |
hello | [] [] [] [] [] [] |
id-utils | [] [] |
indent | [] [] [] [] |
jpilot | [] [] [] |
jtag | |
jwhois | [] |
kbd | [] [] [] [] [] |
latrine | () |
ld | [] [] |
libc | [] [] [] [] [] [] |
libgpewidget | [] [] |
libiconv | [] [] [] [] [] |
lifelines | [] () |
lilypond | [] |
lingoteach | |
lingoteach_lessons | () () |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailutils | [] [] |
make | [] [] [] |
man-db | [] () [] [] () |
minicom | [] [] [] |
mysecretdiary | [] [] [] |
nano | [] () [] [] [] |
nano_1_0 | [] () [] [] [] |
opcodes | [] |
parted | [] [] [] [] [] |
ptx | [] [] [] [] [] |
python | |
radius | [] |
recode | [] [] [] [] [] [] [] |
rpm | [] [] |
screem | |
scrollkeeper | [] [] [] [] [] [] |
sed | [] [] [] [] [] |
sh-utils | [] [] [] |
shared-mime-info | |
sharutils | [] [] [] [] [] [] |
silky | () |
skencil | [] () [] |
sketch | [] () [] |
soundtracker | [] [] [] |
sp | [] |
tar | [] [] [] [] |
texinfo | [] [] [] |
textutils | [] [] [] [] |
tin | () () |
tuxpaint | [] [] [] [] [] [] [] |
util-linux | [] [] [] [] [] |
vorbis-tools | [] [] [] [] |
wastesedge | () |
wdiff | [] [] [] [] |
wget | [] [] [] [] [] [] |
xchat | [] [] [] [] |
xfree86_xkb_xml | [] |
xpad | [] |
+-------------------------------------------+
am az be bg ca cs da de el en en_GB eo es
0 0 8 3 37 38 56 73 15 1 5 12 64
et fa fi fr ga gl he hr hu id is it ja
+----------------------------------------+
a2ps | [] [] [] () |
aegis | |
ant-phone | |
anubis | [] |
ap-utils | [] |
bash | [] [] |
batchelor | [] |
bfd | [] |
binutils | [] [] |
bison | [] [] [] [] |
bluez-pin | [] [] [] [] [] |
clisp | |
clisp | [] |
coreutils | [] [] [] [] [] [] |
cpio | [] [] [] |
darkstat | () [] [] [] |
diffutils | [] [] [] [] [] [] [] |
e2fsprogs | |
enscript | [] [] |
error | [] [] [] [] |
fetchmail | [] |
fileutils | [] [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] [] [] |
flex | [] [] |
fslint | |
gas | [] |
gawk | [] [] [] |
gbiff | |
gcal | [] |
gcc | [] |
gettext | [] [] |
gettext-examples | [] [] |
gettext-runtime | [] [] [] [] |
gettext-tools | [] [] |
gimp-print | [] [] |
gliv | () |
glunarclock | [] [] [] [] |
gnubiff | |
gnucash | () [] |
gnucash-glossary | [] |
gnupg | [] [] [] [] [] [] [] |
gpe-aerial | [] |
gpe-beam | [] |
gpe-calendar | [] [] [] |
gpe-clock | [] |
gpe-conf | [] |
gpe-contacts | [] [] |
gpe-edit | [] [] |
gpe-go | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] [] |
gpe-sketchbook | [] |
gpe-su | [] |
gpe-taskmanager | [] |
gpe-timesheet | [] [] [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] |
gprof | [] [] |
gpsdrive | () [] () () |
gramadoir | [] |
grep | [] [] [] [] [] [] [] [] [] [] [] |
gretl | [] |
gtick | [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] [] |
indent | [] [] [] [] [] [] [] [] [] |
jpilot | [] () |
jtag | |
jwhois | [] [] [] [] |
kbd | [] |
latrine | |
ld | [] |
libc | [] [] [] [] [] |
libgpewidget | [] [] [] [] |
libiconv | [] [] [] [] [] [] [] [] [] |
lifelines | () |
lilypond | [] |
lingoteach | [] [] |
lingoteach_lessons | |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailutils | |
make | [] [] [] [] [] |
man-db | () () |
minicom | [] [] [] [] |
mysecretdiary | [] [] |
nano | [] [] [] [] |
nano_1_0 | [] [] [] [] |
opcodes | [] |
parted | [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
radius | [] |
recode | [] [] [] [] [] [] |
rpm | |
screem | |
scrollkeeper | [] |
sed | [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] |
shared-mime-info | [] |
sharutils | [] [] [] [] [] |
silky | [] () |
skencil | [] |
sketch | [] |
soundtracker | [] [] [] [] |
sp | [] () |
tar | [] [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] |
textutils | [] [] [] [] [] |
tin | [] () |
tuxpaint | [] [] [] [] [] [] [] [] |
util-linux | [] [] [] [] () [] |
vorbis-tools | [] |
wastesedge | () |
wdiff | [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] |
xchat | [] [] [] |
xfree86_xkb_xml | |
xpad | [] |
+----------------------------------------+
et fa fi fr ga gl he hr hu id is it ja
21 1 25 86 24 24 8 10 38 31 1 23 32
ko lg lt lv ms nb nl nn no pl pt pt_BR ro
+-------------------------------------------+
a2ps | () [] [] () () [] [] |
aegis | () () |
ant-phone | [] [] |
anubis | [] [] [] [] [] |
ap-utils | [] () [] |
bash | [] [] |
batchelor | [] |
bfd | [] |
binutils | |
bison | [] [] [] [] |
bluez-pin | [] [] [] |
clisp | |
clisp | [] |
coreutils | [] |
cpio | [] [] [] [] [] |
darkstat | [] [] [] [] |
diffutils | [] [] [] [] |
e2fsprogs | [] |
enscript | [] [] [] |
error | [] [] [] |
fetchmail | [] [] () |
fileutils | [] [] |
findutils | [] [] [] [] [] |
flex | [] [] [] [] |
fslint | [] [] |
gas | |
gawk | [] [] [] |
gbiff | [] [] |
gcal | |
gcc | |
gettext | [] [] [] |
gettext-examples | [] [] |
gettext-runtime | [] [] [] |
gettext-tools | [] [] [] |
gimp-print | [] |
gliv | [] [] [] |
glunarclock | [] [] [] |
gnubiff | |
gnucash | [] [] () |
gnucash-glossary | [] [] |
gnupg | [] |
gpe-aerial | [] [] [] |
gpe-beam | [] [] [] |
gpe-calendar | [] [] [] |
gpe-clock | [] [] [] |
gpe-conf | [] [] [] |
gpe-contacts | [] [] [] |
gpe-edit | [] [] [] |
gpe-go | [] [] |
gpe-login | [] [] [] |
gpe-ownerinfo | [] [] [] |
gpe-sketchbook | [] [] [] |
gpe-su | [] [] [] |
gpe-taskmanager | [] [] [] |
gpe-timesheet | [] [] [] |
gpe-today | [] [] [] |
gpe-todo | [] [] [] |
gphoto2 | [] |
gprof | [] [] |
gpsdrive | () () () [] |
gramadoir | [] |
grep | [] [] [] [] |
gretl | |
gtick | [] [] |
hello | [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] |
indent | [] [] [] |
jpilot | () () |
jtag | |
jwhois | [] [] [] [] |
kbd | [] [] [] |
latrine | [] |
ld | |
libc | [] [] [] [] [] |
libgpewidget | [] [] [] |
libiconv | [] [] [] [] |
lifelines | |
lilypond | |
lingoteach | |
lingoteach_lessons | |
lynx | [] [] |
m4 | [] [] [] [] |
mailutils | [] [] |
make | [] [] [] [] |
man-db | [] |
minicom | [] [] [] |
mysecretdiary | [] [] [] |
nano | [] [] [] [] |
nano_1_0 | [] [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
radius | [] |
recode | [] [] [] |
rpm | [] [] |
screem | |
scrollkeeper | [] [] [] [] |
sed | [] [] [] |
sh-utils | [] |
shared-mime-info | [] |
sharutils | [] |
silky | |
skencil | [] [] |
sketch | [] [] |
soundtracker | |
sp | |
tar | [] [] [] [] [] [] |
texinfo | [] [] [] |
textutils | [] [] |
tin | |
tuxpaint | [] [] [] [] [] [] [] [] [] |
util-linux | [] [] |
vorbis-tools | [] [] |
wastesedge | |
wdiff | [] [] [] [] |
wget | [] [] |
xchat | [] [] |
xfree86_xkb_xml | [] |
xpad | [] [] |
+-------------------------------------------+
ko lg lt lv ms nb nl nn no pl pt pt_BR ro
12 0 1 2 12 10 60 4 4 38 25 35 76
ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
+-------------------------------------------+
a2ps | [] [] [] [] [] | 16
aegis | () | 0
ant-phone | | 2
anubis | [] [] [] | 9
ap-utils | () | 3
bash | [] | 9
batchelor | | 2
bfd | [] [] | 6
binutils | [] [] [] | 7
bison | [] [] [] | 14
bluez-pin | [] [] [] | 13
clisp | | 0
clisp | | 5
coreutils | [] [] [] [] [] | 16
cpio | [] [] [] | 14
darkstat | [] [] [] () () | 12
diffutils | [] [] [] [] | 22
e2fsprogs | [] [] | 5
enscript | [] [] [] | 12
error | [] [] [] | 15
fetchmail | [] [] [] | 11
fileutils | [] [] [] [] [] [] | 17
findutils | [] [] [] [] [] [] [] | 29
flex | [] [] [] | 13
fslint | | 2
gas | [] | 3
gawk | [] [] | 12
gbiff | | 3
gcal | [] [] | 4
gcc | [] | 4
gettext | [] [] [] [] [] [] | 16
gettext-examples | [] [] [] [] | 11
gettext-runtime | [] [] [] [] [] [] [] [] [] | 21
gettext-tools | [] [] [] [] [] [] | 14
gimp-print | [] [] | 10
gliv | | 3
glunarclock | [] [] [] [] | 13
gnubiff | | 1
gnucash | [] [] [] | 9
gnucash-glossary | [] [] [] | 8
gnupg | [] [] [] [] | 17
gpe-aerial | [] [] | 7
gpe-beam | [] [] | 8
gpe-calendar | [] [] [] [] [] | 13
gpe-clock | [] [] [] [] | 10
gpe-conf | [] [] [] | 9
gpe-contacts | [] [] [] [] | 11
gpe-edit | [] [] [] [] [] [] | 12
gpe-go | [] | 5
gpe-login | [] [] [] [] [] [] | 13
gpe-ownerinfo | [] [] [] [] [] | 13
gpe-sketchbook | [] [] [] | 9
gpe-su | [] [] [] [] | 10
gpe-taskmanager | [] [] [] [] | 10
gpe-timesheet | [] [] [] [] [] | 12
gpe-today | [] [] [] [] [] [] | 13
gpe-todo | [] [] [] [] [] | 12
gphoto2 | [] [] [] | 11
gprof | [] [] | 9
gpsdrive | [] [] | 4
gramadoir | | 3
grep | [] [] [] [] [] | 26
gretl | | 2
gtick | [] | 5
hello | [] [] [] [] [] | 33
id-utils | [] [] [] | 12
indent | [] [] [] [] [] | 21
jpilot | [] [] [] [] [] | 9
jtag | [] | 1
jwhois | () () [] [] | 11
kbd | [] [] | 11
latrine | | 1
ld | [] [] | 5
libc | [] [] [] [] | 20
libgpewidget | [] [] [] [] | 13
libiconv | [] [] [] [] [] [] [] [] [] | 27
lifelines | [] | 2
lilypond | [] | 3
lingoteach | | 2
lingoteach_lessons | () | 0
lynx | [] [] [] [] | 14
m4 | [] [] [] | 15
mailutils | [] | 5
make | [] [] [] [] | 16
man-db | [] | 5
minicom | [] | 11
mysecretdiary | [] [] | 10
nano | [] [] [] [] [] | 17
nano_1_0 | [] [] [] [] | 17
opcodes | [] [] | 6
parted | [] [] [] | 15
ptx | [] [] [] | 22
python | | 0
radius | [] | 4
recode | [] [] [] [] | 20
rpm | [] [] [] | 7
screem | [] [] | 2
scrollkeeper | [] [] [] [] | 15
sed | [] [] [] [] [] [] | 23
sh-utils | [] [] [] | 14
shared-mime-info | [] [] | 4
sharutils | [] [] [] [] [] | 17
silky | () | 2
skencil | [] | 6
sketch | [] | 6
soundtracker | [] [] | 9
sp | [] | 3
tar | [] [] [] [] [] | 24
texinfo | [] [] [] [] | 14
textutils | [] [] [] [] [] | 16
tin | | 1
tuxpaint | [] [] [] [] [] | 29
util-linux | [] [] [] | 15
vorbis-tools | [] | 8
wastesedge | | 0
wdiff | [] [] [] [] | 18
wget | [] [] [] [] [] [] [] [] | 23
xchat | [] [] [] [] [] | 14
xfree86_xkb_xml | [] [] [] [] [] [] | 8
xpad | | 4
+-------------------------------------------+
51 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
120 domains 59 42 16 25 81 0 56 12 1 10 21 22 1260
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If December 2003 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites. The most
up-to-date matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
the use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.

10
AUTHORS
View File

@@ -1,6 +1,7 @@
Here are the names of the programs in this package,
each followed by the name(s) of its author(s).
base64: Simon Josefsson
basename: FIXME unknown
cat: Torbjorn Granlund, Richard M. Stallman
chgrp: David MacKenzie, Jim Meyering
@@ -39,7 +40,7 @@ link: Michael Stone
ln: Mike Parker, David MacKenzie
logname: FIXME: unknown
ls: Richard Stallman, David MacKenzie
md5sum: Ulrich Drepper, Scott Miller
md5sum: Ulrich Drepper, Scott Miller, David Madore
mkdir: David MacKenzie
mkfifo: David MacKenzie
mknod: David MacKenzie
@@ -60,8 +61,13 @@ readlink: Dmitry V. Levin
rm: Paul Rubin, David MacKenzie, Richard Stallman, Jim Meyering
rmdir: David MacKenzie
seq: Ulrich Drepper
sha1sum: Ulrich Drepper, Scott Miller
sha1sum: Ulrich Drepper, Scott Miller, David Madore
sha224sum: Ulrich Drepper, Scott Miller, David Madore
sha256sum: Ulrich Drepper, Scott Miller, David Madore
sha384sum: Ulrich Drepper, Scott Miller, David Madore
sha512sum: Ulrich Drepper, Scott Miller, David Madore
shred: Colin Plumb
shuf: Paul Eggert
sleep: Jim Meyering, Paul Eggert
sort: Mike Haertel, Paul Eggert
split: Torbjorn Granlund, Richard M. Stallman

27
COPYING
View File

@@ -1,8 +1,8 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

14413
ChangeLog

File diff suppressed because it is too large Load Diff

11011
ChangeLog-2005 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -46,8 +46,8 @@ include $(srcdir)/Makefile.maint
else
all:
@echo There seems to be no Makefile in this directory.
@echo "You must run ./configure before running \`make'."
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running \`make'." 1>&2
@exit 1
endif

229
INSTALL
View File

@@ -1,229 +0,0 @@
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@@ -1,21 +1,52 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
# Make coreutils. -*-Makefile-*-
# Copyright (C) 1990, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
# 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.gitignore \
.hgignore \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.x-sc_space_tab .x-sc_sun_os_names \
.vg-suppressions \
.x-po-check \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_prohibit_atoi_atof \
.x-sc_require_config_h \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_trailing_blank \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
ChangeLog-2005 \
announce-gen \
bootstrap \
bootstrap.conf \
build-aux/cvsu \
build-aux/vc-list-files \
gl/modules/getloadavg.diff \
m4/ChangeLog \
old/fileutils/ChangeLog \
old/fileutils/ChangeLog-1997 \
old/fileutils/NEWS \
old/sh-utils/ChangeLog \
old/sh-utils/ChangeLog.0 \
old/textutils/ChangeLog \
old/fileutils/NEWS \
old/sh-utils/NEWS \
old/textutils/ChangeLog \
old/textutils/NEWS
install-root:
@@ -43,14 +74,17 @@ distcheck-hook:
rm_subst = \
s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
MAINTAINERCLEANFILES = .kludge-stamp
.kludge-stamp: $(srcdir)/src/Makefile.in
perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
touch $@
MAINTAINERCLEANFILES += THANKS-to-translators
THANKS-to-translators: po/LINGUAS THANKStt.in
( \
cat $(srcdir)/THANKStt.in; \
for lang in `cat po/LINGUAS`; do \
for lang in `cat $(srcdir)/po/LINGUAS`; do \
echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
done; \
) > $@-tmp && mv $@-tmp $@

View File

@@ -1,5 +1,5 @@
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2003-2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,26 +26,11 @@ gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
url_dir_list = \
ftp://$(gnu_rel_host)/gnu/coreutils
# Files to update automatically.
wget_files = \
$(srcdir)/build-aux/config.guess \
$(srcdir)/build-aux/config.sub \
$(srcdir)/build-aux/texinfo.tex
# Of the above, texinfo.tex is out of date,
# and the other two are not available.
wget_files =
# The GnuPG ID of the key used to sign the tarballs.
gpg_key_ID = D333CBA1
cvs_files = \
$(srcdir)/build-aux/elisp-comp \
$(srcdir)/build-aux/depcomp \
$(srcdir)/build-aux/mdate-sh \
$(srcdir)/build-aux/missing \
$(srcdir)/build-aux/install-sh \
$(srcdir)/build-aux/mkinstalldirs
# $(srcdir)/src/ansi2knr.c
local_updates = wget-update cvs-update
# Tests not to run.
local-checks-to-skip =
# Tests not to run as part of "make distcheck".
# Exclude changelog-check here so that there's less churn in ChangeLog
# files -- otherwise, you'd need to have the upcoming version number
# at the top of the file for each `make distcheck' run.
local-checks-to-skip = changelog-check

View File

@@ -1,816 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.hin \
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
INSTALL NEWS THANKS TODO build-aux/ChangeLog \
build-aux/config.guess build-aux/config.rpath \
build-aux/config.sub build-aux/depcomp build-aux/install-sh \
build-aux/mdate-sh build-aux/missing build-aux/mkinstalldirs \
build-aux/texinfo.tex
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/autobuild.m4 \
$(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/basename.m4 \
$(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/boottime.m4 \
$(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/calloc.m4 \
$(top_srcdir)/m4/canon-host.m4 \
$(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/check-decl.m4 \
$(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \
$(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/closeout.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/cycle-check.m4 \
$(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
$(top_srcdir)/m4/diacrit.m4 $(top_srcdir)/m4/dirfd.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
$(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/euidaccess.m4 $(top_srcdir)/m4/exclude.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fd-reopen.m4 \
$(top_srcdir)/m4/file-type.m4 $(top_srcdir)/m4/fileblocks.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
$(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/fstypename.m4 \
$(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/ftruncate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
$(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/getugroups.m4 \
$(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/group-member.m4 \
$(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hash-pjw.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/host-os.m4 \
$(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/intmax_t.m4 \
$(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
$(top_srcdir)/m4/jm-macros.m4 $(top_srcdir)/m4/jm-winsz1.m4 \
$(top_srcdir)/m4/jm-winsz2.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/linebuffer.m4 $(top_srcdir)/m4/link-follow.m4 \
$(top_srcdir)/m4/localcharset.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
$(top_srcdir)/m4/memcmp.m4 $(top_srcdir)/m4/memcoll.m4 \
$(top_srcdir)/m4/memcpy.m4 $(top_srcdir)/m4/memmove.m4 \
$(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
$(top_srcdir)/m4/memset.m4 $(top_srcdir)/m4/mkdir-p.m4 \
$(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \
$(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nanosleep.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/obstack.m4 \
$(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/openat.m4 \
$(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \
$(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/posixtm.m4 $(top_srcdir)/m4/posixver.m4 \
$(top_srcdir)/m4/prereq.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
$(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/readtokens.m4 $(top_srcdir)/m4/readutmp.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/rmdir-errno.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/root-dev-ino.m4 \
$(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/safe-read.m4 \
$(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/same.m4 \
$(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/settime.m4 \
$(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sig2str.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcspn.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strftime.m4 \
$(top_srcdir)/m4/stripslash.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \
$(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strstr.m4 \
$(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/strtoimax.m4 \
$(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
$(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/strverscmp.m4 \
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
$(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uint32_t.m4 \
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/uintptr_t.m4 \
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
$(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xfts.m4 \
$(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xnanosleep.m4 \
$(top_srcdir)/m4/xreadlink.m4 $(top_srcdir)/m4/xstrtod.m4 \
$(top_srcdir)/m4/xstrtoimax.m4 $(top_srcdir)/m4/xstrtol.m4 \
$(top_srcdir)/m4/xstrtoumax.m4 $(top_srcdir)/m4/yesno.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EOVERFLOW = @EOVERFLOW@
EXEEXT = @EXEEXT@
FNMATCH_H = @FNMATCH_H@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
KMEM_GROUP = @KMEM_GROUP@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_GETHRXTIME = @LIB_GETHRXTIME@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
announce-gen \
m4/ChangeLog \
old/fileutils/ChangeLog \
old/fileutils/ChangeLog-1997 \
old/sh-utils/ChangeLog \
old/sh-utils/ChangeLog.0 \
old/textutils/ChangeLog \
old/fileutils/NEWS \
old/sh-utils/NEWS \
old/textutils/NEWS
ACLOCAL_AMFLAGS = -I m4
# Just prior to distribution, ...
# transform the automake-generated rule that runs `rm -f rm'.
# On some systems, that command would fail with a diagnostic like
# `rm: cannot unlink `rm': Text file busy' when `.' appears so early
# in the shell's search path that running `rm' would run the `rm'
# executable in the current directory.
# Similarly, adjust the clean-binPROGRAMS rule.
rm_subst = \
s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnits '; \
cd $(srcdir) && $(AUTOMAKE) --gnits \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.hin: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@case `sed 15q $(srcdir)/NEWS` in \
*"$(VERSION)"*) : ;; \
*) \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1;; \
esac
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/build-aux $(distdir)/m4 $(distdir)/old/fileutils $(distdir)/old/sh-utils $(distdir)/old/textutils $(distdir)/po
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-recursive ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-info-am
install-root:
cd src && $(MAKE) $@
# Some tests always need root privileges, others need them only sometimes.
check-root:
cd tests && $(MAKE) $@
dist-hook:
test -x $(srcdir)/build-aux/install-sh
distcheck-hook:
$(MAKE) my-distcheck
.kludge-stamp: $(srcdir)/src/Makefile.in
perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
touch $@
THANKS-to-translators: po/LINGUAS THANKStt.in
( \
cat $(srcdir)/THANKStt.in; \
for lang in `cat po/LINGUAS`; do \
echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
done; \
) > $@-tmp && mv $@-tmp $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -2,7 +2,7 @@
# This Makefile fragment is shared between the coreutils,
# CPPI, Bison, and Autoconf.
## Copyright (C) 2001-2005 Free Software Foundation, Inc.
## Copyright (C) 2001-2006 Free Software Foundation, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -24,21 +24,30 @@
ME := Makefile.maint
# Do not save the original name or timestamp in the .tar.gz file.
GZIP_ENV = '--no-name --best --rsyncable'
# Use --rsyncable if available.
gzip_rsyncable := \
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
CVS = cvs
GIT = git
VC = $(GIT)
CVS_LIST = cvsu --find --types=AFGM
CVS_LIST = build-aux/vc-list-files
CVS_LIST_EXCEPT = \
$(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
ifeq ($(origin prev_version_file), undefined)
prev_version_file = .prev-version
endif
PREV_VERSION := $(shell cat $(prev_version_file))
VERSION_REGEXP = $(subst .,\.,$(VERSION))
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
tag-this-version = $(subst .,_,$(VERSION))
this-cvs-tag = $(tag-package)-$(tag-this-version)
this-vc-tag = $(tag-package)-$(tag-this-version)
my_distdir = $(PACKAGE)-$(VERSION)
# Old releases are stored here.
@@ -55,125 +64,123 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
# FIXME: add a check to prohibit definition in src/*.c of symbols defined
# in system.h. E.g. today I removed from tail.c a useless definition of
# ENOSYS. It was useless because system.h ensures it's defined.
# Checks that don't require cvs.
# Run `changelog-check' last, as previous test may reveal problems requiring
# new ChangeLog entries.
local-checks-available = \
po-check copyright-check writable-files m4-check author_mark_check \
changelog-check strftime-check syntax-check makefile_path_separator_check \
makefile-check
changelog-check patch-check strftime-check $(syntax-check-rules) \
makefile_path_separator_check \
makefile-check check-AUTHORS
.PHONY: $(local-checks-available)
local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available))
# Collect the names of rules starting with `sc_'.
syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
.PHONY: $(syntax-check-rules)
syntax-check-rules = \
sc_cast_of_argument_to_free \
sc_cast_of_x_alloc_return_value \
sc_cast_of_alloca_return_value \
sc_dd_max_sym_length \
sc_error_exit_success \
sc_file_system \
sc_no_if_have_config_h \
sc_obsolete_symbols \
sc_prohibit_atoi_atof \
sc_prohibit_jm_in_m4 \
sc_root_tests \
sc_space_tab \
sc_sun_os_names \
sc_system_h_headers \
sc_tight_scope \
sc_trailing_blank \
sc_unmarked_diagnostics \
sc_useless_cpp_parens
syntax-check: $(syntax-check-rules)
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
# $$(find -type f -name '*.[chly]') && \
# { echo '$(ME): found conditional include' 1>&2; \
# exit 1; } || :
# grep -E '^# *include <(string|stdlib)\.h>' \
# grep -nE '^# *include <(string|stdlib)\.h>' \
# $(srcdir)/{lib,src}/*.[chy] && \
# { echo '$(ME): FIXME' 1>&2; \
# exit 1; } || :
# FIXME: don't allow `#include .strings\.h' anywhere
# FIXME: add a check for this.
# Nearly every lib/*.c file must include config.h, like this:
# #ifdef HAVE_CONFIG_H
# # include <config.h>
# #endif
sc_cast_of_argument_to_free:
@grep -E '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
@grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || :
sc_cast_of_x_alloc_return_value:
@grep -E --exclude=$(srcdir)/lib/regex.c \
@grep -nE --exclude=$(srcdir)/lib/xalloc.h \
--exclude=$(srcdir)/lib/regex.c \
'\*\) *x(m|c|re)alloc\>' \
$(srcdir)/{lib,src}/*.[chy] && \
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
exit 1; } || :
sc_cast_of_alloca_return_value:
@grep -E '\*\) *alloca\>' \
@grep -nE '\*\) *alloca\>' \
$(srcdir)/src/*.[chy] && \
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
exit 1; } || :
sc_space_tab:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep '[ ] ' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
@grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
1>&2; exit 1; } || :
# Don't use atoi, atof, atol, atoll, or atoq in `real' code.
# Don't use the old ato* functions in `real' code.
# They provide no error checking mechanism.
# Instead, use strto* functions.
sc_prohibit_atoi_atof:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E '\<(ato[filq]|atoll)\>' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
{ echo '$(ME): do not use atof, atoi, atol, atoll, or atoq' \
@grep -nE '\<ato([filq]|ll)\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use ato''f, ato''i, ato''l, ato''ll, or ato''q' \
1>&2; exit 1; } || :
# Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success:
@grep -F 'error (EXIT_SUCCESS,' \
@grep -nF 'error (EXIT_SUCCESS,' \
$$(find -type f -name '*.[chly]') && \
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
exit 1; } || :
sc_file_system:
@grep -i 'filesystem' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
{ echo '$(ME): found use of "filesystem";' \
@grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of "file''system";' \
'rewrite to use "file system"' 1>&2; \
exit 1; } || :
sc_no_if_have_config_h:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep '^# *if HAVE_CONFIG_H' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
{ echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
sc_no_have_config_h:
@grep -n 'HAVE''_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
1>&2; exit 1; } || :
# Nearly all .c files must include <config.h>.
sc_require_config_h:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
grep -L '^# *include <config\.h>' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
| grep . && \
{ echo '$(ME): the above files do not include <config.h>' \
1>&2; exit 1; } || :; \
else :; \
fi
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
files=$$(grep -l '# *include <assert\.h>' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
grep -L '\<assert (' $$files \
| grep . && \
{ echo "$(ME): the above files include <assert.h> but don't use it" \
1>&2; exit 1; } || :; \
else :; \
fi
sc_obsolete_symbols:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E '\<(HAVE_FCNTL_H)\>' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
{ echo '$(ME): do not use HAVE_FCNTL_H' \
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
1>&2; exit 1; } || :
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
# Each nonempty line must start with a year number, or a TAB.
sc_changelog:
@grep '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
exit 1; } || :
@@ -181,31 +188,31 @@ sc_changelog:
# with the strings from the two affected variables.
dd_c = $(srcdir)/src/dd.c
sc_dd_max_sym_length:
@test -f $(dd_c) || exit 0; \
len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c); \
ifneq ($(wildcard $(dd_c)),)
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
| wc --max-line-length); \
| wc --max-line-length); \
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|tr -d '"' | wc --max-line-length); \
if test "$$len" = "$$max"; then :; else \
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
exit 1; \
fi
endif
# Many m4 macros names once began with `jm_'.
# On 2004-04-13, they were all changed to start with gl_ instead.
# Make sure that none are inadvertently reintroduced.
sc_prohibit_jm_in_m4:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E 'jm_[A-Z]' \
$$($(CVS_LIST) $(srcdir)/m4 |grep '\.m4$$') && \
{ echo '$(ME): do not use jm_ in m4 macro names' \
@grep -nE 'jm_[A-Z]' \
$$($(CVS_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
sc_root_tests:
@t1=sc-root.expected; t2=sc-root.actual; \
grep -l '^PRIV_CHECK_ARG=require-root' \
grep -nl '^PRIV_CHECK_ARG=require-root' \
$$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
$(srcdir)/tests/Makefile.am |sort > $$t2; \
@@ -215,6 +222,40 @@ sc_root_tests:
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
exit 1; } || :
headers_with_interesting_macro_defs = \
exit.h \
fcntl_.h \
fnmatch_.h \
intprops.h \
inttypes_.h \
lchown.h \
openat.h \
stat-macros.h \
stdint_.h
# Create a list of regular expressions matching the names
# of macros that are guaranteed by parts of gnulib to be defined.
.re-defmac:
@(cd $(srcdir)/lib; \
for f in $(headers_with_interesting_macro_defs); do \
test -f $$f && \
sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \
done; \
) | sort -u \
| grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \
| sed 's/^/^# *define /' \
> $@-t
@mv $@-t $@
# Don't define macros that we already get from gnulib header files.
sc_always_defined_macros: .re-defmac
@if test -f $(srcdir)/src/system.h; then \
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
grep -f .re-defmac $$($(CVS_LIST)) \
&& { echo '$(ME): define the above via some gnulib .h file' \
1>&2; exit 1; } || :; \
fi
# Create a list of regular expressions matching the names
# of files included from system.h. Exclude a couple.
.re-list:
@@ -228,50 +269,74 @@ sc_root_tests:
# the headers already included via system.h.
sc_system_h_headers: .re-list
@if test -f $(srcdir)/src/system.h; then \
( $(CVS_LIST) ) > /dev/null 2>&1 || exit 0; \
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
grep -E -f .re-list \
$$($(CVS_LIST) src | grep -Ev '(copy|system)\.h$$') \
grep -nE -f .re-list \
$$($(CVS_LIST) src | \
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
&& { echo '$(ME): the above are already included via system.h'\
1>&2; exit 1; } || :; \
fi
sc_sun_os_names:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -Ei \
@grep -nEi \
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
exit 1; } || :
sc_the_the:
@grep -ni '\<the ''the\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of "the ''the";' 1>&2; \
exit 1; } || :
sc_tight_scope:
$(MAKE) -C src $@
sc_trailing_blank:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep '[ ]$$' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
@grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found trailing blank(s)' \
1>&2; exit 1; } || :
# Match lines like the following, but where there is only one space
# between the options and the description:
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
longopt_re = --[a-z][0-9A-Za-z-]*(\[=[0-9A-Za-z-]*\])?
sc_two_space_separator_in_usage:
@grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo "$(ME): help2man requires at least two spaces between"; \
echo "$(ME): an option and its description"; \
1>&2; exit 1; } || :
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep -E \
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
| grep -v '_(' && \
@grep -nE \
'\<error \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
| grep -v '_''(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
# Avoid useless parentheses like those in this example:
# #if defined (SYMBOL) || defined (SYM2)
sc_useless_cpp_parens:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep '^# *if .*defined *(' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
@grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found useless parentheses in cpp directive' \
1>&2; exit 1; } || :
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2
cp -a src src-c89
(cd src-c89; patch -V never --fuzz=0) < src/c99-to-c89.diff \
> $@.1 2>&1
grep -v '^patching file ' $@.1 > $@.2 || :
if test "$${REGEN_PATCH+set}" = set; then \
diff -upr src src-c89 > new-diff || : ; fi
fail=0; test -s $@.2 && fail=1 || : ; \
rm -rf src-c89 $@.1 $@.2; \
test $$fail = 0
# Ensure that date's --help output stays in sync with the info
# documentation for GNU strftime. The only exception is %N,
# which date accepts but GNU strftime does not.
@@ -287,24 +352,29 @@ strftime-check:
rm -f $@-src $@-info; \
fi
check-AUTHORS:
$(MAKE) -C src $@
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
makefile-check:
grep -E '@[A-Z_0-9]+@' `find . -name Makefile.am` \
grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
&& { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
news-date-check: NEWS
today=`date +%Y-%m-%d`; \
if head NEWS | grep '^\*.*'$$today >/dev/null; then \
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
>/dev/null; then \
:; \
else \
echo "today's date is not in NEWS" 1>&2; \
echo "version or today's date is not in NEWS" 1>&2; \
exit 1; \
fi
changelog-check:
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
>/dev/null; then \
:; \
else \
echo "$(VERSION) not in ChangeLog" 1>&2; \
@@ -312,19 +382,21 @@ changelog-check:
fi
m4-check:
@grep 'AC_DEFUN([^[]' m4/*.m4 \
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
exit 1; } || :
# Verify that all source files using _() are listed in po/POTFILES.in.
# FIXME: don't hard-code src/false.c below; use a more general mechanism.
# FIXME: don't hard-code file names below; use a more general mechanism.
po-check:
( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
if test -f po/POTFILES.in; then \
grep -E -v '^(#|$$)' po/POTFILES.in \
| grep -v '^src/false\.c$$' | sort > $@-1; \
files=; \
for file in $$($(CVS_LIST) lib src | grep '\.[chly]$$'); do \
for file in $$($(CVS_LIST_EXCEPT)) lib/*.[ch]; do \
case $$file in \
djgpp/* | man/*) continue;; \
esac; \
case $$file in \
*.[ch]) \
base=`expr " $$file" : ' \(.*\)\..'`; \
@@ -332,7 +404,8 @@ po-check:
esac; \
files="$$files $$file"; \
done; \
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
| sort -u > $@-2; \
diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \
fi
@@ -341,7 +414,7 @@ po-check:
# the English word `and', the string must be marked with `N_ (...)' so that
# gettext recognizes it as a string requiring translation.
author_mark_check:
@grep '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
exit 1; } || :
@@ -353,7 +426,7 @@ author_mark_check:
# that we'd have to worry about limits on command line length.
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
makefile_path_separator_check:
@grep 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
&& { echo $(msg) 1>&2; exit 1; } || :
# Check that `make alpha' will not fail at the end of the process.
@@ -374,33 +447,41 @@ v_etc_file = lib/version-etc.c
# Make sure that the copyright date in $(v_etc_file) is up to date.
copyright-check:
@if test -f $(v_etc_file); then \
grep 'enum { COPYRIGHT_YEAR = 2005 };' $(v_etc_file) \
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
>/dev/null \
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
exit 1; }; \
fi
# Sanity checks with the CVS repository.
cvs-tag-check:
echo $(this-cvs-tag); \
if $(CVS) -n log -h README | grep -e $(this-cvs-tag): >/dev/null; then \
echo "$(this-cvs-tag) as already been used; not tagging" 1>&2; \
exit 1; \
else :; fi
cvs-diff-check:
if $(CVS) diff >cvs-diffs; then \
rm cvs-diffs; \
else \
echo "Some files are locally modified:" 1>&2; \
cat cvs-diffs; \
exit 1; \
# Sanity checks with the repository.
# Abort early if this tag has already been used.
vc-tag-check:
used=no; \
if $(VC) --help | grep CVS; then \
$(CVS) -n log -h README|grep -e $(this-vc-tag): >/dev/null \
&& used=yes; \
else \
$(GIT) tag -l '^$(this-vc-tag)$$' && used=yes; \
fi; \
if test "$$used" = yes; then \
echo "$(this-vc-tag) has already been used; not tagging" 1>&2; \
exit 1; \
fi
cvs-check: cvs-diff-check cvs-tag-check
vc-diff-check:
$(VC) diff > vc-diffs || :
if test -s vc-diffs; then \
cat vc-diffs; \
echo "Some files are locally modified:" 1>&2; \
exit 1; \
else \
rm vc-diffs; \
fi
maintainer-distcheck: changelog-check
cvs-check: vc-diff-check vc-tag-check
maintainer-distcheck:
$(MAKE) distcheck
$(MAKE) my-distcheck
@@ -408,9 +489,8 @@ maintainer-distcheck: changelog-check
# Tag before making distribution. Also, don't make a distribution if
# checks fail. Also, make sure the NEWS file is up-to-date.
# FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck.
cvs-dist: $(local-check) cvs-check maintainer-distcheck
$(CVS) update po
$(CVS) tag -c $(this-cvs-tag)
vc-dist: $(local-check) cvs-check maintainer-distcheck
$(VC) tag $(this-vc-tag)
$(MAKE) dist
# Use this to make sure we don't run these programs when building
@@ -425,18 +505,19 @@ null_AM_MAKEFLAGS = \
# Detect format-string/arg-list mismatches that would normally be obscured
# by the use of _(). The --disable-nls effectively defines away that macro,
# and building with CFLAGS='-Wformat -Werror' causes any format warning to be
# treated as a failure. Also, check for shadowing problems with -Wshadow.
# treated as a failure. Also, check for shadowing problems with -Wshadow,
# and for pointer arithmetic problems with -Wpointer-arith.
# These CFLAGS are pretty strict. If you build this target, you probably
# have to have a recent version of gcc and glibc headers.
TMPDIR ?= /tmp
t=$(TMPDIR)/$(PACKAGE)/test
my-distcheck: $(local-check)
my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
-rm -rf $(t)
mkdir -p $(t)
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
cd $(t)/$(distdir) \
&& ./configure --disable-nls \
&& $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow' \
&& $(MAKE) CFLAGS='-Werror -Wall -Wformat -Wshadow -Wpointer-arith' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
&& $(MAKE) check \
@@ -452,16 +533,6 @@ my-distcheck: $(local-check)
WGET = wget
WGETFLAGS = -C off
tgz-md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//')
tgz-sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//')
bz2-md5 = $(shell md5sum < $(my_distdir).tar.bz2|sed 's/ -//')
bz2-sha1 = $(shell sha1sum < $(my_distdir).tar.bz2|sed 's/ -//')
xdelta-md5 = $(shell md5sum < $(xd-delta)|sed 's/ -//')
xdelta-sha1 = $(shell sha1sum < $(xd-delta)|sed 's/ -//')
tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([MkK]\).*/ \1B/')
bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([MkK]\).*/ \1B/')
xd-size = $(shell du --human $(xd-delta)|sed 's/\([MkK]\).*/ \1B/')
rel-check:
tarz=/tmp/rel-check-tarz-$$$$; \
md5_tmp=/tmp/rel-check-md5-$$$$; \
@@ -482,6 +553,7 @@ announcement: NEWS ChangeLog $(rel-files)
--prev=$(PREV_VERSION) \
--curr=$(VERSION) \
--release-archive-directory=$(release_archive_dir) \
--gpg-key-id=$(gpg_key_ID) \
--news=NEWS \
$(addprefix --url-dir=, $(url_dir_list)) \
@@ -496,99 +568,10 @@ www-gnu = http://www.gnu.org
# Use mv, if you don't have/want move-if-change.
move_if_change ?= move-if-change
# --------------------- #
# Updating everything. #
# --------------------- #
.PHONY: update
local_updates ?= wget-update cvs-update po-update
update: $(local_updates)
# ------------------- #
# Updating PO files. #
# ------------------- #
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE)
.PHONY: do-po-update po-update
do-po-update:
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\
rm -rf $$tmppo && \
mkdir $$tmppo && \
(cd $$tmppo && \
$(WGET) $(WGETFLAGS) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\
cp $$tmppo/*.po po
cd po && $(MAKE) update-po
$(MAKE) po-check
po-update:
if test -d "po"; then \
$(MAKE) do-po-update; \
fi
# -------------------------- #
# Updating GNU build tools. #
# -------------------------- #
# The following pseudo table associates a local directory and a URL
# with each of the files that belongs to some other package and is
# regularly updated from the specified URL.
wget_files ?= \
$(srcdir)/build-aux/config.guess \
$(srcdir)/build-aux/config.sub \
$(srcdir)/build-aux/texinfo.tex \
$(srcdir)/src/ansi2knr.c
get-targets = $(patsubst %, get-%, $(wget_files))
config.guess-url_prefix = $(ftp-gnu)/build-aux/
config.sub-url_prefix = $(ftp-gnu)/build-aux/
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
standards.texi-url_prefix = $(www-gnu)/prep/
make-stds.texi-url_prefix = $(standards.texi-url_prefix)
target = $(patsubst get-%, %, $@)
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
.PHONY: $(get-targets)
$(get-targets):
$(WGET) $(WGETFLAGS) $(url) -O $(target).t \
&& $(move_if_change) $(target).t $(target)
cvs_files ?= \
$(srcdir)/build-aux/depcomp \
$(srcdir)/build-aux/install-sh \
$(srcdir)/build-aux/missing \
$(srcdir)/build-aux/mkinstalldirs \
$(srcdir)/src/ansi2knr.c
automake_repo=:pserver:anoncvs:anoncvs@sources.redhat.com:/cvs/automake
.PHONY: wget-update
wget-update: $(get-targets)
.PHONY: cvs-update
cvs-update:
fail=; \
for f in $(cvs_files); do \
test -f $$f || { echo "*** skipping $$f" 1>&2; continue; }; \
cvs diff $$f > /dev/null \
|| { echo "*** $$f is locally modified; skipping it" 1>&2; \
fail=yes; continue; }; \
file=$$(basename $$f); \
echo checking out $$file...; \
$(CVS) -d $(automake_repo) co -p automake/lib/$$file> $$f.t \
&& $(move_if_change) $$f.t $$f; \
done; \
test "$$fail" && exit 1
emit_upload_commands:
@echo =====================================
@echo =====================================
@echo "$(srcdir)/gnupload $(GNUPLOADFLAGS) \\"
@echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\"
@echo " --to $(gnu_rel_host):coreutils \\"
@echo " $(rel-files)"
@echo '# send the /tmp/announcement e-mail'
@@ -599,12 +582,18 @@ $(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz
xdelta delta -9 $^ $@ || :
.PHONY: alpha beta major
alpha beta major: news-date-check $(local-check)
$(MAKE) cvs-dist
alpha beta major: news-date-check changelog-check $(local-check)
test $@ = major \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
$(MAKE) vc-dist
$(MAKE) $(xd-delta)
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
ln $(rel-files) $(release_archive_dir)
chmod a-w $(rel-files)
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
echo $(VERSION) > $(prev_version_file)
$(CVS) ci -m. $(prev_version_file)
$(VC) commit -m \
'$(prev_version_file): Record previous version: $(VERSION).' \
$(prev_version_file)

498
NEWS
View File

@@ -1,5 +1,475 @@
GNU coreutils NEWS -*- outline -*-
* Major changes in release 6.5 (2006-11-19) [stable]
** Bug fixes
du (and the other fts clients: chmod, chgrp, chown) would exit early
when encountering an inaccessible directory on a system with native
openat support (i.e., linux-2.6.16 or newer along with glibc-2.4
or newer). This bug was introduced with the switch to gnulib's
openat-based variant of fts, for coreutils-6.0.
"ln --backup f f" now produces a sensible diagnostic
** New features
rm accepts a new option: --one-file-system
* Major changes in release 6.4 (2006-10-22) [stable]
** Bug fixes
chgrp and chown would malfunction when invoked with both -R and -H and
with one or more of the following: --preserve-root, --verbose, --changes,
--from=o:g (chown only). This bug was introduced with the switch to
gnulib's openat-based variant of fts, for coreutils-6.0.
cp --backup dir1 dir2, would rename an existing dir2/dir1 to dir2/dir1~.
This bug was introduced in coreutils-6.0.
With --force (-f), rm no longer fails for ENOTDIR.
For example, "rm -f existing-non-directory/anything" now exits
successfully, ignoring the error about a nonexistent file.
* Major changes in release 6.3 (2006-09-30) [stable]
** Improved robustness
pinky no longer segfaults on Darwin 7.9.0 (MacOS X 10.3.9) due to a
buggy native getaddrinfo function.
rm works around a bug in Darwin 7.9.0 (MacOS X 10.3.9) that would
sometimes keep it from removing all entries in a directory on an HFS+
or NFS-mounted partition.
sort would fail to handle very large input (around 40GB) on systems with a
mkstemp function that returns a file descriptor limited to 32-bit offsets.
** Bug fixes
chmod would fail unnecessarily in an unusual case: when an initially-
inaccessible argument is rendered accessible by chmod's action on a
preceding command line argument. This bug also affects chgrp, but
it is harder to demonstrate. It does not affect chown. The bug was
introduced with the switch from explicit recursion to the use of fts
in coreutils-5.1.0 (2003-10-15).
cp -i and mv -i occasionally neglected to prompt when the copy or move
action was bound to fail. This bug dates back to before fileutils-4.0.
With --verbose (-v), cp and mv would sometimes generate no output,
or neglect to report file removal.
For the "groups" command:
"groups" no longer prefixes the output with "user :" unless more
than one user is specified; this is for compatibility with BSD.
"groups user" now exits nonzero when it gets a write error.
"groups" now processes options like --help more compatibly.
shuf would infloop, given 8KB or more of piped input
** Portability
Versions of chmod, chown, chgrp, du, and rm (tools that use openat etc.)
compiled for Solaris 8 now also work when run on Solaris 10.
* Major changes in release 6.2 (2006-09-18) [stable candidate]
** Changes in behavior
mkdir -p and install -d (or -D) now use a method that forks a child
process if the working directory is unreadable and a later argument
uses a relative file name. This avoids some race conditions, but it
means you may need to kill two processes to stop these programs.
rm now rejects attempts to remove the root directory, e.g., `rm -fr /'
now fails without removing anything. Likewise for any file name with
a final `./' or `../' component.
tail now ignores the -f option if POSIXLY_CORRECT is set, no file
operand is given, and standard input is any FIFO; formerly it did
this only for pipes.
** Infrastructure changes
Coreutils now uses gnulib via the gnulib-tool script.
If you check the source out from CVS, then follow the instructions
in README-cvs. Although this represents a large change to the
infrastructure, it should cause no change in how the tools work.
** Bug fixes
cp --backup no longer fails when the last component of a source file
name is "." or "..".
"ls --color" would highlight other-writable and sticky directories
no differently than regular directories on a file system with
dirent.d_type support.
"mv -T --verbose --backup=t A B" now prints the " (backup: B.~1~)"
suffix when A and B are directories as well as when they are not.
mv and "cp -r" no longer fail when invoked with two arguments
where the first one names a directory and the second name ends in
a slash and doesn't exist. E.g., "mv dir B/", for nonexistent B,
now succeeds, once more. This bug was introduced in coreutils-5.3.0.
* Major changes in release 6.1 (2006-08-19) [unstable]
** Changes in behavior
df now considers BSD "kernfs" file systems to be dummies
** New features
printf now supports the 'I' flag on hosts whose underlying printf
implementations support 'I', e.g., "printf %Id 2".
** Bug fixes
cp --sparse preserves sparseness at the end of a file, even when
the file's apparent size is not a multiple of its block size.
[introduced with the original design, in fileutils-4.0r, 2000-04-29]
df (with a command line argument) once again prints its header
[introduced in coreutils-6.0]
ls -CF would misalign columns in some cases involving non-stat'able files
[introduced in coreutils-6.0]
* Major changes in release 6.0 (2006-08-15) [unstable]
** Improved robustness
df: if the file system claims to have more available than total blocks,
report the number of used blocks as being "total - available"
(a negative number) rather than as garbage.
dircolors: a new autoconf run-test for AIX's buggy strndup function
prevents malfunction on that system; may also affect cut, expand,
and unexpand.
fts no longer changes the current working directory, so its clients
(chmod, chown, chgrp, du) no longer malfunction under extreme conditions.
pwd and other programs using lib/getcwd.c work even on file systems
where dirent.d_ino values are inconsistent with those from stat.st_ino.
rm's core is now reentrant: rm --recursive (-r) now processes
hierarchies without changing the working directory at all.
** Changes in behavior
basename and dirname now treat // as different from / on platforms
where the two are distinct.
chmod, install, and mkdir now preserve a directory's set-user-ID and
set-group-ID bits unless you explicitly request otherwise. E.g.,
`chmod 755 DIR' and `chmod u=rwx,go=rx DIR' now preserve DIR's
set-user-ID and set-group-ID bits instead of clearing them, and
similarly for `mkdir -m 755 DIR' and `mkdir -m u=rwx,go=rx DIR'. To
clear the bits, mention them explicitly in a symbolic mode, e.g.,
`mkdir -m u=rwx,go=rx,-s DIR'. To set them, mention them explicitly
in either a symbolic or a numeric mode, e.g., `mkdir -m 2755 DIR',
`mkdir -m u=rwx,go=rx,g+s' DIR. This change is for convenience on
systems where these bits inherit from parents. Unfortunately other
operating systems are not consistent here, and portable scripts
cannot assume the bits are set, cleared, or preserved, even when the
bits are explicitly mentioned. For example, OpenBSD 3.9 `mkdir -m
777 D' preserves D's setgid bit but `chmod 777 D' clears it.
Conversely, Solaris 10 `mkdir -m 777 D', `mkdir -m g-s D', and
`chmod 0777 D' all preserve D's setgid bit, and you must use
something like `chmod g-s D' to clear it.
`cp --link --no-dereference' now works also on systems where the
link system call cannot create a hard link to a symbolic link.
This change has no effect on systems with a Linux-based kernel.
csplit and nl now use POSIX syntax for regular expressions, not
Emacs syntax. As a result, character classes like [[:print:]] and
interval expressions like A\{1,9\} now have their usual meaning,
. no longer matches the null character, and \ must precede the + and
? operators.
date: a command like date -d '2006-04-23 21 days ago' would print
the wrong date in some time zones. (see the test for an example)
df changes:
df now considers "none" and "proc" file systems to be dummies and
therefore does not normally display them. Also, inaccessible file
systems (which can be caused by shadowed mount points or by
chrooted bind mounts) are now dummies, too.
df now fails if it generates no output, so you can inspect the
exit status of a command like "df -t ext3 -t reiserfs DIR" to test
whether DIR is on a file system of type "ext3" or "reiserfs".
expr no longer complains about leading ^ in a regular expression
(the anchor is ignored), or about regular expressions like A** (the
second "*" is ignored). expr now exits with status 2 (not 3) for
errors it detects in the expression's values; exit status 3 is now
used only for internal errors (such as integer overflow, which expr
now checks for).
install and mkdir now implement the X permission symbol correctly,
e.g., `mkdir -m a+X dir'; previously the X was ignored.
install now creates parent directories with mode u=rwx,go=rx (755)
instead of using the mode specified by the -m option; and it does
not change the owner or group of parent directories. This is for
compatibility with BSD and closes some race conditions.
ln now uses different (and we hope clearer) diagnostics when it fails.
ln -v now acts more like FreeBSD, so it generates output only when
successful and the output is easier to parse.
ls now defaults to --time-style='locale', not --time-style='posix-long-iso'.
However, the 'locale' time style now behaves like 'posix-long-iso'
if your locale settings appear to be messed up. This change
attempts to have the default be the best of both worlds.
mkfifo and mknod no longer set special mode bits (setuid, setgid,
and sticky) with the -m option.
nohup's usual diagnostic now more precisely specifies the I/O
redirections, e.g., "ignoring input and appending output to
nohup.out". Also, nohup now redirects stderr to nohup.out (or
$HOME/nohup.out) if stdout is closed and stderr is a tty; this is in
response to Open Group XCU ERN 71.
rm --interactive now takes an optional argument, although the
default of using no argument still acts like -i.
rm no longer fails to remove an empty, unreadable directory
seq changes:
seq defaults to a minimal fixed point format that does not lose
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.
seq now lets you use %a, %A, %E, %F, and %G formats.
seq now uses long double internally rather than double.
sort now reports incompatible options (e.g., -i and -n) rather than
silently ignoring one of them.
stat's --format=FMT option now works the way it did before 5.3.0:
FMT is automatically newline terminated. The first stable release
containing this change was 5.92.
stat accepts the new option --printf=FMT, where FMT is *not*
automatically newline terminated.
stat: backslash escapes are interpreted in a format string specified
via --printf=FMT, but not one specified via --format=FMT. That includes
octal (\ooo, at most three octal digits), hexadecimal (\xhh, one or
two hex digits), and the standard sequences (\a, \b, \f, \n, \r, \t,
\v, \", \\).
With no operand, 'tail -f' now silently ignores the '-f' only if
standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
Formerly, it ignored the '-f' when standard input was a FIFO, pipe,
or socket.
** Scheduled for removal
ptx's --copyright (-C) option is scheduled for removal in 2007, and
now evokes a warning. Use --version instead.
rm's --directory (-d) option is scheduled for removal in 2006. This
option has been silently ignored since coreutils 5.0. On systems
that support unlinking of directories, you can use the "unlink"
command to unlink a directory.
Similarly, we are considering the removal of ln's --directory (-d,
-F) option in 2006. Please write to <bug-coreutils@gnu.org> if this
would cause a problem for you. On systems that support hard links
to directories, you can use the "link" command to create one.
** New programs
base64: base64 encoding and decoding (RFC 3548) functionality.
sha224sum: print or check a SHA224 (224-bit) checksum
sha256sum: print or check a SHA256 (256-bit) checksum
sha384sum: print or check a SHA384 (384-bit) checksum
sha512sum: print or check a SHA512 (512-bit) checksum
shuf: Shuffle lines of text.
** New features
chgrp now supports --preserve-root, --no-preserve-root (default),
as it was documented to do, and just as chmod, chown, and rm do.
New dd iflag= and oflag= flags:
'directory' causes dd to fail unless the file is a directory, on
hosts that support this (e.g., Linux kernels, version 2.1.126 and
later). This has limited utility but is present for completeness.
'noatime' causes dd to read a file without updating its access
time, on hosts that support this (e.g., Linux kernels, version
2.6.8 and later).
'nolinks' causes dd to fail if the file has multiple hard links,
on hosts that support this (e.g., Solaris 10 and later).
ls accepts the new option --group-directories-first, to make it
list directories before files.
rm now accepts the -I (--interactive=once) option. This new option
prompts once if rm is invoked recursively or if more than three
files are being deleted, which is less intrusive than -i prompting
for every file, but provides almost the same level of protection
against mistakes.
shred and sort now accept the --random-source option.
sort now accepts the --random-sort (-R) option and `R' ordering option.
sort now supports obsolete usages like "sort +1 -2" unless
POSIXLY_CORRECT is set. However, when conforming to POSIX
1003.1-2001 "sort +1" still sorts the file named "+1".
wc accepts a new option --files0-from=FILE, where FILE contains a
list of NUL-terminated file names.
** Bug fixes
cat with any of the options, -A -v -e -E -T, when applied to a
file in /proc or /sys (linux-specific), would truncate its output,
usually printing nothing.
cp -p would fail in a /proc-less chroot, on some systems
When `cp -RL' encounters the same directory more than once in the
hierarchy beneath a single command-line argument, it no longer confuses
them with hard-linked directories.
fts-using tools (chmod, chown, chgrp, du) no longer fail due to
a double-free bug -- it could be triggered by making a directory
inaccessible while e.g., du is traversing the hierarchy under it.
fts-using tools (chmod, chown, chgrp, du) no longer misinterpret
a very long symlink chain as a dangling symlink. Before, such a
misinterpretation would cause these tools not to diagnose an ELOOP error.
ls --indicator-style=file-type would sometimes stat a symlink
unnecessarily.
ls --file-type worked like --indicator-style=slash (-p),
rather than like --indicator-style=file-type.
mv: moving a symlink into the place of an existing non-directory is
now done atomically; before, mv would first unlink the destination.
mv -T DIR EMPTY_DIR no longer fails unconditionally. Also, mv can
now remove an empty destination directory: mkdir -p a b/a; mv a b
rm (on systems with openat) can no longer exit before processing
all command-line arguments.
rm is no longer susceptible to a few low-probability memory leaks.
rm -r no longer fails to remove an inaccessible and empty directory
rm -r's cycle detection code can no longer be tricked into reporting
a false positive (introduced in fileutils-4.1.9).
shred --remove FILE no longer segfaults on Gentoo systems
sort would fail for large inputs (~50MB) on systems with a buggy
mkstemp function. sort and tac now use the replacement mkstemp
function, and hence are no longer subject to limitations (of 26 or 32,
on the maximum number of files from a given template) on HP-UX 10.20,
SunOS 4.1.4, Solaris 2.5.1 and OSF1/Tru64 V4.0F&V5.1.
tail -f once again works on a file with the append-only
attribute (affects at least Linux ext2, ext3, xfs file systems)
* Major changes in release 5.97 (2006-06-24) [stable]
* Major changes in release 5.96 (2006-05-22) [stable]
* Major changes in release 5.95 (2006-05-12) [stable]
* Major changes in release 5.94 (2006-02-13) [stable]
[see the b5_9x branch for details]
* Major changes in release 5.93 (2005-11-06) [stable]
** Bug fixes
dircolors no longer segfaults upon an attempt to use the new
STICKY_OTHER_WRITABLE (OWT) attribute.
du no longer overflows a counter when processing a file larger than
2^31-1 on some 32-bit systems (at least some AIX 5.1 configurations).
md5sum once again defaults to using the ` ' non-binary marker
(rather than the `*' binary marker) by default on Unix-like systems.
mkdir -p and install -d no longer exit nonzero when asked to create
a directory like `nonexistent/.'
rm emits a better diagnostic when (without -r) it fails to remove
a directory on e.g., Solaris 9/10 systems.
tac now works when stdin is a tty, even on non-Linux systems.
"tail -c 2 FILE" and "touch 0101000000" now operate as POSIX
1003.1-2001 requires, even when coreutils is conforming to older
POSIX standards, as the newly-required behavior is upward-compatible
with the old.
The documentation no longer mentions rm's --directory (-d) option.
** Build-related bug fixes
installing .mo files would fail
* Major changes in release 5.92 (2005-10-22) [stable]
** Bug fixes
chmod now diagnoses an invalid mode string starting with an octal digit
dircolors now properly quotes single-quote characters
* Major changes in release 5.91 (2005-10-17) [stable candidate]
** Bug fixes
"mkdir -p /a/b/c" no longer fails merely because a leading prefix
directory (e.g., /a or /a/b) exists on a read-only file system.
** Removed options
tail's --allow-missing option has been removed. Use --retry instead.
stat's --link and -l options have been removed.
Use --dereference (-L) instead.
** Deprecated options
Using ls, du, or df with the --kilobytes option now evokes a warning
that the long-named option is deprecated. Use `-k' instead.
du's long-named --megabytes option now evokes a warning.
Use -m instead.
* Major changes in release 5.90 (2005-09-29) [unstable]
** Bring back support for `head -NUM', `tail -NUM', etc. even when
@@ -38,11 +508,14 @@ GNU coreutils NEWS -*- outline -*-
POSIX 1003.2-1992 POSIX 1003.1-2001
sort +4 sort -k 5 sort ./+4
tail +4 tail -n +4 tail ./+4
tail - main.c tail main.c tail -- - main.c
tail - f tail f [see (*) below]
tail -c 4 tail -c 10 ./4 tail -c4
touch 12312359 f touch -t 12312359 f touch ./12312359 f
uniq +4 uniq -s 4 uniq ./+4
(*) "tail - f" does not conform to POSIX 1003.1-2001; to read
standard input and then "f", use the command "tail -- - f".
These changes are in response to decisions taken in the January 2005
Austin Group standardization meeting. For more details, please see
"Utility Syntax Guidelines" in the Minutes of the January 2005
@@ -190,7 +663,7 @@ GNU coreutils NEWS -*- outline -*-
cp and mv: the --reply=X option is deprecated
date accepts the new option --rfc-3339=TIMESPEC. The old --iso-8602 (-I)
date accepts the new option --rfc-3339=TIMESPEC. The old --iso-8601 (-I)
option is deprecated; it still works, but new applications should avoid it.
date, du, ls, and pr's time formats now support new %:z, %::z, %:::z
specifiers for numeric time zone offsets like -07:00, -07:00:00, and -07.
@@ -198,6 +671,10 @@ GNU coreutils NEWS -*- outline -*-
dd has new iflag= and oflag= flags "binary" and "text", which have an
effect only on nonstandard platforms that distinguish text from binary I/O.
dircolors now supports SETUID, SETGID, STICKY_OTHER_WRITABLE,
OTHER_WRITABLE, and STICKY, with ls providing default colors for these
categories if not specified by dircolors.
du accepts new options: --time[=TYPE] and --time-style=STYLE
join now supports a NUL field separator, e.g., "join -t '\0'".
@@ -335,6 +812,8 @@ GNU coreutils NEWS -*- outline -*-
mv (when moving between partitions) no longer fails when
operating on too many command-line-specified nonempty directories.
"readlink -f" is more compatible with prior implementations
rm (without -f) no longer hangs when attempting to remove a symlink
to a file on an off-line NFS-mounted partition.
@@ -518,6 +997,9 @@ GNU coreutils NEWS -*- outline -*-
rather than two-byte int. This makes a difference only on hosts like
Cray systems where the C short int type requires more than two bytes.
readlink accepts new options: --canonicalize-existing (-e)
and --canonicalize-missing (-m).
The stat option --filesystem has been renamed to --file-system, for
consistency with POSIX "file system" and with cp and du --one-file-system.
@@ -1245,3 +1727,15 @@ packages, see ./old/*/NEWS.
This package began as the union of the following:
textutils-2.1, fileutils-4.1.11, sh-utils-2.0.15.
========================================================================
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.

50
README
View File

@@ -7,13 +7,14 @@ arbitrary limits.
The programs that can be built with this package are:
[ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
df dir dircolors dirname du echo env expand expr factor false fmt fold
[ base64 basename cat chgrp chmod chown chroot cksum comm cp csplit cut date
dd df dir dircolors dirname du echo env expand expr factor false fmt fold
ginstall groups head hostid hostname id join kill link ln logname ls
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
split stat stty su sum sync tac tail tee test touch tr true tsort tty
uname unexpand uniq unlink uptime users vdir wc who whoami yes
printenv printf ptx pwd readlink rm rmdir seq sha1sum sha224sum sha256sum
sha384sum sha512sum shred shuf sleep sort split stat stty su sum sync tac
tail tee test touch tr true tsort tty uname unexpand uniq unlink uptime
users vdir wc who whoami yes
See the file NEWS for a list of major changes in the current release.
@@ -59,6 +60,22 @@ the ls `time-1' test to fail. I believe that is due to a bug in the
way Sun implemented link(2) and chmod(2).
***********************
Pre-C99 build failure
-----------------------
There is a new, implicit build requirement:
To build the coreutils from source, you should have a C99-conforming
compiler, due to the use of declarations after non-declaration statements
in several files in src/. There is code in configure to find and, if
possible, enable an appropriate compiler. However, if configure doesn't
find a C99 compiler, it continues nonetheless, and your build will fail.
If that happens, simply apply the included patch using the following
command, and then run make again:
cd src && patch < c99-to-c89.diff
***********************
HPUX 11.x build failure
-----------------------
@@ -109,7 +126,7 @@ Reporting bugs:
IMPORTANT: if you take the time to report a test failure,
please be sure to include the output of running `make check'
in verbose mode for each each failing test. For example,
in verbose mode for each failing test. For example,
if the test that fails is tests/mv/hard-link-1, then you
would run this command:
@@ -124,7 +141,7 @@ and then include the contents of the file `log' in your bug report.
***************************************
There are pretty many tests, but nowhere near as many as we need.
There are many tests, but nowhere near as many as we need.
Additions and corrections are very welcome.
If you see a problem that you've already reported, feel free to re-report
@@ -150,6 +167,12 @@ as you can. Based on the feedback that generates, you may be able to
convince us that it's worth adding.
WARNING: Now that we use the ./bootstrap script, you should not run
autoreconf manually. Doing that will overwrite essential source files
with older versions, which may make the package unbuildable or introduce
subtle bugs.
WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4,
or any Makefile.am, then don't be surprised if what gets regenerated no
longer works. To make things work, you'll have to be using appropriate
@@ -171,3 +194,16 @@ http://www.gnu.org/prep/standards_toc.html.
Mail suggestions and bug reports for these programs to
the address on the last line of --help output.
========================================================================
Copyright (C) 1998, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the ``GNU Free
Documentation License'' file as part of this distribution.

70
README-cvs Normal file
View File

@@ -0,0 +1,70 @@
-*- outline -*-
These notes intend to help people working on the CVS version of
this package.
* Requirements
Only the sources are installed in the CVS repository (to ease the
maintenance, merges etc.), therefore you will have to get the latest
stable versions of the maintainer tools we depend upon, including:
- Automake <http://www.gnu.org/software/automake/>
- Autoconf <http://www.gnu.org/software/autoconf/>
- Bison <http://www.gnu.org/software/bison/>
- Gettext <http://www.gnu.org/software/gettext/>
- Gzip <http://www.gnu.org/software/gzip/>
- Tar <http://www.gnu.org/software/tar/>
- Wget <http://www.gnu.org/software/wget/>
As of this writing, the latest stable version of Gzip is 1.2.4 but we
suggest using test version 1.3.5 (or later, if one becomes available).
Valgrind <http://valgrind.org/> is also highly recommended, if
Valgrind supports your architecture.
Only building the initial full source tree will be a bit painful,
later, a plain `cvs update -P && make' should be sufficient.
* First CVS checkout
Obviously, if you are reading these notes, you did manage to check out
this package from CVS. The next step is to get other files needed to
build, which are extracted from other source packages:
$ ./bootstrap
And there you are! Just
$ ./configure
$ make
$ make check
At this point, there should be no difference between your local copy,
and the CVS master copy:
$ cvs diff
should output no difference.
Enjoy!
-----
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.

View File

@@ -1,4 +1,22 @@
#! /bin/bash
# Convert this package for use with valgrind.
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Convert Makefile.am files:
# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
@@ -16,13 +34,13 @@ coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - s
mkdir -p src/vg
pwd=`pwd`
srcdir=$pwd/src
path='export PATH='$srcdir':${PATH#*:}'
pre='#!/bin/sh\n'"$path"'\n'
n=9
vg='exec /usr/bin/valgrind --log-fd=3 --leak-check=yes --track-fds=yes --quiet --num-callers='$n
_path='export PATH='$srcdir':${PATH#*:}'
pre='#!/bin/sh\n'"$_path"'\n'
n=15
vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --log-fd=3 --leak-check=yes --track-fds=yes --leak-check=full --num-callers='$n
cat <<EOF > src/vg/gen
for i in $coreutils; do
printf "$pre$vg \$i"' "\$@"\n' > \$i
printf "$pre$vg -- \$i"' "\$@"\n' > \$i
chmod a+x \$i
done
EOF

35
THANKS
View File

@@ -8,6 +8,7 @@ the bug-report mailing list (as seen on last line of e.g., cp --help).
??? kytek@cybercomm.net
A Costa agcosta@gis.net
Aaron Hawley ashawley@uvm.edu
Achim Blumensath blume@corona.oche.de
Adam Klein aklein@debian.org
Adrian Bunk bunk@stusta.de
@@ -50,6 +51,7 @@ Arthur Pool pool@commerce.uq.edu.au
Arun Sharma arun.sharma@intel.com
Arvind Autar Autar022@planet.nl
Augey Mikus mikus@dqc.org
Aurelien Jarno aurel32@debian.org
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
Axel Kittenberger Anshil@gmx.net
Bauke Jan Douma bjdouma@xs4all.nl
@@ -92,6 +94,7 @@ Christian Harkort christian.harkort@web.de
Christian Krackowizer ckrackowiz@std.schuler-ag.com
Christian Rose menthos@menthos.com
Christian von Roques roques@pond.sub.org
Christophe LYON christophe.lyon@st.com
Chuck Hedrick hedrick@klinzhai.rutgers.edu
Clark Morgan cmorgan@aracnet.com
Clement Wang clem.wang@overture.com
@@ -115,7 +118,9 @@ David Eisner cradle@umd.edu
David Flynn dav@chess.plus.com
David Godfrey dave@delta.demon.co.uk
David Luyer david_luyer@pacific.net.au
David Madore david.madore@ens.fr
David Malone dwmalone@cnri.dit.ie
Dean Gaudet dean-savannah@arctic.org
Deepak Goel deego@gnufans.org
Dennis Henriksen opus@flamingo.osrl.dk
Dennis Smit ds@nerds-incorporated.org
@@ -146,9 +151,12 @@ Eric S. Raymond esr@snark.thyrsus.com
Erik Bennett bennett@cvo.oneworld.com
Erik Corry erik@kroete2.freinet.de
Felix Lee flee@teleport.com
Felix Rauch Valenti frauch@cse.unsw.edu.au
Ferdinand fw@scenic.mine.nu
Fletcher Mattox fletcher@cs.utexas.edu
Florent Bayle florent@sarcelle.net
Florin Iucha fiucha@hsys.mic.ro
Francesco Montorsi fr_m@hotmail.com
François Pinard pinard@iro.umontreal.ca
Frank Adler fadler@allesklar.de
Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU
@@ -190,6 +198,7 @@ Holger Berger hberger@ess.nec.de
Hon-Yin Kok hkok@yoda.unl.edu
Hugh Daniel hugh@xanadu.com
Ian Bruce ian.bruce@myrealbox.com
Iain Calder ic56@rogers.com
Ian Jackson ijackson@chiark.greenend.org.uk
Ian Lance Taylor ian@cygnus.com
Ian Turner vectro@pipeline.com
@@ -203,6 +212,7 @@ James Sneeringer jvs@ocslink.com
James Tanis jtt@soscorp.com
James Youngman james+usenet@free-lunch.demon.co.uk
Jamie Lokier jamie@imbolc.ucc.ie
Jamie McClelland jm@mayfirst.org
Jan Fedak J.Fedak@sh.cvut.cz
Jan Nieuwenhuizen janneke@gnu.org
Janos Farkas chexum@shadow.banki.hu
@@ -222,6 +232,7 @@ Jim Dennis jimd@starshine.org
Joakim Rosqvist dvljrt@cs.umu.se
Jochen Hein jochen@jochen.org
Joe Orton joe@manyfish.co.uk
Joerg Sonnenberger joerg@britannica.bec.de
Johan Boule bohan@bohan.dyndns.org
Johan Danielsson joda@pdc.kth.se
John Bley jbb6@acpub.duke.edu
@@ -238,6 +249,7 @@ Jon Peatfield J.S.Peatfield@damtp.cam.ac.uk
Joost van Baal joostvb@xs4all.nl
Jorge Stolfi stolfi@ic.unicamp.br
Joseph S. Myers jsm28@cam.ac.uk
Joshua Hudson joshudson@gmail.com
Juan F. Codagnone juam@arnet.com.ar
Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de
Jungshik Shin jshin@pantheon.yale.edu
@@ -277,6 +289,7 @@ Manas Garg manas@cygsoft.com
Manfred Hollstein manfred@s-direktnet.de
Marc Boucher marc@mbsi.ca
Marc Haber mh+debian-bugs@zugschlus.de
Marc Lehman schmorp@schmorp.de
Marc Olzheim marcolz@stack.nl
Marco Franzen Marco.Franzen@Thyron.com
Marcus Brinkmann http://www.marcus-brinkmann.de
@@ -354,6 +367,8 @@ Neil Brown neilb@cse.unsw.edu.au
Nelson H. F. Beebe beebe@math.utah.edu
Nick Estes debian@nickstoys.com
Nick Lawes nlawes@silverplatter.com
Nickolai Zeldovich nickolai@cs.stanford.edu
Nicolas François nicolas.francois@centraliens.net
Niklas Edmundsson nikke@acc.umu.se
Nikola Milutinovic Nikola.Milutinovic@ev.co.yu
Noah Friedman friedman@splode.com
@@ -371,13 +386,17 @@ Paul Jarc prj@po.cwru.edu
Paul Nevai nevai@ops.mps.ohio-state.edu
Paul Sauer paul@alexa.com
Paul Slootman paul@debian.org
Paul Townsend aab@purdue.edu
Paul Worrall paul@basilisk.uklinux.net
Pawel Prokop pablo@wizard.ae.krakow.pl
Per Cederqvist ceder@lysator.liu.se
Per Kristian Hove perhov@math.ntnu.no
Peter Breitenlohner peb@mppmu.mpg.de
Peter Eriksson peter@ifm.liu.se
Peter Fales psfales@lucent.com
Peter Horst peter@ointment.org
Peter Moulder reiter@netspace.net.au
Peter O'Gorman bug-coreutils@mlists.thewrittenword.com
Peter Samuelson psamuels@sampo.creighton.edu
Peter Seebach seebs@taniemarie.solon.com
Petter Reinholdtsen pere@hungry.com
@@ -391,6 +410,7 @@ Piotr Kwapulinski kwap@univ.gda.pl
Prashant TR tr@eth.net
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
Ralf W. Stephan stephan@tmt.de
Ralf Wildenhues Ralf.Wildenhues@gmx.de
Ralph Loader loader@maths.ox.ac.uk
Raul Miller moth@magenta.com
Raúl Núñez de Arenas Coronado raul@pleyades.net
@@ -416,6 +436,7 @@ Ross Paterson rap@doc.ic.ac.uk
Ross Ridge rridge@calum.csclub.uwaterloo.ca
Sami Farin sfarin@ratol.fi
Samuel Tardieu sam@rfc1149.net
Samuel Thibault samuel.thibault@ens-lyon.org
Samuli Karkkainen Samuli.Karkkainen@hut.fi
Sander van Malssen svm@kozmix.ow.nl
Santiago Vila Doncel sanvila@unex.es
@@ -426,23 +447,29 @@ Shing-Shong Shei shei@cs.indiana.edu
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
Solar Designer solar@owl.openwall.com
Stanislav Ievlev inger@altlinux.ru
Stavros Passas stabat@ics.forth.gr
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
Stephen Depooter sbdep@myrealbox.com
Stephen Eglen eglen@pcg.wustl.edu
Stephen Gildea gildea@stop.mail-abuse.org
Stephen Smoogen smooge@mindspring.com
Steve McConnel steve@acadcomp.sil.org
Steve McIntyre steve@einval.com
Steven G. Johnson stevenj@alum.mit.edu
Steven Mocking ufo@quicknet.nl
Steven P Watson steven@magelico.net
Stuart Kemp skemp@peter.bmc.com
Sven Joachim sven_joachim@web.de
Szakacsits Szabolcs szaka@sienet.hu
Tadayoshi Funaba tadf@kt.rim.or.jp
TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp
Theodore Ts'o tytso@rsts-11.mit.edu
The Wanderer inverseparadox@comcast.net
Thomas Bushnell thomas@gnu.ai.mit.edu
Thomas Goerlich thomas@schnappmatik.de
Thomas Hood jdthood@yahoo.co.uk
Thomas Luzat thomas@luzat.com
Thomas M.Ott thmo-13@gmx.de
Thomas Quinot thomas@Cuivre.FR.EU.ORG
Thomas Wolff mined@towo.net
Tim J. Robbins tjr@FreeBSD.org
@@ -453,12 +480,14 @@ Toby Peterson toby@opendarwin.org
Todd A. Jacobs tjacobs@codegnome.org
Tom Haynes thomas@netapp.com
Tom Quinn trq@dionysos.thphys.ox.ac.uk
Tomas Pospisek tpo@sourcepole.ch
Tommi Kyntola tkyntola@cc.hut.fi
Ton Hospel thospel@mail.dma.be
Ton Nijkes ton@murphy.nl
Tony Kocurko akocurko@mun.ca
Tony Leneis tony@plaza.ds.adp.com
Tony Robinson ajr@eng.cam.ac.uk
Toralf Förster toralf.foerster@gmx.de
Torbjorn Granlund tege@nada.kth.se
Torbjorn Lindgren tl@funcom.no
Torsten Landschoff torsten@pclab.ifg.uni-kiel.de
@@ -469,6 +498,8 @@ Urs Thuermann urs@isnogud.escape.de
Uwe H. Steinfeld usteinfeld@gmx.net
Vesselin Atanasov vesselin@bgnet.bg
Vin Shelton acs@alumni.princeton.edu
Vineet Chadha chadha@acis.ufl.edu
Vitaly A. Ostanin vyt@altlinux.org
Vlada Macek tuttle@bbs.fsik.cvut.cz
Volker Borchert bt@teknon.de
Volker Paul vpaul@dohle.com
@@ -487,3 +518,7 @@ Wolfram Kleff kleff@cs.uni-bonn.de
Won-kyu Park wkpark@chem.skku.ac.kr
Yann Dirson dirson@debian.org
Zvi Har'El rl@math.technion.ac.il
;; Local Variables:
;; coding: utf-8
;; End:

91
TODO
View File

@@ -1,7 +1,3 @@
restore djgpp, eventually
merge TODO lists
add unit tests for lib/*.c
strip: add an option to specify the program used to strip binaries.
suggestion from Karl Berry
@@ -9,8 +5,6 @@ doc/coreutils.texi:
Address this comment: FIXME: mv's behavior in this case is system-dependent
Better still: fix the code so it's *not* system-dependent.
implement --target-directory=DIR for install (per texinfo documentation)
ls: add --format=FORMAT option that controls how each line is printed.
cp --no-preserve=X should not attempt to preserve attribute X
@@ -47,20 +41,13 @@ seq: give better diagnostics for invalid formats:
e.g. no or too many % directives
seq: consider allowing format string to contain no %-directives
m4: rename all macros that start with AC_ to start with another prefix
resolve RH report on cp -a forwarded by Tim Waugh
Martin Michlmayr's patch to provide ls with `--sort directory' option
tail: don't use xlseek; it *exits*.
Instead, maybe use a macro and return nonzero.
add mktemp? Suggested by Nelson Beebe
df: alignment problem of `Used' heading with e.g., -mP
reported by Karl Berry
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
lib/strftime.c: Since %N is the only format that we need but that
@@ -73,16 +60,6 @@ sort: Compress temporary files when doing large external sort/merges.
you can read/write, which is common in these days of fast CPUs.
suggestion from Charles Randall on 2001-08-10
sort: Add an ordering option -R that causes 'sort' to sort according
to a random permutation of the correct sort order. Also, add an
option --random-seed=SEED that causes 'sort' to use an arbitrary
string SEED to select which permutations to use, in a deterministic
manner: that is, if you sort a permutation of the same input file
with the same --random-seed=SEED option twice, you'll get the same
output. The default SEED is chosen at random, and contains enough
information to ensure that the output permutation is random.
suggestion from Feth AREZKI, Stephan Kasal, and Paul Eggert on 2003-07-17
unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html]
printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified.
printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n"
@@ -112,8 +89,6 @@ cp --recursive: perform dir traversals in source and dest hierarchy rather
than forming full file names. The latter (current) approach fails
unnecessarily when the names become very long.
tail --p is now ambiguous
Remove suspicious uses of alloca (ones that may allocate more than
about 4k)
@@ -121,15 +96,12 @@ Adapt these contribution guidelines for coreutils:
http://sources.redhat.com/automake/contribute.html
Changes expected to go in, post-5.2.1:
Changes expected to go in, someday.
======================================
wc: add an option, --files0-from [as for du] to make it read NUL-delimited
file name arguments from a file.
dd patch from Olivier Delhomme
Apply Andreas Gruenbacher's ACL and xattr changes
Andreas Gruenbacher's xattr changes
Apply Bruno Haible's hostname changes
@@ -144,9 +116,6 @@ Changes expected to go in, post-5.2.1:
A more efficient version of factor, and possibly one that
accepts inputs of size 2^64 and larger.
Re-add a separate test for du's stack space usage (like the one removed
from tests/rm/deep-1).
dd: consider adding an option to suppress `bytes/block read/written'
output to stderr. Suggested here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
@@ -161,35 +130,12 @@ Changes expected to go in, post-5.2.1:
pb (progress bar) from Miika Pekkarinen
------------------------------
Look into improving the performance of md5sum.
`openssl md5' is consistently about 30% faster than md5sum on an idle
AMD 2000-XP system with plenty of RAM and a 261 MB input file.
openssl's md5 implementation is in assembly, generated by a perl script.
On an AMD-64 system, using a 700MB file on a tmpfs file system
(and enough RAM so that no actual disk reads were performed),
GNU md5sum is slightly faster than `openssl md5', e.g.:
2.38s user 0.38s system 100% cpu 2.756 total (gnu md5sum)
vs.
2.52s user 0.34s system 100% cpu 2.869 total
However, `openssl sha1' is about 5% faster than GNU sha1sum:
3.32s user 0.33s system 99% cpu 3.653 total (openssl sha1)
3.45s user 0.39s system 99% cpu 3.843 total (gnu sha1sum)
The above are using the debian-sid (amd_64 alioth) binaries from
coreutils-5.2.1. When I compile the latest (coreutils-cvs) with
gcc-4.0 -O3, I get slightly (2-3%) better sha1sum performance,
and a ~7% *decrease* in performance for md5sum. I suspect that
with the right compiler options you can do much better.
------------------------------
Have euidaccess.m4 check for eaccess as well as euidaccess
If found, then do `#define euidaccess eaccess'.
Remove long-deprecated options like tail's --allow-missing
Remove long-deprecated options. Search case-insensitive for
`deprecated' and `remove in '. Automate this.
Add a distcheck-time test to ensure that every distributed
file is either read-only(indicating generated) or is
@@ -202,13 +148,13 @@ Implement Ulrich Drepper's suggestion to use getgrouplist rather
But first we'll need a run-test (either in an autoconf macro or at
run time) to avoid the segfault bug in libc-2.3.2's getgrouplist.
In that case, we'd revert to using a new (to-be-written) getgrouplist
module that does most of what `id' already does.
module that does most of what `id' already does. Or just avoid the
buggy use of getgrouplist by never passing it a buffer of length zero.
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200327
remove `%s' notation:
grep -E "\`%.{,4}s'" src/*.c
remove.c should never exit, yet may do so (see uses of EXIT_FAILURE)
remove or adjust chown's --changes option, since it
can't always do what it currently says it does.
@@ -218,3 +164,26 @@ Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
(preferably `no') cost when operating in single-byte mode.
Remove all uses of the `register' keyword
pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
ls.c: use gettime rather than clock_gettime, gettimeofday, time
-----
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

1097
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,29 @@
#!/usr/bin/perl -w
# Generate an announcement message.
# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
use strict;
use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
(my $VERSION = '$Revision: 1.23 $ ') =~ tr/[0-9].//cd;
(my $VERSION = '$Revision: 1.25 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
@@ -60,6 +77,7 @@ OPTIONS:
--package-name=PACKAGE_NAME
--previous-version=VER
--current-version=VER
--gpg-key-id=ID The GnuPG ID of the key used to sign the tarballs
--release-archive-directory=DIR
--url-directory=URL_DIR
--news=NEWS_FILE optional
@@ -124,13 +142,13 @@ sub print_locations ($\@\%@)
print "\n";
}
=item C<print_signatures (@file)
=item C<print_checksums (@file)
Print the MD5 and SHA1 signature section for each C<@file>.
=cut
sub print_signatures (@)
sub print_checksums (@)
{
my (@file) = @_;
@@ -300,6 +318,7 @@ sub print_changelog_deltas ($$)
my $prev_version;
my $curr_version;
my $release_archive_dir;
my $gpg_key_id;
my @url_dir_list;
my @news_file;
@@ -309,6 +328,7 @@ sub print_changelog_deltas ($$)
'package-name=s' => \$package_name,
'previous-version=s' => \$prev_version,
'current-version=s' => \$curr_version,
'gpg-key-id=s' => \$gpg_key_id,
'release-archive-directory=s' => \$release_archive_dir,
'url-directory=s' => \@url_dir_list,
'news=s' => \@news_file,
@@ -365,10 +385,27 @@ EOF
$tgz, $tbz);
print_locations ("xdelta-style diffs", @url_dir_list, %size,
$xd);
print_locations ("GPG detached signatures", @url_dir_list, %size,
print_locations ("GPG detached signatures[*]", @url_dir_list, %size,
"$tgz.sig", "$tbz.sig");
print_signatures ($tgz, $tbz, $xd);
print_checksums ($tgz, $tbz, $xd);
print <<EOF;
[*] You can use either of the above signature files to verify that
the corresponding file (without the .sig suffix) is intact. First,
be sure to download both the .sig file and the corresponding tarball.
Then, run a command like this:
gpg --verify $tgz.sig
If that command fails because you don't have the required public key,
then run this command to import it:
gpg --keyserver wwwkeys.pgp.net --recv-keys $gpg_key_id
and rerun the \`gpg --verify' command.
EOF
print_news_deltas ($_, $prev_version, $curr_version)
foreach @news_file;

497
bootstrap Executable file
View File

@@ -0,0 +1,497 @@
#! /bin/sh
# Bootstrap this package from CVS.
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Written by Paul Eggert.
nl='
'
# Ensure file names are sorted consistently across platforms.
# Also, ensure diagnostics are in English, e.g., "wget --help" below.
LC_ALL=C
export LC_ALL
usage() {
echo >&2 "\
Usage: $0 [OPTION]...
Bootstrap this package from the checked-out sources.
Options:
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
do not want to waste your bandwidth dowloading
them again.
--copy Copy files instead of creating symbolic links.
--force Attempt to bootstrap even if the sources seem
not to have been checked out.
--skip-po Do not download po files.
--cvs-user=USERNAME Set the CVS username to be used when accessing
the gnulib repository.
If the file .bootstrap.conf exists in the current working directory, its
contents are read as shell variables to configure the bootstrap.
Running without arguments will suffice in most cases.
"
}
# Configuration.
# List of gnulib modules needed.
gnulib_modules=
# Any gnulib files needed that are not in modules.
gnulib_files=
# Translation Project URL, for the registry of all projects
# and for the translation-team master directory.
TP_URL='http://www.iro.umontreal.ca/translation/registry.cgi?domain='
TP_PO_URL='http://www.iro.umontreal.ca/translation/teams/PO/'
extract_package_name='
/^AC_INIT(/{
/.*,.*,.*,/{
s///
s/[][]//g
p
q
}
s/AC_INIT(\[*//
s/]*,.*//
s/^GNU //
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
s/[^A-Za-z0-9_]/-/g
p
}
'
package=`sed -n "$extract_package_name" configure.ac` || exit
# Extra files from gnulib, which override files from other sources.
gnulib_extra_files='
build-aux/install-sh
build-aux/missing
build-aux/mdate-sh
build-aux/texinfo.tex
build-aux/depcomp
build-aux/config.guess
build-aux/config.sub
doc/INSTALL
'
# Other locale categories that need message catalogs.
EXTRA_LOCALE_CATEGORIES=
# Additional xgettext options to use. Use "\\\newline" to break lines.
XGETTEXT_OPTIONS='\\\
--flag=_:1:pass-c-format\\\
--flag=N_:1:pass-c-format\\\
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
'
# Files we don't want to import.
excluded_files=
# File that should exist in the top directory of a checked out hierarchy,
# but not in a distribution tarball.
CVS_only_file=README-cvs
# Whether to use copies instead of symlinks.
copy=false
# Override the default configuration, if necessary.
test -r bootstrap.conf && . ./bootstrap.conf
# Translate configuration into internal form.
# Parse options.
for option
do
case $option in
--help)
usage
exit;;
--gnulib-srcdir=*)
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
--cvs-user=*)
CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;;
--skip-po)
SKIP_PO=t;;
--force)
CVS_only_file=;;
--copy)
copy=true;;
*)
echo >&2 "$0: $option: unknown option"
exit 1;;
esac
done
if test -n "$CVS_only_file" && test ! -r "$CVS_only_file"; then
echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
exit 1
fi
echo "$0: Bootstrapping CVS $package..."
cleanup_gnulib() {
status=$?
rm -fr gnulib
exit $status
}
# Get gnulib files.
case ${GNULIB_SRCDIR--} in
-)
if [ ! -d gnulib ]; then
echo "$0: getting gnulib files..."
case ${CVS_AUTH-pserver} in
pserver)
CVS_PREFIX=':pserver:anonymous@';;
ssh)
CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
*)
echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
exit 1;;
esac
case $CVS_RSH in
'') CVS_RSH=ssh; export CVS_RSH;;
esac
trap cleanup_gnulib 1 2 13 15
cvs -z3 -q -d ${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/gnulib co gnulib ||
cleanup_gnulib
trap - 1 2 13 15
fi
GNULIB_SRCDIR=gnulib
esac
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
<$gnulib_tool || exit
# Get translations.
get_translations() {
subdir=$1
domain=$2
case $WGET_COMMAND in
'')
echo "$0: wget not available; skipping translations";;
?*)
echo "$0: getting translations into $subdir for $domain..." &&
(cd $subdir && rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po/p'`) &&
$WGET_COMMAND -O "$subdir/$domain.html" "$TP_URL$domain" &&
sed -n 's|.*"http://[^"]*/translation/teams/PO/\([^/"]*\)/'"$domain"'-\([^/"]*\)\.[^."]*\.po".*|\1.\2|p' <"$subdir/$domain.html" |
sort -k 1,1 -k 2,2n -k2,2 -k3,3n -k3,3 -k4,4n -k4,4 -k5,5n -k5.5 |
awk -F. '
{ if (lang && $1 != lang) print lang, ver }
{ lang = $1; ver = substr($0, index($0, ".") + 1) }
END { if (lang) print lang, ver }
' | awk -v domain="$domain" -v subdir="$subdir" '
{
lang = $1
ver = $2
urlfmt = ""
printf "{ $WGET_COMMAND -O %s/%s.po '\'"$TP_PO_URL"'/%s/%s-%s.%s.po'\'' &&\n", subdir, lang, lang, domain, ver, lang
printf " msgfmt -c -o /dev/null %s/%s.po || {\n", subdir, lang
printf " echo >&2 '\'"$0"': omitting translation for %s'\''\n", lang
printf " rm -f %s/%s.po; }; } &&\n", subdir, lang
}
END { print ":" }
' | WGET_COMMAND="$WGET_COMMAND" sh;;
esac &&
ls "$subdir"/*.po 2>/dev/null |
sed 's|.*/||; s|\.po$||' >"$subdir/LINGUAS" &&
rm -f "$subdir/$domain.html"
}
case $SKIP_PO in
'')
case `wget --help` in
*'--no-cache'*)
WGET_COMMAND='wget -nv --no-cache';;
*'--cache=on/off'*)
WGET_COMMAND='wget -nv --cache=off';;
*'--non-verbose'*)
WGET_COMMAND='wget -nv';;
*)
WGET_COMMAND='';;
esac
get_translations po $package || exit
if test -d runtime-po; then
get_translations runtime-po $package-runtime || exit
fi;;
esac
symlink_to_gnulib()
{
src=$GNULIB_SRCDIR/$1
dst=${2-$1}
test -f "$src" && {
if $copy; then
{
test ! -h "$dst" || {
echo "$0: rm -f $dst" &&
rm -f "$dst"
}
} &&
test -f "$dst" &&
cmp -s "$src" "$dst" || {
echo "$0: cp -fp $src $dst" &&
cp -fp "$src" "$dst"
}
else
test -h "$dst" &&
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
test "$src_i" = "$dst_i" || {
dot_dots=
case $src in
/*) ;;
*)
case /$dst/ in
*//* | */../* | */./* | /*/*/*/*/*/)
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
exit 1;;
/*/*/*/*/) dot_dots=../../../;;
/*/*/*/) dot_dots=../../;;
/*/*/) dot_dots=../;;
esac;;
esac
echo "$0: ln -fs $dot_dots$src $dst" &&
ln -fs "$dot_dots$src" "$dst"
}
fi
}
}
cp_mark_as_generated()
{
cp_src=$1
cp_dst=$2
if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
symlink_to_gnulib "$cp_dst"
else
case $cp_dst in
*.[ch]) c1='/* '; c2=' */';;
*.texi) c1='@c '; c2= ;;
*.m4|*/Make*|Make*) c1='# ' ; c2= ;;
*) c1= ; c2= ;;
esac
if test -z "$c1"; then
cmp -s "$cp_src" "$cp_dst" || {
echo "$0: cp -f $cp_src $cp_dst" &&
cp -f "$cp_src" "$cp_dst"
}
else
# Copy the file first to get proper permissions if it
# doesn't already exist. Then overwrite the copy.
cp "$cp_src" "$cp_dst-t" &&
(
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
cat "$cp_src"
) > $cp_dst-t &&
if cmp -s "$cp_dst-t" "$cp_dst"; then
rm -f "$cp_dst-t"
else
echo "$0: cp $cp_src $cp_dst # with edits" &&
mv -f "$cp_dst-t" "$cp_dst"
fi
fi
fi
}
version_controlled_file() {
dir=$1
file=$2
found=no
if test -d CVS; then
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
elif test -d .git; then
git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
else
echo "$0: no version control for $dir/$file?" >&2
fi
test $found = yes
}
slurp() {
for dir in . `(cd $1 && find * -type d -print)`; do
copied=
sep=
for file in `ls $1/$dir`; do
test -d $1/$dir/$file && continue
for excluded_file in $excluded_files; do
test "$dir/$file" = "$excluded_file" && continue 2
done
if test $file = Makefile.am; then
copied=$copied${sep}gnulib.mk; sep=$nl
remove_intl='/^[^#].*\/intl/s/^/#/'
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || {
echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." &&
rm -f $dir/gnulib.mk &&
sed "$remove_intl" $1/$dir/$file >$dir/gnulib.mk
}
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
version_controlled_file $dir $file; then
echo "$0: $dir/$file overrides $1/$dir/$file"
else
copied=$copied$sep$file; sep=$nl
if test $file = gettext.m4; then
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
rm -f $dir/$file
sed '
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
AC_DEFUN([AM_INTL_SUBDIR], [
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
$a\
AC_DEFUN([gl_LOCK_EARLY], [])
' $1/$dir/$file >$dir/$file
else
cp_mark_as_generated $1/$dir/$file $dir/$file
fi
fi || exit
done
for dot_ig in .cvsignore .gitignore; do
ig=$dir/$dot_ig
if test -n "$copied" && test -f $ig; then
echo "$copied" | sort -u - $ig | cmp -s - $ig ||
echo "$copied" | sort -u - $ig -o $ig || exit
fi
done
done
}
# Create boot temporary directories to import from gnulib and gettext.
bt='.#bootmp'
bt2=${bt}2
rm -fr $bt $bt2 &&
mkdir $bt $bt2 || exit
# Import from gnulib.
gnulib_tool_options="\
--import\
--no-changelog\
--aux-dir $bt/build-aux\
--doc-base $bt/doc\
--lib lib$package\
--m4-base $bt/m4/\
--source-base $bt/lib/\
--tests-base $bt/tests\
--local-dir gl\
"
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
slurp $bt || exit
for file in $gnulib_files; do
symlink_to_gnulib $file || exit
done
# Import from gettext.
echo "$0: (cd $bt2; autopoint) ..."
cp configure.ac $bt2 &&
(cd $bt2 && autopoint && rm configure.ac) &&
slurp $bt2 $bt || exit
rm -fr $bt $bt2 || exit
# Reconfigure, getting other files.
for command in \
'aclocal --force -I m4' \
'autoconf --force' \
'autoheader --force' \
'automake --add-missing --copy --force-missing';
do
echo "$0: $command ..."
$command || exit
done
# Get some extra files from gnulib, overriding existing files.
for file in $gnulib_extra_files; do
case $file in
*/INSTALL) dst=INSTALL;;
*) dst=$file;;
esac
symlink_to_gnulib $file $dst || exit
done
# Create gettext configuration.
echo "$0: Creating po/Makevars from po/Makevars.template ..."
rm -f po/Makevars
sed '
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
/^XGETTEXT_OPTIONS *=/{
s/$/ \\/
a\
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
}
' po/Makevars.template >po/Makevars
if test -d runtime-po; then
# Similarly for runtime-po/Makevars, but not quite the same.
rm -f runtime-po/Makevars
sed '
/^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
/^subdir *=.*/s/=.*/= runtime-po/
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
/^XGETTEXT_OPTIONS *=/{
s/$/ \\/
a\
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
}
' <po/Makevars.template >runtime-po/Makevars
# Copy identical files from po to runtime-po.
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
fi
echo "$0: done. Now you can run './configure'."

94
bootstrap.conf Normal file
View File

@@ -0,0 +1,94 @@
# Bootstrap configuration.
# Copyright (C) 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# We don't need these modules, even though gnulib-tool mistakenly
# includes them because of gettext dependencies.
avoided_gnulib_modules='
--avoid=lock
--avoid=size_max
--avoid=xsize
'
# These modules are obsolete and can probably be removed soon,
# but leave them in for now to minimize changes.
obsolete_gnulib_modules='
atexit free memchr memcmp memcpy memmove memset rename
strcspn strtod strtol utime
'
# gnulib modules used by this package.
gnulib_modules="
$avoided_gnulib_modules
$obsolete_gnulib_modules
acl alloca argmatch assert backupfile base64 c-strtod
c-strtold calloc canon-host canonicalize chown cloexec
config-h configmake
closeout cycle-check d-ino d-type diacrit dirfd dirname dup2
error euidaccess exclude exitfail fcntl fcntl-safer fdl file-type
fileblocks filemode filenamecat fnmatch-gnu fopen-safer
fprintftime fsusage ftruncate fts getdate getgroups gethrxtime
getline getloadavg getndelim2 getopt getpagesize getpass-gnu
gettext gettime gettimeofday getugroups getusershell gnupload
group-member hard-locale hash hash-pjw host-os human idcache
inttostr inttypes isapipe
lchmod lchown lib-ignore linebuffer link-follow
long-options lstat malloc mbswidth md5 memcasecmp mempcpy
memrchr mkancesdirs mkdir mkdir-p mkstemp mktime modechange
mountlist obstack pathmax perl physmem posixtm posixver putenv
quote quotearg raise readlink readtokens readtokens0 readutmp
realloc regex rename-dest-slash rmdir rmdir-errno
root-dev-ino
rpmatch
safe-read same
save-cwd savedir savewd settime sha1 sig2str ssize_t stat-macros
stat-time stdbool stdlib-safer stpcpy strcase strftime
strpbrk strtoimax strtoumax strverscmp sys_stat timespec tzset
unicodeio unistd-safer unlink-busy unlinkdir unlocked-io
uptime userspec utimecmp utimens vasprintf verify version-etc-fsf
wcwidth winsz-ioctl winsz-termios xalloc xgetcwd xgethostname
xmemcoll xnanosleep xreadlink xstrtod xstrtoimax xstrtol
xstrtold xstrtoumax yesno
"
# Other locale categories that need message catalogs.
EXTRA_LOCALE_CATEGORIES=LC_TIME
# Additional xgettext options to use. Use "\\\newline" to break lines.
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
--from-code=UTF-8\\\
--flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
--flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
--flag=wrapf:1:c-format\\\
'
# Gettext supplies these files, but we don't need them since
# we don't have an intl subdirectory.
excluded_files='
m4/glibc2.m4
m4/intdiv0.m4
m4/lcmessage.m4
m4/lock.m4
m4/printf-posix.m4
m4/size_max.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/visibility.m4
m4/xsize.m4
'

12
build-aux/.cvsignore Normal file
View File

@@ -0,0 +1,12 @@
compile
config.guess
config.rpath
config.sub
depcomp
gnupload
install-sh
mdate-sh
missing
mkinstalldirs
texinfo.tex
ylwrap

11
build-aux/.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
compile
config.guess
config.rpath
config.sub
depcomp
gnupload
install-sh
mdate-sh
missing
texinfo.tex
ylwrap

View File

@@ -1,3 +1,83 @@
2006-10-14 Jim Meyering <jim@meyering.net>
* vc-list-files: Don't filter git-ls-files output through cut.
Add a comment about cvsu.
2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
* .cvsignore: New file.
2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
* compile, config.guess, config.rpath, config.sub, depcomp:
* install-sh, mdate-sh, missing, texinfo.tex:
Remove from CVS, since ../bootstrap generates them automatically.
2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
* ChangeLog: Add copyright notice.
* vc-list-files: Likewise.
* mkinstalldirs: Remove; no longer needed.
2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Update from gnulib.
2006-07-25 Jim Meyering <jim@meyering.net>
* vc-list-files: Handle git repositories, too.
2006-07-19 Jim Meyering <jim@meyering.net>
* vc-list-files: Command line args correspond to an "include"
list, not an exclude list.
2006-07-14 Jim Meyering <jim@meyering.net>
* vc-list-files: New file.
2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
* config.guess, config.sub, install-sh, texinfo.tex:
Update from gnulib.
2006-05-29 Jim Meyering <jim@meyering.net>
* config.guess, config.rpath, config.sub, install-sh:
* mkinstalldirs, texinfo.tex: Update from gnulib.
2006-02-14 Paul Eggert <eggert@cs.ucla.edu>
* install-sh: Update from gnulib.
2006-01-31 Jim Meyering <jim@meyering.net>
* config.guess, missing, texinfo.tex: Update from gnulib.
2006-01-10 Paul Eggert <eggert@cs.ucla.edu>
* config.guess, config.sub, depcomp, texinfo.tex: Sync from gnulib.
2005-12-13 Paul Eggert <eggert@cs.ucla.edu>
* config.guess: Sync from gnulib.
2005-12-07 Jim Meyering <jim@meyering.net>
* cvsu: New file.
2005-11-12 Jim Meyering <jim@meyering.net>
* config.guess, install-sh: Update from gnulib.
2005-10-23 Jim Meyering <jim@meyering.net>
* compile: New file, used to build sha* programs from md5sum.c.
2005-10-13 Jim Meyering <jim@meyering.net>
* texinfo.tex: Sync from gnulib.
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
* install-sh, config.guess: Sync from gnulib.
@@ -135,3 +215,13 @@
* config.guess (main): Don't use `head -1'; it's no longer portable.
Use `sed 1q' instead.
-----
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
and this notice are preserved.

1465
build-aux/config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,571 +0,0 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2005 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
kfreebsd*-gnu)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
;;
knetbsd*-gnu)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx*)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

1579
build-aux/config.sub vendored

File diff suppressed because it is too large Load Diff

514
build-aux/cvsu Executable file
View File

@@ -0,0 +1,514 @@
#! /usr/bin/perl -w
# cvsu - do a quick check to see what files are out of date.
#
# Copyright (C) 2000-2005 Pavel Roskin <proski@gnu.org>
# Initially written by Tom Tromey <tromey@cygnus.com>
# Completely rewritten by Pavel Roskin <proski@gnu.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
require 5.004;
use Getopt::Long;
use File::Basename;
use Time::Local;
use strict;
use vars qw($list_types %messages %options @batch_list $batch_cmd
$no_recurse $explain_type $find_mode $short_print
$no_cvsignore $nolinks $file $single_filename $curr_dir
@common_ignores $ignore_rx %entries %subdirs %removed);
use constant SUBDIR_FOUND => 1;
use constant SUBDIR_CVS => 2;
# This list comes from the CVS manual.
use constant STANDARD_IGNORES =>
('RCS', 'SCCS', 'CVS', 'CVS.adm', 'RCSLOG', 'cvslog.*', 'tags',
'TAGS', '.make.state', '.nse_depinfo', '*~', '#*', '.#*', ',*',
"_\$*", "*\$", '*.old', '*.bak', '*.BAK', '*.orig', '*.rej',
'.del-*', '*.a', '*.olb', '*.o', '*.obj', '*.so', '*.exe',
'*.Z', '*.elc', '*.ln', 'core');
# 3-letter month names in POSIX locale, for fast date decoding
my %months = (
"Jan" => 0,
"Feb" => 1,
"Mar" => 2,
"Apr" => 3,
"May" => 4,
"Jun" => 5,
"Jul" => 6,
"Aug" => 7,
"Sep" => 8,
"Oct" => 9,
"Nov" => 10,
"Dec" => 11
);
# print usage information and exit
sub usage ()
{
print "Usage:\n" .
" cvsu [OPTIONS] [FILE] ...\n" .
"Options:\n" .
" --local Disable recursion\n" .
" --explain Verbosely print status of files\n" .
" --find Emulate find - filenames only\n" .
" --short Don't print paths\n" .
" --ignore Don't read .cvsignore\n" .
" --messages List known file types and long messages\n" .
" --nolinks Disable recognizing hard and soft links\n" .
" --types=[^]LIST Print only file types [not] from LIST\n" .
" --batch=COMMAND Execute this command on files\n" .
" --help Print this usage information\n" .
" --version Print version number\n" .
"Abbreviations and short options are supported\n";
exit 0;
}
# print version information and exit
sub version ()
{
print "cvsu - CVS offline examiner, version 0.2.3\n";
exit 0;
}
# If types begin with '^', make inversion
sub adjust_types ()
{
if ($list_types =~ m{^\^(.*)$}) {
$list_types = "";
foreach (keys %messages) {
$list_types .= $_
if (index ($1, $_) < 0);
}
}
}
# list known messages and exit
sub list_messages ()
{
my $default_mark;
print "Recognizable file types are:\n";
foreach (sort keys %messages) {
if (index($list_types, $_) >= 0) {
$default_mark = "*";
} else {
$default_mark = " ";
}
print " $default_mark $_ $messages{$_}\n";
}
print "* indicates file types listed by default\n";
exit 0;
}
# Initialize @common_ignores
# Also read $HOME/.cvsignore and append it to @common_ignores
sub init_ignores ()
{
my $HOME = $ENV{"HOME"};
push @common_ignores, STANDARD_IGNORES;
unless (defined($HOME)) {
return;
}
my $home_cvsignore = "${HOME}/.cvsignore";
if (-f "$home_cvsignore") {
unless (open (CVSIGNORE, "< $home_cvsignore")) {
error ("couldn't open $home_cvsignore: $!");
}
while (<CVSIGNORE>) {
push (@common_ignores, split);
}
close (CVSIGNORE);
}
my $CVSIGNOREENV = $ENV{"CVSIGNORE"};
unless (defined($CVSIGNOREENV)) {
return;
}
my @ignores_var = split (/ /, $CVSIGNOREENV);
push (@common_ignores, @ignores_var);
}
# Print message and exit (like "die", but without raising an exception).
# Newline is added at the end.
sub error ($)
{
print STDERR "cvsu: ERROR: " . shift(@_) . "\n";
exit 1;
}
# execute commands from @exec_list with $exec_cmd
sub do_batch ()
{
my @cmd_list = split (' ', $batch_cmd);
system (@cmd_list, @batch_list);
}
# print files status
# Parameter 1: status in one-letter representation
sub file_status ($)
{
my $type = shift (@_);
my $item;
my $pathfile;
return
if $ignore_rx ne '' && $type =~ /[?SLD]/ && $file =~ /$ignore_rx/;
return
if (index($list_types, $type) < 0);
$pathfile = $curr_dir . $file;
if (defined($batch_cmd)) {
push (@batch_list, $pathfile);
# 1000 items in the command line might be too much for HP-UX
if ($#batch_list > 1000) {
do_batch();
undef @batch_list;
}
}
if ($short_print) {
$item = $file;
} else {
$item = $pathfile;
}
if ($find_mode) {
print "$item\n";
} else {
$type = $messages{$type}
if ($explain_type);
print "$type $item\n";
}
}
# load entries from CVS/Entries and CVS/Entries.Log
# Parameter 1: file name for CVS/Entries
# Return: list of entries in the format used in CVS/Entries
sub load_entries ($);
sub load_entries ($)
{
my $entries_file = shift (@_);
my $entries_log_file = "$entries_file.Log";
my %ent = ();
unless (open (ENTRIES, "< $entries_file")) {
error ("couldn't open $entries_file: $!");
}
while (<ENTRIES>) {
chomp;
$ent{$_} = 1;
}
close (ENTRIES);
if (open (ENTRIES, "< $entries_log_file")) {
while (<ENTRIES>) {
chomp;
if ( m{^A (.+)} ) {
$ent{$1} = 1;
} elsif ( m{^R (.+)} ) {
delete $ent{$1};
} else {
# Note: "cvs commit" helps even when you are offline
error ("$entries_log_file:$.: unrecognizable line, " .
"try \"cvs commit\"");
}
}
close (ENTRIES);
}
return keys %ent;
}
# process one directory
# Parameter 1: directory name
sub process_arg ($);
sub process_arg ($)
{
my $arg = shift (@_);
my %found_files = ();
# $file, $curr_dir, and $ignore_rx must be seen in file_status
local $file = "";
local $ignore_rx = "";
local $single_filename = 0;
if ( $arg eq "" or -d $arg ) {
$curr_dir = $arg;
my $real_curr_dir = $curr_dir eq "" ? "." : $curr_dir;
error ("$real_curr_dir is not a directory")
unless ( -d $real_curr_dir );
# Scan present files.
file_status (".");
opendir (DIR, $real_curr_dir) ||
error ("couldn't open directory $real_curr_dir: $!");
foreach (readdir (DIR)) {
$found_files {$_} = 1;
}
closedir (DIR);
} else {
$single_filename = basename $arg;
$curr_dir = dirname $arg;
$found_files{$single_filename} = 1 if lstat $arg;
}
$curr_dir .= "/"
unless ( $curr_dir eq "" || $curr_dir =~ m{/$} );
# Scan CVS/Entries.
my %entries = ();
my %subdirs = ();
my %removed = ();
foreach ( load_entries ("${curr_dir}CVS/Entries") ) {
if ( m{^D/([^/]+)/} ) {
$subdirs{$1} = SUBDIR_FOUND if !$single_filename;
} elsif ( m{^/([^/]+)/([^/])[^/]*/([^/]*)/} ) {
if ( !$single_filename or $single_filename eq $1 ) {
$entries{$1} = $3;
$removed{$1} = 1
if $2 eq '-';
}
} elsif ( m{^D$} ) {
next;
} else {
error ("${curr_dir}CVS/Entries: unrecognizable line");
}
}
if ( $single_filename && !$entries{$single_filename} &&
!$found_files{$single_filename} ) {
error ("nothing known about $arg");
}
# Scan .cvsignore if any
unless ($no_cvsignore) {
my (@ignore_list) = ();
if (-f "${curr_dir}.cvsignore") {
open (CVSIGNORE, "< ${curr_dir}.cvsignore")
|| error ("couldn't open ${curr_dir}.cvsignore: $!");
while (<CVSIGNORE>) {
push (@ignore_list, split);
}
close (CVSIGNORE);
}
my ($iter);
foreach $iter (@ignore_list, @common_ignores) {
if ($iter eq '!') {
$ignore_rx = ''
} else {
if ($ignore_rx eq '') {
$ignore_rx = '^(';
} else {
$ignore_rx .= '|';
}
$ignore_rx .= glob_to_rx ($iter);
}
}
$ignore_rx .= ')$'
if $ignore_rx ne '';
}
# File is missing
foreach $file (sort keys %entries) {
unless ($found_files{$file}) {
if ($removed{$file}) {
file_status("R");
} else {
file_status("U");
}
}
}
foreach $file (sort keys %found_files) {
next if ($file eq '.' || $file eq '..');
lstat ($curr_dir . $file) ||
error ("lstat() failed on $curr_dir . $file");
if (! $nolinks && -l _) {
file_status ("L");
} elsif (-d _) {
if ($file eq 'CVS') {
file_status ("C");
} elsif ($subdirs{$file}) {
$subdirs{$file} = SUBDIR_CVS;
} else {
file_status ("D"); # Unknown directory
}
} elsif (! (-f _) && ! (-l _)) {
file_status ("S"); # This must be something very special
} elsif (! $nolinks && (stat _) [3] > 1 ) {
file_status ("H"); # Hard link
} elsif (! $entries{$file}) {
file_status ("?");
} elsif ($entries{$file} =~ /^Initial |^dummy /) {
file_status ("A");
} elsif ($entries{$file} =~ /^Result of merge/) {
file_status ("G");
} elsif ($entries{$file} !~
/^(...) (...) (..) (..):(..):(..) (....)$/) {
error ("Invalid timestamp for $curr_dir$file: $entries{$file}");
} else {
my $cvtime = timegm($6, $5, $4, $3, $months{$2}, $7 - 1900);
my $mtime = (stat _) [9];
if ($cvtime == $mtime) {
file_status ("F");
} elsif ($cvtime < $mtime) {
file_status ("M");
} else {
file_status ("O");
}
}
}
# Now do directories.
unless ($no_recurse) {
my $save_curr_dir = $curr_dir;
foreach $file (sort keys %subdirs) {
if ($subdirs{$file} == SUBDIR_FOUND) {
$curr_dir = $save_curr_dir;
file_status ("X");
} elsif ($subdirs{$file} == SUBDIR_CVS) {
process_arg ($save_curr_dir . $file)
}
}
}
}
# Turn a glob into a regexp without recognizing square brackets.
sub glob_to_rx_simple ($)
{
my ($expr) = @_;
# Quote all non-word characters, convert ? to . and * to .*
$expr =~ s/(\W)/\\$1/g;
$expr =~ s/\\\*/.*/g;
$expr =~ s/\\\?/./g;
return $expr;
}
# Turn a glob into a regexp
sub glob_to_rx ($)
{
my $result = '';
my ($expr) = @_;
# Find parts in square brackets and copy them literally
# Text outside brackets is processed by glob_to_rx_simple()
while ($expr ne '') {
if ($expr =~ /^(.*?)(\[.*?\])(.*)/) {
$expr = $3;
$result .= glob_to_rx_simple ($1) . $2;
} else {
$result .= glob_to_rx_simple ($expr);
last;
}
}
return $result;
}
sub Main ()
{
# types of files to be listed
$list_types = "^.FCL";
# long status messages
%messages = (
"?" => "Unlisted file",
"." => "Known directory",
"F" => "Up-to-date file",
"C" => "CVS admin directory",
"M" => "Modified file",
"S" => "Special file",
"D" => "Unlisted directory",
"L" => "Symbolic link",
"H" => "Hard link",
"U" => "Lost file",
"X" => "Lost directory",
"A" => "Newly added",
"O" => "Older copy",
"G" => "Result of merge",
"R" => "Removed file"
);
undef @batch_list; # List of files for batch processing
undef $batch_cmd; # Command to be executed on files
$no_recurse = 0; # If this is set, do only local files
$explain_type = 0; # Verbosely print status of files
$find_mode = 0; # Don't print status at all
$short_print = 0; # Print only filenames without path
$no_cvsignore = 0; # Ignore .cvsignore
$nolinks = 0; # Do not test for soft- or hard-links
my $want_msg = 0; # List possible filetypes and exit
my $want_help = 0; # Print help and exit
my $want_ver = 0; # Print version and exit
my %options = (
"types=s" => \$list_types,
"batch=s" => \$batch_cmd,
"local" => \$no_recurse,
"explain" => \$explain_type,
"find" => \$find_mode,
"short" => \$short_print,
"ignore" => \$no_cvsignore,
"messages" => \$want_msg,
"nolinks" => \$nolinks,
"help" => \$want_help,
"version" => \$want_ver
);
GetOptions(%options);
adjust_types();
list_messages() if $want_msg;
usage() if $want_help;
version() if $want_ver;
unless ($no_cvsignore) {
init_ignores();
}
if ($#ARGV < 0) {
@ARGV = ("");
}
foreach (@ARGV) {
process_arg ($_);
}
if ($#batch_list >= 0) {
do_batch();
}
}
Main();

View File

@@ -1,530 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,401 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-09-13.16
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_glob=
posix_mkdir=
# Symbolic mode for testing mkdir with directories.
# It is the same as 755, but also tests that "u+" works.
test_mode=u=rwx,g=rx,o=rx,u+wx
# Desired mode of installed file.
mode=0755
# Desired mode of newly created intermediate directories.
# It is empty if not known yet.
intermediate_mode=
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
posix_mkdir=false
if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
posix_mkdir=true
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
fi ;;
esac
if
$posix_mkdir && {
# With -d, create the new directory with the user-specified mode.
# Otherwise, create it using the same intermediate mode that
# mkdir -p would use when creating intermediate directories.
# POSIX says that this mode is "$(umask -S),u+wx", so use that
# if umask -S works.
if test -n "$dir_arg"; then
mkdir_mode=$mode
else
case $intermediate_mode in
'')
if umask_S=`(umask -S) 2>/dev/null`; then
intermediate_mode=$umask_S,u+wx
else
intermediate_mode=$test_mode
fi ;;
esac
mkdir_mode=$intermediate_mode
fi
$mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
}
then :
else
# mkdir does not conform to POSIX, or it failed possibly due to
# a race condition. Create the directory the slow way, step by
# step, checking for races as we go.
case $dstdir in
/*) pathcomp=/ ;;
-*) pathcomp=./ ;;
*) pathcomp= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS
IFS=/
$posix_glob && set -f
set fnord $dstdir
shift
$posix_glob && set +f
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# Don't fail if two instances are running concurrently.
test -d "$pathcomp" || exit 1
fi
pathcomp=$pathcomp/
done
obsolete_mkdir_used=true
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
} || exit 1
trap - 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,201 +0,0 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
scriptversion=2005-06-29.22
# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software
# Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: mdate-sh [--help] [--version] FILE
Pretty-print the modification time of FILE.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "mdate-sh $scriptversion"
exit $?
;;
esac
# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME
# GNU ls changes its time format in response to the TIME_STYLE
# variable. Since we cannot assume `unset' works, revert this
# variable to its documented default.
if test "${TIME_STYLE+set}" = set; then
TIME_STYLE=posix-long-iso
export TIME_STYLE
fi
save_arg1=$1
# Find out how to get the extended ls output of a file or directory.
if ls -L /dev/null 1>/dev/null 2>&1; then
ls_command='ls -L -l -d'
else
ls_command='ls -l -d'
fi
# A `ls -l' line looks as follows on OS/2.
# drwxrwx--- 0 Aug 11 2001 foo
# This differs from Unix, which adds ownership information.
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
#
# To find the date, we split the line on spaces and iterate on words
# until we find a month. This cannot work with files whose owner is a
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
# will be owned by a user whose name is a month. So we first look at
# the extended ls output of the root directory to decide how many
# words should be skipped to get the date.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
set x`ls -l -d /`
# Find which argument is the month.
month=
command=
until test $month
do
shift
# Add another shift to the command.
command="$command shift;"
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
done
# Get the extended ls output of the file or directory.
set dummy x`eval "$ls_command \"\$save_arg1\""`
# Remove all preceding arguments
eval $command
# Because of the dummy argument above, month is in $2.
#
# On a POSIX system, we should have
#
# $# = 5
# $1 = file size
# $2 = month
# $3 = day
# $4 = year or time
# $5 = filename
#
# On Darwin 7.7.0 and 7.6.0, we have
#
# $# = 4
# $1 = day
# $2 = month
# $3 = year or time
# $4 = filename
# Get the month.
case $2 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
case $3 in
???*) day=$1;;
*) day=$3; shift;;
esac
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
*:*) set `date`; eval year=\$$#
case $2 in
Jan) nummonthtod=1;;
Feb) nummonthtod=2;;
Mar) nummonthtod=3;;
Apr) nummonthtod=4;;
May) nummonthtod=5;;
Jun) nummonthtod=6;;
Jul) nummonthtod=7;;
Aug) nummonthtod=8;;
Sep) nummonthtod=9;;
Oct) nummonthtod=10;;
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for files modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr $year - 1`
fi;;
*) year=$3;;
esac
# The result.
echo $day $month $year
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,360 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,158 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File diff suppressed because it is too large Load Diff

60
build-aux/vc-list-files Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
# List the specified version-controlled files.
# Copyright (C) 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# List the specified version-controlled files.
# With no argument, list them all.
# This script must be run solely from the top of a $srcdir build directory.
# If there's an argument, it must be a single, "."-relative directory name,
# with no trailing slashes. In mercurial mode, it's used as part of a
# "grep" pattern (prepend "^", append "/"), and in cvs mode, it's simply
# used as an argument to the cvsu script.
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
include_prefix=
case $# in
0) ;;
1) include_prefix=$1 ;;
*) echo "$0: too many arguments" 1>&2; exit 1 ;;
esac
if test -d .git; then
if test "x$include_prefix" = x; then
git-ls-files
else
git-ls-files | grep "^$include_prefix/"
fi
elif test -d .hg; then
if test "x$include_prefix" = x; then
hg manifest | cut -d ' ' -f 3
else
hg manifest | cut -d ' ' -f 3 | grep "^$include_prefix/"
fi
elif test -x build-aux/cvsu; then
build-aux/cvsu --find --types=AFGM $include_prefix
else
awk -F/ '{ \
if (!$1 && $3 !~ /^-/) { \
f=FILENAME; \
sub(/CVS\/Entries/, "", f); \
print f $2; \
}}' \
$(find ${*-*} -name Entries -print) /dev/null;
fi

1740
config.hin

File diff suppressed because it is too large Load Diff

55398
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +1,43 @@
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
# -*- autoconf -*-
# Process this file with autoconf to produce a configure script.
dnl Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2005,
dnl 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1991, 1993-2006 Free Software Foundation, Inc.
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software Foundation,
dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
dnl Written by Jim Meyering.
AC_INIT([GNU coreutils],[5.90],[bug-coreutils@gnu.org])
AC_PREREQ(2.60)
AC_INIT([GNU coreutils],[6.5],[bug-coreutils@gnu.org])
AC_CONFIG_SRCDIR(src/ls.c)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_HEADERS([config.h:config.hin])
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
AB_INIT()
AM_INIT_AUTOMAKE([1.8.3 gnits dist-bzip2])
AM_INIT_AUTOMAKE([1.9.6 gnits dist-bzip2])
gl_DEFAULT_POSIX2_VERSION
gl_USE_SYSTEM_EXTENSIONS
gl_PERL
AC_PROG_CC
AC_PROG_CC_STDC
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB
AC_PROG_LN_S
gl_EARLY
gl_INIT
coreutils_MACROS
AC_CHECK_FUNCS(uname,
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uname\$(EXEEXT)"
@@ -48,8 +49,6 @@ AC_CHECK_FUNCS(gethostid,
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS hostid\$(EXEEXT)"
MAN="$MAN hostid.1")
gl_MACROS
gl_WINSIZE_IN_PTEM
AC_MSG_CHECKING(whether localtime caches TZ)
@@ -60,14 +59,14 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
# include <stdlib.h>
#endif
extern char **environ;
unset_TZ ()
void unset_TZ (void)
{
char **from, **to;
for (to = from = environ; (*to = *from); from++)
if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
to++;
}
main()
int main()
{
time_t now = time ((time_t *) 0);
int hour_GMT0, hour_unset;
@@ -148,7 +147,7 @@ coreutils_DUMMY_1
AC_MSG_CHECKING(ut_host in struct utmp)
AC_CACHE_VAL(su_cv_func_ut_host_in_utmp,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],
#include <utmp.h>]], [[struct utmp ut; return !sizeof ut.ut_host;]])],
[su_cv_func_ut_host_in_utmp=yes],
[su_cv_func_ut_host_in_utmp=no])])
AC_MSG_RESULT($su_cv_func_ut_host_in_utmp)
@@ -161,7 +160,7 @@ if test -z "$have_ut_host"; then
AC_MSG_CHECKING(ut_host in struct utmpx)
AC_CACHE_VAL(su_cv_func_ut_host_in_utmpx,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <utmpx.h>]], [[struct utmpx ut; ut.ut_host;]])],
#include <utmpx.h>]], [[struct utmpx ut; return !sizeof ut.ut_host;]])],
[su_cv_func_ut_host_in_utmpx=yes],
[su_cv_func_ut_host_in_utmpx=no])])
AC_MSG_RESULT($su_cv_func_ut_host_in_utmpx)
@@ -203,7 +202,7 @@ yes
#define _XOPEN_SOURCE
#endif
#include <sys/types.h>
#include <termios.h>]], [[struct termios t; t.c_line;]])],
#include <termios.h>]], [[struct termios t; return !sizeof t.c_line;]])],
[su_cv_sys_c_line_in_termios=yes],
[su_cv_sys_c_line_in_termios=no])])
AC_MSG_RESULT($su_cv_sys_c_line_in_termios)
@@ -248,8 +247,8 @@ AC_CHECK_DECLS([strtoimax, strtoumax])
cu_LIB_CHECK
AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION(0.13.1)
AM_GNU_GETTEXT([external], [need-formatstring-macros])
AM_GNU_GETTEXT_VERSION([0.15])
AC_CONFIG_FILES(
Makefile
@@ -259,7 +258,6 @@ AC_CONFIG_FILES(
po/Makefile.in
src/Makefile
tests/Makefile
tests/basename/Makefile
tests/chgrp/Makefile
tests/chmod/Makefile
tests/chown/Makefile

View File

@@ -1,20 +1,25 @@
Makefile
Makefile.in
coreutils.aux
coreutils.cm
coreutils.cp
coreutils.cps
coreutils.dvi
coreutils.fl
coreutils.fn
coreutils.info
coreutils.html
coreutils.info*
coreutils.ky
coreutils.log
coreutils.op
coreutils.pdf
coreutils.pg
coreutils.ps
coreutils.tmp
coreutils.toc
coreutils.tp
coreutils.tps
coreutils.vr
fdl.texi
getdate.texi
stamp-vti
version.texi
coreutils.tmp

5
doc/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
coreutils.info
fdl.texi
getdate.texi
stamp-vti
version.texi

View File

@@ -1,3 +1,411 @@
2006-10-27 Jim Meyering <jim@meyering.net>
* coreutils.texi (wc invocation): When giving the order in which
the various "counts" are listed, also mention "maximum line length".
Prompted by a report from Vincent LeFevre.
2006-10-23 Jim Meyering <jim@meyering.net>
* coreutils.texi (rm invocation): Describe --one-file-system.
2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (groups invocation): "groups" no longer prefixes
the output with "user :" unless more than one user is specified.
2006-09-19 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (cp invocation): Say that -i and -f are
independent. Clarify -i's behavior.
(Disk usage): Clarify intro. Problem reported by Van Ly.
2006-09-08 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (tail invocation): Ignore -f when standard input
is a FIFO, too.
2006-09-02 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (Treating / specially): --preserve-root is
now the default for rm.
(rm invocation): Likewise. Also, document that you can't
remove `.' or `..'. Use the POSIX term "root directory"
rather than the more-ambiguous "file system root".
2006-08-22 Paul Eggert <eggert@cs.ucla.edu>
* .cvsignore: Add Makefile.in, coreutils.html, coreutils.pdf,
coreutils.ps, coreutils.tps. Remove coreutils.cm (dunno what it
is, but the makefile doesn't mention it). Remove coreutils.info
as it is subsumed by coreutils.info*.
2006-08-22 Jim Meyering <jim@meyering.net>
* .cvsignore: Add files that are now generated by ../bootstrap.
2006-08-20 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in, fdl.texi, getdate.texi:
Remove from CVS, since ../bootstrap generates them automatically.
2006-08-17 Jim Meyering <jim@meyering.net>
* Makefile.am (EXTRA_DIST): Reflect doclicense.texi->fdl.texi renaming.
2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
* ChangeLog: Add copyright notice.
* Makefile.am: Likewise.
* getdate.texi: Likewise.
* perm.texi: Likewise.
* getdate.texi: Update to version 1.2 of the GNU FDL.
* coreutils.texi: Likewise.
(Copying This Manual): Renamed from GNU Free Documentation License.
Now an appendix. Include fdl.texi rather than doclicense.texi.
* fdl.tex: Renamed from doclicense.texi. Latest version from FSF.
* perm.texi: Add copyright notice.
2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (df invocation): df exits nonzero if it outputs
nothing.
2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (dd invocation): Warn about oflag=append without
conv=notrunc. See Debian bug 373736.
2006-08-08 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (shuf invocation, Random sources): New sections.
(Operating on sorted files): Add shuf.
(sort invocation, shred invocation): New option --random-source.
(sort invocation): Fix typo: -R -> -r.
2006-07-28 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (install invocation, mkdir invocation):
Add cross-references to Directory Setuid and Setgid.
(install-invocation): The default mode is no longer equivalent to 755.
* perm.texi (Changing Special Mode Bits): Clarify u+s versus
a+s versus +s, and likewise for g+s.
(Numeric Modes): Bring back example of 0055 == 55. 4755 no
longer clears setgid bit on directories.
(Directory Setuid and Setgid): Numeric modes now affect setuid
and setgid on directories only if they set these bits. This
is so that leading 0 has no effect on numeric modes.
2006-07-26 Jim Meyering <jim@meyering.net>
* coreutils.texi (What information is listed): Mention that missing
pieces of information are marked with "?". From Paul Eggert.
2006-07-25 Paul Eggert <eggert@cs.ucla.edu>
* perm.texi (Directory Setuid and Setgid): Explain that this is a
GNU extension, and that other systems behave differently here.
2006-07-22 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (What information is listed): Clarify that the
restricted deletion flag is another name for the sticky bit.
* perm.texi (Mode Structure): The restricted deletion flag
restricts only unprivileged users.
(Mode Structure, Symbolic Modes, Numeric Modes): Be more careful
about distinguishing file mode bits from permissions bits,
and about execute versus search permission. The FreeBSD command
is chflags, not chrflags.
2006-07-16 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi: Change GNU to @acronym{GNU} in a few places.
Use "set-user-ID" and "set-group-ID" a bit more consistently.
Use "appropriate privileges" rather than "super-user" a bit
more consistently.
(install invocation): Parent directories are now 755 without uid
or gid changing. The default mode is now 0755, not 755.
(mkdir invocation): Rewrite the top-level usage description, since
I couldn't easily follow the old one. It's now 3 lines not 8.
For -m, describe file permission bits versus other bits, and note
that mkdir is atomic if you don't mention special bits.
(chmod invocation): Mention what chmod does to setgid and setuid bits.
* perm.texi (Mode Structure): Modernize the explanation of the
setuid and setgid bits on directories.
(Changing Special Mode Bits): Mention that a implies both u and g
for s. Cross reference to new node.
(Numeric Modes): Don't claim that 0055 is the same as 55; this isn't
true any more. Mention new node.
4755 is now like u=rwxs,go=rx,g-s, not like u=rwxs,go=rx.
(Directory Setuid and Setgid): New node.
2006-07-08 Jim Meyering <jim@meyering.net>
* coreutils.texi (Squeezing): Separate doubled "the", so typo-checkers
don't complain.
* Makefile.am (check-texinfo): Enforce the zeros vs. zeroes consistency.
2006-07-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* coreutils.texi: Fix some typos. Use `zeros' consistently (both
`zeros' and `zeroes' are correct).
2006-07-01 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (tail invocation): With no operand, 'tail -f' now
silently ignores the '-f' only if standard input is a FIFO or pipe
and POSIXLY_CORRECT is set.
2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (seq invocation): seq now uses long double
internally rather than double. It now defaults to a minimal fixed
point format if possible. It lets you use %a, %A, %E, %F, %G.
Don't assume printf doesn't work for numbers that fit in 64 but
not 32 bits; typically they work these days. Improve discussion
of large integers and update the rounding-error numbers.
2006-06-28 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (sort invocation): 'sort +1 -2' is now supported
even when conforming to POSIX 1003.1-2001, since this is a pure
extension to POSIX.
2006-06-27 Jim Meyering <jim@meyering.net>
* coreutils.texi (wc invocation): Remove ./ prefix from example.
From Padraig Brady.
2006-06-26 Jim Meyering <jim@meyering.net>
* coreutils.texi (wc invocation): Spell out `--files0-from' in
the example. Suggestion from Bob Proulx.
* coreutils.texi (wc invocation): Document new --files0-from option.
2006-06-20 Eric Blake <ebb9@byu.net>
* coreutils.texi (sleep invocation): Document that accepting
multiple arguments and suffixes are extensions.
Reported by Dan Jacobson.
2006-06-12 Paul Eggert <eggert@cs.ucla.edu>
* Makefile.am (check-texinfo): Use $(_W) and $(W_) instead of
assuming grep -w (which is not portable).
2006-05-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am: Use `AM_MAKEINFOFLAGS' rather than
overwriting `MAKEINFO', so that `missing' can do its job.
* Makefile.am (check-texinfo): Use `$(EGREP)' instead of `grep -E'.
(check-texinfo): Use literal `{' only in brackets, i.e., [{] or [}],
to avoid triggering an error from Solaris 2.6's grep.
2006-05-25 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (sort invocation): Remove mention of --seed, since
it's going away.
2006-05-04 Eric Blake <ebb9@byu.net>
* coreutils.texi (Examples of date): Give example of @seconds.
2006-05-03 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (head invocation, tail invocation, sort invocation):
Give advice about porting to hosts that support only obsolete syntax.
Problem reported by Zack Weinberg.
2006-04-23 Francesco Montorsi <fr_m@hotmail.com>
* coreutils.texi (Which files are listed): Describe new option:
--group-directories-first.
2006-04-17 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (What information is listed): Add P for Solaris
10 ports. Add commented-out entries for other types that POSIX
says are possible, or that I observed in FreeBSD documentation.
2006-04-18 Jim Meyering <jim@meyering.net>
* coreutils.texi (Input processing in ptx): Remove mention of the
default --ignore file, /usr/local/lib/eign. That file has never
been used. Reported by Eric Blake.
2006-04-12 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (expr invocation): expr exit status is 3 only for
internal errors now; 2 is also for invalid values in expressions.
(What information is listed): Document 'ls' type letters.
Problem reported by Lincoln Martin.
2006-04-09 Ori Avtalion <oavtal@bezeqint.net>
* coreutils.texi (Top): Add 'hostid' to System context menu line.
(trivial change)
2006-03-22 Eric Blake <ebb9@byu.net>
* coreutils.texi (General options in ptx): Undocument --copyright.
2006-03-27 Eric Blake <ebb9@byu.net>
* coreutils.texi (dirname invocation): Macro in previous patch
was too broad.
2006-03-11 Eric Blake <ebb9@byu.net>
* coreutils.texi (basename invocation, dirname invocation):
Improve documentation to match recent // patches.
2006-03-23 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (nohup invocation): nohup now redirects stderr to
nohup.out if stdout is closed and stderr is a tty.
2006-03-05 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (dd invocation): New flags directory, nolinks.
Alphabetize nofollow.
2006-02-17 Simon Josefsson <jas@extundo.com>
* coreutils.texi: Add base64 section.
2006-02-20 Eric Blake <ebb9@byu.net>
* coreutils.texi (rm invocation): Fix typo in last patch.
(paste invocation): Fix whitespace.
2006-02-18 Eric Blake <ebb9@byu.net>
* coreutils.texi (rm invocation): Document new -I option, and new
--interactive behavior.
2006-02-12 Jim Meyering <jim@meyering.net>
* coreutils.texi (Character sets): Don't say that an unknown
backslash-escape causes an error message -- it doesn't.
Mention that `\' also removes any special significance, so
is useful for [, ], *, -. Prompted by Richard Neill in
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=14937
2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (od invocation): Warn that -t a ignores the high
order bit.
2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (tail invocation): In the obsolete usage, the
count is optional, so put square brackets around it.
2006-01-02 Paul Eggert <eggert@cs.ucla.edu>
* getdate.texi (General date syntax): Invalid dates are rejected.
(Time of day items): Mention the possibility of leap seconds.
Problem reported by Dr. David Alan Gilbert.
* coreutils.texi: Use @acronym around "ISO" uniformly.
(Date conversion specifiers): Explain %g, %G, and %V a bit better.
2006-01-02 Jim Meyering <jim@meyering.net>
* coreutils.texi (tail invocation): Say that --retry
is useful `mainly' (not `only') when following by name.
2006-01-01 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi, perm.texi: Clarify file mode bits versus
file permission bits.
* coreutils.texi (mkfifo invocation, mknod invocation): -m
affects only file permission bits.
2005-12-29 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (sort invocation): Clarify that a blank is a space
or a tab.
2005-12-15 Jim Meyering <jim@meyering.net>
* coreutils.texi (stat invocation) [--printf]: Describe new option.
[--format]: Add example. Distinguish from --printf.
Sort option descriptions.
2005-12-05 Andreas Gruenbacher <agruen@suse.de>
* coreutils.texi (ls): Clarify the Alternate Access Method description.
(cp): Clarify that --preserve=mode also preserves acls.
2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (sort invocation): Clarify explanation of
--random-sort, and use a simpler example.
2005-12-10 Frederik Eaton <frederik@ofb.net>
* coreutils.texi (sort invocation): Add --random-sort (-R) and --seed.
2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (dd invocation): New noatime flag.
2005-11-25 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (df invocation): Document treatment of dummy file
systems better.
2005-11-16 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (ln invocation): ln -v now outputs lines only for
successful links.
(tail invocation): Say that the obsolete form uses exactly one
option and at most one file.
2005-11-13 Jim Meyering <jim@meyering.net>
* perm.texi (Mode Structure): Capitalize two sentences in an
enumerated list and fix a typo. From Aaron Hawley.
2005-11-08 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (Formatting file timestamps): ls now defaults to
--time-style='locale', which in turn acts like
--time-style='posix-long-iso' if the locale settings are messed up.
2005-11-02 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (rm invocation): Don't mention --directory (-d).
2005-11-01 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (tail invocation): Describe obsolete usages
like "tail -2" more precisely.
(touch invocation): The old usage works only for 1969-1999 now.
2005-08-28 David Madore <david.madore@ens.fr>
* coreutils.texi: Document SHA-1 and SHA-2 utilities.
2005-10-15 Paul Eggert <eggert@cs.ucla.edu>
* doc/coreutils.texi (Top, General output formatting, dir invocation):
(vdir invocation): Don't document the old v and d commands.
2005-10-15 Jim Meyering <jim@meyering.net>
* coreutils.texi (du invocation): Document du's -m option,
now that we've decided to keep it.
(who invocation): Remove documentation for deprecated --idle (-i).
2005-10-13 Jim Meyering <jim@meyering.net>
* coreutils.texi: Avoid a few overfull/underfull hboxes.
2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (touch invocation):
@@ -1471,3 +1879,13 @@
(DISABLED_constants.texi): New rule -- disabled for now.
This directory is now shared by fileutils, textutils, and sh-utils.
-----
Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
and this notice are preserved.

View File

@@ -1,7 +1,26 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-
# Make coreutils documentation. -*-Makefile-*-
# Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
@@ -11,7 +30,7 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
# Otherwise, it would also generate files with names like <package>.info-[123],
# and those names all map to one 14-byte name (<package>.info-) on some crufty
# old systems.
MAKEINFO = makeinfo --no-split
AM_MAKEINFOFLAGS = --no-split
constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
@@ -30,7 +49,8 @@ W_ = ([^A-Za-z0-9_]|$$)
# List words/regexps here that should not appear in the texinfo documentation.
# E.g., use @sc{nul}, not `NUL'
# and use `time zone', not `timezone'.
# Use `time zone', not `timezone'.
# Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
check-texinfo:
fail=0; \
grep timezone $(srcdir)/*.texi && fail=1; \
@@ -40,14 +60,15 @@ check-texinfo:
$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
grep -n filename $(srcdir)/*.texi|grep -vE 'setfilename|{filename}' \
grep -n filename $(srcdir)/*.texi|$(EGREP) -v 'setfilename|[{]filename[}]' \
&& fail=1; \
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
grep -iwE 'builtins?' $(srcdir)/*.texi && fail=1; \
grep -iwE 'path(name)?s?' $(srcdir)/*.texi \
| grep -vE '@vindex PATH$$|@env{PATH}' && fail=1; \
$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && fail=1; \
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
| $(EGREP) -v '@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
exit $$fail
check: check-texinfo

View File

@@ -1,677 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/stamp-vti $(srcdir)/version.texi ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/autobuild.m4 \
$(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/basename.m4 \
$(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/boottime.m4 \
$(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/calloc.m4 \
$(top_srcdir)/m4/canon-host.m4 \
$(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/check-decl.m4 \
$(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \
$(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/closeout.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/cycle-check.m4 \
$(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
$(top_srcdir)/m4/diacrit.m4 $(top_srcdir)/m4/dirfd.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
$(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/euidaccess.m4 $(top_srcdir)/m4/exclude.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fd-reopen.m4 \
$(top_srcdir)/m4/file-type.m4 $(top_srcdir)/m4/fileblocks.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
$(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/fstypename.m4 \
$(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/ftruncate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
$(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/getugroups.m4 \
$(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/group-member.m4 \
$(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hash-pjw.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/host-os.m4 \
$(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/intmax_t.m4 \
$(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
$(top_srcdir)/m4/jm-macros.m4 $(top_srcdir)/m4/jm-winsz1.m4 \
$(top_srcdir)/m4/jm-winsz2.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/linebuffer.m4 $(top_srcdir)/m4/link-follow.m4 \
$(top_srcdir)/m4/localcharset.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
$(top_srcdir)/m4/memcmp.m4 $(top_srcdir)/m4/memcoll.m4 \
$(top_srcdir)/m4/memcpy.m4 $(top_srcdir)/m4/memmove.m4 \
$(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
$(top_srcdir)/m4/memset.m4 $(top_srcdir)/m4/mkdir-p.m4 \
$(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \
$(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nanosleep.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/obstack.m4 \
$(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/openat.m4 \
$(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \
$(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/posixtm.m4 $(top_srcdir)/m4/posixver.m4 \
$(top_srcdir)/m4/prereq.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
$(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/readtokens.m4 $(top_srcdir)/m4/readutmp.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/rmdir-errno.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/root-dev-ino.m4 \
$(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/safe-read.m4 \
$(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/same.m4 \
$(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/settime.m4 \
$(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sig2str.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcspn.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strftime.m4 \
$(top_srcdir)/m4/stripslash.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \
$(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strstr.m4 \
$(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/strtoimax.m4 \
$(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
$(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/strverscmp.m4 \
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
$(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uint32_t.m4 \
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/uintptr_t.m4 \
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
$(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xfts.m4 \
$(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xnanosleep.m4 \
$(top_srcdir)/m4/xreadlink.m4 $(top_srcdir)/m4/xstrtod.m4 \
$(top_srcdir)/m4/xstrtoimax.m4 $(top_srcdir)/m4/xstrtol.m4 \
$(top_srcdir)/m4/xstrtoumax.m4 $(top_srcdir)/m4/yesno.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
INFO_DEPS = $(srcdir)/coreutils.info
TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
DVIS = coreutils.dvi
PDFS = coreutils.pdf
PSS = coreutils.ps
HTMLS = coreutils.html
TEXINFOS = coreutils.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
am__installdirs = "$(DESTDIR)$(infodir)"
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EOVERFLOW = @EOVERFLOW@
EXEEXT = @EXEEXT@
FNMATCH_H = @FNMATCH_H@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
KMEM_GROUP = @KMEM_GROUP@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_GETHRXTIME = @LIB_GETHRXTIME@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
# The following is necessary if the package name is 8 characters or longer.
# If the info documentation would be split into 10 or more separate files,
# then this is necessary even if the package name is 7 characters long.
#
# Tell makeinfo to put everything in a single info file: <package>.info.
# Otherwise, it would also generate files with names like <package>.info-[123],
# and those names all map to one 14-byte name (<package>.info-) on some crufty
# old systems.
MAKEINFO = makeinfo --no-split
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
MAINTAINERCLEANFILES = constants.texi
# Extended regular expressions to match word starts and ends.
_W = (^|[^A-Za-z0-9_])
W_ = ([^A-Za-z0-9_]|$$)
all: all-am
.SUFFIXES:
.SUFFIXES: .dvi .html .info .pdf .ps .texi
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
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 && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
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; else :; fi; \
done; \
else :; fi && \
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" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
.texi.pdf:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2PDF) $<
.texi.html:
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
else \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
$(srcdir)/coreutils.info: coreutils.texi $(srcdir)/version.texi
coreutils.dvi: coreutils.texi $(srcdir)/version.texi
coreutils.pdf: coreutils.texi $(srcdir)/version.texi
coreutils.html: coreutils.texi $(srcdir)/version.texi
$(srcdir)/version.texi: $(srcdir)/stamp-vti
$(srcdir)/stamp-vti: coreutils.texi $(top_srcdir)/configure
@(dir=.; test -f ./coreutils.texi || dir=$(srcdir); \
set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/coreutils.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > vti.tmp
@cmp -s vti.tmp $(srcdir)/version.texi \
|| (echo "Updating $(srcdir)/version.texi"; \
cp vti.tmp $(srcdir)/version.texi)
-@rm -f vti.tmp
@cp $(srcdir)/version.texi $@
mostlyclean-vti:
-rm -f vti.tmp
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
uninstall-info-am:
@$(PRE_UNINSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
for file in $$d/$$base*; do \
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f $(distdir)/$$relfile || \
cp -p $$file $(distdir)/$$relfile; \
done; \
done
mostlyclean-aminfo:
-rm -rf coreutils.aux coreutils.cp coreutils.cps coreutils.fl coreutils.fn \
coreutils.ky coreutils.log coreutils.op coreutils.pg \
coreutils.tmp coreutils.toc coreutils.tp coreutils.tps \
coreutils.vr coreutils.dvi coreutils.pdf coreutils.ps \
coreutils.html
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-info
check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS)
installdirs:
for dir in "$(DESTDIR)$(infodir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am: $(DVIS)
html: html-am
html-am: $(HTMLS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am: install-info-am
install-exec-am:
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
done; \
else : ; fi
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
pdf: pdf-am
pdf-am: $(PDFS)
ps: ps-am
ps-am: $(PSS)
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic dist-info \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-data install-data-am \
install-exec install-exec-am install-info install-info-am \
install-man install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti mostlyclean \
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c > t-$@
mv t-$@ $@
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
# List words/regexps here that should not appear in the texinfo documentation.
# E.g., use @sc{nul}, not `NUL'
# and use `time zone', not `timezone'.
check-texinfo:
fail=0; \
grep timezone $(srcdir)/*.texi && fail=1; \
$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
grep non-zero $(srcdir)/*.texi && fail=1; \
grep '@url{' $(srcdir)/*.texi && fail=1; \
$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
grep -n filename $(srcdir)/*.texi|grep -vE 'setfilename|{filename}' \
&& fail=1; \
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
grep -iwE 'builtins?' $(srcdir)/*.texi && fail=1; \
grep -iwE 'path(name)?s?' $(srcdir)/*.texi \
| grep -vE '@vindex PATH$$|@env{PATH}' && fail=1; \
exit $$fail
check: check-texinfo
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

File diff suppressed because it is too large Load Diff

View File

@@ -1,395 +0,0 @@
@c -*-texinfo-*-
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@center Version 1.1, March 2000
@ifnottex
@menu
* How to use this License for your documents::
@end menu
@end ifnottex
@display
Copyright (C) 2000 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@iftex
@sp1
@end iftex
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
written document ``free'' in the sense of freedom: to assure everyone
the effective freedom to copy and redistribute it, with or without
modifying it, either commercially or noncommercially. Secondarily,
this License preserves for the author and publisher a way to get
credit for their work, while not being considered responsible for
modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@iftex
@sp1
@end iftex
@item
APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work that contains a
notice placed by the copyright holder saying it can be distributed
under the terms of this License. The ``Document'', below, refers to any
such manual or work. Any member of the public is a licensee, and is
addressed as ``you''.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A ``Secondary Section'' is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (For example, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup has been designed to thwart or discourage
subsequent modification by readers is not Transparent. A copy that is
not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
HTML designed for human modification. Opaque formats include
PostScript, PDF, proprietary formats that can be read and edited only
by proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
machine-generated HTML produced by some word processors for output
purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
@iftex
@sp1
@end iftex
@item
VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
@iftex
@sp1
@end iftex
@item
COPYING IN QUANTITY
If you publish printed copies of the Document numbering more than 100,
and the Document's license notice requires Cover Texts, you must enclose
the copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the
general network-using public has access to download anonymously at no
charge using public-standard network protocols. If you use the latter
option, you must take reasonably prudent steps, when you begin
distribution of Opaque copies in quantity, to ensure that this
Transparent copy will remain thus accessible at the stated location
until at least one year after the last time you distribute an Opaque
copy (directly or through your agents or retailers) of that edition to
the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
@iftex
@sp1
@end iftex
@item
MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.@*
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has less than five).@*
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.@*
D. Preserve all the copyright notices of the Document.@*
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.@*
F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.@*
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.@*
H. Include an unaltered copy of this License.@*
I. Preserve the section entitled ``History'', and its title, and add to
it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.@*
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.@*
K. In any section entitled ``Acknowledgements'' or ``Dedications'',
preserve the section's title, and preserve in the section all the
substance and tone of each of the contributor acknowledgements
and/or dedications given therein.@*
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.@*
M. Delete any section entitled ``Endorsements''. Such a section
may not be included in the Modified Version.@*
N. Do not retitle any existing section as ``Endorsements''
or to conflict in title with any Invariant Section.@*
@iftex
@sp1
@end iftex
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
@iftex
@sp1
@end iftex
@item
COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections entitled ``History''
in the various original documents, forming one section entitled
``History''; likewise combine any sections entitled ``Acknowledgements'',
and any sections entitled ``Dedications''. You must delete all sections
entitled ``Endorsements.''
@iftex
@sp1
@end iftex
@item
COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
@iftex
@sp1
@end iftex
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version
of the Document, provided no compilation copyright is claimed for the
compilation. Such a compilation is called an ``aggregate'', and this
License does not apply to the other self-contained works thus compiled
with the Document, on account of their being thus compiled, if they
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one quarter
of the entire aggregate, the Document's Cover Texts may be placed on
covers that surround only the Document within the aggregate.
Otherwise they must appear on covers around the whole aggregate.
@iftex
@sp1
@end iftex
@item
TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License provided that you also include the
original English version of this License. In case of a disagreement
between the translation and the original English version of this
License, the original English version will prevail.
@iftex
@sp1
@end iftex
@item
TERMINATION
You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
@iftex
@sp1
@end iftex
@item
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
@end enumerate
@node How to use this License for your documents
@unnumberedsec ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
@smallexample
@group
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the Invariant Sections being @var{list their titles}, with the
Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have no Invariant Sections, write ``with no Invariant Sections''
instead of saying which ones are invariant. If you have no
Front-Cover Texts, write ``no Front-Cover Texts'' instead of
``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.

View File

@@ -1,547 +0,0 @@
@c GNU date syntax documentation
@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@c 2003, 2004, 2005 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.1 or
@c any later version published by the Free Software Foundation; with no
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
@c Texts. A copy of the license is included in the ``GNU Free
@c Documentation License'' file as part of this distribution.
@node Date input formats
@chapter Date input formats
@cindex date input formats
@findex get_date
First, a quote:
@quotation
Our units of temporal measurement, from seconds on up to months, are so
complicated, asymmetrical and disjunctive so as to make coherent mental
reckoning in time all but impossible. Indeed, had some tyrannical god
contrived to enslave our minds to time, to make it all but impossible
for us to escape subjection to sodden routines and unpleasant surprises,
he could hardly have done better than handing down our present system.
It is like a set of trapezoidal building blocks, with no vertical or
horizontal surfaces, like a language in which the simplest thought
demands ornate constructions, useless particles and lengthy
circumlocutions. Unlike the more successful patterns of language and
science, which enable us to face experience boldly or at least
level-headedly, our system of temporal calculation silently and
persistently encourages our terror of time.
@dots{} It is as though architects had to measure length in feet, width
in meters and height in ells; as though basic instruction manuals
demanded a knowledge of five different languages. It is no wonder then
that we often look into our own immediate past or future, last Tuesday
or a week from Sunday, with feelings of helpless confusion. @dots{}
--- Robert Grudin, @cite{Time and the Art of Living}.
@end quotation
This section describes the textual date representations that @sc{gnu}
programs accept. These are the strings you, as a user, can supply as
arguments to the various programs. The C interface (via the
@code{get_date} function) is not described here.
@menu
* General date syntax:: Common rules.
* Calendar date items:: 19 Dec 1994.
* Time of day items:: 9:20pm.
* Time zone items:: @sc{est}, @sc{pdt}, @sc{gmt}.
* Day of week items:: Monday and others.
* Relative items in date strings:: next tuesday, 2 years ago.
* Pure numbers in date strings:: 19931219, 1440.
* Seconds since the Epoch:: @@1078100502.
* Specifying time zone rules:: TZ="America/New_York", TZ="UTC0".
* Authors of get_date:: Bellovin, Eggert, Salz, Berets, et al.
@end menu
@node General date syntax
@section General date syntax
@cindex general date syntax
@cindex items in date strings
A @dfn{date} is a string, possibly empty, containing many items
separated by whitespace. The whitespace may be omitted when no
ambiguity arises. The empty string means the beginning of today (i.e.,
midnight). Order of the items is immaterial. A date string may contain
many flavors of items:
@itemize @bullet
@item calendar date items
@item time of day items
@item time zone items
@item day of the week items
@item relative items
@item pure numbers.
@end itemize
@noindent We describe each of these item types in turn, below.
@cindex numbers, written-out
@cindex ordinal numbers
@findex first @r{in date strings}
@findex next @r{in date strings}
@findex last @r{in date strings}
A few ordinal numbers may be written out in words in some contexts. This is
most useful for specifying day of the week items or relative items (see
below). Among the most commonly used ordinal numbers, the word
@samp{last} stands for @math{-1}, @samp{this} stands for 0, and
@samp{first} and @samp{next} both stand for 1. Because the word
@samp{second} stands for the unit of time there is no way to write the
ordinal number 2, but for convenience @samp{third} stands for 3,
@samp{fourth} for 4, @samp{fifth} for 5,
@samp{sixth} for 6, @samp{seventh} for 7, @samp{eighth} for 8,
@samp{ninth} for 9, @samp{tenth} for 10, @samp{eleventh} for 11 and
@samp{twelfth} for 12.
@cindex months, written-out
When a month is written this way, it is still considered to be written
numerically, instead of being ``spelled in full''; this changes the
allowed strings.
@cindex language, in dates
In the current implementation, only English is supported for words and
abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
@cindex language, in dates
@cindex time zone item
The output of the @command{date} command
is not always acceptable as a date string,
not only because of the language problem, but also because there is no
standard meaning for time zone items like @samp{IST}. When using
@command{date} to generate a date string intended to be parsed later,
specify a date format that is independent of language and that does not
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
ways to do this:
@example
$ LC_ALL=C TZ=UTC0 date
Mon Mar 1 00:21:42 UTC 2004
$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
2004-03-01 00:21:42Z
$ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension.
2004-02-29 16:21:42,692722128-0800
$ date --rfc-2822 # a GNU extension
Sun, 29 Feb 2004 16:21:42 -0800
$ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension.
2004-02-29 16:21:42 -0800
$ date +'@@%s.%N' # %s and %N are GNU extensions.
@@1078100502.692722128
@end example
@cindex case, ignored in dates
@cindex comments, in dates
Alphabetic case is completely ignored in dates. Comments may be introduced
between round parentheses, as long as included parentheses are properly
nested. Hyphens not followed by a digit are currently ignored. Leading
zeros on numbers are ignored.
@node Calendar date items
@section Calendar date items
@cindex calendar date item
A @dfn{calendar date item} specifies a day of the year. It is
specified differently, depending on whether the month is specified
numerically or literally. All these strings specify the same calendar date:
@example
1972-09-24 # @sc{iso} 8601.
72-9-24 # Assume 19xx for 69 through 99,
# 20xx for 00 through 68.
72-09-24 # Leading zeros are ignored.
9/24/72 # Common U.S. writing.
24 September 1972
24 Sept 72 # September has a special abbreviation.
24 Sep 72 # Three-letter abbreviations always allowed.
Sep 24, 1972
24-sep-72
24sep72
@end example
The year can also be omitted. In this case, the last specified year is
used, or the current year if none. For example:
@example
9/24
sep 24
@end example
Here are the rules.
@cindex @sc{iso} 8601 date format
@cindex date format, @sc{iso} 8601
For numeric months, the @sc{iso} 8601 format
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
any positive number, @var{month} is a number between 01 and 12, and
@var{day} is a number between 01 and 31. A leading zero must be present
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
is added to it; otherwise, if @var{year} is less than 100,
then 1900 is added to it. The construct
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
@cindex month names in date strings
@cindex abbreviations for months
Literal months may be spelled out in full: @samp{January},
@samp{February}, @samp{March}, @samp{April}, @samp{May}, @samp{June},
@samp{July}, @samp{August}, @samp{September}, @samp{October},
@samp{November} or @samp{December}. Literal months may be abbreviated
to their first three letters, possibly followed by an abbreviating dot.
It is also permitted to write @samp{Sept} instead of @samp{September}.
When months are written literally, the calendar date may be given as any
of the following:
@example
@var{day} @var{month} @var{year}
@var{day} @var{month}
@var{month} @var{day} @var{year}
@var{day}-@var{month}-@var{year}
@end example
Or, omitting the year:
@example
@var{month} @var{day}
@end example
@node Time of day items
@section Time of day items
@cindex time of day item
A @dfn{time of day item} in date strings specifies the time on a given
day. Here are some examples, all of which represent the same time:
@example
20:02:00.000000
20:02
8:02pm
20:02-0500 # In @sc{est} (U.S. Eastern Standard Time).
@end example
More generally, the time of day may be given as
@samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is
a number between 0 and 23, @var{minute} is a number between 0 and
59, and @var{second} is a number between 0 and 59 possibly followed by
@samp{.} or @samp{,} and a fraction containing one or more digits.
Alternatively,
@samp{:@var{second}} can be omitted, in which case it is taken to
be zero.
@findex am @r{in date strings}
@findex pm @r{in date strings}
@findex midnight @r{in date strings}
@findex noon @r{in date strings}
If the time is followed by @samp{am} or @samp{pm} (or @samp{a.m.}
or @samp{p.m.}), @var{hour} is restricted to run from 1 to 12, and
@samp{:@var{minute}} may be omitted (taken to be zero). @samp{am}
indicates the first half of the day, @samp{pm} indicates the second
half of the day. In this notation, 12 is the predecessor of 1:
midnight is @samp{12am} while noon is @samp{12pm}.
(This is the zero-oriented interpretation of @samp{12am} and @samp{12pm},
as opposed to the old tradition derived from Latin
which uses @samp{12m} for noon and @samp{12pm} for midnight.)
@cindex time zone correction
@cindex minutes, time zone correction by
The time may alternatively be followed by a time zone correction,
expressed as @samp{@var{s}@var{hh}@var{mm}}, where @var{s} is @samp{+}
or @samp{-}, @var{hh} is a number of zone hours and @var{mm} is a number
of zone minutes. You can also separate @var{hh} from @var{mm} with a colon.
When a time zone correction is given this way, it
forces interpretation of the time relative to
Coordinated Universal Time (@sc{utc}), overriding any previous
specification for the time zone or the local time zone. For example,
@samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours
ahead of @sc{utc} (e.g., India). The @var{minute}
part of the time of day may not be elided when a time zone correction
is used. This is the best way to specify a time zone correction by
fractional parts of an hour.
Either @samp{am}/@samp{pm} or a time zone correction may be specified,
but not both.
@node Time zone items
@section Time zone items
@cindex time zone item
A @dfn{time zone item} specifies an international time zone, indicated
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
for Coordinated Universal
Time. Any included periods are ignored. By following a
non-daylight-saving time zone by the string @samp{DST} in a separate
word (that is, separated by some white space), the corresponding
daylight saving time zone may be specified.
Alternatively, a non-daylight-saving time zone can be followed by a
time zone correction, to add the two values. This is normally done
only for @samp{UTC}; for example, @samp{UTC+05:30} is equivalent to
@samp{+05:30}.
Time zone items other than @samp{UTC} and @samp{Z}
are obsolescent and are not recommended, because they
are ambiguous; for example, @samp{EST} has a different meaning in
Australia than in the United States. Instead, it's better to use
unambiguous numeric time zone corrections like @samp{-0500}, as
described in the previous section.
If neither a time zone item nor a time zone correction is supplied,
time stamps are interpreted using the rules of the default time zone
(@pxref{Specifying time zone rules}).
@node Day of week items
@section Day of week items
@cindex day of week item
The explicit mention of a day of the week will forward the date
(only if necessary) to reach that day of the week in the future.
Days of the week may be spelled out in full: @samp{Sunday},
@samp{Monday}, @samp{Tuesday}, @samp{Wednesday}, @samp{Thursday},
@samp{Friday} or @samp{Saturday}. Days may be abbreviated to their
first three letters, optionally followed by a period. The special
abbreviations @samp{Tues} for @samp{Tuesday}, @samp{Wednes} for
@samp{Wednesday} and @samp{Thur} or @samp{Thurs} for @samp{Thursday} are
also allowed.
@findex next @var{day}
@findex last @var{day}
A number may precede a day of the week item to move forward
supplementary weeks. It is best used in expression like @samp{third
monday}. In this context, @samp{last @var{day}} or @samp{next
@var{day}} is also acceptable; they move one week before or after
the day that @var{day} by itself would represent.
A comma following a day of the week item is ignored.
@node Relative items in date strings
@section Relative items in date strings
@cindex relative items in date strings
@cindex displacement of dates
@dfn{Relative items} adjust a date (or the current date if none) forward
or backward. The effects of relative items accumulate. Here are some
examples:
@example
1 year
1 year ago
3 years
2 days
@end example
@findex year @r{in date strings}
@findex month @r{in date strings}
@findex fortnight @r{in date strings}
@findex week @r{in date strings}
@findex day @r{in date strings}
@findex hour @r{in date strings}
@findex minute @r{in date strings}
The unit of time displacement may be selected by the string @samp{year}
or @samp{month} for moving by whole years or months. These are fuzzy
units, as years and months are not all of equal duration. More precise
units are @samp{fortnight} which is worth 14 days, @samp{week} worth 7
days, @samp{day} worth 24 hours, @samp{hour} worth 60 minutes,
@samp{minute} or @samp{min} worth 60 seconds, and @samp{second} or
@samp{sec} worth one second. An @samp{s} suffix on these units is
accepted and ignored.
@findex ago @r{in date strings}
The unit of time may be preceded by a multiplier, given as an optionally
signed number. Unsigned numbers are taken as positively signed. No
number at all implies 1 for a multiplier. Following a relative item by
the string @samp{ago} is equivalent to preceding the unit by a
multiplier with value @math{-1}.
@findex day @r{in date strings}
@findex tomorrow @r{in date strings}
@findex yesterday @r{in date strings}
The string @samp{tomorrow} is worth one day in the future (equivalent
to @samp{day}), the string @samp{yesterday} is worth
one day in the past (equivalent to @samp{day ago}).
@findex now @r{in date strings}
@findex today @r{in date strings}
@findex this @r{in date strings}
The strings @samp{now} or @samp{today} are relative items corresponding
to zero-valued time displacement, these strings come from the fact
a zero-valued time displacement represents the current time when not
otherwise changed by previous items. They may be used to stress other
items, like in @samp{12:00 today}. The string @samp{this} also has
the meaning of a zero-valued time displacement, but is preferred in
date strings like @samp{this thursday}.
When a relative item causes the resulting date to cross a boundary
where the clocks were adjusted, typically for daylight saving time,
the resulting date and time are adjusted accordingly.
The fuzz in units can cause problems with relative items. For
example, @samp{2003-07-31 -1 month} might evaluate to 2003-07-01,
because 2003-06-31 is an invalid date. To determine the previous
month more reliably, you can ask for the month before the 15th of the
current month. For example:
@example
$ date -R
Thu, 31 Jul 2003 13:02:39 -0700
$ date --date='-1 month' +'Last month was %B?'
Last month was July?
$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
Last month was June!
@end example
Also, take care when manipulating dates around clock changes such as
daylight saving leaps. In a few cases these have added or subtracted
as much as 24 hours from the clock, so it is often wise to adopt
universal time by setting the @env{TZ} environment variable to
@samp{UTC0} before embarking on calendrical calculations.
@node Pure numbers in date strings
@section Pure numbers in date strings
@cindex pure numbers in date strings
The precise interpretation of a pure decimal number depends
on the context in the date string.
If the decimal number is of the form @var{yyyy}@var{mm}@var{dd} and no
other calendar date item (@pxref{Calendar date items}) appears before it
in the date string, then @var{yyyy} is read as the year, @var{mm} as the
month number and @var{dd} as the day of the month, for the specified
calendar date.
If the decimal number is of the form @var{hh}@var{mm} and no other time
of day item appears before it in the date string, then @var{hh} is read
as the hour of the day and @var{mm} as the minute of the hour, for the
specified time of day. @var{mm} can also be omitted.
If both a calendar date and a time of day appear to the left of a number
in the date string, but no relative item, then the number overrides the
year.
@node Seconds since the Epoch
@section Seconds since the Epoch
If you precede a number with @samp{@@}, it represents an internal time
stamp as a count of seconds. The number can contain an internal
decimal point (either @samp{.} or @samp{,}); any excess precision not
supported by the internal representation is truncated toward minus
infinity. Such a number cannot be combined with any other date
item, as it specifies a complete time stamp.
@cindex beginning of time, for @acronym{POSIX}
@cindex epoch, for @acronym{POSIX}
Internally, computer times are represented as a count of seconds since
an epoch---a well-defined point of time. On @acronym{GNU} and
@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so
@samp{@@0} represents this time, @samp{@@1} represents 1970-01-01
00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other
@acronym{POSIX}-compliant systems support such times as an extension
to @acronym{POSIX}, using negative counts, so that @samp{@@-1}
represents 1969-12-31 23:59:59 @sc{utc}.
Traditional Unix systems count seconds with 32-bit two's-complement
integers and can represent times from 1901-12-13 20:45:52 through
2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts
of seconds with nanosecond subcounts, and can represent all the times
in the known lifetime of the universe to a resolution of 1 nanosecond.
On most systems, these counts ignore the presence of leap seconds.
For example, on most systems @samp{@@915148799} represents 1998-12-31
23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00
@sc{utc}, and there is no way to represent the intervening leap second
1998-12-31 23:59:60 @sc{utc}.
@node Specifying time zone rules
@section Specifying time zone rules
@vindex TZ
Normally, dates are interpreted using the rules of the current time
zone, which in turn are specified by the @env{TZ} environment
variable, or by a system default if @env{TZ} is not set. To specify a
different set of default time zone rules that apply just to one date,
start the date with a string of the form @samp{TZ="@var{rule}"}. The
two quote characters (@samp{"}) must be present in the date, and any
quotes or backslashes within @var{rule} must be escaped by a
backslash.
For example, with the @acronym{GNU} @command{date} command you can
answer the question ``What time is it in New York when a Paris clock
shows 6:30am on October 31, 2004?'' by using a date beginning with
@samp{TZ="Europe/Paris"} as shown in the following shell transcript:
@example
$ export TZ="America/New_York"
$ date --date='TZ="Europe/Paris" 2004-10-31 06:30'
Sun Oct 31 01:30:00 EDT 2004
@end example
In this example, the @option{--date} operand begins with its own
@env{TZ} setting, so the rest of that operand is processed according
to @samp{Europe/Paris} rules, treating the string @samp{2004-10-31
06:30} as if it were in Paris. However, since the output of the
@command{date} command is processed according to the overall time zone
rules, it uses New York time. (Paris was normally six hours ahead of
New York in 2004, but this example refers to a brief Halloween period
when the gap was five hours.)
A @env{TZ} value is a rule that typically names a location in the
@uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}.
A recent catalog of location names appears in the
@uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time
Gateway}. A few non-@acronym{GNU} hosts require a colon before a
location name in a @env{TZ} setting, e.g.,
@samp{TZ=":America/New_York"}.
The @samp{tz} database includes a wide variety of locations ranging
from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but
if you are at sea and have your own private time zone, or if you are
using a non-@acronym{GNU} host that does not support the @samp{tz}
database, you may need to use a @acronym{POSIX} rule instead. Simple
@acronym{POSIX} rules like @samp{UTC0} specify a time zone without
daylight saving time; other rules can specify simple daylight saving
regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ},
libc, The GNU C Library}.
@node Authors of get_date
@section Authors of @code{get_date}
@cindex authors of @code{get_date}
@cindex Bellovin, Steven M.
@cindex Salz, Rich
@cindex Berets, Jim
@cindex MacKenzie, David
@cindex Meyering, Jim
@cindex Eggert, Paul
@code{get_date} was originally implemented by Steven M. Bellovin
(@email{smb@@research.att.com}) while at the University of North Carolina
at Chapel Hill. The code was later tweaked by a couple of people on
Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various
revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
Paul Eggert and others.
@cindex Pinard, F.
@cindex Berry, K.
This chapter was originally produced by Fran@,{c}ois Pinard
(@email{pinard@@iro.umontreal.ca}) from the @file{getdate.y} source code,
and then edited by K.@: Berry (@email{kb@@cs.umb.edu}).

View File

@@ -1,16 +1,32 @@
Each file has a set of @dfn{permissions} that control the kinds of
access that users have to that file. The permissions for a file are
also called its @dfn{access mode}. They can be represented either in
@c File mode bits
@c Copyright (C) 1994, 1996, 1999, 2000, 2001, 2003, 2004, 2005, 2006
@c Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.2 or
@c any later version published by the Free Software Foundation; with no
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
@c Texts. A copy of the license is included in the ``GNU Free
@c Documentation License'' file as part of this distribution.
Each file has a set of @dfn{file mode bits} that control the kinds of
access that users have to that file. They can be represented either in
symbolic form or as an octal number.
@menu
* Mode Structure:: Structure of file permissions.
* Symbolic Modes:: Mnemonic permissions representation.
* Numeric Modes:: Permissions as octal numbers.
* Mode Structure:: Structure of file mode bits.
* Symbolic Modes:: Mnemonic representation of file mode bits.
* Numeric Modes:: File mode bits as octal numbers.
* Directory Setuid and Setgid:: Set-user-ID and set-group-ID on directories.
@end menu
@node Mode Structure
@section Structure of File Permissions
@section Structure of File Mode Bits
The file mode bits have two parts: the @dfn{file permission bits},
which control ordinary access to the file, and @dfn{special mode
bits}, which affect only some files.
There are three kinds of permissions that a user can have for a file:
@@ -24,7 +40,7 @@ list the contents of the directory.
permission to write to (change) the file. For directories, this means
permission to create and remove files in the directory.
@item
@cindex execute permission
@cindex execute/search permission
permission to execute the file (run it as a program). For directories,
this means permission to access files in the directory.
@end enumerate
@@ -50,58 +66,66 @@ file system the file is created on, and the way the file is created. You
can change the owner and group of a file by using the @command{chown} and
@command{chgrp} commands.
In addition to the three sets of three permissions listed above, a
file's permissions have three special components, which affect only
executable files (programs) and, on some systems, directories:
In addition to the three sets of three permissions listed above, the
file mode bits have three special components, which affect only
executable files (programs) and, on most systems, directories:
@enumerate
@item
@cindex set-user-ID
@cindex setuid
set the process's effective user ID to that of the file upon execution
(called the @dfn{setuid bit}). No effect on directories.
Set the process's effective user ID to that of the file upon execution
(called the @dfn{set-user-ID bit}, or sometimes the @dfn{setgid bit}).
For directories on a few systems, give files created in the directory
the same owner as the directory, no matter who creates them, and set
the set-user-ID bit of newly-created subdirectories.
@item
@cindex set-group-ID
@cindex setgid
set the process's effective group ID to that of the file upon execution
(called the @dfn{setgid bit}). For directories on some systems, put
files created in the directory into the same group as the directory, no
matter what group the user who creates them is in.
Set the process's effective group ID to that of the file upon execution
(called the @dfn{set-group-ID bit}, or sometimes the @dfn{setgid bit}).
For directories on most systems, give files created in the directory
the same group as the directory, no matter what group the user who
creates them is in, and set the set-group-ID bit of newly-created
subdirectories.
@item
@cindex sticky
@cindex swap space, saving text image in
@cindex text image, saving in swap space
@cindex restricted deletion flag
prevent users from removing or renaming a file in a directory
Prevent unprivileged users from removing or renaming a file in a directory
unless they own the file or the directory; this is called the
@dfn{restricted deletion flag} for the directory.
For regular files on some systems, save the program's text image on the
@dfn{restricted deletion flag} for the directory, and is commonly
found on world-writable directories like @file{/tmp}.
For regular files on some older systems, save the program's text image on the
swap device so it will load more quickly when run; this is called the
@dfn{sticky bit}.
@end enumerate
In addition to the permissions listed above, there may be file attributes
specific to the file system, e.g: access control lists (ACLs), whether a
file is compressed, whether a file can be modified (immutability), whether
In addition to the file mode bits listed above, there may be file attributes
specific to the file system, e.g., access control lists (ACLs), whether a
file is compressed, whether a file can be modified (immutability), and whether
a file can be dumped. These are usually set using programs
specific to the file system. For example:
@c should probably say a lot more about ACLs... someday
@table @asis
@item ext2
On @acronym{GNU} and @acronym{GNU}/Linux the file permissions
(``attributes'') specific to
On @acronym{GNU} and @acronym{GNU}/Linux the file attributes specific to
the ext2 file system are set using @command{chattr}.
@item FFS
On FreeBSD the file permissions (``flags'') specific to the FFS
file system are set using @command{chrflags}.
On FreeBSD the file flags specific to the FFS
file system are set using @command{chflags}.
@end table
Although a file's permission ``bits'' allow an operation on that file,
Even if a file's mode bits allow an operation on that file,
that operation may still fail, because:
@itemize
@item
the file-system-specific permissions do not permit it;
the file-system-specific attributes or flags do not permit it; or
@item
the file system is mounted as read-only.
@@ -115,9 +139,9 @@ may have just run @code{chmod a+w FILE}.
@section Symbolic Modes
@cindex symbolic modes
@dfn{Symbolic modes} represent changes to files' permissions as
@dfn{Symbolic modes} represent changes to files' mode bits as
operations on single-character symbols. They allow you to modify either
all or selected parts of files' permissions, optionally based on
all or selected parts of files' mode bits, optionally based on
their previous values, and perhaps on the current @code{umask} as well
(@pxref{Umask and Protection}).
@@ -137,7 +161,7 @@ symbolic modes.
@menu
* Setting Permissions:: Basic operations on permissions.
* Copying Permissions:: Copying existing permissions.
* Changing Special Permissions:: Special permissions.
* Changing Special Mode Bits:: Special mode bits.
* Conditional Executability:: Conditionally affecting executability.
* Multiple Changes:: Making multiple changes.
* Umask and Protection:: The effect of the umask.
@@ -148,7 +172,7 @@ symbolic modes.
The basic symbolic operations on a file's permissions are adding,
removing, and setting the permission that certain users have to read,
write, and execute the file. These operations have the following
write, and execute or search the file. These operations have the following
format:
@example
@@ -213,18 +237,19 @@ the permission the @var{users} have to read the file;
@cindex write permission, symbolic
the permission the @var{users} have to write to the file;
@item x
@cindex execute permission, symbolic
the permission the @var{users} have to execute the file.
@cindex execute/search permission, symbolic
the permission the @var{users} have to execute the file,
or search it if it is a directory.
@end table
For example, to give everyone permission to read and write a file,
For example, to give everyone permission to read and write a regular file,
but not to execute it, use:
@example
a=rw
@end example
To remove write permission for from all users other than the file's
To remove write permission for all users other than the file's
owner, use:
@example
@@ -275,38 +300,42 @@ it to mode 666 (@samp{rw-rw-rw-}). If the file had started out as mode
(@samp{rwxr--r-x}). The @samp{-} and @samp{=} operations work
analogously.
@node Changing Special Permissions
@subsection Changing Special Permissions
@node Changing Special Mode Bits
@subsection Changing Special Mode Bits
@cindex changing special permissions
In addition to changing a file's read, write, and execute permissions,
you can change its special permissions. @xref{Mode Structure}, for a
summary of these permissions.
@cindex changing special mode bits
In addition to changing a file's read, write, and execute/search permissions,
you can change its special mode bits. @xref{Mode Structure}, for a
summary of these special mode bits.
To change a file's permission to set the user ID on execution, use
To change the file mode bits to set the user ID on execution, use
@samp{u} in the @var{users} part of the symbolic mode and
@samp{s} in the @var{permissions} part.
To change a file's permission to set the group ID on execution, use
To change the file mode bits to set the group ID on execution, use
@samp{g} in the @var{users} part of the symbolic mode and
@samp{s} in the @var{permissions} part.
To change a file's permission to set the restricted deletion flag or sticky bit,
omit the @var{users} part of the symbolic mode (or use @samp{a}) and put
To set both user and group ID on execution, omit the @var{users} part
of the symbolic mode (or use @samp{a}) and use @samp{s} in the
@var{permissions} part.
To change the file mode bits to set the restricted deletion flag or sticky bit,
omit the @var{users} part of the symbolic mode (or use @samp{a}) and use
@samp{t} in the @var{permissions} part.
For example, to add set-user-ID permission to a program,
For example, to set the set-user-ID mode bit of a program,
you can use the mode:
@example
u+s
@end example
To remove both set-user-ID and set-group-ID permission from
To remove both set-user-ID and set-group-ID mode bits from
it, you can use the mode:
@example
ug-s
a-s
@end example
To set the restricted deletion flag or sticky bit, you can use
@@ -320,8 +349,8 @@ The combination @samp{o+s} has no effect. On @acronym{GNU} systems
the combinations @samp{u+t} and @samp{g+t} have no effect, and
@samp{o+t} acts like plain @samp{+t}.
The @samp{=} operator is not very useful with special permissions; for
example, the mode:
The @samp{=} operator is not very useful with special mode bits.
For example, the mode:
@example
o=t
@@ -329,15 +358,18 @@ o=t
@noindent
does set the restricted deletion flag or sticky bit, but it also
removes all read, write, and execute permissions that users not in the
removes all read, write, and execute/search permissions that users not in the
file's group might have had for it.
@xref{Directory Setuid and Setgid}, for additional rules concerning
set-user-ID and set-group-ID bits and directories.
@node Conditional Executability
@subsection Conditional Executability
@cindex conditional executability
There is one more special type of symbolic permission: if you use
@samp{X} instead of @samp{x}, execute permission is affected only if the
@samp{X} instead of @samp{x}, execute/search permission is affected only if the
file is a directory or already had execute permission.
For example, this mode:
@@ -356,7 +388,7 @@ anyone could execute them before.
@cindex multiple changes to permissions
The format of symbolic modes is actually more complex than described
above (@pxref{Setting Permissions}). It provides two ways to make
multiple changes to files' permissions.
multiple changes to files' mode bits.
The first way is to specify multiple @var{operation} and
@var{permissions} parts after a @var{users} part in the symbolic mode.
@@ -370,7 +402,7 @@ og+rX-w
@noindent
gives users other than the owner of the file read permission and, if
it is a directory or if someone already had execute permission
to it, gives them execute permission; and it also denies them write
to it, gives them execute/search permission; and it also denies them write
permission to the file. It does not affect the permission that the
owner of the file has for it. The above mode is equivalent to
the two modes:
@@ -396,7 +428,7 @@ u=rwx,g=rx,o=
@end example
@noindent
sets all of the non-special permissions for the file explicitly. (It
sets all of the permission bits for the file explicitly. (It
gives users who are not in the file's group no permission at all for
it.)
@@ -408,7 +440,7 @@ a+r,g+x-w
@noindent
gives all users permission to read the file, and gives users who are in
the file's group permission to execute it, as well, but not permission
the file's group permission to execute/search it as well, but not permission
to write to it. The above mode could be written in several different
ways; another is:
@@ -457,52 +489,116 @@ the file to all users.
@section Numeric Modes
@cindex numeric modes
@cindex file permissions, numeric
@cindex file mode bits, numeric
@cindex octal numbers for file modes
As an
alternative to giving a symbolic mode, you can give an octal (base 8)
number that represents the new mode.
number that represents the mode.
This number is always interpreted in octal; you do not have to add a
leading 0, as you do in C. Mode 0055 is the same as mode 55.
leading @samp{0}, as you do in C. Mode @samp{0055} is the same as
mode @samp{55}.
A numeric mode is usually shorter than the corresponding symbolic
mode, but it is limited in that it cannot take into account a file's
previous permissions; it can only set them absolutely.
mode, but it is limited in that normally it cannot take into account the
previous file mode bits; it can only set them absolutely.
(As discussed in the next section, the set-user-ID and set-group-ID
bits of directories are an exception to this general limitation.)
The permissions granted to the user,
to other users in the file's group,
and to other users not in the file's group each require three
bits, which are represented as one octal digit. The three special
permissions also require one bit each, and they are as a group
mode bits also require one bit each, and they are as a group
represented as another octal digit. Here is how the bits are arranged,
starting with the lowest valued bit:
@example
Value in Corresponding
Mode Permission
Mode Mode Bit
Other users not in the file's group:
1 Execute
1 Execute/search
2 Write
4 Read
Other users in the file's group:
10 Execute
10 Execute/search
20 Write
40 Read
The file's owner:
100 Execute
100 Execute/search
200 Write
400 Read
Special permissions:
Special mode bits:
1000 Restricted deletion flag or sticky bit
2000 Set group ID on execution
4000 Set user ID on execution
@end example
For example, numeric mode 4755 corresponds to symbolic mode
@samp{u=rwxs,go=rx}, and numeric mode 664 corresponds to symbolic mode
@samp{ug=rw,o=r}. Numeric mode 0 corresponds to symbolic mode
For example, numeric mode @samp{4755} corresponds to symbolic mode
@samp{u=rwxs,go=rx}, and numeric mode @samp{664} corresponds to symbolic mode
@samp{ug=rw,o=r}. Numeric mode @samp{0} corresponds to symbolic mode
@samp{a=}.
@node Directory Setuid and Setgid
@section Directories and the Set-User-ID and Set-Group-ID Bits
On most systems, if a directory's set-group-ID bit is set, newly
created subfiles inherit the same group as the directory, and newly
created subdirectories inherit the set-group-ID bit of the parent
directory. On a few systems, a directory's set-user-ID bit has a
similar effect on the ownership of new subfiles and the set-user-ID
bits of new subdirectories. These mechanisms let users share files
more easily, by lessening the need to use @command{chmod} or
@command{chown} to share new files.
These convenience mechanisms rely on the set-user-ID and set-group-ID
bits of directories. If commands like @command{chmod} and
@command{mkdir} routinely cleared these bits on directories, the
mechanisms would be less convenient and it would be harder to share
files. Therefore, a command like @command{chmod} does not affect the
set-user-ID or set-group-ID bits of a directory unless the user
specifically mentions them in a symbolic mode, or sets them in
a numeric mode. For example, on systems that support
set-group-ID inheritance:
@example
# These commands leave the set-user-ID and
# set-group-ID bits of the subdirectories alone,
# so that they retain their default values.
mkdir A B C
chmod 755 A
chmod 0755 B
chmod u=rwx,go=rx C
mkdir -m 755 D
mkdir -m 0755 E
mkdir -m u=rwx,go=rx F
@end example
If you want to try to set these bits, you must mention them
explicitly in the symbolic or numeric modes, e.g.:
@example
# These commands try to set the set-user-ID
# and set-group-ID bits of the subdirectories.
mkdir G H
chmod 6755 G
chmod u=rwx,go=rx,a+s H
mkdir -m 6755 I
mkdir -m u=rwx,go=rx,a+s J
@end example
If you want to try to clear these bits, you must mention them
explicitly in a symbolic mode, e.g.:
@example
# This command tries to clear the set-user-ID
# and set-group-ID bits of the directory D.
chmod a-s D
@end example
This behavior is a @acronym{GNU} extension. Portable scripts should
not rely on requests to set or clear these bits on directories, as
@acronym{POSIX} allows implementations to ignore these requests.

View File

@@ -1,5 +1,5 @@
/* root-dev-ino.c -- get the device and inode numbers for `/'.
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,12 +17,11 @@
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include "root-dev-ino.h"
#include <stdlib.h>
#include "root-dev-ino.h"
/* Call lstat to get the device and inode numbers for `/'.
Upon failure, return NULL. Otherwise, set the members of

View File

@@ -1,7 +1,26 @@
/* Root device and inode number checking.
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef ROOT_DEV_INO_H
# define ROOT_DEV_INO_H 1
# include "dev-ino.h"
# include "same-inode.h"
struct dev_ino *
get_root_dev_ino (struct dev_ino *root_d_i);

View File

@@ -1,12 +1,11 @@
#serial 1
dnl Copyright (C) 2005 Free Software Foundation, Inc.
#serial 3
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_ROOT_DEV_INO],
[
AC_LIBSOURCES([root-dev-ino.c, root-dev-ino.h, dev-ino.h])
AC_LIBOBJ([root-dev-ino])
dnl Prerequisites

View File

@@ -0,0 +1,16 @@
Index: modules/getloadavg
===================================================================
RCS file: /sources/gnulib/gnulib/modules/getloadavg,v
retrieving revision 1.13
diff -u -p -r1.13 getloadavg
--- modules/getloadavg 22 Sep 2006 12:47:55 -0000 1.13
+++ modules/getloadavg 23 Sep 2006 16:41:36 -0000
@@ -14,7 +14,7 @@ stdbool
fcntl-safer
configure.ac:
-gl_GETLOADAVG([$gl_source_base])
+gl_GETLOADAVG([lib])
Makefile.am:

25
gl/modules/root-dev-ino Normal file
View File

@@ -0,0 +1,25 @@
Description:
Root device and inode number checking.
Files:
lib/root-dev-ino.h
lib/root-dev-ino.c
m4/root-dev-ino.m4
Depends-on:
dev-ino
same-inode
configure.ac:
gl_ROOT_DEV_INO
Makefile.am:
Include:
"root-dev-ino.h"
License:
GPL
Maintainer:
Jim Meyering

166
gnupload
View File

@@ -1,166 +0,0 @@
#!/bin/sh
# Sign files and upload them.
scriptversion=2004-01-28.17
# Copyright (C) 2004 Free Software Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# Originally written by Alexandre Duret-Lutz <adl@gnu.org>.
set -e
GPG='/usr/bin/gpg --batch --no-tty'
to=
usage="Usage: $0 [OPTIONS]... FILES...
Sign all FILES, and upload them to selected destinations.
Options:
--help print this help text and exit
--to DEST specify one destination for FILES
(multiple --to options are allowed)
--user NAME sign with key NAME
--version output version information and exit
Recognized destinations are:
alpha.gnu.org:DIRECTORY build directive files and upload files by FTP
ftp.gnu.org:DIRECTORY build directive files and upload files by FTP
[user@]host:DIRECTORY upload files with scp
Example:
gnupload --to sources.redhat.com:~ftp/automake \\
--to alpha.gnu.org:automake \\
automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
Report bugs to <bug-automake@gnu.org>.
Send patches to <automake-patches@gnu.org>."
while test -n "$1"; do
case $1 in
--help)
echo "$usage"
exit 0
;;
--to)
if test -z "$2"; then
echo "$0: Missing argument for --to" 1>&2
exit 1
else
to="$to $2"
shift 2
fi
;;
--user)
if test -z "$2"; then
echo "$0: Missing argument for --user" 1>&2
exit 1
else
GPG="$GPG --local-user $2"
shift 2
fi
;;
--version)
echo "gnupload $scriptversion"
exit 0
;;
-*)
echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
exit 1
;;
*)
break
;;
esac
done
if test $# = 0; then
echo "$0: No file to upload" 1>&2
exit 1
else
:
fi
# Make sure all files exist. We don't want to ask
# for the passphrase if the script will fail.
for file;
do
if test ! -f $file; then
echo "$0: Cannot find \`$file'" 1>&2
exit 1
else
:
fi
done
# Make sure passphrase is not exported in the environment.
unset passphrase
# Reset PATH to be sure that echo is a built-in. We will later use
# `echo $passphrase' to output the passphrase, so it is important that
# it is a built-in (third-party programs tend to appear in `ps'
# listings with their arguments...).
# Remember this script runs with `set -e', so if echo is not built-in
# it will exit now.
PATH=/empty echo -n "Enter GPG passphrase: "
stty -echo
read -r passphrase
stty echo
echo
for file;
do
echo "Signing $file..."
rm -f $file.sig
echo $passphrase | $GPG --passphrase-fd 0 -ba -o $file.sig $file
done
for dest in $to;
do
for file;
do
echo "Uploading $file to $dest..."
files="$file $file.sig"
case $dest in
alpha.gnu.org:*)
rm -f $file.directive $file.directive.asc
echo directory: `echo $dest | sed 's/[^:]*://'` >$file.directive
echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
ncftpput ftp-upload.gnu.org /incoming/alpha $files $file.directive.asc
rm -f $file.directive $file.directive.asc
;;
ftp.gnu.org:*)
rm -f $file.directive $file.directive.asc
echo directory: `echo $dest | sed 's/[^:]*://'` >$file.directive
echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
ncftpput ftp-upload.gnu.org /incoming/ftp $files $file.directive.asc
rm -f $file.directive $file.directive.asc
;;
*)
scp $files $dest
;;
esac
done
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -1,43 +0,0 @@
alloca_.h
allocsa.h
error.h
exit.h
fnmatch_.h
fts.c
fts_.h
getaddrinfo.h
getdelim.h
getline.h
getndelim2.h
getopt.c
getopt.h
getopt1.c
getopt_.h
getopt_int.h
getpagesize.h
getpass.c
gettext.h
localcharset.h
mbchar.h
mbuiter.h
md5.h
obstack.h
printf-args.h
printf-parse.h
regcomp.c
regex.c
regex.h
regex_internal.c
regex_internal.h
stat-time.h
stdbool_.h
strcase.h
strdup.h
strndup.h
strnlen.h
strnlen1.h
strtoul.c
time_r.h
utimecmp.h
vasnprintf.h
vasprintf.h

View File

@@ -1,19 +1,378 @@
.deps
Makefile
Makefile.in
__fpending.c
__fpending.h
acl.c
acl.h
alloca.c
alloca.h
alloca_.h
allocsa.c
allocsa.h
allocsa.valgrind
argmatch.c
argmatch.h
asnprintf.c
asprintf.c
at-func.c
atexit.c
backupfile.c
backupfile.h
base64.c
base64.h
basename.c
c-strtod.c
c-strtod.h
c-strtold.c
calloc.c
canon-host.c
canon-host.h
canonicalize.c
canonicalize.h
charset.alias
chdir-long.c
chdir-long.h
chown.c
cloexec.c
cloexec.h
close-stream.c
close-stream.h
closeout.c
closeout.h
config.charset
config.h
config.hin
configmake.h
creat-safer.c
cycle-check.c
cycle-check.h
dev-ino.h
diacrit.c
diacrit.h
dirchownmod.c
dirchownmod.h
dirfd.c
dirfd.h
dirname.c
dirname.h
dup-safer.c
dup2.c
error.c
error.h
euidaccess.c
euidaccess.h
exclude.c
exclude.h
exit.h
exitfail.c
exitfail.h
fchmodat.c
fchown-stub.c
fcntl--.h
fcntl-safer.h
fcntl.h
fcntl_.h
fd-safer.c
file-type.c
file-type.h
fileblocks.c
filemode.c
filemode.h
filenamecat.c
filenamecat.h
fnmatch.c
fnmatch.h
fnmatch_.h
fnmatch_loop.c
fopen-safer.c
fprintftime.c
fprintftime.h
free.c
fsusage.c
fsusage.h
ftruncate.c
fts-cycle.c
fts.c
fts.h
fts_.h
full-read.c
full-read.h
full-write.c
full-write.h
gai_strerror.c
getaddrinfo.c
getaddrinfo.h
getcwd.c
getcwd.h
getdate.c
getdate.h
getdate.tab.c
getdate.tab.h
getdate.y
getdelim.c
getdelim.h
getgroups.c
gethostname.c
gethrxtime.c
gethrxtime.h
getline.c
getline.h
getloadavg.c
getndelim2.c
getndelim2.h
getopt.c
getopt.h
getopt1.c
getopt_.h
getopt_int.h
getpagesize.h
getpass.c
getpass.h
gettext.h
gettime.c
gettimeofday.c
getugroups.c
getusershell.c
gnulib.mk
group-member.c
group-member.h
hard-locale.c
hard-locale.h
hash-pjw.c
hash-pjw.h
hash.c
hash.h
human.c
human.h
i-ring.c
i-ring.h
idcache.c
imaxtostr.c
inet_ntop.c
inet_ntop.h
intprops.h
inttostr.c
inttostr.h
inttypes.h
inttypes_.h
isapipe.c
isapipe.h
lchmod.h
lchown.c
lchown.h
linebuffer.c
linebuffer.h
localcharset.c
localcharset.h
long-options.c
long-options.h
lstat.c
lstat.h
malloc.c
mbchar.c
mbchar.h
mbswidth.c
mbswidth.h
mbuiter.h
md5.c
md5.h
memcasecmp.c
memcasecmp.h
memchr.c
memcmp.c
memcoll.c
memcoll.h
memcpy.c
memmove.c
mempcpy.c
mempcpy.h
memrchr.c
memrchr.h
memset.c
mkancesdirs.c
mkancesdirs.h
mkdir-p.c
mkdir-p.h
mkdir.c
mkdirat.c
mkstemp-safer.c
mkstemp.c
mkstemp.h
mktime.c
modechange.c
modechange.h
mountlist.c
mountlist.h
nanosleep.c
obstack.c
obstack.h
offtostr.c
open-safer.c
openat-die.c
openat-priv.h
openat-proc.c
openat.c
openat.h
pathmax.h
physmem.c
physmem.h
pipe-safer.c
poll.h
posixtm.c
posixtm.h
posixver.c
posixver.h
printf-args.c
printf-args.h
printf-parse.h
putenv.c
quote.c
quote.h
quotearg.c
quotearg.h
raise.c
readlink.c
readtokens.c
readtokens.h
readtokens0.c
readtokens0.h
readutmp.c
readutmp.h
realloc.c
ref-add.sed
ref-add.sin
ref-del.sed
ref-del.sin
regcomp.c
regex.c
regex.h
regex_internal.c
regex_internal.h
regexec.c
rename-dest-slash.c
rename.c
rmdir.c
root-dev-ino.c
root-dev-ino.h
rpmatch.c
safe-read.c
safe-read.h
safe-write.c
safe-write.h
same-inode.h
same.c
same.h
save-cwd.c
save-cwd.h
savedir.c
savedir.h
savewd.c
savewd.h
search.h
stat.c
setenv.c
setenv.h
settime.c
sha1.c
sha1.h
sig2str.c
sig2str.h
snprintf.c
snprintf.h
socket_.h
stamp-h1
stat-macros.h
stat-time.h
stat_.h
stdbool.h
sysexit.h
stdbool_.h
stdint.h
stdint_.h
stdio--.h
stdio-safer.h
stdlib--.h
stdlib-safer.h
stpcpy.c
stpcpy.h
strcase.h
strcasecmp.c
strcspn.c
strdup.c
strdup.h
strftime.c
strftime.h
stripslash.c
strncasecmp.c
strndup.c
strndup.h
strnlen.c
strnlen.h
strnlen1.c
strnlen1.h
strpbrk.c
strpbrk.h
strtod.c
strtoimax.c
strtol.c
strtoll.c
strtoul.c
strtoull.c
strtoumax.c
strverscmp.c
strverscmp.h
t-fpending
tempname.c
tempname.h
time_r.c
time_r.h
timespec.h
uinttostr.c
umaxtostr.c
unicodeio.h
unistd--.h
unistd-safer.h
unlinkdir.c
unlinkdir.h
unlocked-io.h
unsetenv.c
userspec.c
userspec.h
utime.c
utimecmp.c
utimecmp.h
utimens.c
utimens.h
vasnprintf.h
vasprintf.c
vasprintf.h
verify.h
version-etc-fsf.c
version-etc.c
version-etc.h
wcwidth.h
xalloc-die.c
xalloc.h
xgetcwd.c
xgetcwd.h
xgethostname.c
xgethostname.h
xmalloc.c
xmemcoll.c
xmemcoll.h
xnanosleep.c
xnanosleep.h
xreadlink.c
xreadlink.h
xstrndup.c
xstrndup.h
xstrtod.c
xstrtod.h
xstrtoimax.c
xstrtol.c
xstrtol.h
xstrtold.c
xstrtoul.c
xstrtoumax.c
xtime.h
yesno.c
yesno.h

View File

@@ -1,3 +1,22 @@
# GDB history for debugging coreutils.
#
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
r 206.65.212.10
b main
r
@@ -9,7 +28,7 @@ p addr
p he->h_name
n
q
b canon_host
b canon_host
r 206.65.212.10
n
p he
@@ -103,7 +122,7 @@ p *old_vec@10
p *old_vec@13
b hash_insert_item
r
b hash_insert_item_at
b hash_insert_item_at
r
n
p fail
@@ -111,7 +130,7 @@ p *(ht->vec)@13
p *(ht->ht_vec)@13
p ((struct item*)(ht->ht_vec)[10])->key
b hash_delete_item
b hash_delete_item_at
b hash_delete_item_at
c
n
p slot
@@ -147,7 +166,7 @@ p *old_vec@13
p &dummy
q
r 444444444444 44444444444
b human_readable
b human_readable
r
n
q
@@ -166,7 +185,7 @@ p b
r 343434343 343434343
c
q
b posixtime
b posixtime
r
n
s
@@ -187,7 +206,7 @@ q
complete b user
complete b user
complete b pars
b parse_user_spec
b parse_user_spec
r a.b
n
n
@@ -291,7 +310,7 @@ p allocated
n 20
n
complete p alloca
p allocated
p allocated
p length
n
p maxlen
@@ -303,7 +322,7 @@ n
p result
q
complete b vasnp
b vasnprintf
b vasnprintf
r
n 30
n

365
lib/.gitignore vendored Normal file
View File

@@ -0,0 +1,365 @@
__fpending.c
__fpending.h
acl.c
acl.h
alloca.c
alloca.h
alloca_.h
allocsa.c
allocsa.h
allocsa.valgrind
argmatch.c
argmatch.h
asnprintf.c
asprintf.c
at-func.c
atexit.c
backupfile.c
backupfile.h
base64.c
base64.h
basename.c
c-strtod.c
c-strtod.h
c-strtold.c
calloc.c
canon-host.c
canon-host.h
canonicalize.c
canonicalize.h
charset.alias
chdir-long.c
chdir-long.h
chown.c
cloexec.c
cloexec.h
close-stream.c
close-stream.h
closeout.c
closeout.h
config.charset
configmake.h
creat-safer.c
cycle-check.c
cycle-check.h
dev-ino.h
diacrit.c
diacrit.h
dirchownmod.c
dirchownmod.h
dirfd.c
dirfd.h
dirname.c
dirname.h
dup-safer.c
dup2.c
error.c
error.h
euidaccess.c
euidaccess.h
exclude.c
exclude.h
exit.h
exitfail.c
exitfail.h
fchmodat.c
fchown-stub.c
fcntl--.h
fcntl-safer.h
fcntl.h
fcntl_.h
fd-safer.c
file-type.c
file-type.h
fileblocks.c
filemode.c
filemode.h
filenamecat.c
filenamecat.h
fnmatch.c
fnmatch_.h
fnmatch_loop.c
fopen-safer.c
fprintftime.c
fprintftime.h
free.c
fsusage.c
fsusage.h
ftruncate.c
fts-cycle.c
fts.c
fts_.h
full-read.c
full-read.h
full-write.c
full-write.h
gai_strerror.c
getaddrinfo.c
getaddrinfo.h
getcwd.c
getcwd.h
getdate.c
getdate.h
getdate.y
getdelim.c
getdelim.h
getgroups.c
gethostname.c
gethrxtime.c
gethrxtime.h
getline.c
getline.h
getloadavg.c
getndelim2.c
getndelim2.h
getopt.c
getopt1.c
getopt_.h
getopt_int.h
getpagesize.h
getpass.c
getpass.h
gettext.h
gettime.c
gettimeofday.c
getugroups.c
getusershell.c
gnulib.mk
group-member.c
group-member.h
hard-locale.c
hard-locale.h
hash-pjw.c
hash-pjw.h
hash.c
hash.h
human.c
human.h
i-ring.c
i-ring.h
idcache.c
imaxtostr.c
inet_ntop.c
inet_ntop.h
intprops.h
inttostr.c
inttostr.h
inttypes.h
inttypes_.h
isapipe.c
isapipe.h
lchmod.h
lchown.c
lchown.h
libcoreutils.a
linebuffer.c
linebuffer.h
localcharset.c
localcharset.h
long-options.c
long-options.h
lstat.c
lstat.h
malloc.c
mbchar.c
mbchar.h
mbswidth.c
mbswidth.h
mbuiter.h
md5.c
md5.h
memcasecmp.c
memcasecmp.h
memchr.c
memcmp.c
memcoll.c
memcoll.h
memcpy.c
memmove.c
mempcpy.c
mempcpy.h
memrchr.c
memrchr.h
memset.c
mkancesdirs.c
mkancesdirs.h
mkdir-p.c
mkdir-p.h
mkdir.c
mkdirat.c
mkstemp-safer.c
mkstemp.c
mkstemp.h
mktime.c
modechange.c
modechange.h
mountlist.c
mountlist.h
nanosleep.c
obstack.c
obstack.h
offtostr.c
open-safer.c
openat-die.c
openat-priv.h
openat-proc.c
openat.c
openat.h
pathmax.h
physmem.c
physmem.h
pipe-safer.c
posixtm.c
posixtm.h
posixver.c
posixver.h
printf-args.c
printf-args.h
printf-parse.h
putenv.c
quote.c
quote.h
quotearg.c
quotearg.h
raise.c
readlink.c
readtokens.c
readtokens.h
readtokens0.c
readtokens0.h
readutmp.c
readutmp.h
realloc.c
ref-add.sed
ref-add.sin
ref-del.sed
ref-del.sin
regcomp.c
regex.c
regex.h
regex_internal.c
regex_internal.h
regexec.c
rename-dest-slash.c
rename.c
rmdir.c
root-dev-ino.c
root-dev-ino.h
rpmatch.c
safe-read.c
safe-read.h
safe-write.c
safe-write.h
same-inode.h
same.c
same.h
save-cwd.c
save-cwd.h
savedir.c
savedir.h
savewd.c
savewd.h
setenv.c
setenv.h
settime.c
sha1.c
sha1.h
sig2str.c
sig2str.h
snprintf.c
snprintf.h
socket_.h
stat-macros.h
stat-time.h
stat_.h
stdbool_.h
stdint.h
stdint_.h
stdio--.h
stdio-safer.h
stdlib--.h
stdlib-safer.h
stpcpy.c
stpcpy.h
strcase.h
strcasecmp.c
strcspn.c
strdup.c
strdup.h
strftime.c
strftime.h
stripslash.c
strncasecmp.c
strndup.c
strndup.h
strnlen.c
strnlen.h
strnlen1.c
strnlen1.h
strpbrk.c
strpbrk.h
strtod.c
strtoimax.c
strtol.c
strtoll.c
strtoul.c
strtoull.c
strtoumax.c
strverscmp.c
strverscmp.h
t-fpending
tempname.c
tempname.h
time_r.c
time_r.h
timespec.h
uinttostr.c
umaxtostr.c
unicodeio.h
unistd--.h
unistd-safer.h
unlinkdir.c
unlinkdir.h
unlocked-io.h
unsetenv.c
userspec.c
userspec.h
utime.c
utimecmp.c
utimecmp.h
utimens.c
utimens.h
vasnprintf.h
vasprintf.c
vasprintf.h
verify.h
version-etc-fsf.c
version-etc.c
version-etc.h
wcwidth.h
xalloc-die.c
xalloc.h
xgetcwd.c
xgetcwd.h
xgethostname.c
xgethostname.h
xmalloc.c
xmemcoll.c
xmemcoll.h
xnanosleep.c
xnanosleep.h
xreadlink.c
xreadlink.h
xstrndup.c
xstrndup.h
xstrtod.c
xstrtod.h
xstrtoimax.c
xstrtol.c
xstrtol.h
xstrtold.c
xstrtoul.c
xstrtoumax.c
xtime.h
yesno.c
yesno.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
## Makefile for gnulib/lib -*-Makefile-*-
# Copyright (C) 1995-2005 Free Software Foundation, Inc.
# Copyright (C) 1995-2006 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -17,153 +17,23 @@
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
noinst_LIBRARIES = libcoreutils.a
include gnulib.mk
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
noinst_PROGRAMS = t-fpending
LDADD = $(noinst_LIBRARIES)
AM_CPPFLAGS = -I.. -I$(srcdir)
DEFS += -DLIBDIR=\"$(libdir)\"
libcoreutils_a_SOURCES = \
allocsa.c allocsa.h \
euidaccess.h \
exit.h \
fprintftime.c fprintftime.h \
full-read.c full-read.h \
full-write.c full-write.h \
getaddrinfo.h \
gettext.h \
localcharset.c localcharset.h \
mbchar.h \
mbswidth.c mbswidth.h \
mbuiter.h \
readtokens0.c readtokens0.h \
strcase.h \
strnlen1.c strnlen1.h \
strstr.h \
time_r.c time_r.h \
unicodeio.c unicodeio.h \
verify.h \
xalloc-die.c \
xgethostname.c xgethostname.h \
xmemcoll.c xmemcoll.h \
xstrndup.c xstrndup.h \
xstrtoimax.c \
xstrtoumax.c
libcoreutils_a_SOURCES += \
printf-args.h \
printf-parse.h \
vasprintf.h \
vasnprintf.h
buffer-lcm.c buffer-lcm.h \
xmemcoll.c xmemcoll.h \
xmemxfrm.c xmemxfrm.h
libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
lib_OBJECTS = $(libcoreutils_a_OBJECTS)
BUILT_SOURCES = getdate.c
CLEANFILES =
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANFILES =
SUFFIXES =
EXTRA_DIST = getdate.c config.charset ref-add.sin ref-del.sin \
getndelim2.c getndelim2.h
# We need the following in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
install-exec-local: all-local
test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test $(GLIBC21) = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
if grep '^# Packages using this file: $$' $(charset_tmp) \
> /dev/null; then \
rm -f $(charset_alias); \
else \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
fi; \
rm -f $(charset_tmp); \
fi
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
mv t-$@ $@
SUFFIXES += .sed .sin
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
mv t-$@ $@
CLEANFILES += charset.alias ref-add.sed ref-del.sed
BUILT_SOURCES += $(STDBOOL_H)
EXTRA_DIST += stdbool_.h
MOSTLYCLEANFILES += stdbool.h stdbool.ht
# Create stdbool.h on systems that lack a working one.
stdbool.h: stdbool_.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
mv $@t $@
BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h
# We need the following in order to create an <alloca.h> when the system
# doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(ALLOCA_H)
alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@-t
mv $@-t $@
MOSTLYCLEANFILES += alloca.h alloca.h-t
BUILT_SOURCES += $(FNMATCH_H)
EXTRA_DIST += fnmatch_.h fnmatch_loop.c
# We need the following in order to create an <fnmatch.h> when the system
# doesn't have one that supports the required API.
all-local $(lib_OBJECTS): $(FNMATCH_H)
fnmatch.h: fnmatch_.h
cp $(srcdir)/fnmatch_.h $@-t
mv $@-t $@
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
BUILT_SOURCES += $(GETOPT_H)
EXTRA_DIST += getopt_.h getopt_int.h
libcoreutils_a_LIBADD += $(LIBOBJS)
libcoreutils_a_DEPENDENCIES += $(LIBOBJS)
check: unit-test
.PHONY: unit-test
unit-test: t-fpending
./t-fpending > /dev/null
# We need the following in order to create an <getopt.h> when the system
# doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(GETOPT_H)
getopt.h: getopt_.h
cp $(srcdir)/getopt_.h $@-t
mv $@-t $@
MOSTLYCLEANFILES += getopt.h getopt.h-t

View File

@@ -1,938 +0,0 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Copyright (C) 1995-2005 Free Software Foundation, Inc.
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = t-fpending$(EXEEXT)
subdir = lib
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ChangeLog TODO __fpending.c __fpending.h acl.c acl.h alloca.c \
argmatch.c argmatch.h asnprintf.c asprintf.c atexit.c \
backupfile.c backupfile.h basename.c c-strtod.c c-strtod.h \
c-strtold.c calloc.c canon-host.c canon-host.h canonicalize.c \
canonicalize.h chdir-long.c chdir-long.h chown.c cloexec.c \
cloexec.h closeout.c closeout.h creat-safer.c cycle-check.c \
cycle-check.h dev-ino.h diacrit.c diacrit.h dirfd.c dirfd.h \
dirname.c dirname.h dup-safer.c dup2.c error.c error.h \
euidaccess.c exclude.c exclude.h exitfail.c exitfail.h \
fchdir-stub.c fchown-stub.c fcntl--.h fcntl-safer.h \
fd-reopen.c fd-reopen.h fd-safer.c file-type.c file-type.h \
fileblocks.c filemode.c filemode.h filenamecat.c filenamecat.h \
fnmatch.c fopen-safer.c free.c fsusage.c fsusage.h ftruncate.c \
fts-cycle.c fts.c fts_.h gai_strerror.c getaddrinfo.c getcwd.c \
getcwd.h getdate.h getdate.y getdelim.c getdelim.h getgroups.c \
gethostname.c gethrxtime.c gethrxtime.h getline.c getline.h \
getloadavg.c getndelim2.c getopt.c getopt1.c getpagesize.h \
getpass.c getpass.h gettime.c gettimeofday.c getugroups.c \
getusershell.c group-member.c group-member.h hard-locale.c \
hard-locale.h hash-pjw.c hash-pjw.h hash.c hash.h human.c \
human.h idcache.c imaxtostr.c intprops.h inttostr.c inttostr.h \
lchown.c lchown.h linebuffer.c linebuffer.h long-options.c \
long-options.h lstat.c lstat.h malloc.c mbchar.c md5.c md5.h \
memcasecmp.c memcasecmp.h memchr.c memcmp.c memcoll.c \
memcoll.h memcpy.c memmove.c mempcpy.c mempcpy.h memrchr.c \
memrchr.h memset.c mkdir-p.c mkdir-p.h mkdir.c mkstemp-safer.c \
mkstemp.c mktime.c modechange.c modechange.h mountlist.c \
mountlist.h nanosleep.c obstack.c obstack.h offtostr.c \
open-safer.c openat-die.c openat.c openat.h pathmax.h \
physmem.c physmem.h pipe-safer.c posixtm.c posixtm.h \
posixver.c posixver.h printf-args.c printf-parse.c putenv.c \
quote.c quote.h quotearg.c quotearg.h raise.c readlink.c \
readtokens.c readtokens.h readutmp.c readutmp.h realloc.c \
regcomp.c regex.c regex.h regex_internal.c regex_internal.h \
regexec.c rename.c rmdir.c root-dev-ino.c root-dev-ino.h \
rpmatch.c safe-read.c safe-read.h safe-write.c safe-write.h \
same.c same.h save-cwd.c save-cwd.h savedir.c savedir.h \
setenv.c setenv.h settime.c sha1.c sha1.h sig2str.c sig2str.h \
stat-macros.h stat-time.h stdio--.h stdio-safer.h stdlib--.h \
stdlib-safer.h stpcpy.c strcasecmp.c strcspn.c strdup.c \
strdup.h strftime.c strftime.h strintcmp.c stripslash.c \
strncasecmp.c strndup.c strndup.h strnlen.c strnlen.h \
strnumcmp-in.h strnumcmp.c strnumcmp.h strpbrk.c strstr.c \
strtod.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
strtoumax.c strverscmp.c strverscmp.h tempname.c timespec.h \
umaxtostr.c unistd--.h unistd-safer.h unlinkdir.c unlinkdir.h \
unlocked-io.h unsetenv.c userspec.c userspec.h utime.c \
utimecmp.c utimecmp.h utimens.c utimens.h vasnprintf.c \
vasprintf.c version-etc-fsf.c version-etc.c version-etc.h \
xalloc.h xfts.c xfts.h xgetcwd.c xgetcwd.h xmalloc.c \
xnanosleep.c xnanosleep.h xreadlink.c xreadlink.h xstrtod.c \
xstrtod.h xstrtol.c xstrtol.h xstrtoul.c xtime.h yesno.c \
yesno.h
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/autobuild.m4 \
$(top_srcdir)/m4/backupfile.m4 $(top_srcdir)/m4/basename.m4 \
$(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/boottime.m4 \
$(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/calloc.m4 \
$(top_srcdir)/m4/canon-host.m4 \
$(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/check-decl.m4 \
$(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \
$(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/closeout.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/cycle-check.m4 \
$(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
$(top_srcdir)/m4/diacrit.m4 $(top_srcdir)/m4/dirfd.m4 \
$(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
$(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
$(top_srcdir)/m4/euidaccess.m4 $(top_srcdir)/m4/exclude.m4 \
$(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fd-reopen.m4 \
$(top_srcdir)/m4/file-type.m4 $(top_srcdir)/m4/fileblocks.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \
$(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \
$(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/fstypename.m4 \
$(top_srcdir)/m4/fsusage.m4 $(top_srcdir)/m4/ftruncate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
$(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
$(top_srcdir)/m4/gettimeofday.m4 \
$(top_srcdir)/m4/getugroups.m4 \
$(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/group-member.m4 \
$(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hash-pjw.m4 \
$(top_srcdir)/m4/hash.m4 $(top_srcdir)/m4/host-os.m4 \
$(top_srcdir)/m4/human.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/idcache.m4 $(top_srcdir)/m4/intmax_t.m4 \
$(top_srcdir)/m4/inttostr.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
$(top_srcdir)/m4/jm-macros.m4 $(top_srcdir)/m4/jm-winsz1.m4 \
$(top_srcdir)/m4/jm-winsz2.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
$(top_srcdir)/m4/linebuffer.m4 $(top_srcdir)/m4/link-follow.m4 \
$(top_srcdir)/m4/localcharset.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
$(top_srcdir)/m4/memcmp.m4 $(top_srcdir)/m4/memcoll.m4 \
$(top_srcdir)/m4/memcpy.m4 $(top_srcdir)/m4/memmove.m4 \
$(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
$(top_srcdir)/m4/memset.m4 $(top_srcdir)/m4/mkdir-p.m4 \
$(top_srcdir)/m4/mkdir-slash.m4 $(top_srcdir)/m4/mkstemp.m4 \
$(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/modechange.m4 \
$(top_srcdir)/m4/mountlist.m4 $(top_srcdir)/m4/nanosleep.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/obstack.m4 \
$(top_srcdir)/m4/onceonly_2_57.m4 $(top_srcdir)/m4/openat.m4 \
$(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perl.m4 \
$(top_srcdir)/m4/physmem.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/posixtm.m4 $(top_srcdir)/m4/posixver.m4 \
$(top_srcdir)/m4/prereq.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quote.m4 \
$(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/readtokens.m4 $(top_srcdir)/m4/readutmp.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/restrict.m4 $(top_srcdir)/m4/rmdir-errno.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/root-dev-ino.m4 \
$(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/safe-read.m4 \
$(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/same.m4 \
$(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \
$(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/settime.m4 \
$(top_srcdir)/m4/sha1.m4 $(top_srcdir)/m4/sig2str.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
$(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strcspn.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strftime.m4 \
$(top_srcdir)/m4/stripslash.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strnumcmp.m4 \
$(top_srcdir)/m4/strpbrk.m4 $(top_srcdir)/m4/strstr.m4 \
$(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/strtoimax.m4 \
$(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoll.m4 \
$(top_srcdir)/m4/strtoul.m4 $(top_srcdir)/m4/strtoull.m4 \
$(top_srcdir)/m4/strtoumax.m4 $(top_srcdir)/m4/strverscmp.m4 \
$(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
$(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uint32_t.m4 \
$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/uintptr_t.m4 \
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
$(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
$(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
$(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xfts.m4 \
$(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xnanosleep.m4 \
$(top_srcdir)/m4/xreadlink.m4 $(top_srcdir)/m4/xstrtod.m4 \
$(top_srcdir)/m4/xstrtoimax.m4 $(top_srcdir)/m4/xstrtol.m4 \
$(top_srcdir)/m4/xstrtoumax.m4 $(top_srcdir)/m4/yesno.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
libcoreutils_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 = @LIBOBJS@
am__DEPENDENCIES_2 = @ALLOCA@
am_libcoreutils_a_OBJECTS = allocsa.$(OBJEXT) fprintftime.$(OBJEXT) \
full-read.$(OBJEXT) full-write.$(OBJEXT) \
localcharset.$(OBJEXT) mbswidth.$(OBJEXT) \
readtokens0.$(OBJEXT) strnlen1.$(OBJEXT) time_r.$(OBJEXT) \
unicodeio.$(OBJEXT) xalloc-die.$(OBJEXT) \
xgethostname.$(OBJEXT) xmemcoll.$(OBJEXT) xstrndup.$(OBJEXT) \
xstrtoimax.$(OBJEXT) xstrtoumax.$(OBJEXT)
libcoreutils_a_OBJECTS = $(am_libcoreutils_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
t_fpending_SOURCES = t-fpending.c
t_fpending_OBJECTS = t-fpending.$(OBJEXT)
t_fpending_LDADD = $(LDADD)
am__DEPENDENCIES_3 = libcoreutils.a
t_fpending_DEPENDENCIES = $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
SOURCES = $(libcoreutils_a_SOURCES) t-fpending.c
DIST_SOURCES = $(libcoreutils_a_SOURCES) t-fpending.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFAULT_POSIX2_VERSION = @DEFAULT_POSIX2_VERSION@
DEFS = @DEFS@ -DLIBDIR=\"$(libdir)\"
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EOVERFLOW = @EOVERFLOW@
EXEEXT = @EXEEXT@
FNMATCH_H = @FNMATCH_H@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
KMEM_GROUP = @KMEM_GROUP@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
LIB_FDATASYNC = @LIB_FDATASYNC@
LIB_GETHRXTIME = @LIB_GETHRXTIME@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LN_S = @LN_S@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
noinst_LIBRARIES = libcoreutils.a
LDADD = $(noinst_LIBRARIES)
AM_CPPFLAGS = -I.. -I$(srcdir)
libcoreutils_a_SOURCES = allocsa.c allocsa.h euidaccess.h exit.h \
fprintftime.c fprintftime.h full-read.c full-read.h \
full-write.c full-write.h getaddrinfo.h gettext.h \
localcharset.c localcharset.h mbchar.h mbswidth.c mbswidth.h \
mbuiter.h readtokens0.c readtokens0.h strcase.h strnlen1.c \
strnlen1.h strstr.h time_r.c time_r.h unicodeio.c unicodeio.h \
verify.h xalloc-die.c xgethostname.c xgethostname.h xmemcoll.c \
xmemcoll.h xstrndup.c xstrndup.h xstrtoimax.c xstrtoumax.c \
printf-args.h printf-parse.h vasprintf.h vasnprintf.h
libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
lib_OBJECTS = $(libcoreutils_a_OBJECTS)
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(ALLOCA_H) $(FNMATCH_H) \
$(GETOPT_H)
CLEANFILES = charset.alias ref-add.sed ref-del.sed
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANFILES = stdbool.h stdbool.ht alloca.h alloca.h-t fnmatch.h \
fnmatch.h-t getopt.h getopt.h-t
SUFFIXES = .sed .sin
EXTRA_DIST = getdate.c config.charset ref-add.sin ref-del.sin \
getndelim2.c getndelim2.h stdbool_.h alloca_.h fnmatch_.h \
fnmatch_loop.c getopt_.h getopt_int.h
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .sed .sin .c .o .obj .y
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnits lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libcoreutils.a: $(libcoreutils_a_OBJECTS) $(libcoreutils_a_DEPENDENCIES)
-rm -f libcoreutils.a
$(libcoreutils_a_AR) libcoreutils.a $(libcoreutils_a_OBJECTS) $(libcoreutils_a_LIBADD)
$(RANLIB) libcoreutils.a
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
t-fpending$(EXEEXT): $(t_fpending_OBJECTS) $(t_fpending_DEPENDENCIES)
@rm -f t-fpending$(EXEEXT)
$(LINK) $(t_fpending_LDFLAGS) $(t_fpending_OBJECTS) $(t_fpending_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/__fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/acl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/argmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/backupfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/basename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/c-strtod.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/c-strtold.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/canon-host.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/canonicalize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chdir-long.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chown.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cloexec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/closeout.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/creat-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cycle-check.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/diacrit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dirfd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dirname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dup-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dup2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/euidaccess.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/exclude.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/exitfail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fchdir-stub.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fchown-stub.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fd-reopen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fd-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/file-type.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fileblocks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/filemode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/filenamecat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fnmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fopen-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/free.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fsusage.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ftruncate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fts-cycle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gai_strerror.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getcwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdate.y@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdelim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getgroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gethostname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gethrxtime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getloadavg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getndelim2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getpass.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gettime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gettimeofday.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getugroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getusershell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/group-member.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hard-locale.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash-pjw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/human.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/idcache.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/imaxtostr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inttostr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lchown.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/linebuffer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/long-options.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mbchar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memmove.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mempcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memrchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkdir-p.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkstemp-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkstemp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mktime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/modechange.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mountlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nanosleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/offtostr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/open-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openat-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/physmem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pipe-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/posixtm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/posixver.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-args.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quote.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/quotearg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raise.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readtokens.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readutmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/realloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regcomp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex_internal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regexec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rmdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/root-dev-ino.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rpmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/safe-read.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/safe-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/same.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/save-cwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/savedir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/settime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sha1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sig2str.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stpcpy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcspn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strintcmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/stripslash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strncasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnumcmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strpbrk.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strstr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtod.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoimax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtol.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoull.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoumax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strverscmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tempname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/umaxtostr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/unlinkdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/unsetenv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/userspec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utimecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utimens.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/version-etc-fsf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/version-etc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xfts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xgetcwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xnanosleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xreadlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrtod.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrtol.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrtoul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/yesno.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fprintftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbswidth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtokens0.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeio.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgethostname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmemcoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoimax.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.y.c:
$(YACCCOMPILE) $<
if test -f y.tab.h; then \
to=`echo "$*_H" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \
y.tab.h >$*.ht; \
rm -f y.tab.h; \
if cmp -s $*.ht $*.h; then \
rm -f $*.ht ;\
else \
mv $*.ht $*.h; \
fi; \
fi
if test -f y.output; then \
mv y.output $*.output; \
fi
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
rm -f y.tab.c
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS) all-local
installdirs:
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-exec-local
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-local
.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \
distclean distclean-compile distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-exec \
install-exec-am install-exec-local install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-info-am uninstall-local
# We need the following in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
all-local: charset.alias ref-add.sed ref-del.sed
install-exec-local: all-local
test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test $(GLIBC21) = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
if grep '^# Packages using this file: $$' $(charset_tmp) \
> /dev/null; then \
rm -f $(charset_alias); \
else \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
fi; \
rm -f $(charset_tmp); \
fi
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
mv t-$@ $@
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
mv t-$@ $@
# Create stdbool.h on systems that lack a working one.
stdbool.h: stdbool_.h
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
mv $@t $@
# We need the following in order to create an <alloca.h> when the system
# doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(ALLOCA_H)
alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@-t
mv $@-t $@
# We need the following in order to create an <fnmatch.h> when the system
# doesn't have one that supports the required API.
all-local $(lib_OBJECTS): $(FNMATCH_H)
fnmatch.h: fnmatch_.h
cp $(srcdir)/fnmatch_.h $@-t
mv $@-t $@
check: unit-test
.PHONY: unit-test
unit-test: t-fpending
./t-fpending > /dev/null
# We need the following in order to create an <getopt.h> when the system
# doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(GETOPT_H)
getopt.h: getopt_.h
cp $(srcdir)/getopt_.h $@-t
mv $@-t $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,3 +0,0 @@
The files in this directory are used in many GNU packages,
including coreutils, diffutils, and tar.
The autoconf tests required for these files are in ../m4.

View File

@@ -30,3 +30,11 @@ Mention fragmentation.
assert (bucket_limit - bucket == n_buckets) ?
remove.c: s/done/successful or ok
-----
Copyright (C) 1998 Free Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
and this notice are preserved.

View File

@@ -1,32 +0,0 @@
/* __fpending.c -- return the number of pending output bytes on a stream
Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "__fpending.h"
/* Return the number of pending (aka buffered, unflushed)
bytes on the stream, FP, that is open for writing. */
size_t
__fpending (FILE *fp)
{
return PENDING_OUTPUT_N_BYTES;
}

View File

@@ -1,13 +0,0 @@
#include <stddef.h>
#include <stdio.h>
#if HAVE_STDIO_EXT_H
# include <stdio_ext.h>
#endif
#ifndef HAVE_DECL___FPENDING
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL___FPENDING
size_t __fpending (FILE *);
#endif

View File

@@ -1,63 +0,0 @@
/* acl.c - access control lists
Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Written by Paul Eggert. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifndef S_ISLNK
# define S_ISLNK(Mode) 0
#endif
#include "acl.h"
#include <errno.h>
#ifndef ENOSYS
# define ENOSYS (-1)
#endif
#ifndef MIN_ACL_ENTRIES
# define MIN_ACL_ENTRIES 4
#endif
/* Return 1 if FILE has a nontrivial access control list, 0 if not,
and -1 (setting errno) if an error is encountered. */
int
file_has_acl (char const *file, struct stat const *filestat)
{
/* FIXME: This implementation should work on recent-enough versions
of HP-UX, Solaris, and Unixware, but it simply returns 0 with
POSIX 1003.1e (draft 17 -- abandoned), AIX, GNU/Linux, Irix, and
Tru64. Please see Samba's source/lib/sysacls.c file for
fix-related ideas. */
#if HAVE_ACL && defined GETACLCNT
if (! S_ISLNK (filestat->st_mode))
{
int n = acl (file, GETACLCNT, 0, NULL);
return n < 0 ? (errno == ENOSYS ? 0 : -1) : (MIN_ACL_ENTRIES < n);
}
#endif
return 0;
}

View File

@@ -1,28 +0,0 @@
/* acl.c - access control lists
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Written by Paul Eggert. */
#if HAVE_SYS_ACL_H && HAVE_ACL
# include <sys/acl.h>
#endif
#if ! defined GETACLCNT && defined ACL_CNT
# define GETACLCNT ACL_CNT
#endif
int file_has_acl (char const *, struct stat const *);

View File

@@ -1,491 +0,0 @@
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
This implementation of the PWB library alloca function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant <jot@cray.com> contributed the Cray support.
There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <alloca.h>
#include <string.h>
#include <stdlib.h>
#ifdef emacs
# include "lisp.h"
# include "blockinput.h"
# ifdef EMACS_FREE
# undef free
# define free EMACS_FREE
# endif
#else
# define memory_full() abort ()
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
# ifndef alloca
# ifdef emacs
# ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
# ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
/* Using #error here is not wise since this file should work for
old and obscure compilers. */
# endif /* STACK_DIRECTION undefined */
# endif /* static */
# endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
# else
# define ADDRESS_FUNCTION(arg) &(arg)
# endif
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
# ifndef STACK_DIRECTION
# define STACK_DIRECTION 0 /* Direction unknown. */
# endif
# if STACK_DIRECTION != 0
# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
# else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
# define STACK_DIR stack_dir
static void
find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
if (addr == NULL)
{ /* Initial entry. */
addr = ADDRESS_FUNCTION (dummy);
find_stack_direction (); /* Recurse once. */
}
else
{
/* Second entry. */
if (ADDRESS_FUNCTION (dummy) > addr)
stack_dir = 1; /* Stack grew upward. */
else
stack_dir = -1; /* Stack grew downward. */
}
}
# endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
# ifndef ALIGN_SIZE
# define ALIGN_SIZE sizeof(double)
# endif
typedef union hdr
{
char align[ALIGN_SIZE]; /* To force sizeof(header). */
struct
{
union hdr *next; /* For chaining headers. */
char *deep; /* For stack depth measure. */
} h;
} header;
static header *last_alloca_header = NULL; /* -> last alloca header. */
/* Return a pointer to at least SIZE bytes of storage,
which will be automatically reclaimed upon exit from
the procedure that called alloca. Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
void *
alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
# if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
# endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
# ifdef emacs
BLOCK_INPUT;
# endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
register header *np = hp->h.next;
free (hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
else
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
# ifdef emacs
UNBLOCK_INPUT;
# endif
}
if (size == 0)
return NULL; /* No allocation required. */
/* Allocate combined header + user data storage. */
{
/* Address of header. */
register header *new;
size_t combined_size = sizeof (header) + size;
if (combined_size < sizeof (header))
memory_full ();
new = malloc (combined_size);
if (! new)
memory_full ();
new->h.next = last_alloca_header;
new->h.deep = depth;
last_alloca_header = new;
/* User storage begins just after header. */
return (void *) (new + 1);
}
}
# if defined (CRAY) && defined (CRAY_STACKSEG_END)
# ifdef DEBUG_I00AFUNC
# include <stdio.h>
# endif
# ifndef CRAY_STACK
# define CRAY_STACK
# ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
# else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
# endif /* CRAY2 */
# endif /* not CRAY_STACK */
# ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == 0)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != 0)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == 0 || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == 0)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != 0);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
# else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
# endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
# endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
# endif /* not CRAY2 */
# endif /* CRAY */
# endif /* no alloca */
#endif /* not GCC version 2 */

View File

@@ -1,52 +0,0 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
#ifndef _GNULIB_ALLOCA_H
# define _GNULIB_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
Use of alloca should be avoided:
- inside arguments of function calls - undefined behaviour,
- in inline functions - the allocation may actually last until the
calling function returns,
- for huge N (say, N >= 65536) - you never know how large (or small)
the stack is, and when the stack cannot fulfill the memory allocation
request, the program just crashes.
*/
#ifdef __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#endif /* _GNULIB_ALLOCA_H */

View File

@@ -1,139 +0,0 @@
/* Safe automatic memory allocation.
Copyright (C) 2003 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "allocsa.h"
/* The speed critical point in this file is freesa() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
mallocsa() and freesa() in the other case are not critical, because they
are only invoked for big memory sizes. */
#if HAVE_ALLOCA
/* Store the mallocsa() results in a hash table. This is needed to reliably
distinguish a mallocsa() result and an alloca() result.
Although it is possible that the same pointer is returned by alloca() and
by mallocsa() at different times in the same application, it does not lead
to a bug in freesa(), because:
- Before a pointer returned by alloca() can point into malloc()ed memory,
the function must return, and once this has happened the programmer must
not call freesa() on it anyway.
- Before a pointer returned by mallocsa() can point into the stack, it
must be freed. The only function that can free it is freesa(), and
when freesa() frees it, it also removes it from the hash table. */
# define MAGIC_NUMBER 0x1415fb4a
# define MAGIC_SIZE sizeof (int)
/* This is how the header info would look like without any alignment
considerations. */
struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
/* But the header's size must be a multiple of sa_alignment_max. */
# define HEADER_SIZE \
(((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
/* Verify that HEADER_SIZE == sizeof (struct header). */
typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1];
/* We make the hash table quite big, so that during lookups the probability
of empty hash buckets is quite high. There is no need to make the hash
table resizable, because when the hash table gets filled so much that the
lookup becomes slow, it means that the application has memory leaks. */
# define HASH_TABLE_SIZE 257
static void * mallocsa_results[HASH_TABLE_SIZE];
#endif
void *
mallocsa (size_t n)
{
#if HAVE_ALLOCA
/* Allocate one more word, that serves as an indicator for malloc()ed
memory, so that freesa() of an alloca() result is fast. */
size_t nplus = n + HEADER_SIZE;
if (nplus >= n)
{
char *p = (char *) malloc (nplus);
if (p != NULL)
{
size_t slot;
p += HEADER_SIZE;
/* Put a magic number into the indicator word. */
((int *) p)[-1] = MAGIC_NUMBER;
/* Enter p into the hash table. */
slot = (unsigned long) p % HASH_TABLE_SIZE;
((struct header *) (p - HEADER_SIZE))->next = mallocsa_results[slot];
mallocsa_results[slot] = p;
return p;
}
}
/* Out of memory. */
return NULL;
#else
# if !MALLOC_0_IS_NONNULL
if (n == 0)
n = 1;
# endif
return malloc (n);
#endif
}
#if HAVE_ALLOCA
void
freesa (void *p)
{
/* mallocsa() may have returned NULL. */
if (p != NULL)
{
/* Attempt to quickly distinguish the mallocsa() result - which has
a magic indicator word - and the alloca() result - which has an
uninitialized indicator word. It is for this test that sa_increment
additional bytes are allocated in the alloca() case. */
if (((int *) p)[-1] == MAGIC_NUMBER)
{
/* Looks like a mallocsa() result. To see whether it really is one,
perform a lookup in the hash table. */
size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
void **chain = &mallocsa_results[slot];
for (; *chain != NULL;)
{
if (*chain == p)
{
/* Found it. Remove it from the hash table and free it. */
char *p_begin = (char *) p - HEADER_SIZE;
*chain = ((struct header *) p_begin)->next;
free (p_begin);
return;
}
chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
}
}
/* At this point, we know it was not a mallocsa() result. */
}
}
#endif

View File

@@ -1,113 +0,0 @@
/* Safe automatic memory allocation.
Copyright (C) 2003-2004 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _ALLOCSA_H
#define _ALLOCSA_H
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
alloca(N); otherwise it returns NULL. It either returns N bytes of
memory allocated on the stack, that lasts until the function returns,
or NULL.
Use of safe_alloca should be avoided:
- inside arguments of function calls - undefined behaviour,
- in inline functions - the allocation may actually last until the
calling function returns.
*/
#if HAVE_ALLOCA
/* The OS usually guarantees only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
This must be a macro, not an inline function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((N), NULL)
#endif
/* allocsa(N) is a safe variant of alloca(N). It allocates N bytes of
memory allocated on the stack, that must be freed using freesa() before
the function returns. Upon failure, it returns NULL. */
#if HAVE_ALLOCA
# define allocsa(N) \
((N) < 4032 - sa_increment \
? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
: mallocsa (N))
#else
# define allocsa(N) \
mallocsa (N)
#endif
extern void * mallocsa (size_t n);
/* Free a block of memory allocated through allocsa(). */
#if HAVE_ALLOCA
extern void freesa (void *p);
#else
# define freesa free
#endif
/* Maybe we should also define a variant
nallocsa (size_t n, size_t s) - behaves like allocsa (n * s)
If this would be useful in your application. please speak up. */
/* ------------------- Auxiliary, non-public definitions ------------------- */
/* Determine the alignment of a type at compile time. */
#if defined __GNUC__
# define sa_alignof __alignof__
#elif defined __cplusplus
template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
# define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2)
#elif defined __hpux
/* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
values. */
# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
#else
# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
#endif
enum
{
/* The desired alignment of memory allocations is the maximum alignment
among all elementary types. */
sa_alignment_long = sa_alignof (long),
sa_alignment_double = sa_alignof (double),
#ifdef HAVE_LONG_LONG
sa_alignment_longlong = sa_alignof (long long),
#endif
#ifdef HAVE_LONG_DOUBLE
sa_alignment_longdouble = sa_alignof (long double),
#endif
sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
#ifdef HAVE_LONG_LONG
| (sa_alignment_longlong - 1)
#endif
#ifdef HAVE_LONG_DOUBLE
| (sa_alignment_longdouble - 1)
#endif
) + 1,
/* The increment that guarantees room for a magic word must be >= sizeof (int)
and a multiple of sa_alignment_max. */
sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max
};
#endif /* _ALLOCSA_H */

View File

@@ -1,281 +0,0 @@
/* argmatch.c -- find a match for a string in an array
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <djm@ai.mit.edu>
Modified by Akim Demaille <demaille@inf.enst.fr> */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "argmatch.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "error.h"
#include "exit.h"
#include "quotearg.h"
#include "quote.h"
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
/* When reporting an invalid argument, show nonprinting characters
by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use
literal_quoting_style. */
#ifndef ARGMATCH_QUOTING_STYLE
# define ARGMATCH_QUOTING_STYLE locale_quoting_style
#endif
/* Non failing version of argmatch call this function after failing. */
#ifndef ARGMATCH_DIE
# include "exitfail.h"
# define ARGMATCH_DIE exit (exit_failure)
#endif
#ifdef ARGMATCH_DIE_DECL
ARGMATCH_DIE_DECL;
#endif
static void
__argmatch_die (void)
{
ARGMATCH_DIE;
}
/* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h.
Default to __argmatch_die, but allow caller to change this at run-time. */
argmatch_exit_fn argmatch_die = __argmatch_die;
/* If ARG is an unambiguous match for an element of the
NULL-terminated array ARGLIST, return the index in ARGLIST
of the matched element, else -1 if it does not match any element
or -2 if it is ambiguous (is a prefix of more than one element).
If VALLIST is none null, use it to resolve ambiguities limited to
synonyms, i.e., for
"yes", "yop" -> 0
"no", "nope" -> 1
"y" is a valid argument, for `0', and "n" for `1'. */
ptrdiff_t
argmatch (const char *arg, const char *const *arglist,
const char *vallist, size_t valsize)
{
size_t i; /* Temporary index in ARGLIST. */
size_t arglen; /* Length of ARG. */
ptrdiff_t matchind = -1; /* Index of first nonexact match. */
bool ambiguous = false; /* If true, multiple nonexact match(es). */
arglen = strlen (arg);
/* Test all elements for either exact match or abbreviated matches. */
for (i = 0; arglist[i]; i++)
{
if (!strncmp (arglist[i], arg, arglen))
{
if (strlen (arglist[i]) == arglen)
/* Exact match found. */
return i;
else if (matchind == -1)
/* First nonexact match found. */
matchind = i;
else
{
/* Second nonexact match found. */
if (vallist == NULL
|| memcmp (vallist + valsize * matchind,
vallist + valsize * i, valsize))
{
/* There is a real ambiguity, or we could not
disambiguate. */
ambiguous = true;
}
}
}
}
if (ambiguous)
return -2;
else
return matchind;
}
/* Error reporting for argmatch.
CONTEXT is a description of the type of entity that was being matched.
VALUE is the invalid value that was given.
PROBLEM is the return value from argmatch. */
void
argmatch_invalid (const char *context, const char *value, ptrdiff_t problem)
{
char const *format = (problem == -1
? _("invalid argument %s for %s")
: _("ambiguous argument %s for %s"));
error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value),
quote_n (1, context));
}
/* List the valid arguments for argmatch.
ARGLIST is the same as in argmatch.
VALLIST is a pointer to an array of values.
VALSIZE is the size of the elements of VALLIST */
void
argmatch_valid (const char *const *arglist,
const char *vallist, size_t valsize)
{
size_t i;
const char *last_val = NULL;
/* We try to put synonyms on the same line. The assumption is that
synonyms follow each other */
fprintf (stderr, _("Valid arguments are:"));
for (i = 0; arglist[i]; i++)
if ((i == 0)
|| memcmp (last_val, vallist + valsize * i, valsize))
{
fprintf (stderr, "\n - `%s'", arglist[i]);
last_val = vallist + valsize * i;
}
else
{
fprintf (stderr, ", `%s'", arglist[i]);
}
putc ('\n', stderr);
}
/* Never failing versions of the previous functions.
CONTEXT is the context for which argmatch is called (e.g.,
"--version-control", or "$VERSION_CONTROL" etc.). Upon failure,
calls the (supposed never to return) function EXIT_FN. */
ptrdiff_t
__xargmatch_internal (const char *context,
const char *arg, const char *const *arglist,
const char *vallist, size_t valsize,
argmatch_exit_fn exit_fn)
{
ptrdiff_t res = argmatch (arg, arglist, vallist, valsize);
if (res >= 0)
/* Success. */
return res;
/* We failed. Explain why. */
argmatch_invalid (context, arg, res);
argmatch_valid (arglist, vallist, valsize);
(*exit_fn) ();
return -1; /* To please the compilers. */
}
/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
return the first corresponding argument in ARGLIST */
const char *
argmatch_to_argument (const char *value,
const char *const *arglist,
const char *vallist, size_t valsize)
{
size_t i;
for (i = 0; arglist[i]; i++)
if (!memcmp (value, vallist + valsize * i, valsize))
return arglist[i];
return NULL;
}
#ifdef TEST
/*
* Based on "getversion.c" by David MacKenzie <djm@gnu.ai.mit.edu>
*/
char *program_name;
/* When to make backup files. */
enum backup_type
{
/* Never make backups. */
no_backups,
/* Make simple backups of every file. */
simple_backups,
/* Make numbered backups of files that already have numbered backups,
and simple backups of the others. */
numbered_existing_backups,
/* Make numbered backups of every file. */
numbered_backups
};
/* Two tables describing arguments (keys) and their corresponding
values */
static const char *const backup_args[] =
{
"no", "none", "off",
"simple", "never",
"existing", "nil",
"numbered", "t",
0
};
static const enum backup_type backup_vals[] =
{
no_backups, no_backups, no_backups,
simple_backups, simple_backups,
numbered_existing_backups, numbered_existing_backups,
numbered_backups, numbered_backups
};
int
main (int argc, const char *const *argv)
{
const char *cp;
enum backup_type backup_type = no_backups;
program_name = (char *) argv[0];
if (argc > 2)
{
fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name);
exit (1);
}
if ((cp = getenv ("VERSION_CONTROL")))
backup_type = XARGMATCH ("$VERSION_CONTROL", cp,
backup_args, backup_vals);
if (argc == 2)
backup_type = XARGMATCH (program_name, argv[1],
backup_args, backup_vals);
printf ("The version control is `%s'\n",
ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
return 0;
}
#endif

View File

@@ -1,103 +0,0 @@
/* argmatch.h -- definitions and prototypes for argmatch.c
Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by David MacKenzie <djm@ai.mit.edu>
Modified by Akim Demaille <demaille@inf.enst.fr> */
#ifndef ARGMATCH_H_
# define ARGMATCH_H_ 1
# include <stddef.h>
# include "verify.h"
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
/* Assert there are as many real arguments as there are values
(argument list ends with a NULL guard). */
# define ARGMATCH_VERIFY(Arglist, Vallist) \
verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
/* Return the index of the element of ARGLIST (NULL terminated) that
matches with ARG. If VALLIST is not NULL, then use it to resolve
false ambiguities (i.e., different matches of ARG but corresponding
to the same values in VALLIST). */
ptrdiff_t argmatch (char const *arg, char const *const *arglist,
char const *vallist, size_t valsize);
# define ARGMATCH(Arg, Arglist, Vallist) \
argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
/* xargmatch calls this function when it fails. This function should not
return. By default, this is a function that calls ARGMATCH_DIE which
in turn defaults to `exit (exit_failure)'. */
typedef void (*argmatch_exit_fn) (void);
extern argmatch_exit_fn argmatch_die;
/* Report on stderr why argmatch failed. Report correct values. */
void argmatch_invalid (char const *context, char const *value,
ptrdiff_t problem);
/* Left for compatibility with the old name invalid_arg */
# define invalid_arg(Context, Value, Problem) \
argmatch_invalid (Context, Value, Problem)
/* Report on stderr the list of possible arguments. */
void argmatch_valid (char const *const *arglist,
char const *vallist, size_t valsize);
# define ARGMATCH_VALID(Arglist, Vallist) \
argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
/* Same as argmatch, but upon failure, reports a explanation on the
failure, and exits using the function EXIT_FN. */
ptrdiff_t __xargmatch_internal (char const *context,
char const *arg, char const *const *arglist,
char const *vallist, size_t valsize,
argmatch_exit_fn exit_fn);
/* Programmer friendly interface to __xargmatch_internal. */
# define XARGMATCH(Context, Arg, Arglist, Vallist) \
((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \
(char const *) (Vallist), \
sizeof *(Vallist), \
argmatch_die)])
/* Convert a value into a corresponding argument. */
char const *argmatch_to_argument (char const *value,
char const *const *arglist,
char const *vallist, size_t valsize);
# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \
argmatch_to_argument (Value, Arglist, \
(char const *) (Vallist), sizeof *(Vallist))
#endif /* ARGMATCH_H_ */

View File

@@ -1,37 +0,0 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "vasnprintf.h"
#include <stdarg.h>
char *
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
{
va_list args;
char *result;
va_start (args, format);
result = vasnprintf (resultbuf, lengthp, format, args);
va_end (args);
return result;
}

View File

@@ -1,37 +0,0 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "vasprintf.h"
#include <stdarg.h>
int
asprintf (char **resultp, const char *format, ...)
{
va_list args;
int result;
va_start (args, format);
result = vasprintf (resultp, format, args);
va_end (args);
return result;
}

View File

@@ -1,15 +0,0 @@
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
/* This function is in the public domain. --Mike Stump. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
int
atexit (void (*f) (void))
{
/* If the system doesn't provide a definition for atexit, use on_exit
if the system provides that. */
on_exit (f, 0);
return 0;
}

View File

@@ -1,384 +0,0 @@
/* backupfile.c -- make Emacs style backup file names
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert and David MacKenzie.
Some algorithms adapted from GNU Emacs. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "backupfile.h"
#include "argmatch.h"
#include "dirname.h"
#include "xalloc.h"
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <unistd.h>
#if HAVE_DIRENT_H
# include <dirent.h>
# define NLENGTH(direct) strlen ((direct)->d_name)
#else
# define dirent direct
# define NLENGTH(direct) ((size_t) (direct)->d_namlen)
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
# define HAVE_DIR 1
#else
# define HAVE_DIR 0
#endif
#if D_INO_IN_DIRENT
# define REAL_DIR_ENTRY(dp) ((dp)->d_ino != 0)
#else
# define REAL_DIR_ENTRY(dp) 1
#endif
#if ! (HAVE_PATHCONF && defined _PC_NAME_MAX)
# define pathconf(file, option) (errno = -1)
#endif
#ifndef _POSIX_NAME_MAX
# define _POSIX_NAME_MAX 14
#endif
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#if defined _XOPEN_NAME_MAX
# define NAME_MAX_MINIMUM _XOPEN_NAME_MAX
#else
# define NAME_MAX_MINIMUM _POSIX_NAME_MAX
#endif
#ifndef HAVE_DOS_FILE_NAMES
# define HAVE_DOS_FILE_NAMES 0
#endif
#ifndef HAVE_LONG_FILE_NAMES
# define HAVE_LONG_FILE_NAMES 0
#endif
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
- It's guaranteed to evaluate its argument exactly once.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
ISDIGIT_LOCALE unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
/* The extension added to file names to produce a simple (as opposed
to numbered) backup file name. */
char const *simple_backup_suffix = "~";
/* If FILE (which was of length FILELEN before an extension was
appended to it) is too long, replace the extension with the single
char E. If the result is still too long, remove the char just
before E. */
static void
check_extension (char *file, size_t filelen, char e)
{
char *base = base_name (file);
size_t baselen = base_len (base);
size_t baselen_max = HAVE_LONG_FILE_NAMES ? 255 : NAME_MAX_MINIMUM;
if (HAVE_DOS_FILE_NAMES || NAME_MAX_MINIMUM < baselen)
{
/* The new base name is long enough to require a pathconf check. */
long name_max;
/* Temporarily modify the buffer into its parent directory name,
invoke pathconf on the directory, and then restore the buffer. */
char tmp[sizeof "."];
memcpy (tmp, base, sizeof ".");
strcpy (base, ".");
errno = 0;
name_max = pathconf (file, _PC_NAME_MAX);
if (0 <= name_max || errno == 0)
{
long size = baselen_max = name_max;
if (name_max != size)
baselen_max = SIZE_MAX;
}
memcpy (base, tmp, sizeof ".");
}
if (HAVE_DOS_FILE_NAMES && baselen_max <= 12)
{
/* Live within DOS's 8.3 limit. */
char *dot = strchr (base, '.');
if (!dot)
baselen_max = 8;
else
{
char const *second_dot = strchr (dot + 1, '.');
baselen_max = (second_dot
? second_dot - base
: dot + 1 - base + 3);
}
}
if (baselen_max < baselen)
{
baselen = file + filelen - base;
if (baselen_max <= baselen)
baselen = baselen_max - 1;
base[baselen] = e;
base[baselen + 1] = '\0';
}
}
#if HAVE_DIR
/* Returned values for NUMBERED_BACKUP. */
enum numbered_backup_result
{
/* The new backup name is the same length as an existing backup
name, so it's valid for that directory. */
BACKUP_IS_SAME_LENGTH,
/* Some backup names already exist, but the returned name is longer
than any of them, and its length should be checked. */
BACKUP_IS_LONGER,
/* There are no existing backup names. The new name's length
should be checked. */
BACKUP_IS_NEW
};
/* *BUFFER contains a file name. Store into *BUFFER the next backup
name for the named file, with a version number greater than all the
existing numbered backups. Reallocate *BUFFER as necessary; its
initial allocated size is BUFFER_SIZE, which must be at least 4
bytes longer than the file name to make room for the initially
appended ".~1". FILELEN is the length of the original file name.
The returned value indicates what kind of backup was found. If an
I/O or other read error occurs, use the highest backup number that
was found. */
static enum numbered_backup_result
numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
{
enum numbered_backup_result result = BACKUP_IS_NEW;
DIR *dirp;
struct dirent *dp;
char *buf = *buffer;
size_t versionlenmax = 1;
char *base = base_name (buf);
size_t base_offset = base - buf;
size_t baselen = base_len (base);
/* Temporarily modify the buffer into its parent directory name,
open the directory, and then restore the buffer. */
char tmp[sizeof "."];
memcpy (tmp, base, sizeof ".");
strcpy (base, ".");
dirp = opendir (buf);
memcpy (base, tmp, sizeof ".");
strcpy (base + baselen, ".~1~");
if (!dirp)
return result;
while ((dp = readdir (dirp)) != NULL)
{
char const *p;
char *q;
bool all_9s;
size_t versionlen;
size_t new_buflen;
if (! REAL_DIR_ENTRY (dp) || NLENGTH (dp) < baselen + 4)
continue;
if (memcmp (buf + base_offset, dp->d_name, baselen + 2) != 0)
continue;
p = dp->d_name + baselen + 2;
/* Check whether this file has a version number and if so,
whether it is larger. Use string operations rather than
integer arithmetic, to avoid problems with integer overflow. */
if (! ('1' <= *p && *p <= '9'))
continue;
all_9s = (*p == '9');
for (versionlen = 1; ISDIGIT (p[versionlen]); versionlen++)
all_9s &= (p[versionlen] == '9');
if (! (p[versionlen] == '~' && !p[versionlen + 1]
&& (versionlenmax < versionlen
|| (versionlenmax == versionlen
&& memcmp (buf + filelen + 2, p, versionlen) <= 0))))
continue;
/* This directory has the largest version number seen so far.
Append this highest numbered extension to the file name,
prepending '0' to the number if it is all 9s. */
versionlenmax = all_9s + versionlen;
result = (all_9s ? BACKUP_IS_LONGER : BACKUP_IS_SAME_LENGTH);
new_buflen = filelen + 2 + versionlenmax + 1;
if (buffer_size <= new_buflen)
{
buf = xnrealloc (buf, 2, new_buflen);
buffer_size = new_buflen * 2;
}
q = buf + filelen;
*q++ = '.';
*q++ = '~';
*q = '0';
q += all_9s;
memcpy (q, p, versionlen + 2);
/* Add 1 to the version number. */
q += versionlen;
while (*--q == '9')
*q = '0';
++*q;
}
closedir (dirp);
*buffer = buf;
return result;
}
#endif /* HAVE_DIR */
/* Return the name of the new backup file for the existing file FILE,
allocated with malloc. Report an error and fail if out of memory.
Do not call this function if backup_type == no_backups. */
char *
find_backup_file_name (char const *file, enum backup_type backup_type)
{
size_t filelen = strlen (file);
char *s;
size_t ssize;
bool simple = true;
/* Allow room for simple or ".~N~" backups. The guess must be at
least sizeof ".~1~", but otherwise will be adjusted as needed. */
size_t simple_backup_suffix_size = strlen (simple_backup_suffix) + 1;
size_t backup_suffix_size_guess = simple_backup_suffix_size;
enum { GUESS = sizeof ".~12345~" };
if (HAVE_DIR && backup_suffix_size_guess < GUESS)
backup_suffix_size_guess = GUESS;
ssize = filelen + backup_suffix_size_guess + 1;
s = xmalloc (ssize);
memcpy (s, file, filelen + 1);
#if HAVE_DIR
if (backup_type != simple_backups)
switch (numbered_backup (&s, ssize, filelen))
{
case BACKUP_IS_SAME_LENGTH:
return s;
case BACKUP_IS_LONGER:
simple = false;
break;
case BACKUP_IS_NEW:
simple = (backup_type == numbered_existing_backups);
break;
}
#endif
if (simple)
memcpy (s + filelen, simple_backup_suffix, simple_backup_suffix_size);
check_extension (s, filelen, '~');
return s;
}
static char const * const backup_args[] =
{
/* In a series of synonyms, present the most meaningful first, so
that argmatch_valid be more readable. */
"none", "off",
"simple", "never",
"existing", "nil",
"numbered", "t",
NULL
};
static const enum backup_type backup_types[] =
{
no_backups, no_backups,
simple_backups, simple_backups,
numbered_existing_backups, numbered_existing_backups,
numbered_backups, numbered_backups
};
/* Ensure that these two vectors have the same number of elements,
not counting the final NULL in the first one. */
ARGMATCH_VERIFY (backup_args, backup_types);
/* Return the type of backup specified by VERSION.
If VERSION is NULL or the empty string, return numbered_existing_backups.
If VERSION is invalid or ambiguous, fail with a diagnostic appropriate
for the specified CONTEXT. Unambiguous abbreviations are accepted. */
enum backup_type
get_version (char const *context, char const *version)
{
if (version == 0 || *version == 0)
return numbered_existing_backups;
else
return XARGMATCH (context, version, backup_args, backup_types);
}
/* Return the type of backup specified by VERSION.
If VERSION is NULL, use the value of the envvar VERSION_CONTROL.
If the specified string is invalid or ambiguous, fail with a diagnostic
appropriate for the specified CONTEXT.
Unambiguous abbreviations are accepted. */
enum backup_type
xget_version (char const *context, char const *version)
{
if (version && *version)
return get_version (context, version);
else
return get_version ("$VERSION_CONTROL", getenv ("VERSION_CONTROL"));
}

View File

@@ -1,61 +0,0 @@
/* backupfile.h -- declarations for making Emacs style backup file names
Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef BACKUPFILE_H_
# define BACKUPFILE_H_
# ifdef __cplusplus
extern "C" {
# endif
/* When to make backup files. */
enum backup_type
{
/* Never make backups. */
no_backups,
/* Make simple backups of every file. */
simple_backups,
/* Make numbered backups of files that already have numbered backups,
and simple backups of the others. */
numbered_existing_backups,
/* Make numbered backups of every file. */
numbered_backups
};
# define VALID_BACKUP_TYPE(Type) \
((unsigned int) (Type) <= numbered_backups)
extern char const *simple_backup_suffix;
char *find_backup_file_name (char const *, enum backup_type);
enum backup_type get_version (char const *context, char const *arg);
enum backup_type xget_version (char const *context, char const *arg);
void addext (char *, char const *, int);
# ifdef __cplusplus
}
# endif
#endif /* ! BACKUPFILE_H_ */

View File

@@ -1,79 +0,0 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "dirname.h"
#include <string.h>
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.
Return the address of the last file name component of NAME. If
NAME has no file name components because it is all slashes, return
NAME if it is empty, the address of its last slash otherwise. */
char *
base_name (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p;
for (p = base; *p; p++)
{
if (ISSLASH (*p))
{
/* Treat multiple adjacent slashes like a single slash. */
do p++;
while (ISSLASH (*p));
/* If the file name ends in slash, use the trailing slash as
the basename if no non-slashes have been found. */
if (! *p)
{
if (ISSLASH (*base))
base = p - 1;
break;
}
/* *P is a non-slash preceded by a slash. */
base = p;
}
}
return (char *) base;
}
/* Return the length of of the basename NAME. Typically NAME is the
value returned by base_name. Act like strlen (NAME), except omit
redundant trailing slashes. */
size_t
base_len (char const *name)
{
size_t len;
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
return len;
}

View File

@@ -1,21 +0,0 @@
/* bcopy.c -- copy memory.
Copy LENGTH bytes from SOURCE to DEST. Does not null-terminate.
In the public domain.
By David MacKenzie <djm@gnu.ai.mit.edu>. */
#include <stddef.h>
void
bcopy (void const *source0, void *dest0, size_t length)
{
char const *source = source0;
char *dest = dest0;
if (source < dest)
/* Moving from low mem to hi mem; start at end. */
for (source += length, dest += length; length; --length)
*--dest = *--source;
else if (source != dest)
/* Moving from hi mem to low mem; start at beginning. */
for (; length; --length)
*dest++ = *source++;
}

59
lib/buffer-lcm.c Normal file
View File

@@ -0,0 +1,59 @@
/* buffer-lcm.c - compute a good buffer size for dealing with two files
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#include "buffer-lcm.h"
/* Return a buffer size suitable for doing I/O with files whose block
sizes are A and B. However, never return a value greater than
LCM_MAX. */
size_t
buffer_lcm (size_t a, size_t b, size_t lcm_max)
{
size_t size;
/* Use reasonable values if buffer sizes are zero. */
if (!a)
size = b ? b : 8 * 1024;
else
{
if (b)
{
/* Return lcm (A, B) if it is in range; otherwise, fall back
on A. */
size_t lcm, m, n, q, r;
/* N = gcd (A, B). */
for (m = a, n = b; (r = m % n) != 0; m = n, n = r)
continue;
/* LCM = lcm (A, B), if in range. */
q = a / n;
lcm = q * b;
if (lcm <= lcm_max && lcm / b == q)
return lcm;
}
size = a;
}
return size <= lcm_max ? size : lcm_max;
}

2
lib/buffer-lcm.h Normal file
View File

@@ -0,0 +1,2 @@
#include <stddef.h>
size_t buffer_lcm (size_t, size_t, size_t);

View File

@@ -1,81 +0,0 @@
/* Convert string to double, using the C locale.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Written by Paul Eggert. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "c-strtod.h"
#include <locale.h>
#include <stdlib.h>
#include "xalloc.h"
#if LONG
# define C_STRTOD c_strtold
# define DOUBLE long double
# define STRTOD_L strtold_l
#else
# define C_STRTOD c_strtod
# define DOUBLE double
# define STRTOD_L strtod_l
#endif
/* c_strtold falls back on strtod if strtold doesn't conform to C99. */
#if LONG && HAVE_C99_STRTOLD
# define STRTOD strtold
#else
# define STRTOD strtod
#endif
DOUBLE
C_STRTOD (char const *nptr, char **endptr)
{
DOUBLE r;
#ifdef LC_ALL_MASK
locale_t c_locale = newlocale (LC_ALL_MASK, "C", 0);
r = STRTOD_L (nptr, endptr, c_locale);
freelocale (c_locale);
#else
char *saved_locale = setlocale (LC_NUMERIC, NULL);
if (saved_locale)
{
saved_locale = xstrdup (saved_locale);
setlocale (LC_NUMERIC, "C");
}
r = STRTOD (nptr, endptr);
if (saved_locale)
{
setlocale (LC_NUMERIC, saved_locale);
free (saved_locale);
}
#endif
return r;
}

View File

@@ -1,2 +0,0 @@
double c_strtod (char const *, char **);
long double c_strtold (char const *, char **);

View File

@@ -1,2 +0,0 @@
#define LONG 1
#include "c-strtod.c"

View File

@@ -1,46 +0,0 @@
/* calloc() function that is glibc compatible.
This wrapper function is required at least on Tru64 UNIX 5.1.
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* written by Jim Meyering */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef calloc
#include <stdlib.h>
/* Allocate and zero-fill an NxS-byte block of memory from the heap.
If N or S is zero, allocate and zero-fill a 1-byte block. */
void *
rpl_calloc (size_t n, size_t s)
{
size_t bytes;
if (n == 0 || s == 0)
return calloc (1, 1);
/* Defend against buggy calloc implementations that mishandle
size_t overflow. */
bytes = n * s;
if (bytes / s != n)
return NULL;
return calloc (n, s);
}

View File

@@ -1,90 +0,0 @@
/* Host name canonicalization
Copyright (C) 2005 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "canon-host.h"
#include "getaddrinfo.h"
#include "strdup.h"
/* Store the last error for the single-threaded version of this function. */
static int last_cherror;
/* Single-threaded of wrapper for canon_host_r. After a NULL return, error
messages may be retrieved via ch_strerror(). */
char *
canon_host (const char *host)
{
return canon_host_r (host, &last_cherror);
}
/* Return a malloc'd string containing the canonical hostname associated with
HOST, or NULL if a canonical name cannot be determined. On NULL return,
if CHERROR is not NULL, set *CHERROR to an error code as returned by
getaddrinfo(). Use ch_strerror_r() or gai_strerror() to convert a *CHERROR
value to a string suitable for error messages.
WARNINGS
HOST must be a string representation of a resolvable name for this host.
Strings containing an IP address in dotted decimal notation will be
returned as-is, without further resolution.
The use of the word "canonical" in this context is unfortunate but
entrenched. The value returned by this function will be the end result
of the resolution of any CNAME chains in the DNS. There may only be one
such value for any given hostname, though the actual IP address
referenced by this value and the device using that IP address may each
actually have any number of such "canonical" hostnames. See the POSIX
getaddrinfo spec <http://www.opengroup.org/susv3xsh/getaddrinfo.html">,
RFC 1034 <http://www.faqs.org/rfcs/rfc1034.html>, & RFC 2181
<http://www.faqs.org/rfcs/rfc2181.html> for more on what this confusing
term really refers to. */
char *
canon_host_r (char const *host, int *cherror)
{
char *retval = NULL;
static struct addrinfo hints;
struct addrinfo *res = NULL;
int status;
hints.ai_flags = AI_CANONNAME;
status = getaddrinfo (host, NULL, &hints, &res);
if (!status)
{
retval = strdup (res->ai_canonname);
if (!retval && cherror)
*cherror = EAI_MEMORY;
freeaddrinfo (res);
}
else if (cherror)
*cherror = status;
return retval;
}
/* Return a string describing the last error encountered by canon_host. */
const char *
ch_strerror (void)
{
return gai_strerror (last_cherror);
}

Some files were not shown because too many files have changed in this diff Show More