Compare commits

...

1523 Commits
v5.92 ... v6.0

Author SHA1 Message Date
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
687 changed files with 186126 additions and 97131 deletions

154
.gitignore vendored Normal file
View File

@@ -0,0 +1,154 @@
*.1
*.I[12]
*.[EIOX]
*.gmo
*.o
*/.deps
*~
.kludge-stamp
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
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/stdint.h
lib/t-fpending
po/Makefile.in
po/POTFILES
po/coreutils.pot
po/stamp-po
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/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.91
5.92

3
.x-po-check Normal file
View File

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

View File

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

View File

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$

27
.x-sc_require_config_h Normal file
View File

@@ -0,0 +1,27 @@
^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

@@ -3,3 +3,4 @@ Makefile\.in$
^config-log/
^build-aux/texinfo\.tex$
\.gdb-history$
^src/c99-to-c89\.diff

View File

View File

@@ -1 +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/

1467
ABOUT-NLS

File diff suppressed because it is too large Load Diff

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

View File

@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
51 Franklin St, 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.
@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found.
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
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
@@ -313,7 +313,7 @@ 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.

12510
ChangeLog

File diff suppressed because it is too large Load Diff

11002
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

67
INSTALL
View File

@@ -1,13 +1,16 @@
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
Installation Instructions
*************************
This file is free documentation; the Free Software Foundation gives
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006 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.
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -67,9 +70,9 @@ The simplest way to compile this package is:
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.
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
@@ -82,7 +85,7 @@ is an example:
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
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
@@ -99,19 +102,19 @@ 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'.
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
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.
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files 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
options like `--bindir=DIR' 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.
@@ -122,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
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
@@ -137,11 +140,11 @@ you can use the `configure' options `--x-includes=DIR' and
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
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:
@@ -156,7 +159,7 @@ where SYSTEM can have one of these forms:
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
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
@@ -167,9 +170,9 @@ 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'.
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.
@@ -178,7 +181,7 @@ 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
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
@@ -186,14 +189,18 @@ 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
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`configure' recognizes the following options to control how it operates.
`--help'
`-h'

View File

@@ -2,14 +2,26 @@
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.hgignore \
.gitignore \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.vg-suppressions \
.x-po-check \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
.x-sc_require_config_h \
.x-sc_prohibit_assert_without_use \
.x-sc_prohibit_atoi_atof \
.x-sc_trailing_blank \
.x-sc_two_space_separator_in_usage \
announce-gen \
build-aux/cvsu \
build-aux/vc-list-files \
m4/ChangeLog \
ChangeLog-2005 \
old/fileutils/ChangeLog \
old/fileutils/ChangeLog-1997 \
old/sh-utils/ChangeLog \
@@ -48,6 +60,8 @@ rm_subst = \
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; \

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
@@ -47,5 +47,11 @@ cvs_files = \
local_updates = wget-update cvs-update
# Tests not to run.
local-checks-to-skip =
# The GnuPG ID of the key used to sign the tarballs.
gpg_key_ID = D333CBA1
# 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

@@ -38,40 +38,46 @@ 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 \
INSTALL NEWS THANKS TODO build-aux/ChangeLog build-aux/compile \
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 \
am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
$(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/allocsa.m4 $(top_srcdir)/m4/argmatch.m4 \
$(top_srcdir)/m4/arpa_inet_h.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/chdir-long.m4 $(top_srcdir)/m4/chdir-safer.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/close-stream.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/dev-ino.m4 $(top_srcdir)/m4/diacrit.m4 \
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.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-stat.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/fprintftime.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-abort-bug.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 \
@@ -86,14 +92,17 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/idcache.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
$(top_srcdir)/m4/inttypes-h.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/lchmod.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ignore.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 \
@@ -105,32 +114,37 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/memset.m4 $(top_srcdir)/m4/memxfrm.m4 \
$(top_srcdir)/m4/mkancesdirs.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/netinet_in_h.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.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/quotearg.m4 $(top_srcdir)/m4/randint.m4 \
$(top_srcdir)/m4/randperm.m4 $(top_srcdir)/m4/randread.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/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/safe-write.m4 $(top_srcdir)/m4/same-inode.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/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
$(top_srcdir)/m4/sig2str.m4 $(top_srcdir)/m4/signed.m4 \
$(top_srcdir)/m4/snprintf.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/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stdint.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 \
@@ -142,6 +156,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/sys_socket_h.m4 $(top_srcdir)/m4/time_r.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 \
@@ -154,13 +169,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcwidth.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 \
@@ -190,16 +205,23 @@ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
ARPA_INET_H = @ARPA_INET_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -221,8 +243,19 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
@@ -237,6 +270,7 @@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_ACL = @LIB_ACL@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
@@ -249,10 +283,11 @@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
NETINET_IN_H = @NETINET_IN_H@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
@@ -265,21 +300,27 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDBOOL_H = @STDBOOL_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_SOCKET_H = @SYS_SOCKET_H@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
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@
@@ -324,14 +365,26 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.hgignore \
.gitignore \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.vg-suppressions \
.x-po-check \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
.x-sc_require_config_h \
.x-sc_prohibit_assert_without_use \
.x-sc_prohibit_atoi_atof \
.x-sc_trailing_blank \
.x-sc_two_space_separator_in_usage \
announce-gen \
build-aux/cvsu \
build-aux/vc-list-files \
m4/ChangeLog \
ChangeLog-2005 \
old/fileutils/ChangeLog \
old/fileutils/ChangeLog-1997 \
old/sh-utils/ChangeLog \
@@ -353,6 +406,7 @@ ACLOCAL_AMFLAGS = -I m4
rm_subst = \
s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
MAINTAINERCLEANFILES = THANKS-to-translators
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -722,6 +776,7 @@ distclean-generic:
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-recursive
clean-am: clean-generic mostlyclean-am
@@ -804,7 +859,6 @@ distcheck-hook:
.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; \

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,11 +24,18 @@
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|grep rsyncable >/dev/null && echo --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
CVS = cvs
CVS_LIST = cvsu --find --types=AFGM
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
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
@@ -56,125 +63,116 @@ 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 \
changelog-check patch-check strftime-check $(syntax-check-rules) \
makefile_path_separator_check \
makefile-check
.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/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-$@ ) && \
@grep -n '^# *if HAVE_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
1>&2; exit 1; } || :
# Nearly all .c files must include <config.h>.
sc_require_config_h:
@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; } || :
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
@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; } || :
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; } || :
@@ -182,31 +180,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 '$(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; \
@@ -229,52 +227,72 @@ 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:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E \
'\<error \([^"]*"[^"]*[a-z]{3}' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) \
| 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.
# For now, it affects only remove.c. Eventually, we'll probably
# have to copy all of src/ before running patch.
patch-check:
cp src/remove.c tmp-remove.c
patch -V never --fuzz=0 tmp-remove.c src/c99-to-c89.diff \
> $@.1 2>&1
sed -n '2p' $@.1 > $@.2
test -s $@.2 && exit 1 || :
rm -f tmp-remove.c $@.1 $@.2
# 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.
@@ -294,7 +312,7 @@ strftime-check:
# 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
@@ -317,19 +335,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" : ' \(.*\)\..'`; \
@@ -337,7 +357,7 @@ po-check:
esac; \
files="$$files $$file"; \
done; \
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort -u > $@-2; \
diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \
fi
@@ -346,7 +366,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; } || :
@@ -358,7 +378,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.
@@ -379,7 +399,7 @@ 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; }; \
@@ -405,7 +425,7 @@ cvs-diff-check:
cvs-check: cvs-diff-check cvs-tag-check
maintainer-distcheck: changelog-check
maintainer-distcheck:
$(MAKE) distcheck
$(MAKE) my-distcheck
@@ -430,7 +450,8 @@ 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
@@ -441,7 +462,7 @@ my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
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 \
@@ -457,16 +478,6 @@ my-distcheck: $(local-check) $(release_archive_dir)/$(prev-tgz)
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-$$$$; \
@@ -487,6 +498,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)) \
@@ -507,31 +519,10 @@ move_if_change ?= move-if-change
# --------------------- #
.PHONY: update
local_updates ?= wget-update cvs-update po-update
local_updates ?= wget-update cvs-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. #
# -------------------------- #
@@ -604,7 +595,11 @@ $(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)
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) cvs-dist
$(MAKE) $(xd-delta)
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)

293
NEWS
View File

@@ -1,5 +1,292 @@
GNU coreutils NEWS -*- outline -*-
* 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 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.
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
@@ -8,6 +295,7 @@ GNU coreutils NEWS -*- outline -*-
dircolors now properly quotes single-quote characters
* Major changes in release 5.91 (2005-10-17) [stable candidate]
** Bug fixes
@@ -373,6 +661,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.
@@ -556,6 +846,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.

15
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.
@@ -109,7 +110,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 +125,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

View File

@@ -16,13 +16,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'
_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 --quiet --num-callers='$n
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

28
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
@@ -222,6 +230,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 +247,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
@@ -354,6 +364,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 +383,16 @@ 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 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 +406,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
@@ -426,6 +442,7 @@ 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
@@ -436,12 +453,15 @@ 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
@@ -454,12 +474,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
@@ -470,6 +492,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
@@ -488,3 +512,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:

70
TODO
View File

@@ -1,6 +1,4 @@
restore djgpp, eventually
merge TODO lists
add unit tests for lib/*.c
convert to use gnulib-tool
strip: add an option to specify the program used to strip binaries.
suggestion from Karl Berry
@@ -9,8 +7,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,12 +43,8 @@ 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.
@@ -73,16 +65,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 +94,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 +101,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
@@ -158,35 +135,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
@@ -199,13 +153,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.
@@ -216,8 +170,6 @@ Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
Remove all uses of the `register' keyword
rm: add support for a -I option, like that from FreeBSD's rm:
-I Request confirmation once if more than three files are being
removed or if a directory is being recursively removed. This
is a far less intrusive option than -i yet provides almost
the same level of protection against mistakes.
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

59
aclocal.m4 vendored
View File

@@ -541,6 +541,34 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
#
# 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.
# serial 3
# AM_PROG_CC_C_O
# --------------
# Like AC_PROG_CC_C_O, but changed for automake.
AC_DEFUN([AM_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
@@ -873,11 +901,12 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/absolute-header.m4])
m4_include([m4/acl.m4])
m4_include([m4/afs.m4])
m4_include([m4/alloca.m4])
m4_include([m4/allocsa.m4])
m4_include([m4/argmatch.m4])
m4_include([m4/arpa_inet_h.m4])
m4_include([m4/assert.m4])
m4_include([m4/atexit.m4])
m4_include([m4/autobuild.m4])
@@ -890,23 +919,28 @@ m4_include([m4/calloc.m4])
m4_include([m4/canon-host.m4])
m4_include([m4/canonicalize.m4])
m4_include([m4/chdir-long.m4])
m4_include([m4/chdir-safer.m4])
m4_include([m4/check-decl.m4])
m4_include([m4/chown.m4])
m4_include([m4/clock_time.m4])
m4_include([m4/cloexec.m4])
m4_include([m4/close-stream.m4])
m4_include([m4/closeout.m4])
m4_include([m4/codeset.m4])
m4_include([m4/cycle-check.m4])
m4_include([m4/d-ino.m4])
m4_include([m4/d-type.m4])
m4_include([m4/dev-ino.m4])
m4_include([m4/diacrit.m4])
m4_include([m4/dirfd.m4])
m4_include([m4/dirname.m4])
m4_include([m4/dos.m4])
m4_include([m4/double-slash-root.m4])
m4_include([m4/dup2.m4])
m4_include([m4/eealloc.m4])
m4_include([m4/eoverflow.m4])
m4_include([m4/error.m4])
m4_include([m4/euidaccess-stat.m4])
m4_include([m4/euidaccess.m4])
m4_include([m4/exclude.m4])
m4_include([m4/exitfail.m4])
@@ -919,12 +953,14 @@ m4_include([m4/filemode.m4])
m4_include([m4/filenamecat.m4])
m4_include([m4/fnmatch.m4])
m4_include([m4/fpending.m4])
m4_include([m4/fprintftime.m4])
m4_include([m4/free.m4])
m4_include([m4/fstypename.m4])
m4_include([m4/fsusage.m4])
m4_include([m4/ftruncate.m4])
m4_include([m4/fts.m4])
m4_include([m4/getaddrinfo.m4])
m4_include([m4/getcwd-abort-bug.m4])
m4_include([m4/getcwd-path-max.m4])
m4_include([m4/getcwd.m4])
m4_include([m4/getdate.m4])
@@ -951,16 +987,20 @@ m4_include([m4/host-os.m4])
m4_include([m4/human.m4])
m4_include([m4/iconv.m4])
m4_include([m4/idcache.m4])
m4_include([m4/inet_ntop.m4])
m4_include([m4/intmax_t.m4])
m4_include([m4/inttostr.m4])
m4_include([m4/inttypes-h.m4])
m4_include([m4/inttypes-pri.m4])
m4_include([m4/inttypes.m4])
m4_include([m4/inttypes_h.m4])
m4_include([m4/jm-macros.m4])
m4_include([m4/jm-winsz1.m4])
m4_include([m4/jm-winsz2.m4])
m4_include([m4/lchmod.m4])
m4_include([m4/lchown.m4])
m4_include([m4/lib-check.m4])
m4_include([m4/lib-ignore.m4])
m4_include([m4/lib-ld.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
@@ -987,6 +1027,8 @@ m4_include([m4/memmove.m4])
m4_include([m4/mempcpy.m4])
m4_include([m4/memrchr.m4])
m4_include([m4/memset.m4])
m4_include([m4/memxfrm.m4])
m4_include([m4/mkancesdirs.m4])
m4_include([m4/mkdir-p.m4])
m4_include([m4/mkdir-slash.m4])
m4_include([m4/mkstemp.m4])
@@ -994,9 +1036,9 @@ m4_include([m4/mktime.m4])
m4_include([m4/modechange.m4])
m4_include([m4/mountlist.m4])
m4_include([m4/nanosleep.m4])
m4_include([m4/netinet_in_h.m4])
m4_include([m4/nls.m4])
m4_include([m4/obstack.m4])
m4_include([m4/onceonly_2_57.m4])
m4_include([m4/openat.m4])
m4_include([m4/pathmax.m4])
m4_include([m4/perl.m4])
@@ -1009,26 +1051,32 @@ m4_include([m4/progtest.m4])
m4_include([m4/putenv.m4])
m4_include([m4/quote.m4])
m4_include([m4/quotearg.m4])
m4_include([m4/randint.m4])
m4_include([m4/randperm.m4])
m4_include([m4/randread.m4])
m4_include([m4/readlink.m4])
m4_include([m4/readtokens.m4])
m4_include([m4/readutmp.m4])
m4_include([m4/regex.m4])
m4_include([m4/rename.m4])
m4_include([m4/restrict.m4])
m4_include([m4/rmdir-errno.m4])
m4_include([m4/rmdir.m4])
m4_include([m4/root-dev-ino.m4])
m4_include([m4/rpmatch.m4])
m4_include([m4/safe-read.m4])
m4_include([m4/safe-write.m4])
m4_include([m4/same-inode.m4])
m4_include([m4/same.m4])
m4_include([m4/save-cwd.m4])
m4_include([m4/savedir.m4])
m4_include([m4/setenv.m4])
m4_include([m4/settime.m4])
m4_include([m4/sha1.m4])
m4_include([m4/sha256.m4])
m4_include([m4/sha512.m4])
m4_include([m4/sig2str.m4])
m4_include([m4/signed.m4])
m4_include([m4/snprintf.m4])
m4_include([m4/socklen.m4])
m4_include([m4/sockpfaf.m4])
m4_include([m4/ssize_t.m4])
@@ -1036,7 +1084,9 @@ m4_include([m4/st_dm_mode.m4])
m4_include([m4/stat-macros.m4])
m4_include([m4/stat-prog.m4])
m4_include([m4/stat-time.m4])
m4_include([m4/stdarg.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stdint.m4])
m4_include([m4/stdint_h.m4])
m4_include([m4/stdio-safer.m4])
m4_include([m4/stdlib-safer.m4])
@@ -1059,6 +1109,8 @@ m4_include([m4/strtoul.m4])
m4_include([m4/strtoull.m4])
m4_include([m4/strtoumax.m4])
m4_include([m4/strverscmp.m4])
m4_include([m4/sys_socket_h.m4])
m4_include([m4/time_r.m4])
m4_include([m4/timespec.m4])
m4_include([m4/tm_gmtoff.m4])
m4_include([m4/tzset.m4])
@@ -1084,6 +1136,7 @@ m4_include([m4/vasnprintf.m4])
m4_include([m4/vasprintf.m4])
m4_include([m4/version-etc.m4])
m4_include([m4/wchar_t.m4])
m4_include([m4/wcwidth.m4])
m4_include([m4/wint_t.m4])
m4_include([m4/xalloc.m4])
m4_include([m4/xfts.m4])

View File

@@ -6,7 +6,7 @@ use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
(my $VERSION = '$Revision: 1.23 $ ') =~ tr/[0-9].//cd;
(my $VERSION = '$Revision: 1.24 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
@@ -60,6 +60,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 +125,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 +301,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 +311,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 +368,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;

View File

@@ -1,3 +1,58 @@
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.

136
build-aux/compile Normal file
View File

@@ -0,0 +1,136 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2003-11-09.00
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit 0
;;
-v | --v*)
echo "compile $scriptversion"
exit 0
;;
esac
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status
# 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,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-09-19'
timestamp='2006-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -206,8 +207,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -764,7 +768,14 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -779,8 +790,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -817,6 +831,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
@@ -851,7 +868,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -870,7 +891,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -919,6 +944,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
@@ -964,7 +992,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -974,7 +1002,11 @@ EOF
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1263,6 +1295,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@@ -2,7 +2,7 @@
# 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.
# Copyright 1996-2006 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -25,7 +25,7 @@
# 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,
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
@@ -35,7 +35,17 @@ 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 _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
@@ -48,7 +58,7 @@ else
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
case $cc_basename in
xlc*)
wl='-Wl,'
;;
@@ -78,6 +88,13 @@ else
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
osf3* | osf4* | osf5*)
@@ -120,6 +137,10 @@ case "$host_os" in
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
@@ -127,6 +148,12 @@ esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# 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'
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
@@ -162,9 +189,20 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
interix3*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
solaris*)
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
@@ -173,16 +211,23 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
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
:
@@ -191,10 +236,8 @@ if test "$with_gnu_ld" = yes; then
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'
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
@@ -225,6 +268,7 @@ else
break
fi
done
;;
esac
fi
hardcode_direct=yes
@@ -244,6 +288,7 @@ else
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
@@ -291,7 +336,7 @@ else
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
case $cc_basename in
xlc*)
;;
*)
@@ -326,24 +371,25 @@ else
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
hpux10*)
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_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
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
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.
@@ -397,8 +443,6 @@ else
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
@@ -427,14 +471,11 @@ else
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
@@ -471,12 +512,12 @@ case "$host_os" in
;;
kfreebsd*-gnu)
;;
freebsd*)
freebsd* | dragonfly*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
case $host_cpu in
ia64*)
shrext=.so
;;
@@ -488,6 +529,8 @@ case "$host_os" in
;;
esac
;;
interix3*)
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
@@ -523,16 +566,16 @@ case "$host_os" in
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
sysv4 | sysv4.3*)
;;
sysv4*MP*)
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
;;
uts4*)
;;
esac

95
build-aux/config.sub vendored
View File

@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
timestamp='2005-07-08'
timestamp='2006-08-14'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,7 +241,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -239,7 +249,8 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,28 +268,26 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -286,6 +295,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -305,7 +317,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -316,7 +328,7 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,31 +348,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -696,6 +707,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +817,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +879,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -885,6 +909,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -1101,7 +1129,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1202,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1340,6 +1370,9 @@ else
# system, and we'll never get to this point.
case $basic_machine in
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@@ -1349,9 +1382,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20

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,9 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
scriptversion=2006-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 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
@@ -276,6 +277,46 @@ icc)
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
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
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
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'.
@@ -288,13 +329,13 @@ tru64)
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
# static library. This mechanism 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
# compilations output dependencies 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

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-09-13.16
scriptversion=2006-05-11.20
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -39,15 +39,24 @@ scriptversion=2005-09-13.16
# 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.
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# put in absolute paths if you don't have them in your path; or use env. vars.
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
@@ -61,17 +70,9 @@ 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=
@@ -109,7 +110,7 @@ Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
while test $# -ne 0; do
case $1 in
-c) shift
continue;;
@@ -128,6 +129,12 @@ while test -n "$1"; do
-m) mode=$2
shift
shift
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;;
-o) chowncmd="$chownprog $2"
@@ -150,25 +157,33 @@ while test -n "$1"; do
--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
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
done
if test -z "$1"; then
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# 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
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@@ -178,7 +193,32 @@ if test -z "$1"; then
exit 0
fi
test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
@@ -230,14 +270,25 @@ do
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
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'
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
@@ -250,51 +301,72 @@ do
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
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
fi ;;
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- / "$tmpdir/d") >/dev/null 2>&1
then
# Check for bugs in HP-UX 11.23 and IRIX 6.5 mkdir.
case `ls -ld "$tmpdir"` in
d????-??-* ) posix_mkdir=:;;
esac
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
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"
}
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $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.
# The umask is ridiculous, or 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= ;;
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
esac
case $posix_glob in
@@ -314,19 +386,39 @@ do
$posix_glob && set +f
IFS=$oIFS
prefixes=
for d
do
test "x$d" = x && continue
test -z "$d" && 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
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
pathcomp=$pathcomp/
prefix=$prefix/
done
obsolete_mkdir_used=true
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
@@ -334,7 +426,7 @@ do
{ 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
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
@@ -345,7 +437,7 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -356,7 +448,7 @@ do
{ 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"; } &&
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
@@ -389,7 +481,7 @@ do
}
} || exit 1
trap - 0
trap '' 0
fi
done

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@@ -33,6 +33,8 @@ if test $# -eq 0; then
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@ fi
msg="missing on your system"
case "$1" in
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
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
@@ -106,7 +109,7 @@ 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
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
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'`
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
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
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
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
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
\`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
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
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'`
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
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`
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
@@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
case "$firstarg" in
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-06-29.22
scriptversion=2006-05-11.19
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
@@ -11,6 +11,9 @@ scriptversion=2005-06-29.22
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
IFS=" "" $nl"
errstatus=0
dirmode=

View File

@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2005-10-10.17}
\def\texinfoversion{2006-07-17.16}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
% Foundation, Inc.
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
% Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -293,6 +293,13 @@
% before the \shipout runs.
%
\indexdummies % don't expand commands in the output.
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
% {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -320,9 +327,9 @@
\pagebody{#1}%
\ifdim\ht\footlinebox > 0pt
% Only leave this space if the footline is nonempty.
% (We lessened \vsize for it in \oddfootingxxx.)
% (We lessened \vsize for it in \oddfootingyyy.)
% The \baselineskip=24pt in plain's \makefootline has no effect.
\vskip 2\baselineskip
\vskip 24pt
\unvbox\footlinebox
\fi
%
@@ -378,7 +385,7 @@
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
\def\next{#2}%
\def\argtorun{#2}%
\begingroup
\obeylines
\spaceisspace
@@ -409,8 +416,7 @@
\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
\def\temp{#3}%
\ifx\temp\empty
% We cannot use \next here, as it holds the macro to run;
% thus we reuse \temp.
% Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
\let\temp\finishparsearg
\else
\let\temp\argcheckspaces
@@ -422,14 +428,14 @@
% If a _delimited_ argument is enclosed in braces, they get stripped; so
% to get _exactly_ the rest of the line, we had to prevent such situation.
% We prepended an \empty token at the very beginning and we expand it now,
% just before passing the control to \next.
% just before passing the control to \argtorun.
% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
% either the null string, or it ends with \^^M---thus there is no danger
% that a pair of braces would be stripped.
%
% But first, we have to remove the trailing space token.
%
\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef\foo{...}
% is roughly equivalent to
@@ -1078,15 +1084,24 @@ where each line of input produces a line of output.}
\def\minus{$-$}
% @dots{} outputs an ellipsis using the current font.
% We do .5em per period so that it has the same spacing in a typewriter
% font as three actual period characters.
% We do .5em per period so that it has the same spacing in the cm
% typewriter fonts as three actual period characters; on the other hand,
% in other typewriter fonts three periods are wider than 1.5em. So do
% whichever is larger.
%
\def\dots{%
\leavevmode
\hbox to 1.5em{%
\hskip 0pt plus 0.25fil
.\hfil.\hfil.%
\hskip 0pt plus 0.5fil
\setbox0=\hbox{...}% get width of three periods
\ifdim\wd0 > 1.5em
\dimen0 = \wd0
\else
\dimen0 = 1.5em
\fi
\hbox to \dimen0{%
\hskip 0pt plus.25fil
.\hskip 0pt plus1fil
.\hskip 0pt plus1fil
.\hskip 0pt plus.5fil
}%
}
@@ -1231,9 +1246,10 @@ where each line of input produces a line of output.}
\ifpdf
\input pdfcolor
\pdfcatalog{/PageMode /UseOutlines}%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
\def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
\def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
% without \immediate, pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
@@ -1241,8 +1257,8 @@ where each line of input produces a line of output.}
\else
\immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
\ifdim \wd0 >0pt width \imagewidth \fi
\ifdim \wd2 >0pt height \imageheight \fi
\ifnum\pdftexversion<13
#1.pdf%
\else
@@ -1385,9 +1401,17 @@ where each line of input produces a line of output.}
\else
\let \startlink \pdfstartlink
\fi
% make a live url in pdf output.
\def\pdfurl#1{%
\begingroup
\normalturnoffactive\def\@{@}%
% it seems we really need yet another set of dummies; have not
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
%
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\makevalueexpandable
\leavevmode\Red
\startlink attr{/Border [0 0 0]}%
@@ -1457,6 +1481,7 @@ where each line of input produces a line of output.}
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
% Default leading.
\newdimen\textleading \textleading = 13.2pt
@@ -1478,11 +1503,13 @@ where each line of input produces a line of output.}
}%
}
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
@@ -1506,6 +1533,10 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
% Definitions for a main text size of 11pt. This is the default in
% Texinfo.
%
\def\definetextfontsizexi{
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
\edef\mainmagstep{\magstephalf}
@@ -1619,6 +1650,165 @@ where each line of input produces a line of output.}
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
% reset the current fonts
\textfonts
\rm
} % end of 11pt text font size definitions
% Definitions to make the main text be 10pt Computer Modern, with
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
\edef\mainmagstep{1000}
\setfont\textrm\rmshape{10}{\mainmagstep}
\setfont\texttt\ttshape{10}{\mainmagstep}
\setfont\textbf\bfshape{10}{\mainmagstep}
\setfont\textit\itshape{10}{\mainmagstep}
\setfont\textsl\slshape{10}{\mainmagstep}
\setfont\textsf\sfshape{10}{\mainmagstep}
\setfont\textsc\scshape{10}{\mainmagstep}
\setfont\textttsl\ttslshape{10}{\mainmagstep}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}
\setfont\deftt\ttshape{10}{\magstephalf}
\setfont\defttsl\ttslshape{10}{\magstephalf}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}
\setfont\smalltt\ttshape{9}{1000}
\setfont\smallbf\bfshape{10}{900}
\setfont\smallit\itshape{9}{1000}
\setfont\smallsl\slshape{9}{1000}
\setfont\smallsf\sfshape{9}{1000}
\setfont\smallsc\scshape{10}{900}
\setfont\smallttsl\ttslshape{10}{900}
\font\smalli=cmmi9
\font\smallsy=cmsy9
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}
\setfont\smallertt\ttshape{8}{1000}
\setfont\smallerbf\bfshape{10}{800}
\setfont\smallerit\itshape{8}{1000}
\setfont\smallersl\slshape{8}{1000}
\setfont\smallersf\sfshape{8}{1000}
\setfont\smallersc\scshape{10}{800}
\setfont\smallerttsl\ttslshape{10}{800}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}
\setfont\titleit\itbshape{10}{\magstep4}
\setfont\titlesl\slbshape{10}{\magstep4}
\setfont\titlett\ttbshape{12}{\magstep3}
\setfont\titlettsl\ttslshape{10}{\magstep4}
\setfont\titlesf\sfbshape{17}{\magstep1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\authorrm{\secrm}
\def\authortt{\sectt}
% Chapter fonts (14.4pt).
\def\chapnominalsize{14pt}
\setfont\chaprm\rmbshape{12}{\magstep1}
\setfont\chapit\itbshape{10}{\magstep2}
\setfont\chapsl\slbshape{10}{\magstep2}
\setfont\chaptt\ttbshape{12}{\magstep1}
\setfont\chapttsl\ttslshape{10}{\magstep2}
\setfont\chapsf\sfbshape{12}{\magstep1}
\let\chapbf\chaprm
\setfont\chapsc\scbshape{10}{\magstep2}
\font\chapi=cmmi12 scaled \magstep1
\font\chapsy=cmsy10 scaled \magstep2
% Section fonts (12pt).
\def\secnominalsize{12pt}
\setfont\secrm\rmbshape{12}{1000}
\setfont\secit\itbshape{10}{\magstep1}
\setfont\secsl\slbshape{10}{\magstep1}
\setfont\sectt\ttbshape{12}{1000}
\setfont\secttsl\ttslshape{10}{\magstep1}
\setfont\secsf\sfbshape{12}{1000}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}
\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
% Subsection fonts (10pt).
\def\ssecnominalsize{10pt}
\setfont\ssecrm\rmbshape{10}{1000}
\setfont\ssecit\itbshape{10}{1000}
\setfont\ssecsl\slbshape{10}{1000}
\setfont\ssectt\ttbshape{10}{1000}
\setfont\ssecttsl\ttslshape{10}{1000}
\setfont\ssecsf\sfbshape{10}{1000}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1000}
\font\sseci=cmmi10
\font\ssecsy=cmsy10
% Reduced fonts for @acro in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}
\setfont\reducedtt\ttshape{9}{1000}
\setfont\reducedbf\bfshape{10}{900}
\setfont\reducedit\itshape{9}{1000}
\setfont\reducedsl\slshape{9}{1000}
\setfont\reducedsf\sfshape{9}{1000}
\setfont\reducedsc\scshape{10}{900}
\setfont\reducedttsl\ttslshape{10}{900}
\font\reducedi=cmmi9
\font\reducedsy=cmsy9
% reduce space between paragraphs
\divide\parskip by 2
% reset the current fonts
\textfonts
\rm
} % end of 10pt text font size definitions
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
\def\xword{10}
\def\xiword{11}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
%
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
\else
\errhelp=\EMsimple
\errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
\fi\fi
\endgroup
}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts except
@@ -1729,7 +1919,7 @@ where each line of input produces a line of output.}
% Set up the default fonts, so we can use them for creating boxes.
%
\textfonts \rm
\definetextfontsizexi
% Define these so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
@@ -1861,11 +2051,11 @@ where each line of input produces a line of output.}
% and arrange explicitly to hyphenate at a dash.
% -- rms.
{
\catcode`\-=\active
\catcode`\_=\active
\catcode`\-=\active \catcode`\_=\active \catcode`\'=\active
%
\global\def\code{\begingroup
\catcode`\-=\active \catcode`\_=\active
\catcode`\-=\active \catcode`\_=\active \catcode`\'=\active
\let'\singlequotechar
\ifallowcodebreaks
\let-\codedash
\let_\codeunder
@@ -2282,8 +2472,8 @@ where each line of input produces a line of output.}
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
\global\advance\pageheight by -\baselineskip
\global\advance\vsize by -\baselineskip
\global\advance\pageheight by -12pt
\global\advance\vsize by -12pt
}
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
@@ -2942,6 +3132,7 @@ where each line of input produces a line of output.}
\def\doignore#1{\begingroup
% Scan in ``verbatim'' mode:
\obeylines
\catcode`\@ = \other
\catcode`\{ = \other
\catcode`\} = \other
@@ -2962,16 +3153,16 @@ where each line of input produces a line of output.}
\gdef\dodoignore#1{%
% #1 contains the command name as a string, e.g., `ifinfo'.
%
% Define a command to find the next `@end #1', which must be on a line
% by itself.
\long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}%
% Define a command to find the next `@end #1'.
\long\def\doignoretext##1^^M@end #1{%
\doignoretextyyy##1^^M@#1\_STOP_}%
%
% And this command to find another #1 command, at the beginning of a
% line. (Otherwise, we would consider a line `@c @ifset', for
% example, to count as an @ifset for nesting.)
\long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
%
% And now expand that command.
\obeylines %
\doignoretext ^^M%
}%
}
@@ -3001,7 +3192,12 @@ where each line of input produces a line of output.}
}
% Finish off ignored text.
\def\enddoignore{\endgroup\ignorespaces}
{ \obeylines%
% Ignore anything after the last `@end #1'; this matters in verbatim
% environments, where otherwise the newline after an ignored conditional
% would result in a blank line in the output.
\gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
}
% @set VAR sets the variable VAR to an empty value.
@@ -3204,12 +3400,39 @@ where each line of input produces a line of output.}
\escapechar = `\\ % use backslash in output files.
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
% causes processing to be prematurely terminated. This is,
% apparently, because \indexsorttmp is fully expanded, and \endinput
% is an expandable command. The redefinition below makes \endinput
% disappear altogether for that purpose -- although logging shows that
% processing continues to some further point. On the other hand, it
% seems \endinput does not hurt in the printed index arg, since that
% is still getting written without apparent harm.
%
% Sample source (mac-idx3.tex, reported by Graham Percival to
% help-texinfo, 22may06):
% @macro funindex {WORD}
% @findex xyz
% @end macro
% ...
% @funindex commtest
%
% The above is not enough to reproduce the bug, but it gives the flavor.
%
% Sample whatsit resulting:
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
%
% So:
\let\endinput = \empty
%
% Do the redefinitions.
\commondummies
}
@@ -3782,9 +4005,9 @@ where each line of input produces a line of output.}
\endgroup
}
% Like \dotfill except takes at least 1 em.
% Like plain.tex's \dotfill, except uses up at least 1 em.
\def\indexdotfill{\cleaders
\hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
@@ -4358,14 +4581,17 @@ where each line of input produces a line of output.}
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
\gdef\thischapternum{}%
\gdef\thischapter{#1}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
\gdef\thischapternum{}%
\gdef\thischapter{}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
\xdef\thischapternum{\appendixletter}%
% We don't substitute the actual chapter name into \thischapter
% because we don't want its macros evaluated now. And we don't
% use \thissection because that changes with each section.
@@ -4375,6 +4601,7 @@ where each line of input produces a line of output.}
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
\xdef\thischapternum{\the\chapno}%
\xdef\thischapter{\putwordChapter{} \the\chapno:
\noexpand\thischaptername}%
\fi\fi\fi
@@ -4486,13 +4713,21 @@ where each line of input produces a line of output.}
\gdef\thissection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chfplain.
% Write the toc entry (before \donoderef). See comments in \chapmacro.
\writetocentry{\toctype\sectionlevel}{#1}{#4}%
%
% Write the node reference (= pdf destination for pdftex).
% Again, see comments in \chfplain.
% Again, see comments in \chapmacro.
\donoderef{#3}%
%
% Interline glue will be inserted when the vbox is completed.
% That glue will be a valid breakpoint for the page, since it'll be
% preceded by a whatsit (usually from the \donoderef, or from the
% \writetocentry if there was no node). We don't want to allow that
% break, since then the whatsits could end up on page n while the
% section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
\nobreak
%
% Output the actual section heading.
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
\hangindent=\wd0 % zero if no section number
@@ -4555,7 +4790,7 @@ where each line of input produces a line of output.}
\edef\temp{%
\write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
\temp
}
}%
\fi
\fi
%
@@ -4807,7 +5042,7 @@ where each line of input produces a line of output.}
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
@@ -5030,11 +5265,10 @@ where each line of input produces a line of output.}
%
\maketwodispenvs {lisp}{example}{%
\nonfillstart
\tt
\tt\quoteexpand
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
\gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
\makedispenv {display}{%
@@ -5162,6 +5396,22 @@ where each line of input produces a line of output.}
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
\def\starttabbox{\setbox0=\hbox\bgroup}
% Allow an option to not replace quotes with a regular directed right
% quote/apostrophe (char 0x27), but instead use the undirected quote
% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
% the default, but it works for pasting with more pdf viewers (at least
% evince), the lilypond developers report. xpdf does work with the
% regular 0x27.
%
\def\singlequotechar{%
\expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
'%
\else
\char'15
\fi
}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
@@ -5174,7 +5424,13 @@ where each line of input produces a line of output.}
\wd0=\dimen0 \box0 \starttabbox
}%
}
\catcode`\'=\active
\gdef\quoteexpand{%
\catcode`\'=\active
\def'{\singlequotechar}
}%
\endgroup
%
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
@@ -5183,6 +5439,7 @@ where each line of input produces a line of output.}
\def\par{\leavevmode\egroup\box0\endgraf}%
\catcode`\`=\active
\tabexpand
\quoteexpand
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
@@ -5632,7 +5889,6 @@ where each line of input produces a line of output.}
\spaceisspace
%
% Append \endinput to make sure that TeX does not see the ending newline.
%
% I've verified that it is necessary both for e-TeX and for ordinary TeX
% --kasal, 29nov03
\scantokens{#1\endinput}%
@@ -5899,11 +6155,11 @@ where each line of input produces a line of output.}
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
% as an argument (by \parsebrace or \parsearg)
\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
\expandafter\parsearg
\fi \next}
\fi \macnamexxx}
% @alias.
@@ -6498,7 +6754,7 @@ where each line of input produces a line of output.}
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup\hss
\line\bgroup
\fi
%
% Output the image.
@@ -6511,7 +6767,7 @@ where each line of input produces a line of output.}
\epsfbox{#1.eps}%
\fi
%
\ifimagevmode \hss \egroup \bigbreak \fi % space after the image
\ifimagevmode \egroup \bigbreak \fi % space after the image
\endgroup}
@@ -7102,22 +7358,6 @@ should work if nowhere else does.}
% \otherifyactive is called near the end of this file.
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
% Same as @turnoffactive below, but backslash retains it's normal definition.
% (Before 2005-08-15, this macro explicitly assigned @let\=@normalbackslash,
% but it doesn't seem to be necessary. --kasal)
\def\normalturnoffactive{%
\let"=\normaldoublequote
\let~=\normaltilde
\let^=\normalcaret
\let_=\normalunderscore
\let|=\normalverticalbar
\let<=\normalless
\let>=\normalgreater
\let+=\normalplus
\let$=\normaldollar %$ font-lock fix
\unsepspaces
}
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
@@ -7149,6 +7389,23 @@ should work if nowhere else does.}
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'.
%
@def@normalturnoffactive{%
@let\=@normalbackslash
@let"=@normaldoublequote
@let~=@normaltilde
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar %$ font-lock fix
@unsepspaces
}
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
@otherifyactive

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

@@ -0,0 +1,40 @@
#!/bin/sh
# 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.
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 | cut -d ' ' -f 3
else
git-ls-files | cut -d ' ' -f 3 | 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

View File

@@ -1,7 +1,7 @@
/* config.hin. Generated from configure.ac by autoheader. */
/* Define if you have the Andrew File System. */
#undef AFS
/* Define this to an absolute name of <stdint.h>. */
#undef ABSOLUTE_STDINT_H
/* Define to the function xargmatch calls on failures. */
#undef ARGMATCH_DIE
@@ -9,6 +9,21 @@
/* Define to the declaration of the xargmatch failure function. */
#undef ARGMATCH_DIE_DECL
/* Define to the number of bits in type 'ptrdiff_t'. */
#undef BITSIZEOF_PTRDIFF_T
/* Define to the number of bits in type 'sig_atomic_t'. */
#undef BITSIZEOF_SIG_ATOMIC_T
/* Define to the number of bits in type 'size_t'. */
#undef BITSIZEOF_SIZE_T
/* Define to the number of bits in type 'wchar_t'. */
#undef BITSIZEOF_WCHAR_T
/* Define to the number of bits in type 'wint_t'. */
#undef BITSIZEOF_WINT_T
/* Define if chown is not POSIX compliant regarding IDs of -1. */
#undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE
@@ -54,6 +69,9 @@
#endif
/* Define to 1 if // is a file system root distinct from /. */
#undef DOUBLE_SLASH_IS_DISTINCT_ROOT
/* Define if there is a member named d_ino in the struct describing directory
headers. */
#undef D_INO_IN_DIRENT
@@ -74,12 +92,9 @@
separator. */
#undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
#else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
#endif
/* Define if a drive letter prefix denotes a relative path if it is not
followed by a file name component separator. */
#undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
/* Define to the type of elements in the array set by `getgroups'. Usually
this is either `int' or `gid_t'. */
@@ -101,6 +116,42 @@
/* Define to 1 if you have the `acl' function. */
#undef HAVE_ACL
/* Define to 1 if you have the `acl_delete_def_file' function. */
#undef HAVE_ACL_DELETE_DEF_FILE
/* Define to 1 if you have the `acl_entries' function. */
#undef HAVE_ACL_ENTRIES
/* Define to 1 if you have the `acl_extended_file' function. */
#undef HAVE_ACL_EXTENDED_FILE
/* Define to 1 if you have the `acl_free' function. */
#undef HAVE_ACL_FREE
/* Define to 1 if you have the `acl_from_mode' function. */
#undef HAVE_ACL_FROM_MODE
/* Define to 1 if you have the `acl_from_text' function. */
#undef HAVE_ACL_FROM_TEXT
/* Define to 1 if you have the `acl_get_fd' function. */
#undef HAVE_ACL_GET_FD
/* Define to 1 if you have the `acl_get_file' function. */
#undef HAVE_ACL_GET_FILE
/* Define to 1 if you have the <acl/libacl.h> header file. */
#undef HAVE_ACL_LIBACL_H
/* Define to 1 if you have the `acl_set_fd' function. */
#undef HAVE_ACL_SET_FD
/* Define to 1 if you have the `acl_set_file' function. */
#undef HAVE_ACL_SET_FILE
/* Define to 1 if you have the `acl_to_text' function. */
#undef HAVE_ACL_TO_TEXT
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
@@ -115,6 +166,9 @@
/* Define if you have an arithmetic hrtime_t type. */
#undef HAVE_ARITHMETIC_HRTIME_T
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `atexit' function. */
#undef HAVE_ATEXIT
@@ -275,6 +329,10 @@
don't. */
#undef HAVE_DECL_GETLOGIN
/* Define to 1 if you have the declaration of `getnameinfo', and to 0 if you
don't. */
#undef HAVE_DECL_GETNAMEINFO
/* Define to 1 if you have the declaration of `getpass', and to 0 if you
don't. */
#undef HAVE_DECL_GETPASS
@@ -291,6 +349,14 @@
don't. */
#undef HAVE_DECL_GETUTENT
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#undef HAVE_DECL_INET_NTOP
/* Define to 1 if you have the declaration of `isblank', and to 0 if you
don't. */
#undef HAVE_DECL_ISBLANK
/* Define to 1 if you have the declaration of `lseek', and to 0 if you don't.
*/
#undef HAVE_DECL_LSEEK
@@ -331,6 +397,10 @@
don't. */
#undef HAVE_DECL_SETREGID
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_SNPRINTF
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
*/
#undef HAVE_DECL_STPCPY
@@ -343,6 +413,10 @@
don't. */
#undef HAVE_DECL_STRERROR_R
/* Define to 1 if you have the declaration of `strmode', and to 0 if you
don't. */
#undef HAVE_DECL_STRMODE
/* Define to 1 if you have the declaration of `strndup', and to 0 if you
don't. */
#undef HAVE_DECL_STRNDUP
@@ -391,8 +465,8 @@
*/
#undef HAVE_DECL_TZNAME
/* Define to 1 if you have the declaration of wcwidth(), and to 0 otherwise.
*/
/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
don't. */
#undef HAVE_DECL_WCWIDTH
/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
@@ -435,9 +509,6 @@
/* Define if you have the declaration of environ. */
#undef HAVE_ENVIRON_DECL
/* Define if you have the declaration of errno. */
#undef HAVE_ERRNO_DECL
/* Define to 1 if you have the `euidaccess' function. */
#undef HAVE_EUIDACCESS
@@ -459,9 +530,6 @@
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
@@ -498,6 +566,9 @@
/* Define to 1 if your system has a working `getgroups' function. */
#undef HAVE_GETGROUPS
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostid' function. */
#undef HAVE_GETHOSTID
@@ -549,6 +620,9 @@
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
@@ -571,9 +645,6 @@
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
/* Define to 1 if you have the `iswcntrl' function. */
#undef HAVE_ISWCNTRL
@@ -586,6 +657,9 @@
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the `lchmod' function. */
#undef HAVE_LCHMOD
/* Define to 1 if you have the `lchown' function. */
#undef HAVE_LCHOWN
@@ -616,12 +690,19 @@
/* Define if you have the 'long double' type. */
#undef HAVE_LONG_DOUBLE
/* Define to 1 if the type `long double' works and has more range or precision
than `double'. */
#undef HAVE_LONG_DOUBLE_WIDER
/* Define to 1 if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
/* Define if you have the 'long long' type. */
#undef HAVE_LONG_LONG
/* Define to 1 if the system has the type `long long int'. */
#undef HAVE_LONG_LONG_INT
/* Define to 1 if `lstat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_LSTAT_EMPTY_STRING_BUG
@@ -642,7 +723,7 @@
/* Define to 1 if you have the `mbrlen' function. */
#undef HAVE_MBRLEN
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
/* Define to 1 if you have the `mbrtowc' function. */
#undef HAVE_MBRTOWC
/* Define to 1 if you have the `mbsinit' function. */
@@ -687,9 +768,6 @@
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define to 1 if you have the `modf' function. */
#undef HAVE_MODF
/* Define to 1 if you have the `nanotime' function. */
#undef HAVE_NANOTIME
@@ -741,6 +819,9 @@
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE
/* Define to 1 if you have the <priv.h> header file. */
#undef HAVE_PRIV_H
@@ -775,9 +856,6 @@
/* Define to 1 if you have the `resolvepath' function. */
#undef HAVE_RESOLVEPATH
/* Define to 1 if you have the `rint' function. */
#undef HAVE_RINT
/* Define to 1 if you have the `rmdir' function. */
#undef HAVE_RMDIR
@@ -793,6 +871,9 @@
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `setgroups' function. */
#undef HAVE_SETGROUPS
/* Define to 1 if you have the `sethostname' function. */
#undef HAVE_SETHOSTNAME
@@ -811,6 +892,15 @@
/* Define to 1 if you have the `siginterrupt' function. */
#undef HAVE_SIGINTERRUPT
/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
#undef HAVE_SIGNED_SIG_ATOMIC_T
/* Define to 1 if 'wchar_t' is a signed integer type. */
#undef HAVE_SIGNED_WCHAR_T
/* Define to 1 if 'wint_t' is a signed integer type. */
#undef HAVE_SIGNED_WINT_T
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
@@ -820,9 +910,6 @@
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -855,9 +942,6 @@
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -867,7 +951,7 @@
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
/* Define to 1 if you have the `strndup' function. */
/* Define if you have the strndup() function and it works. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the <stropts.h> header file. */
@@ -1040,6 +1124,9 @@
/* Define to 1 if you have the `strverscmp' function. */
#undef HAVE_STRVERSCMP
/* Define to 1 if you have the `strxfrm' function. */
#undef HAVE_STRXFRM
/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
`HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
#undef HAVE_ST_BLOCKS
@@ -1047,6 +1134,9 @@
/* Define if struct stat has an st_dm_mode member. */
#undef HAVE_ST_DM_MODE
/* Define to 1 if you have the `sync' function. */
#undef HAVE_SYNC
/* Define to 1 if you have the `sysctl' function. */
#undef HAVE_SYSCTL
@@ -1065,6 +1155,9 @@
/* Define to 1 if you have the <sys/acl.h> header file. */
#undef HAVE_SYS_ACL_H
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
@@ -1078,6 +1171,9 @@
/* Define to 1 if you have the <sys/fs_types.h> header file. */
#undef HAVE_SYS_FS_TYPES_H
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
@@ -1100,6 +1196,9 @@
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
@@ -1163,6 +1262,10 @@
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if localtime_r, etc. have the type signatures that POSIX
requires. */
#undef HAVE_TIME_R_POSIX
/* Define if struct tm has the tm_gmtoff member. */
#undef HAVE_TM_GMTOFF
@@ -1195,6 +1298,9 @@
/* Define if you have the 'unsigned long long' type. */
#undef HAVE_UNSIGNED_LONG_LONG
/* Define to 1 if the system has the type `unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define if utimes accepts a null argument */
#undef HAVE_UTIMES_NULL
@@ -1246,6 +1352,9 @@
/* Define to 1 if you have the `wcwidth' function. */
#undef HAVE_WCWIDTH
/* Define to 1 if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
/* Define if you have the 'wint_t' type. */
#undef HAVE_WINT_T
@@ -1261,6 +1370,9 @@
/* Define if utimes works properly. */
#undef HAVE_WORKING_UTIMES
/* Define to 1 if you have the <ws2tcpip.h> header file. */
#undef HAVE_WS2TCPIP_H
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
@@ -1360,6 +1472,9 @@
on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
#undef NLIST_NAME_UNION
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Name of package */
#undef PACKAGE
@@ -1394,6 +1509,10 @@
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'ptrdiff_t'. */
#undef PTRDIFF_T_SUFFIX
/* Define if rename does not work for source file names with a trailing slash,
like the one from SunOS 4.1.1_U1. */
#undef RENAME_TRAILING_SLASH_BUG
@@ -1406,9 +1525,17 @@
release 3. */
#undef SETVBUF_REVERSED
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'sig_atomic_t'. */
#undef SIG_ATOMIC_T_SUFFIX
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'size_t'. */
#undef SIZE_T_SUFFIX
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
@@ -1466,6 +1593,10 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Define to 1 if the type of the st_atim member of a struct stat is struct
timespec. */
#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
/* Define if tzset clobbers localtime's static buffer. */
#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
@@ -1491,6 +1622,9 @@
/* Define to 1 if unlink (dir) cannot possibly succeed. */
#undef UNLINK_CANNOT_UNLINK_DIR
/* Define if you want access control list support. */
#undef USE_ACL
/* Define to 1 if you want getc etc. to use unlocked I/O if available.
Unlocked I/O can improve performance in unithreaded apps, but it is not
safe for multithreaded apps. */
@@ -1502,9 +1636,17 @@
/* Define if unsetenv() returns void, not int. */
#undef VOID_UNSETENV
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wchar_t'. */
#undef WCHAR_T_SUFFIX
/* Define if sys/ptem.h is required for struct winsize. */
#undef WINSIZE_IN_PTEM
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
'wint_t'. */
#undef WINT_T_SUFFIX
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
@@ -1575,9 +1717,6 @@
/* Define to rpl_chown if the replacement function should be used. */
#undef chown
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to a replacement function name for fnmatch(). */
#undef fnmatch
@@ -1599,6 +1738,9 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))
/* Define to rpl_gmtime if the replacement function should be used. */
#undef gmtime
@@ -1720,7 +1862,7 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Map `socklen_t' to `int' if it is missing. */
/* type to use in place of socklen_t if not defined */
#undef socklen_t
/* Define as a signed type of the same size as size_t. */
@@ -1729,6 +1871,9 @@
/* Define to rpl_strcasecmp always. */
#undef strcasecmp
/* Define to rpl_strndup if the replacement function should be used, */
#undef strndup
/* Define to rpl_strnlen if the replacement function should be used. */
#undef strnlen
@@ -1756,6 +1901,9 @@
/* Define to rpl_utime if the replacement function should be used. */
#undef utime
/* Define as a macro for copying va_list variables. */
#undef va_copy
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
#undef volatile

32646
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +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.92],[bug-coreutils@gnu.org])
AC_INIT([GNU coreutils],[6.0],[bug-coreutils@gnu.org])
AC_CONFIG_SRCDIR(src/ls.c)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_HEADERS([config.h: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_IGNORE_UNUSED_LIBRARIES
AC_CHECK_FUNCS(uname,
@@ -248,8 +250,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 +261,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,3 +1,324 @@
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):

View File

@@ -11,7 +11,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 +30,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 +41,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

@@ -39,33 +39,39 @@ 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 \
am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
$(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/allocsa.m4 $(top_srcdir)/m4/argmatch.m4 \
$(top_srcdir)/m4/arpa_inet_h.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/chdir-long.m4 $(top_srcdir)/m4/chdir-safer.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/close-stream.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/dev-ino.m4 $(top_srcdir)/m4/diacrit.m4 \
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.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-stat.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/fprintftime.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-abort-bug.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 \
@@ -80,14 +86,17 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/idcache.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
$(top_srcdir)/m4/inttypes-h.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/lchmod.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ignore.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 \
@@ -99,32 +108,37 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/memset.m4 $(top_srcdir)/m4/memxfrm.m4 \
$(top_srcdir)/m4/mkancesdirs.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/netinet_in_h.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.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/quotearg.m4 $(top_srcdir)/m4/randint.m4 \
$(top_srcdir)/m4/randperm.m4 $(top_srcdir)/m4/randread.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/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/safe-write.m4 $(top_srcdir)/m4/same-inode.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/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
$(top_srcdir)/m4/sig2str.m4 $(top_srcdir)/m4/signed.m4 \
$(top_srcdir)/m4/snprintf.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/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stdint.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 \
@@ -136,6 +150,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/sys_socket_h.m4 $(top_srcdir)/m4/time_r.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 \
@@ -148,13 +163,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcwidth.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
@@ -177,16 +192,23 @@ AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
am__installdirs = "$(DESTDIR)$(infodir)"
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
ARPA_INET_H = @ARPA_INET_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -208,8 +230,19 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
@@ -224,6 +257,7 @@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_ACL = @LIB_ACL@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
@@ -234,21 +268,13 @@ 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
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
NETINET_IN_H = @NETINET_IN_H@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
@@ -261,21 +287,27 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDBOOL_H = @STDBOOL_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_SOCKET_H = @SYS_SOCKET_H@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
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@
@@ -320,6 +352,16 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.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,
# 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.
AM_MAKEINFOFLAGS = --no-split
MAINTAINERCLEANFILES = constants.texi
# Extended regular expressions to match word starts and ends.
@@ -651,7 +693,8 @@ $(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'.
# 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; \
@@ -661,14 +704,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

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
@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 2003, 2004, 2005, 2006 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
@@ -144,6 +144,11 @@ 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.
Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are
rejected. In the typical case of a host that does not support leap
seconds, a time like @samp{23:59:60} is rejected even if it
corresponds to a valid leap second.
@node Calendar date items
@section Calendar date items
@@ -238,7 +243,8 @@ a number between 0 and 23, @var{minute} is a number between 0 and
@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.
be zero. On the rare hosts that support leap seconds, @var{second}
may be 60.
@findex am @r{in date strings}
@findex pm @r{in date strings}
@@ -464,8 +470,8 @@ integers and can represent times from 1901-12-13 20:45:52 through
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
On most hosts, these counts ignore the presence of leap seconds.
For example, on most hosts @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}.

View File

@@ -1,16 +1,20 @@
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
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 +28,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 +54,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 +127,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 +149,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 +160,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 +225,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 +288,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 +337,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 +346,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 +376,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 +390,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 +416,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 +428,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 +477,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,9 +1,9 @@
#!/bin/sh
# Sign files and upload them.
scriptversion=2004-01-28.17
scriptversion=2006-05-20.00
# Copyright (C) 2004 Free Software Foundation
# Copyright (C) 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
@@ -39,13 +39,16 @@ Options:
--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
alpha.gnu.org:DIRECTORY
savannah.gnu.org:DIRECTORY
savannah.nongnu.org:DIRECTORY
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 \\
gnupload --to sources.redhat.com:~ftp/pub/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>.
@@ -55,7 +58,7 @@ while test -n "$1"; do
case $1 in
--help)
echo "$usage"
exit 0
exit $?
;;
--to)
if test -z "$2"; then
@@ -77,7 +80,7 @@ while test -n "$1"; do
;;
--version)
echo "gnupload $scriptversion"
exit 0
exit $?
;;
-*)
echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
@@ -136,21 +139,28 @@ do
do
echo "Uploading $file to $dest..."
files="$file $file.sig"
destdir=`echo $dest | sed 's/[^:]*://'`
case $dest in
alpha.gnu.org:*)
rm -f $file.directive $file.directive.asc
echo directory: `echo $dest | sed 's/[^:]*://'` >$file.directive
echo directory: $destdir >$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 directory: $destdir >$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
;;
savannah.gnu.org:*)
ncftpput savannah.gnu.org /incoming/savannah/$destdir $files
;;
savannah.nongnu.org:*)
ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files
;;
*)
scp $files $dest
;;

View File

@@ -29,8 +29,11 @@ regex.c
regex.h
regex_internal.c
regex_internal.h
snprintf.h
socket_.h
stat-time.h
stdbool_.h
stdint_.h
strcase.h
strdup.h
strndup.h
@@ -41,3 +44,4 @@ time_r.h
utimecmp.h
vasnprintf.h
vasprintf.h
wcwidth.h

View File

@@ -14,6 +14,7 @@ ref-del.sed
search.h
stat.c
stdbool.h
stdint.h
sysexit.h
t-fpending
unlocked-io.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,6 +17,8 @@
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
## 02110-1301, USA.
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
noinst_LIBRARIES = libcoreutils.a
noinst_PROGRAMS = t-fpending
@@ -27,27 +29,32 @@ DEFS += -DLIBDIR=\"$(libdir)\"
libcoreutils_a_SOURCES = \
allocsa.c allocsa.h \
base64.c base64.h \
buffer-lcm.c buffer-lcm.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 \
inet_ntop.h \
localcharset.c localcharset.h \
mbchar.h \
mbswidth.c mbswidth.h \
mbuiter.h \
readtokens0.c readtokens0.h \
setenv.h \
snprintf.h \
strcase.h \
strnlen1.c strnlen1.h \
strstr.h \
time_r.c time_r.h \
unicodeio.c unicodeio.h \
verify.h \
wcwidth.h \
xalloc-die.c \
xgethostname.c xgethostname.h \
xmemcoll.c xmemcoll.h \
xmemxfrm.c xmemxfrm.h \
xstrndup.c xstrndup.h \
xstrtoimax.c \
xstrtoumax.c
@@ -66,6 +73,7 @@ lib_OBJECTS = $(libcoreutils_a_OBJECTS)
BUILT_SOURCES = getdate.c
CLEANFILES =
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANDIRS =
MOSTLYCLEANFILES =
SUFFIXES =
@@ -122,11 +130,42 @@ CLEANFILES += charset.alias ref-add.sed ref-del.sed
BUILT_SOURCES += $(STDBOOL_H)
EXTRA_DIST += stdbool_.h
MOSTLYCLEANFILES += stdbool.h stdbool.ht
MOSTLYCLEANFILES += stdbool.h stdbool.h-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 $@
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
mv $@-t $@
BUILT_SOURCES += $(STDINT_H)
EXTRA_DIST += stdint_.h
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
stdint.h: stdint_.h
sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
-e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
-e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
-e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
-e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
-e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
< $(srcdir)/stdint_.h > $@-t
mv $@-t $@
MOSTLYCLEANFILES += stdint.h stdint.h-t
BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h
@@ -153,6 +192,40 @@ MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
BUILT_SOURCES += $(GETOPT_H)
EXTRA_DIST += getopt_.h getopt_int.h
BUILT_SOURCES += $(ARPA_INET_H)
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
arpa/inet.h:
test -d arpa || mkdir arpa
echo '#include <sys/socket.h>' >$@-t
mv $@-t $@
MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
MOSTLYCLEANDIRS += arpa
BUILT_SOURCES += $(SYS_SOCKET_H)
EXTRA_DIST += socket_.h
BUILT_SOURCES += $(NETINET_IN_H)
# We need the following in order to create <netinet/in.h> when the system
# doesn't have one.
netinet/in.h:
test -d netinet || mkdir netinet
echo '#include <sys/socket.h>' >$@-t
mv $@-t $@
MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t
MOSTLYCLEANDIRS += netinet
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
sys/socket.h: socket_.h
test -d sys || mkdir sys
cp $(srcdir)/socket_.h $@-t
mv $@-t $@
MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
MOSTLYCLEANDIRS += sys
check: unit-test
.PHONY: unit-test

View File

@@ -14,7 +14,7 @@
@SET_MAKE@
# Copyright (C) 1995-2005 Free Software Foundation, Inc.
# Copyright (C) 1995-2006 Free Software Foundation, Inc.
srcdir = @srcdir@
@@ -46,15 +46,18 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
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 \
canonicalize.h chdir-long.c chdir-long.h chdir-safer.c \
chdir-safer.h chown.c cloexec.c cloexec.h close-stream.c \
close-stream.h closeout.c closeout.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-stat.c \
euidaccess-stat.h euidaccess.c exclude.c exclude.h exitfail.c \
exitfail.h fchdir-stub.c fchmodat.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 fprintftime.c \
fprintftime.h 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 \
@@ -62,67 +65,77 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
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
human.h idcache.c imaxtostr.c inet_ntop.c intprops.h \
inttostr.c inttostr.h lchmod.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 memxfrm.c \
memxfrm.h mkancesdirs.c mkancesdirs.h mkdir-p.c mkdir-p.h \
mkdir.c mkdirat.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-priv.h 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 rand-isaac.c rand-isaac.h \
randint.c randint.h randperm.c randperm.h randread.c \
randread.h 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-inode.h same.c \
same.h save-cwd.c save-cwd.h savedir.c savedir.h setenv.c \
settime.c sha1.c sha1.h sha256.c sha256.h sha512.c sha512.h \
sig2str.c sig2str.h snprintf.c 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 time_r.c time_r.h 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 xstrtold.c \
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 \
am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
$(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
$(top_srcdir)/m4/allocsa.m4 $(top_srcdir)/m4/argmatch.m4 \
$(top_srcdir)/m4/arpa_inet_h.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/chdir-long.m4 $(top_srcdir)/m4/chdir-safer.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/close-stream.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/dev-ino.m4 $(top_srcdir)/m4/diacrit.m4 \
$(top_srcdir)/m4/dirfd.m4 $(top_srcdir)/m4/dirname.m4 \
$(top_srcdir)/m4/dos.m4 $(top_srcdir)/m4/double-slash-root.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-stat.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/fprintftime.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-abort-bug.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 \
@@ -137,14 +150,17 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/idcache.m4 $(top_srcdir)/m4/inet_ntop.m4 \
$(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
$(top_srcdir)/m4/inttypes-h.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/lchmod.m4 $(top_srcdir)/m4/lchown.m4 \
$(top_srcdir)/m4/lib-check.m4 $(top_srcdir)/m4/lib-ignore.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 \
@@ -156,32 +172,37 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/memset.m4 $(top_srcdir)/m4/memxfrm.m4 \
$(top_srcdir)/m4/mkancesdirs.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/netinet_in_h.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/obstack.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/quotearg.m4 $(top_srcdir)/m4/randint.m4 \
$(top_srcdir)/m4/randperm.m4 $(top_srcdir)/m4/randread.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/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/safe-write.m4 $(top_srcdir)/m4/same-inode.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/sha256.m4 $(top_srcdir)/m4/sha512.m4 \
$(top_srcdir)/m4/sig2str.m4 $(top_srcdir)/m4/signed.m4 \
$(top_srcdir)/m4/snprintf.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/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stdint.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 \
@@ -193,6 +214,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/sys_socket_h.m4 $(top_srcdir)/m4/time_r.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 \
@@ -205,13 +227,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcwidth.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
@@ -225,13 +247,13 @@ am__DEPENDENCIES_1 = @LIBOBJS@
am__DEPENDENCIES_2 = @ALLOCA@
libcoreutils_a_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2)
am_libcoreutils_a_OBJECTS = allocsa.$(OBJEXT) fprintftime.$(OBJEXT) \
full-read.$(OBJEXT) full-write.$(OBJEXT) \
am_libcoreutils_a_OBJECTS = allocsa.$(OBJEXT) base64.$(OBJEXT) \
buffer-lcm.$(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)
readtokens0.$(OBJEXT) strnlen1.$(OBJEXT) unicodeio.$(OBJEXT) \
xalloc-die.$(OBJEXT) xgethostname.$(OBJEXT) xmemcoll.$(OBJEXT) \
xmemxfrm.$(OBJEXT) xstrndup.$(OBJEXT) xstrtoimax.$(OBJEXT) \
xstrtoumax.$(OBJEXT)
libcoreutils_a_OBJECTS = $(am_libcoreutils_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
t_fpending_SOURCES = t-fpending.c
@@ -252,16 +274,23 @@ DIST_SOURCES = $(libcoreutils_a_SOURCES) t-fpending.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
ARPA_INET_H = @ARPA_INET_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -283,8 +312,19 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GMSGFMT_015 = @GMSGFMT_015@
GNU_PACKAGE = @GNU_PACKAGE@
GREP = @GREP@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
@@ -299,6 +339,7 @@ LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_ACL = @LIB_ACL@
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
LIB_CRYPT = @LIB_CRYPT@
LIB_EACCESS = @LIB_EACCESS@
@@ -311,10 +352,11 @@ LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
NETINET_IN_H = @NETINET_IN_H@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
PACKAGE = @PACKAGE@
@@ -327,21 +369,27 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
POSUB = @POSUB@
POW_LIB = @POW_LIB@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
STDBOOL_H = @STDBOOL_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_SOCKET_H = @SYS_SOCKET_H@
U = @U@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
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@
@@ -384,30 +432,36 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AM_CFLAGS = $(WARNING_CFLAGS) $(WERROR_CFLAGS)
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 \
libcoreutils_a_SOURCES = allocsa.c allocsa.h base64.c base64.h \
buffer-lcm.c buffer-lcm.h euidaccess.h exit.h full-read.c \
full-read.h full-write.c full-write.h getaddrinfo.h gettext.h \
inet_ntop.h localcharset.c localcharset.h mbchar.h mbswidth.c \
mbswidth.h mbuiter.h readtokens0.c readtokens0.h setenv.h \
snprintf.h strcase.h strnlen1.c strnlen1.h strstr.h \
unicodeio.c unicodeio.h verify.h wcwidth.h xalloc-die.c \
xgethostname.c xgethostname.h xmemcoll.c xmemcoll.h xmemxfrm.c \
xmemxfrm.h xstrndup.c xstrndup.h xstrtoimax.c xstrtoumax.c \
printf-args.h printf-parse.h vasprintf.h vasnprintf.h
libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
lib_OBJECTS = $(libcoreutils_a_OBJECTS)
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(ALLOCA_H) $(FNMATCH_H) \
$(GETOPT_H)
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(STDINT_H) $(ALLOCA_H) \
$(FNMATCH_H) $(GETOPT_H) $(ARPA_INET_H) $(SYS_SOCKET_H) \
$(NETINET_IN_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
MOSTLYCLEANDIRS = arpa netinet sys
MOSTLYCLEANFILES = stdbool.h stdbool.h-t stdint.h stdint.h-t alloca.h \
alloca.h-t fnmatch.h fnmatch.h-t arpa/inet.h arpa/inet.h-t \
netinet/in.h netinet/in.h-t sys/socket.h sys/socket.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
getndelim2.c getndelim2.h stdbool_.h stdint_.h alloca_.h \
fnmatch_.h fnmatch_loop.c getopt_.h getopt_int.h socket_.h
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
all: $(BUILT_SOURCES)
@@ -479,21 +533,26 @@ distclean-compile:
@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)/chdir-safer.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)/close-stream.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)/dirchownmod.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-stat.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)/fchmodat.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@
@@ -503,6 +562,7 @@ distclean-compile:
@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)/fprintftime.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@
@@ -534,6 +594,7 @@ distclean-compile:
@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)/inet_ntop.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@
@@ -551,8 +612,11 @@ distclean-compile:
@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)/memxfrm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkancesdirs.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)/mkdirat.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@
@@ -574,6 +638,10 @@ distclean-compile:
@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)/rand-isaac.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/randint.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/randperm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/randread.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@
@@ -594,7 +662,10 @@ distclean-compile:
@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)/sha256.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sha512.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sig2str.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.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@
@@ -617,6 +688,7 @@ distclean-compile:
@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)/time_r.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@
@@ -635,10 +707,12 @@ distclean-compile:
@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)/xstrtold.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)/base64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer-lcm.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@
@@ -646,11 +720,11 @@ distclean-compile:
@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)/xmemxfrm.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@
@@ -905,8 +979,35 @@ charset.alias: config.charset
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 $@
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t
mv $@-t $@
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
stdint.h: stdint_.h
sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
-e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
-e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
-e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
-e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
-e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
< $(srcdir)/stdint_.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.
@@ -922,6 +1023,27 @@ fnmatch.h: fnmatch_.h
cp $(srcdir)/fnmatch_.h $@-t
mv $@-t $@
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
arpa/inet.h:
test -d arpa || mkdir arpa
echo '#include <sys/socket.h>' >$@-t
mv $@-t $@
# We need the following in order to create <netinet/in.h> when the system
# doesn't have one.
netinet/in.h:
test -d netinet || mkdir netinet
echo '#include <sys/socket.h>' >$@-t
mv $@-t $@
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
sys/socket.h: socket_.h
test -d sys || mkdir sys
cp $(srcdir)/socket_.h $@-t
mv $@-t $@
check: unit-test
.PHONY: unit-test

376
lib/acl.c
View File

@@ -16,48 +16,394 @@
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. */
Written by Paul Eggert and Andreas Gruenbacher. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef S_ISLNK
# define S_ISLNK(Mode) 0
#endif
#ifdef HAVE_ACL_LIBACL_H
# include <acl/libacl.h>
#endif
#include "acl.h"
#include "error.h"
#include "quote.h"
#include <errno.h>
#ifndef ENOSYS
# define ENOSYS (-1)
#endif
#ifndef MIN_ACL_ENTRIES
# define MIN_ACL_ENTRIES 4
#ifndef ENOTSUP
# define ENOTSUP (-1)
#endif
/* Return 1 if FILE has a nontrivial access control list, 0 if not,
and -1 (setting errno) if an error is encountered. */
#if ENABLE_NLS
# include <libintl.h>
# define _(Text) gettext (Text)
#else
# define _(Text) Text
#endif
#ifndef HAVE_FCHMOD
# define HAVE_FCHMOD false
# define fchmod(fd, mode) (-1)
#endif
/* POSIX 1003.1e (draft 17) */
#ifndef HAVE_ACL_GET_FD
# define HAVE_ACL_GET_FD false
# define acl_get_fd(fd) (NULL)
#endif
/* POSIX 1003.1e (draft 17) */
#ifndef HAVE_ACL_SET_FD
# define HAVE_ACL_SET_FD false
# define acl_set_fd(fd, acl) (-1)
#endif
/* Linux-specific */
#ifndef HAVE_ACL_EXTENDED_FILE
# define HAVE_ACL_EXTENDED_FILE false
# define acl_extended_file(name) (-1)
#endif
/* Linux-specific */
#ifndef HAVE_ACL_FROM_MODE
# define HAVE_ACL_FROM_MODE false
# define acl_from_mode(mode) (NULL)
#endif
/* We detect presence of POSIX 1003.1e (draft 17 -- abandoned) support
by checking for HAVE_ACL_GET_FILE, HAVE_ACL_SET_FILE, and HAVE_ACL_FREE.
Systems that have acl_get_file, acl_set_file, and acl_free must also
have acl_to_text, acl_from_text, and acl_delete_def_file (all defined
in the draft); systems that don't would hit #error statements here. */
#if USE_ACL && HAVE_ACL_GET_FILE && !HAVE_ACL_ENTRIES
# ifndef HAVE_ACL_TO_TEXT
# error Must have acl_to_text (see POSIX 1003.1e draft 17).
# endif
/* Return the number of entries in ACL. Linux implements acl_entries
as a more efficient extension than using this workaround. */
static int
acl_entries (acl_t acl)
{
char *text = acl_to_text (acl, NULL), *t;
int entries;
if (text == NULL)
return -1;
for (entries = 0, t = text; ; t++, entries++) {
t = strchr (t, '\n');
if (t == NULL)
break;
}
acl_free (text);
return entries;
}
#endif
/* If DESC is a valid file descriptor use fchmod to change the
file's mode to MODE on systems that have fchown. On systems
that don't have fchown and if DESC is invalid, use chown on
NAME instead. */
int
file_has_acl (char const *file, struct stat const *filestat)
chmod_or_fchmod (const char *name, int desc, mode_t mode)
{
/* 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_FCHMOD && desc != -1)
return fchmod (desc, mode);
else
return chmod (name, mode);
}
#if HAVE_ACL && defined GETACLCNT
if (! S_ISLNK (filestat->st_mode))
/* Return 1 if NAME has a nontrivial access control list, 0 if
NAME only has no or a base access control list, and -1 on
error. SB must be set to the stat buffer of FILE. */
int
file_has_acl (char const *name, struct stat const *sb)
{
#if USE_ACL && HAVE_ACL && defined GETACLCNT
/* This implementation should work on recent-enough versions of HP-UX,
Solaris, and Unixware. */
# ifndef MIN_ACL_ENTRIES
# define MIN_ACL_ENTRIES 4
# endif
if (! S_ISLNK (sb->st_mode))
{
int n = acl (file, GETACLCNT, 0, NULL);
int n = acl (name, GETACLCNT, 0, NULL);
return n < 0 ? (errno == ENOSYS ? 0 : -1) : (MIN_ACL_ENTRIES < n);
}
#elif USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_FREE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
if (! S_ISLNK (sb->st_mode))
{
int ret;
if (HAVE_ACL_EXTENDED_FILE)
ret = acl_extended_file (name);
else
{
acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
if (acl)
{
ret = (3 < acl_entries (acl));
acl_free (acl);
if (ret == 0 && S_ISDIR (sb->st_mode))
{
acl = acl_get_file (name, ACL_TYPE_DEFAULT);
if (acl)
{
ret = (0 < acl_entries (acl));
acl_free (acl);
}
else
ret = -1;
}
}
else
ret = -1;
}
if (ret < 0)
return (errno == ENOSYS || errno == ENOTSUP) ? 0 : -1;
return ret;
}
#endif
/* FIXME: Add support for AIX, Irix, and Tru64. Please see Samba's
source/lib/sysacls.c file for fix-related ideas. */
return 0;
}
/* Copy access control lists from one file to another. If SOURCE_DESC is
a valid file descriptor, use file descriptor operations, else use
filename based operations on SRC_NAME. Likewise for DEST_DESC and
DEST_NAME.
If access control lists are not available, fchmod the target file to
MODE. Also sets the non-permission bits of the destination file
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
System call return value semantics. */
int
copy_acl (const char *src_name, int source_desc, const char *dst_name,
int dest_desc, mode_t mode)
{
int ret;
#if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_SET_FILE && HAVE_ACL_FREE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
acl_t acl;
if (HAVE_ACL_GET_FD && source_desc != -1)
acl = acl_get_fd (source_desc);
else
acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
if (acl == NULL)
{
if (errno == ENOSYS || errno == ENOTSUP)
return set_acl (dst_name, dest_desc, mode);
else
{
error (0, errno, "%s", quote (src_name));
return -1;
}
}
if (HAVE_ACL_SET_FD && dest_desc != -1)
ret = acl_set_fd (dest_desc, acl);
else
ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
if (ret != 0)
{
int saved_errno = errno;
if (errno == ENOSYS || errno == ENOTSUP)
{
int n = acl_entries (acl);
acl_free (acl);
if (n == 3)
{
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
saved_errno = errno;
else
return 0;
}
else
chmod_or_fchmod (dst_name, dest_desc, mode);
}
else
{
acl_free (acl);
chmod_or_fchmod (dst_name, dest_desc, mode);
}
error (0, saved_errno, _("preserving permissions for %s"),
quote (dst_name));
return -1;
}
else
acl_free (acl);
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
{
/* We did not call chmod so far, so the special bits have not yet
been set. */
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
{
error (0, errno, _("preserving permissions for %s"),
quote (dst_name));
return -1;
}
}
if (S_ISDIR (mode))
{
acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
if (acl == NULL)
{
error (0, errno, "%s", quote (src_name));
return -1;
}
if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
{
error (0, errno, _("preserving permissions for %s"),
quote (dst_name));
acl_free (acl);
return -1;
}
else
acl_free (acl);
}
return 0;
#else
ret = chmod_or_fchmod (dst_name, dest_desc, mode);
if (ret != 0)
error (0, errno, _("preserving permissions for %s"), quote (dst_name));
return ret;
#endif
}
/* Set the access control lists of a file. If DESC is a valid file
descriptor, use file descriptor operations where available, else use
filename based operations on NAME. If access control lists are not
available, fchmod the target file to MODE. Also sets the
non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
to those from MODE if any are set. System call return value
semantics. */
int
set_acl (char const *name, int desc, mode_t mode)
{
#if USE_ACL && HAVE_ACL_SET_FILE && HAVE_ACL_FREE
/* POSIX 1003.1e draft 17 (abandoned) specific version. */
/* We must also have have_acl_from_text and acl_delete_def_file.
(acl_delete_def_file could be emulated with acl_init followed
by acl_set_file, but acl_set_file with an empty acl is
unspecified.) */
# ifndef HAVE_ACL_FROM_TEXT
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
# endif
# ifndef HAVE_ACL_DELETE_DEF_FILE
# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
# endif
acl_t acl;
int ret;
if (HAVE_ACL_FROM_MODE)
{
acl = acl_from_mode (mode);
if (!acl)
{
error (0, errno, "%s", quote (name));
return -1;
}
}
else
{
char acl_text[] = "u::---,g::---,o::---";
if (mode & S_IRUSR) acl_text[ 3] = 'r';
if (mode & S_IWUSR) acl_text[ 4] = 'w';
if (mode & S_IXUSR) acl_text[ 5] = 'x';
if (mode & S_IRGRP) acl_text[10] = 'r';
if (mode & S_IWGRP) acl_text[11] = 'w';
if (mode & S_IXGRP) acl_text[12] = 'x';
if (mode & S_IROTH) acl_text[17] = 'r';
if (mode & S_IWOTH) acl_text[18] = 'w';
if (mode & S_IXOTH) acl_text[19] = 'x';
acl = acl_from_text (acl_text);
if (!acl)
{
error (0, errno, "%s", quote (name));
return -1;
}
}
if (HAVE_ACL_SET_FD && desc != -1)
ret = acl_set_fd (desc, acl);
else
ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
if (ret != 0)
{
int saved_errno = errno;
acl_free (acl);
if (errno == ENOTSUP || errno == ENOSYS)
{
if (chmod_or_fchmod (name, desc, mode) != 0)
saved_errno = errno;
else
return 0;
}
error (0, saved_errno, _("setting permissions for %s"), quote (name));
return -1;
}
else
acl_free (acl);
if (S_ISDIR (mode) && acl_delete_def_file (name))
{
error (0, errno, _("setting permissions for %s"), quote (name));
return -1;
}
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
{
/* We did not call chmod so far, so the special bits have not yet
been set. */
if (chmod_or_fchmod (name, desc, mode))
{
error (0, errno, _("preserving permissions for %s"), quote (name));
return -1;
}
}
return 0;
#else
int ret = chmod_or_fchmod (name, desc, mode);
if (ret)
error (0, errno, _("setting permissions for %s"), quote (name));
return ret;
#endif
}

View File

@@ -18,11 +18,14 @@
Written by Paul Eggert. */
#if HAVE_SYS_ACL_H && HAVE_ACL
#if HAVE_SYS_ACL_H
# include <sys/acl.h>
#endif
#if ! defined GETACLCNT && defined ACL_CNT
#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
# define GETACLCNT ACL_CNT
#endif
int file_has_acl (char const *, struct stat const *);
int copy_acl (char const *, int, char const *, int, mode_t);
int set_acl (char const *, int, mode_t);
int chmod_or_fchmod (char const *, int, mode_t);

View File

@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004 Free Software
Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -34,19 +34,21 @@
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
#ifndef alloca
# 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
# endif
void *alloca (size_t);
# endif
#endif
#endif /* _GNULIB_ALLOCA_H */

View File

@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
Copyright (C) 2003-2004 Free Software Foundation, Inc.
Copyright (C) 2003-2006 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,12 @@
#include <stddef.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/* 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,
@@ -69,6 +75,11 @@ extern void freesa (void *p);
If this would be useful in your application. please speak up. */
#ifdef __cplusplus
}
#endif
/* ------------------- Auxiliary, non-public definitions ------------------- */
/* Determine the alignment of a type at compile time. */
@@ -81,6 +92,10 @@ extern void freesa (void *p);
/* 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)
#elif defined _AIX
/* Work around an AIX 3.2.5 xlc 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

View File

@@ -1,7 +1,8 @@
/* 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.
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
@@ -40,29 +41,10 @@
#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
#include <dirent.h>
#ifndef _D_EXACT_NAMLEN
# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
#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
@@ -94,11 +76,11 @@
#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.
- Its arg may be any int or unsigned int; it need not be an unsigned char
or EOF.
- 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
ISDIGIT 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)
@@ -115,7 +97,7 @@ char const *simple_backup_suffix = "~";
static void
check_extension (char *file, size_t filelen, char e)
{
char *base = base_name (file);
char *base = last_component (file);
size_t baselen = base_len (base);
size_t baselen_max = HAVE_LONG_FILE_NAMES ? 255 : NAME_MAX_MINIMUM;
@@ -165,8 +147,6 @@ check_extension (char *file, size_t filelen, char e)
}
}
#if HAVE_DIR
/* Returned values for NUMBERED_BACKUP. */
enum numbered_backup_result
@@ -202,7 +182,7 @@ numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
struct dirent *dp;
char *buf = *buffer;
size_t versionlenmax = 1;
char *base = base_name (buf);
char *base = last_component (buf);
size_t base_offset = base - buf;
size_t baselen = base_len (base);
@@ -226,7 +206,7 @@ numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
size_t versionlen;
size_t new_buflen;
if (! REAL_DIR_ENTRY (dp) || NLENGTH (dp) < baselen + 4)
if (! REAL_DIR_ENTRY (dp) || _D_EXACT_NAMLEN (dp) < baselen + 4)
continue;
if (memcmp (buf + base_offset, dp->d_name, baselen + 2) != 0)
@@ -281,7 +261,6 @@ numbered_backup (char **buffer, size_t buffer_size, size_t filelen)
*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.
@@ -300,14 +279,13 @@ find_backup_file_name (char const *file, enum backup_type backup_type)
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)
if (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))
{
@@ -322,7 +300,6 @@ find_backup_file_name (char const *file, enum backup_type backup_type)
simple = (backup_type == numbered_existing_backups);
break;
}
#endif
if (simple)
memcpy (s + filelen, simple_backup_suffix, simple_backup_suffix_size);

427
lib/base64.c Normal file
View File

@@ -0,0 +1,427 @@
/* base64.c -- Encode binary data using printable characters.
Copyright (C) 1999, 2000, 2001, 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 Simon Josefsson. Partially adapted from GNU MailUtils
* (mailbox/filter_trans.c, as of 2004-11-28). Improved by review
* from Paul Eggert, Bruno Haible, and Stepan Kasal.
*
* See also RFC 3548 <http://www.ietf.org/rfc/rfc3548.txt>.
*
* Be careful with error checking. Here is how you would typically
* use these functions:
*
* bool ok = base64_decode_alloc (in, inlen, &out, &outlen);
* if (!ok)
* FAIL: input was not valid base64
* if (out == NULL)
* FAIL: memory allocation error
* OK: data in OUT/OUTLEN
*
* size_t outlen = base64_encode_alloc (in, inlen, &out);
* if (out == NULL && outlen == 0 && inlen != 0)
* FAIL: input too long
* if (out == NULL)
* FAIL: memory allocation error
* OK: data in OUT/OUTLEN.
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Get prototype. */
#include "base64.h"
/* Get malloc. */
#include <stdlib.h>
/* Get UCHAR_MAX. */
#include <limits.h>
/* C89 compliant way to cast 'char' to 'unsigned char'. */
static inline unsigned char
to_uchar (char ch)
{
return ch;
}
/* Base64 encode IN array of size INLEN into OUT array of size OUTLEN.
If OUTLEN is less than BASE64_LENGTH(INLEN), write as many bytes as
possible. If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero
terminate the output buffer. */
void
base64_encode (const char *restrict in, size_t inlen,
char *restrict out, size_t outlen)
{
static const char b64str[64] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
while (inlen && outlen)
{
*out++ = b64str[(to_uchar (in[0]) >> 2) & 0x3f];
if (!--outlen)
break;
*out++ = b64str[((to_uchar (in[0]) << 4)
+ (--inlen ? to_uchar (in[1]) >> 4 : 0))
& 0x3f];
if (!--outlen)
break;
*out++ =
(inlen
? b64str[((to_uchar (in[1]) << 2)
+ (--inlen ? to_uchar (in[2]) >> 6 : 0))
& 0x3f]
: '=');
if (!--outlen)
break;
*out++ = inlen ? b64str[to_uchar (in[2]) & 0x3f] : '=';
if (!--outlen)
break;
if (inlen)
inlen--;
if (inlen)
in += 3;
}
if (outlen)
*out = '\0';
}
/* Allocate a buffer and store zero terminated base64 encoded data
from array IN of size INLEN, returning BASE64_LENGTH(INLEN), i.e.,
the length of the encoded data, excluding the terminating zero. On
return, the OUT variable will hold a pointer to newly allocated
memory that must be deallocated by the caller. If output string
length would overflow, 0 is returned and OUT is set to NULL. If
memory allocation failed, OUT is set to NULL, and the return value
indicates length of the requested memory block, i.e.,
BASE64_LENGTH(inlen) + 1. */
size_t
base64_encode_alloc (const char *in, size_t inlen, char **out)
{
size_t outlen = 1 + BASE64_LENGTH (inlen);
/* Check for overflow in outlen computation.
*
* If there is no overflow, outlen >= inlen.
*
* If the operation (inlen + 2) overflows then it yields at most +1, so
* outlen is 0.
*
* If the multiplication overflows, we lose at least half of the
* correct value, so the result is < ((inlen + 2) / 3) * 2, which is
* less than (inlen + 2) * 0.66667, which is less than inlen as soon as
* (inlen > 4).
*/
if (inlen > outlen)
{
*out = NULL;
return 0;
}
*out = malloc (outlen);
if (!*out)
return outlen;
base64_encode (in, inlen, *out, outlen);
return outlen - 1;
}
/* With this approach this file works independent of the charset used
(think EBCDIC). However, it does assume that the characters in the
Base64 alphabet (A-Za-z0-9+/) are encoded in 0..255. POSIX
1003.1-2001 require that char and unsigned char are 8-bit
quantities, though, taking care of that problem. But this may be a
potential problem on non-POSIX C99 platforms.
IBM C V6 for AIX mishandles "#define B64(x) ...'x'...", so use "_"
as the formal parameter rather than "x". */
#define B64(_) \
((_) == 'A' ? 0 \
: (_) == 'B' ? 1 \
: (_) == 'C' ? 2 \
: (_) == 'D' ? 3 \
: (_) == 'E' ? 4 \
: (_) == 'F' ? 5 \
: (_) == 'G' ? 6 \
: (_) == 'H' ? 7 \
: (_) == 'I' ? 8 \
: (_) == 'J' ? 9 \
: (_) == 'K' ? 10 \
: (_) == 'L' ? 11 \
: (_) == 'M' ? 12 \
: (_) == 'N' ? 13 \
: (_) == 'O' ? 14 \
: (_) == 'P' ? 15 \
: (_) == 'Q' ? 16 \
: (_) == 'R' ? 17 \
: (_) == 'S' ? 18 \
: (_) == 'T' ? 19 \
: (_) == 'U' ? 20 \
: (_) == 'V' ? 21 \
: (_) == 'W' ? 22 \
: (_) == 'X' ? 23 \
: (_) == 'Y' ? 24 \
: (_) == 'Z' ? 25 \
: (_) == 'a' ? 26 \
: (_) == 'b' ? 27 \
: (_) == 'c' ? 28 \
: (_) == 'd' ? 29 \
: (_) == 'e' ? 30 \
: (_) == 'f' ? 31 \
: (_) == 'g' ? 32 \
: (_) == 'h' ? 33 \
: (_) == 'i' ? 34 \
: (_) == 'j' ? 35 \
: (_) == 'k' ? 36 \
: (_) == 'l' ? 37 \
: (_) == 'm' ? 38 \
: (_) == 'n' ? 39 \
: (_) == 'o' ? 40 \
: (_) == 'p' ? 41 \
: (_) == 'q' ? 42 \
: (_) == 'r' ? 43 \
: (_) == 's' ? 44 \
: (_) == 't' ? 45 \
: (_) == 'u' ? 46 \
: (_) == 'v' ? 47 \
: (_) == 'w' ? 48 \
: (_) == 'x' ? 49 \
: (_) == 'y' ? 50 \
: (_) == 'z' ? 51 \
: (_) == '0' ? 52 \
: (_) == '1' ? 53 \
: (_) == '2' ? 54 \
: (_) == '3' ? 55 \
: (_) == '4' ? 56 \
: (_) == '5' ? 57 \
: (_) == '6' ? 58 \
: (_) == '7' ? 59 \
: (_) == '8' ? 60 \
: (_) == '9' ? 61 \
: (_) == '+' ? 62 \
: (_) == '/' ? 63 \
: -1)
static const signed char b64[0x100] = {
B64 (0), B64 (1), B64 (2), B64 (3),
B64 (4), B64 (5), B64 (6), B64 (7),
B64 (8), B64 (9), B64 (10), B64 (11),
B64 (12), B64 (13), B64 (14), B64 (15),
B64 (16), B64 (17), B64 (18), B64 (19),
B64 (20), B64 (21), B64 (22), B64 (23),
B64 (24), B64 (25), B64 (26), B64 (27),
B64 (28), B64 (29), B64 (30), B64 (31),
B64 (32), B64 (33), B64 (34), B64 (35),
B64 (36), B64 (37), B64 (38), B64 (39),
B64 (40), B64 (41), B64 (42), B64 (43),
B64 (44), B64 (45), B64 (46), B64 (47),
B64 (48), B64 (49), B64 (50), B64 (51),
B64 (52), B64 (53), B64 (54), B64 (55),
B64 (56), B64 (57), B64 (58), B64 (59),
B64 (60), B64 (61), B64 (62), B64 (63),
B64 (64), B64 (65), B64 (66), B64 (67),
B64 (68), B64 (69), B64 (70), B64 (71),
B64 (72), B64 (73), B64 (74), B64 (75),
B64 (76), B64 (77), B64 (78), B64 (79),
B64 (80), B64 (81), B64 (82), B64 (83),
B64 (84), B64 (85), B64 (86), B64 (87),
B64 (88), B64 (89), B64 (90), B64 (91),
B64 (92), B64 (93), B64 (94), B64 (95),
B64 (96), B64 (97), B64 (98), B64 (99),
B64 (100), B64 (101), B64 (102), B64 (103),
B64 (104), B64 (105), B64 (106), B64 (107),
B64 (108), B64 (109), B64 (110), B64 (111),
B64 (112), B64 (113), B64 (114), B64 (115),
B64 (116), B64 (117), B64 (118), B64 (119),
B64 (120), B64 (121), B64 (122), B64 (123),
B64 (124), B64 (125), B64 (126), B64 (127),
B64 (128), B64 (129), B64 (130), B64 (131),
B64 (132), B64 (133), B64 (134), B64 (135),
B64 (136), B64 (137), B64 (138), B64 (139),
B64 (140), B64 (141), B64 (142), B64 (143),
B64 (144), B64 (145), B64 (146), B64 (147),
B64 (148), B64 (149), B64 (150), B64 (151),
B64 (152), B64 (153), B64 (154), B64 (155),
B64 (156), B64 (157), B64 (158), B64 (159),
B64 (160), B64 (161), B64 (162), B64 (163),
B64 (164), B64 (165), B64 (166), B64 (167),
B64 (168), B64 (169), B64 (170), B64 (171),
B64 (172), B64 (173), B64 (174), B64 (175),
B64 (176), B64 (177), B64 (178), B64 (179),
B64 (180), B64 (181), B64 (182), B64 (183),
B64 (184), B64 (185), B64 (186), B64 (187),
B64 (188), B64 (189), B64 (190), B64 (191),
B64 (192), B64 (193), B64 (194), B64 (195),
B64 (196), B64 (197), B64 (198), B64 (199),
B64 (200), B64 (201), B64 (202), B64 (203),
B64 (204), B64 (205), B64 (206), B64 (207),
B64 (208), B64 (209), B64 (210), B64 (211),
B64 (212), B64 (213), B64 (214), B64 (215),
B64 (216), B64 (217), B64 (218), B64 (219),
B64 (220), B64 (221), B64 (222), B64 (223),
B64 (224), B64 (225), B64 (226), B64 (227),
B64 (228), B64 (229), B64 (230), B64 (231),
B64 (232), B64 (233), B64 (234), B64 (235),
B64 (236), B64 (237), B64 (238), B64 (239),
B64 (240), B64 (241), B64 (242), B64 (243),
B64 (244), B64 (245), B64 (246), B64 (247),
B64 (248), B64 (249), B64 (250), B64 (251),
B64 (252), B64 (253), B64 (254), B64 (255)
};
#if UCHAR_MAX == 255
# define uchar_in_range(c) true
#else
# define uchar_in_range(c) ((c) <= 255)
#endif
/* Return true if CH is a character from the Base64 alphabet, and
false otherwise. Note that '=' is padding and not considered to be
part of the alphabet. */
bool
isbase64 (char ch)
{
return uchar_in_range (to_uchar (ch)) && 0 <= b64[to_uchar (ch)];
}
/* Decode base64 encoded input array IN of length INLEN to output
array OUT that can hold *OUTLEN bytes. Return true if decoding was
successful, i.e. if the input was valid base64 data, false
otherwise. If *OUTLEN is too small, as many bytes as possible will
be written to OUT. On return, *OUTLEN holds the length of decoded
bytes in OUT. Note that as soon as any non-alphabet characters are
encountered, decoding is stopped and false is returned. This means
that, when applicable, you must remove any line terminators that is
part of the data stream before calling this function. */
bool
base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen)
{
size_t outleft = *outlen;
while (inlen >= 2)
{
if (!isbase64 (in[0]) || !isbase64 (in[1]))
break;
if (outleft)
{
*out++ = ((b64[to_uchar (in[0])] << 2)
| (b64[to_uchar (in[1])] >> 4));
outleft--;
}
if (inlen == 2)
break;
if (in[2] == '=')
{
if (inlen != 4)
break;
if (in[3] != '=')
break;
}
else
{
if (!isbase64 (in[2]))
break;
if (outleft)
{
*out++ = (((b64[to_uchar (in[1])] << 4) & 0xf0)
| (b64[to_uchar (in[2])] >> 2));
outleft--;
}
if (inlen == 3)
break;
if (in[3] == '=')
{
if (inlen != 4)
break;
}
else
{
if (!isbase64 (in[3]))
break;
if (outleft)
{
*out++ = (((b64[to_uchar (in[2])] << 6) & 0xc0)
| b64[to_uchar (in[3])]);
outleft--;
}
}
}
in += 4;
inlen -= 4;
}
*outlen -= outleft;
if (inlen != 0)
return false;
return true;
}
/* Allocate an output buffer in *OUT, and decode the base64 encoded
data stored in IN of size INLEN to the *OUT buffer. On return, the
size of the decoded data is stored in *OUTLEN. OUTLEN may be NULL,
if the caller is not interested in the decoded length. *OUT may be
NULL to indicate an out of memory error, in which case *OUTLEN
contains the size of the memory block needed. The function returns
true on successful decoding and memory allocation errors. (Use the
*OUT and *OUTLEN parameters to differentiate between successful
decoding and memory error.) The function returns false if the
input was invalid, in which case *OUT is NULL and *OUTLEN is
undefined. */
bool
base64_decode_alloc (const char *in, size_t inlen, char **out,
size_t *outlen)
{
/* This may allocate a few bytes too much, depending on input,
but it's not worth the extra CPU time to compute the exact amount.
The exact amount is 3 * inlen / 4, minus 1 if the input ends
with "=" and minus another 1 if the input ends with "==".
Dividing before multiplying avoids the possibility of overflow. */
size_t needlen = 3 * (inlen / 4) + 2;
*out = malloc (needlen);
if (!*out)
return true;
if (!base64_decode (in, inlen, *out, &needlen))
{
free (*out);
*out = NULL;
return false;
}
if (outlen)
*outlen = needlen;
return true;
}

45
lib/base64.h Normal file
View File

@@ -0,0 +1,45 @@
/* base64.h -- Encode binary data using printable characters.
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Simon Josefsson.
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 BASE64_H
# define BASE64_H
/* Get size_t. */
# include <stddef.h>
/* Get bool. */
# include <stdbool.h>
/* This uses that the expression (n+(k-1))/k means the smallest
integer >= n/k, i.e., the ceiling of n/k. */
# define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
extern bool isbase64 (char ch);
extern void base64_encode (const char *restrict in, size_t inlen,
char *restrict out, size_t outlen);
extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
extern bool base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen);
extern bool base64_decode_alloc (const char *in, size_t inlen,
char **out, size_t *outlen);
#endif /* BASE64_H */

View File

@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free
Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -22,58 +22,110 @@
#endif
#include "dirname.h"
#include <string.h>
#include "xalloc.h"
#include "xstrndup.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. */
/* Return the address of the last file name component of NAME. If
NAME has no relative file name components because it is a file
system root, return the empty string. */
char *
base_name (char const *name)
last_component (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
char const *p;
bool saw_slash = false;
while (ISSLASH (*base))
base++;
for (p = base; *p; p++)
{
if (ISSLASH (*p))
saw_slash = true;
else if (saw_slash)
{
/* 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;
saw_slash = false;
}
}
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. */
/* 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 last file name component of NAME, allocated with
xmalloc. On systems with drive letters, a leading "./"
distinguishes relative names that would otherwise look like a drive
letter. Unlike POSIX basename(), NAME cannot be NULL,
base_name("") returns "", and the first trailing slash is not
stripped.
If lstat (NAME) would succeed, then { chdir (dir_name (NAME));
lstat (base_name (NAME)); } will access the same file. Likewise,
if the sequence { chdir (dir_name (NAME));
rename (base_name (NAME), "foo"); } succeeds, you have renamed NAME
to "foo" in the same directory NAME was in. */
char *
base_name (char const *name)
{
char const *base = last_component (name);
size_t length;
/* If there is no last component, then name is a file system root or the
empty string. */
if (! *base)
return xstrndup (name, base_len (name));
/* Collapse a sequence of trailing slashes into one. */
length = base_len (base);
if (ISSLASH (base[length]))
length++;
/* On systems with drive letters, `a/b:c' must return `./b:c' rather
than `b:c' to avoid confusion with a drive letter. On systems
with pure POSIX semantics, this is not an issue. */
if (FILE_SYSTEM_PREFIX_LEN (base))
{
char *p = xmalloc (length + 3);
p[0] = '.';
p[1] = '/';
memcpy (p + 2, base, length);
p[length + 2] = '\0';
return p;
}
/* Finally, copy the basename. */
return xstrndup (base, length);
}
/* Return the length of the basename NAME. Typically NAME is the
value returned by base_name or last_component. Act like strlen
(NAME), except omit all trailing slashes. */
size_t
base_len (char const *name)
{
size_t len;
size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
&& ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
return 2;
if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
&& len == prefix_len && ISSLASH (name[prefix_len]))
return prefix_len + 1;
return len;
}

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

@@ -77,13 +77,10 @@ cdb_free (struct cd_buf const *cdb)
static int
cdb_advance_fd (struct cd_buf *cdb, char const *dir)
{
int new_fd = openat (cdb->fd, dir, O_RDONLY | O_DIRECTORY);
int new_fd = openat (cdb->fd, dir,
O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
if (new_fd < 0)
{
new_fd = openat (cdb->fd, dir, O_WRONLY | O_DIRECTORY);
if (new_fd < 0)
return -1;
}
return -1;
cdb_free (cdb);
cdb->fd = new_fd;

84
lib/chdir-safer.c Normal file
View File

@@ -0,0 +1,84 @@
/* much like chdir(2), but safer
Copyright (C) 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 Jim Meyering */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "chdir-safer.h"
#include <stdbool.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "same-inode.h"
#ifndef O_DIRECTORY
# define O_DIRECTORY 0
#endif
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
#endif
/* Like chdir, but fail if DIR is a symbolic link to a directory (or
similar funny business), or if DIR is not readable. This avoids a
minor race condition between when a directory is created or statted
and when the process chdirs into it. */
int
chdir_no_follow (char const *dir)
{
int result = 0;
int saved_errno;
int fd = open (dir,
O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NOFOLLOW | O_NONBLOCK);
if (fd < 0)
return -1;
/* If open follows symlinks, lstat DIR and fstat FD to ensure that
they are the same file; if they are different files, set errno to
ELOOP (the same value that open uses for symlinks with
O_NOFOLLOW) so the caller can report a failure. */
if (! O_NOFOLLOW)
{
struct stat sb1;
result = lstat (dir, &sb1);
if (result == 0)
{
struct stat sb2;
result = fstat (fd, &sb2);
if (result == 0 && ! SAME_INODE (sb1, sb2))
{
errno = ELOOP;
result = -1;
}
}
}
if (result == 0)
result = fchdir (fd);
saved_errno = errno;
close (fd);
errno = saved_errno;
return result;
}

21
lib/chdir-safer.h Normal file
View File

@@ -0,0 +1,21 @@
/* much like chdir(2), but safer
Copyright (C) 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. */
int chdir_no_follow (char const *file);

View File

@@ -27,12 +27,15 @@
most systems. */
#undef chown
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "stat-macros.h"
/* Provide a more-closely POSIX-conforming version of chown on
systems with one or both of the following problems:
- chown doesn't treat an ID of -1 as meaning
@@ -66,20 +69,34 @@ rpl_chown (const char *file, uid_t uid, gid_t gid)
on the symlink itself. To work around that, we open the
file (but this can fail due to lack of read or write permission) and
use fchown on the resulting descriptor. */
int fd = open (file, O_RDONLY | O_NONBLOCK | O_NOCTTY);
if (fd < 0
&& (fd = open (file, O_WRONLY | O_NONBLOCK | O_NOCTTY)) < 0)
return -1;
if (fchown (fd, uid, gid))
int open_flags = O_NONBLOCK | O_NOCTTY;
int fd = open (file, O_RDONLY | open_flags);
if (0 <= fd
|| (errno == EACCES
&& 0 <= (fd = open (file, O_WRONLY | open_flags))))
{
int result = fchown (fd, uid, gid);
int saved_errno = errno;
/* POSIX says fchown can fail with errno == EINVAL on sockets,
so fall back on chown in that case. */
struct stat sb;
bool fchown_socket_failure =
(result != 0 && saved_errno == EINVAL
&& fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode));
close (fd);
errno = saved_errno;
return -1;
if (! fchown_socket_failure)
{
errno = saved_errno;
return result;
}
}
return close (fd);
else if (errno != EACCES)
return -1;
}
#else
return chown (file, uid, gid);
#endif
return chown (file, uid, gid);
}

78
lib/close-stream.c Normal file
View File

@@ -0,0 +1,78 @@
/* Close a stream, with nicer error checking than fclose's.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 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, 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 "close-stream.h"
#include <errno.h>
#include <stdbool.h>
#include "__fpending.h"
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
/* Close STREAM. Return 0 if successful, EOF (setting errno)
otherwise. A failure might set errno to 0 if the error number
cannot be determined.
If a program writes *anything* to STREAM, that program should close
STREAM and make sure that it succeeds before exiting. Otherwise,
suppose that you go to the extreme of checking the return status
of every function that does an explicit write to STREAM. The last
printf can succeed in writing to the internal stream buffer, and yet
the fclose(STREAM) could still fail (due e.g., to a disk full error)
when it tries to write out that buffered data. Thus, you would be
left with an incomplete output file and the offending program would
exit successfully. Even calling fflush is not always sufficient,
since some file systems (NFS and CODA) buffer written/flushed data
until an actual close call.
Besides, it's wasteful to check the return value from every call
that writes to STREAM -- just let the internal stream state record
the failure. That's what the ferror test is checking below. */
int
close_stream (FILE *stream)
{
bool some_pending = (__fpending (stream) != 0);
bool prev_fail = (ferror (stream) != 0);
bool fclose_fail = (fclose (stream) != 0);
/* Return an error indication if there was a previous failure or if
fclose failed, with one exception: ignore an fclose failure if
there was no previous error, no data remains to be flushed, and
fclose failed with EBADF. That can happen when a program like cp
is invoked like this `cp a b >&-' (i.e., with standard output
closed) and doesn't generate any output (hence no previous error
and nothing to be flushed). */
if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
{
if (! fclose_fail)
errno = 0;
return EOF;
}
return 0;
}

2
lib/close-stream.h Normal file
View File

@@ -0,0 +1,2 @@
#include <stdio.h>
int close_stream (FILE *stream);

View File

@@ -1,7 +1,7 @@
/* closeout.c - close standard output
/* Close standard output, exiting with a diagnostic on error.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Free Software
Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 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
@@ -23,21 +23,17 @@
#include "closeout.h"
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "close-stream.h"
#include "error.h"
#include "exitfail.h"
#include "quotearg.h"
#include "__fpending.h"
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
static const char *file_name;
@@ -49,22 +45,22 @@ close_stdout_set_file_name (const char *file)
file_name = file;
}
/* Close standard output, exiting with status 'exit_failure' on failure.
If a program writes *anything* to stdout, that program should close
stdout and make sure that it succeeds before exiting. Otherwise,
suppose that you go to the extreme of checking the return status
of every function that does an explicit write to stdout. The last
printf can succeed in writing to the internal stream buffer, and yet
the fclose(stdout) could still fail (due e.g., to a disk full error)
when it tries to write out that buffered data. Thus, you would be
left with an incomplete output file and the offending program would
exit successfully. Even calling fflush is not always sufficient,
since some file systems (NFS and CODA) buffer written/flushed data
until an actual close call.
/* Close standard output. On error, issue a diagnostic and _exit
with status 'exit_failure'.
Besides, it's wasteful to check the return value from every call
that writes to stdout -- just let the internal stream state record
the failure. That's what the ferror test is checking below.
Since close_stdout is commonly registered via 'atexit', POSIX
and the C standard both say that it should not call 'exit',
because the behavior is undefined if 'exit' is called more than
once. So it calls '_exit' instead of 'exit'. If close_stdout
is registered via atexit before other functions are registered,
the other functions can act before this _exit is invoked.
Applications that use close_stdout should flush any streams
other than stdout and stderr before exiting, since the call to
_exit will bypass other buffer flushing. Applications should
be flushing and closing other streams anyway, to check for I/O
errors. Also, applications should not use tmpfile, since _exit
can bypass the removal of these files.
It's important to detect such failures and exit nonzero because many
tools (most notably `make' and other build-management systems) depend
@@ -73,29 +69,15 @@ close_stdout_set_file_name (const char *file)
void
close_stdout (void)
{
bool prev_fail = ferror (stdout);
bool none_pending = (0 == __fpending (stdout));
bool fclose_fail = fclose (stdout);
if (prev_fail || fclose_fail)
if (close_stream (stdout) != 0)
{
int e = fclose_fail ? errno : 0;
char const *write_error;
/* If ferror returned zero, no data remains to be flushed, and we'd
otherwise fail with EBADF due to a failed fclose, then assume that
it's ok to ignore the fclose failure. That can happen when a
program like cp is invoked like this `cp a b >&-' (i.e., with
stdout closed) and doesn't generate any output (hence no previous
error and nothing to be flushed). */
if (e == EBADF && !prev_fail && none_pending)
return;
write_error = _("write error");
char const *write_error = _("write error");
if (file_name)
error (exit_failure, e, "%s: %s", quotearg_colon (file_name),
error (0, errno, "%s: %s", quotearg_colon (file_name),
write_error);
else
error (exit_failure, e, "%s", write_error);
error (0, errno, "%s", write_error);
_exit (exit_failure);
}
}

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004 Free Software Foundation, Inc.
# Copyright (C) 2000-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
@@ -30,21 +30,21 @@
# The current list of GNU canonical charset names is as follows.
#
# name MIME? used by which systems
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# ISO-8859-3 Y glibc solaris
# ISO-8859-4 Y osf solaris freebsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
# ISO-8859-4 Y osf solaris freebsd netbsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# ISO-8859-6 Y glibc aix hpux solaris
# ISO-8859-7 Y glibc aix hpux irix osf solaris darwin
# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd darwin
# ISO-8859-8 Y glibc aix hpux osf solaris
# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
# ISO-8859-13 glibc darwin
# ISO-8859-13 glibc netbsd darwin
# ISO-8859-14 glibc
# ISO-8859-15 glibc aix osf solaris freebsd darwin
# KOI8-R Y glibc solaris freebsd darwin
# KOI8-U Y glibc freebsd darwin
# KOI8-R Y glibc solaris freebsd netbsd darwin
# KOI8-U Y glibc freebsd netbsd darwin
# KOI8-T glibc
# CP437 dos
# CP775 dos
@@ -57,7 +57,7 @@
# CP862 dos
# CP864 dos
# CP865 dos
# CP866 freebsd darwin dos
# CP866 freebsd netbsd darwin dos
# CP869 dos
# CP874 woe32 dos
# CP922 aix
@@ -70,22 +70,22 @@
# CP1125 dos
# CP1129 aix
# CP1250 woe32
# CP1251 glibc solaris darwin woe32
# CP1251 glibc solaris netbsd darwin woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
# CP1255 glibc woe32
# CP1256 woe32
# CP1257 woe32
# GB2312 Y glibc aix hpux irix solaris freebsd darwin
# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
# EUC-TW glibc aix hpux irix osf solaris
# BIG5 Y glibc aix hpux osf solaris freebsd darwin
# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# EUC-TW glibc aix hpux irix osf solaris netbsd
# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
# BIG5-HKSCS glibc solaris
# GBK glibc aix osf solaris woe32 dos
# GB18030 glibc solaris
# SHIFT_JIS Y hpux osf solaris freebsd darwin
# GB18030 glibc solaris netbsd
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
# JOHAB glibc solaris woe32
# TIS-620 glibc aix hpux osf solaris
# VISCII Y glibc
@@ -99,7 +99,7 @@
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
# UTF-8 Y glibc aix hpux osf solaris darwin
# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
#
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).
@@ -387,6 +387,8 @@ case "$os" in
echo "ISO8859-2 ISO-8859-2"
echo "ISO8859-4 ISO-8859-4"
echo "ISO8859-5 ISO-8859-5"
echo "ISO8859-7 ISO-8859-7"
echo "ISO8859-13 ISO-8859-13"
echo "ISO8859-15 ISO-8859-15"
echo "eucCN GB2312"
echo "eucJP EUC-JP"
@@ -479,7 +481,7 @@ case "$os" in
echo "# If you find that the encoding given for your language and"
echo "# country is not the one your DOS machine actually uses, just"
echo "# correct it in this file, and send a mail to"
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
echo "# and Bruno Haible <bruno@clisp.org>."
echo "#"
echo "C ASCII"

View File

@@ -1,6 +1,6 @@
/* help detect directory cycles efficiently
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
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
@@ -33,10 +33,6 @@
#include "cycle-check.h"
#define SAME_INODE(Stat_buf_1, Stat_buf_2) \
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
#define CC_MAGIC 9827862
/* Return true if I is a power of 2, or is zero. */

View File

@@ -1,6 +1,6 @@
/* help detect directory cycles efficiently
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
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
@@ -30,6 +30,7 @@
# endif
# include <stdbool.h>
# include "dev-ino.h"
# include "same-inode.h"
struct cycle_check_state
{
@@ -41,4 +42,18 @@ struct cycle_check_state
void cycle_check_init (struct cycle_check_state *state);
bool cycle_check (struct cycle_check_state *state, struct stat const *sb);
# define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \
do \
{ \
/* You must call cycle_check at least once before using this macro. */ \
if ((State)->chdir_counter == 0) \
abort (); \
if (SAME_INODE ((State)->dev_ino, SB_subdir)) \
{ \
(State)->dev_ino.st_dev = (SB_dir).st_dev; \
(State)->dev_ino.st_ino = (SB_dir).st_ino; \
} \
} \
while (0)
#endif

159
lib/dirchownmod.c Normal file
View File

@@ -0,0 +1,159 @@
/* Change the ownership and mode bits of a directory.
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. */
/* Written by Paul Eggert. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "dirchownmod.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "lchmod.h"
#include "stat-macros.h"
#ifndef O_DIRECTORY
# define O_DIRECTORY 0
#endif
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
#endif
/* Change the ownership and mode bits of the directory DIR.
If MKDIR_MODE is not (mode_t) -1, mkdir (DIR, MKDIR_MODE) has just
been executed successfully with umask zero, so DIR should be a
directory (not a symbolic link).
First, set the file's owner to OWNER and group to GROUP, but leave
the owner alone if OWNER is (uid_t) -1, and similarly for GROUP.
Then, set the file's mode bits to MODE, except preserve any of the
bits that correspond to zero bits in MODE_BITS. In other words,
MODE_BITS is a mask that specifies which of the file's mode bits
should be set or cleared. MODE should be a subset of MODE_BITS,
which in turn should be a subset of CHMOD_MODE_BITS.
This implementation assumes the current umask is zero.
Return 0 if successful, -1 (setting errno) otherwise. Unsuccessful
calls may do the chown but not the chmod. */
int
dirchownmod (char const *dir, mode_t mkdir_mode,
uid_t owner, gid_t group,
mode_t mode, mode_t mode_bits)
{
struct stat st;
int result;
/* Manipulate DIR via a file descriptor if possible, to avoid some races. */
int open_flags = O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NOFOLLOW | O_NONBLOCK;
int fd = open (dir, open_flags);
/* Fail if the directory is unreadable, the directory previously
existed or was created without read permission. Otherwise, get
the file's status. */
if (0 <= fd)
result = fstat (fd, &st);
else if (errno != EACCES
|| (mkdir_mode != (mode_t) -1 && mkdir_mode & S_IRUSR))
return fd;
else
result = stat (dir, &st);
if (result == 0)
{
mode_t dir_mode = st.st_mode;
/* Check whether DIR is a directory. If FD is nonnegative, this
check avoids changing the ownership and mode bits of the
wrong file in many cases. This doesn't fix all the race
conditions, but it is better than nothing. */
if (! S_ISDIR (dir_mode))
{
errno = ENOTDIR;
result = -1;
}
else
{
/* If at least one of the S_IXUGO bits are set, chown might
clear the S_ISUID and S_SGID bits. Keep track of any
file mode bits whose values are indeterminate due to this
issue. */
mode_t indeterminate = 0;
/* On some systems, chown clears S_ISUID and S_ISGID, so do
chown before chmod. On older System V hosts, ordinary
users can give their files away via chown; don't worry
about that here, since users shouldn't do that. */
if ((owner != (uid_t) -1 && owner != st.st_uid)
|| (group != (gid_t) -1 && group != st.st_gid))
{
result = (0 <= fd
? fchown (fd, owner, group)
: mkdir_mode != (mode_t) -1
? lchown (dir, owner, group)
: chown (dir, owner, group));
/* Either the user cares about an indeterminate bit and
it'll be set properly by chmod below, or the user
doesn't care and it's OK to use the bit's pre-chown
value. So there's no need to re-stat DIR here. */
if (result == 0 && (dir_mode & S_IXUGO))
indeterminate = dir_mode & (S_ISUID | S_ISGID);
}
/* If the file mode bits might not be right, use chmod to
change them. Don't change bits the user doesn't care
about. */
if (result == 0 && (((dir_mode ^ mode) | indeterminate) & mode_bits))
{
mode_t chmod_mode =
mode | (dir_mode & CHMOD_MODE_BITS & ~mode_bits);
result = (0 <= fd
? fchmod (fd, chmod_mode)
: mkdir_mode != (mode_t) -1
? lchmod (dir, chmod_mode)
: chmod (dir, chmod_mode));
}
}
}
if (0 <= fd)
{
if (result == 0)
result = close (fd);
else
{
int e = errno;
close (fd);
errno = e;
}
}
return result;
}

2
lib/dirchownmod.h Normal file
View File

@@ -0,0 +1,2 @@
#include <sys/types.h>
int dirchownmod (char const *, mode_t, uid_t, gid_t, mode_t, mode_t);

View File

@@ -1,5 +1,5 @@
/* Declare dirfd, if necessary.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 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
@@ -19,20 +19,7 @@
#include <sys/types.h>
#if HAVE_DIRENT_H
# include <dirent.h>
#else /* not HAVE_DIRENT_H */
# define dirent direct
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif /* HAVE_SYS_NDIR_H */
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif /* HAVE_SYS_DIR_H */
# if HAVE_NDIR_H
# include <ndir.h>
# endif /* HAVE_NDIR_H */
#endif /* HAVE_DIRENT_H */
#include <dirent.h>
#ifndef HAVE_DECL_DIRFD
"this configure-time declaration test was not run"

View File

@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005 Free Software
Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -26,96 +26,62 @@
#include <string.h>
#include "xalloc.h"
/* Return the length of `dirname (FILE)', or zero if FILE is
in the working directory. Works properly even if
there are trailing slashes (by effectively ignoring them). */
/* Return the length of the prefix of FILE that will be used by
dir_name. If FILE is in the working directory, this returns zero
even though `dir_name (FILE)' will return ".". Works properly even
if there are trailing slashes (by effectively ignoring them). */
size_t
dir_len (char const *file)
{
size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
size_t length;
/* Strip the basename and any redundant slashes before it. */
for (length = base_name (file) - file; prefix_length < length; length--)
if (! ISSLASH (file[length - 1]))
return length;
/* Advance prefix_length beyond important leading slashes. */
prefix_length += (prefix_length != 0
? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& ISSLASH (file[prefix_length]))
: (ISSLASH (file[0])
? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
&& ISSLASH (file[1]) && ! ISSLASH (file[2])
? 2 : 1))
: 0));
/* But don't strip the only slash from "/". */
return prefix_length + ISSLASH (file[prefix_length]);
/* Strip the basename and any redundant slashes before it. */
for (length = last_component (file) - file;
prefix_length < length; length--)
if (! ISSLASH (file[length - 1]))
break;
return length;
}
/* Return the leading directories part of FILE,
allocated with xmalloc.
Works properly even if there are trailing slashes
(by effectively ignoring them). */
/* In general, we can't use the builtin `dirname' function if available,
since it has different meanings in different environments.
In some environments the builtin `dirname' modifies its argument.
Return the leading directories part of FILE, allocated with xmalloc.
Works properly even if there are trailing slashes (by effectively
ignoring them). Unlike POSIX dirname(), FILE cannot be NULL.
If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
lstat (base_name (FILE)); } will access the same file. Likewise,
if the sequence { chdir (dir_name (FILE));
rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
to "foo" in the same directory FILE was in. */
char *
dir_name (char const *file)
{
size_t length = dir_len (file);
bool append_dot = (length == FILE_SYSTEM_PREFIX_LEN (file));
bool append_dot = (length == 0
|| (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
&& length == FILE_SYSTEM_PREFIX_LEN (file)
&& file[2] != '\0' && ! ISSLASH (file[2])));
char *dir = xmalloc (length + append_dot + 1);
memcpy (dir, file, length);
if (append_dot)
dir[length++] = '.';
dir[length] = 0;
dir[length] = '\0';
return dir;
}
#ifdef TEST_DIRNAME
/*
Run the test like this (expect no output):
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
basename.c dirname.c xmalloc.c error.c
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
If it's been built on a DOS or Windows platforms, run another test like
this (again, expect no output):
sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
BEGIN-DATA
foo//// .
bar/foo//// bar
foo/ .
/ /
. .
a .
END-DATA
BEGIN-DOS-DATA
c:///// c:/
c:/ c:/
c:/. c:/
c:foo c:.
c:foo/bar c:foo
END-DOS-DATA
*/
# define MAX_BUFF_LEN 1024
# include <stdio.h>
char *program_name;
int
main (int argc, char *argv[])
{
char buff[MAX_BUFF_LEN + 1];
program_name = argv[0];
buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{
char file[MAX_BUFF_LEN];
char expected_result[MAX_BUFF_LEN];
char const *result;
sscanf (buff, "%s %s", file, expected_result);
result = dir_name (file);
if (strcmp (result, expected_result))
printf ("%s: got %s, expected %s\n", file, result, expected_result);
}
return 0;
}
#endif

View File

@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
Copyright (C) 1998, 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
@@ -31,16 +31,39 @@
# endif
# ifndef FILE_SYSTEM_PREFIX_LEN
# define FILE_SYSTEM_PREFIX_LEN(File_name) 0
# if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
<= 'z' - 'a')
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
# else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# endif
# endif
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
# endif
# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 1
# endif
# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
(ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
# endif
# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
char *base_name (char const *file);
char *dir_name (char const *file);
size_t base_len (char const *file);
size_t dir_len (char const *file);
char *last_component (char const *file);
bool strip_trailing_slashes (char *file);

View File

@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc.
Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -34,6 +34,9 @@
#endif
#ifdef _LIBC
# include <libintl.h>
# include <stdbool.h>
# include <stdint.h>
# include <wchar.h>
# define mbsrtowcs __mbsrtowcs
#endif
@@ -59,6 +62,7 @@ unsigned int error_message_count;
# define program_name program_invocation_name
# include <errno.h>
# include <limits.h>
# include <libio/libioP.h>
/* In GNU libc we want do not want to use the common name `error' directly.
@@ -122,14 +126,10 @@ print_errno_message (int errnum)
#endif
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
{
__fwprintf (stderr, L": %s", s);
return;
}
#endif
__fxprintf (NULL, ": %s", s);
#else
fprintf (stderr, ": %s", s);
#endif
}
static void
@@ -140,26 +140,65 @@ error_tail (int status, int errnum, const char *message, va_list args)
{
# define ALLOCA_LIMIT 2000
size_t len = strlen (message) + 1;
const wchar_t *wmessage = L"out of memory";
wchar_t *wbuf = (len < ALLOCA_LIMIT
? alloca (len * sizeof *wbuf)
: len <= SIZE_MAX / sizeof *wbuf
? malloc (len * sizeof *wbuf)
: NULL);
wchar_t *wmessage = NULL;
mbstate_t st;
size_t res;
const char *tmp;
bool use_malloc = false;
if (wbuf)
while (1)
{
size_t res;
mbstate_t st;
const char *tmp = message;
if (__libc_use_alloca (len * sizeof (wchar_t)))
wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
else
{
if (!use_malloc)
wmessage = NULL;
wchar_t *p = (wchar_t *) realloc (wmessage,
len * sizeof (wchar_t));
if (p == NULL)
{
free (wmessage);
fputws_unlocked (L"out of memory\n", stderr);
return;
}
wmessage = p;
use_malloc = true;
}
memset (&st, '\0', sizeof (st));
res = mbsrtowcs (wbuf, &tmp, len, &st);
wmessage = res == (size_t) -1 ? L"???" : wbuf;
tmp = message;
res = mbsrtowcs (wmessage, &tmp, len, &st);
if (res != len)
break;
if (__builtin_expect (len >= SIZE_MAX / 2, 0))
{
/* This really should not happen if everything is fine. */
res = (size_t) -1;
break;
}
len *= 2;
}
if (res == (size_t) -1)
{
/* The string cannot be converted. */
if (use_malloc)
{
free (wmessage);
use_malloc = false;
}
wmessage = (wchar_t *) L"???";
}
__vfwprintf (stderr, wmessage, args);
if (! (len < ALLOCA_LIMIT))
free (wbuf);
if (use_malloc)
free (wmessage);
}
else
#endif
@@ -170,11 +209,10 @@ error_tail (int status, int errnum, const char *message, va_list args)
if (errnum)
print_errno_message (errnum);
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
putwc (L'\n', stderr);
else
__fxprintf (NULL, "\n");
#else
putc ('\n', stderr);
#endif
putc ('\n', stderr);
fflush (stderr);
if (status)
exit (status);
@@ -207,11 +245,10 @@ error (int status, int errnum, const char *message, ...)
else
{
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s: ", program_name);
else
__fxprintf (NULL, "%s: ", program_name);
#else
fprintf (stderr, "%s: ", program_name);
#endif
fprintf (stderr, "%s: ", program_name);
}
va_start (args, message);
@@ -267,21 +304,19 @@ error_at_line (int status, int errnum, const char *file_name,
else
{
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s: ", program_name);
else
__fxprintf (NULL, "%s:", program_name);
#else
fprintf (stderr, "%s:", program_name);
#endif
fprintf (stderr, "%s:", program_name);
}
if (file_name != NULL)
{
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
else
__fxprintf (NULL, "%s:%d: ", file_name, line_number);
#else
fprintf (stderr, "%s:%d: ", file_name, line_number);
#endif
fprintf (stderr, "%s:%d: ", file_name, line_number);
}
va_start (args, message);

View File

@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes

145
lib/euidaccess-stat.c Normal file
View File

@@ -0,0 +1,145 @@
/* euidaccess-stat -- check if effective user id can access lstat'd file
This function is probably useful only for choosing whether to issue
a prompt in an implementation of POSIX-specified rm.
Copyright (C) 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. */
/* Adapted for use in GNU remove.c by Jim Meyering. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "euidaccess-stat.h"
#include <unistd.h>
#ifndef F_OK
# define F_OK 0
# define X_OK 1
# define W_OK 2
# define R_OK 4
#endif
#include "group-member.h"
#include "stat-macros.h"
/* Return true if the current user has permission of type MODE
on the file from which stat buffer *ST was obtained, ignoring
ACLs, attributes, `read-only'ness, etc...
Otherwise, return false.
Like the reentrant version of euidaccess, but starting with
a stat buffer rather than a file name. Hence, this function
never calls access or accessx, and doesn't take into account
whether the file has ACLs or other attributes, or resides on
a read-only file system. */
bool
euidaccess_stat (struct stat const *st, int mode)
{
uid_t euid;
unsigned int granted;
/* Convert the mode to traditional form, clearing any bogus bits. */
if (R_OK == 4 && W_OK == 2 && X_OK == 1 && F_OK == 0)
mode &= 7;
else
mode = ((mode & R_OK ? 4 : 0)
+ (mode & W_OK ? 2 : 0)
+ (mode & X_OK ? 1 : 0));
if (mode == 0)
return true; /* The file exists. */
euid = geteuid ();
/* The super-user can read and write any file, and execute any file
that anyone can execute. */
if (euid == 0 && ((mode & X_OK) == 0
|| (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
return true;
/* Convert the file's permission bits to traditional form. */
if ( S_IRUSR == (4 << 6)
&& S_IWUSR == (2 << 6)
&& S_IXUSR == (1 << 6)
&& S_IRGRP == (4 << 3)
&& S_IWGRP == (2 << 3)
&& S_IXGRP == (1 << 3)
&& S_IROTH == (4 << 0)
&& S_IWOTH == (2 << 0)
&& S_IXOTH == (1 << 0))
granted = st->st_mode;
else
granted = ( (st->st_mode & S_IRUSR ? 4 << 6 : 0)
+ (st->st_mode & S_IWUSR ? 2 << 6 : 0)
+ (st->st_mode & S_IXUSR ? 1 << 6 : 0)
+ (st->st_mode & S_IRGRP ? 4 << 3 : 0)
+ (st->st_mode & S_IWGRP ? 2 << 3 : 0)
+ (st->st_mode & S_IXGRP ? 1 << 3 : 0)
+ (st->st_mode & S_IROTH ? 4 << 0 : 0)
+ (st->st_mode & S_IWOTH ? 2 << 0 : 0)
+ (st->st_mode & S_IXOTH ? 1 << 0 : 0));
if (euid == st->st_uid)
granted >>= 6;
else
{
gid_t egid = getegid ();
if (egid == st->st_gid || group_member (st->st_gid))
granted >>= 3;
}
if ((mode & ~granted) == 0)
return true;
return false;
}
#ifdef TEST
# include <errno.h>
# include <stdio.h>
# include <stdlib.h>
# include "error.h"
# define _(msg) msg
char *program_name;
int
main (int argc, char **argv)
{
char *file;
int mode;
bool ok;
struct stat st;
program_name = argv[0];
if (argc < 3)
abort ();
file = argv[1];
mode = atoi (argv[2]);
if (lstat (file, &st) != 0)
error (EXIT_FAILURE, errno, _("cannot stat %s"), file);
ok = euidaccess_stat (&st, mode);
printf ("%s: %s\n", file, ok ? "y" : "n");
exit (0);
}
#endif

5
lib/euidaccess-stat.h Normal file
View File

@@ -0,0 +1,5 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdbool.h>
bool euidaccess_stat (struct stat const *st, int mode);

View File

@@ -1,7 +1,7 @@
/* exclude.c -- exclude file names
Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Software Foundation, Inc.
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
@@ -37,26 +37,12 @@
#include "fnmatch.h"
#include "strcase.h"
#include "xalloc.h"
#include "verify.h"
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#endif
#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
# define IN_CTYPE_DOMAIN(c) true
#else
# define IN_CTYPE_DOMAIN(c) isascii (c)
#endif
static inline bool
is_space (unsigned char c)
{
return IN_CTYPE_DOMAIN (c) && isspace (c);
}
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
/* Non-GNU systems lack these options, so we don't need to check them. */
#ifndef FNM_CASEFOLD
# define FNM_CASEFOLD 0
@@ -65,11 +51,10 @@ is_space (unsigned char c)
# define FNM_LEADING_DIR 0
#endif
verify (EXCLUDE_macros_do_not_collide_with_FNM_macros,
(((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
& (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
| FNM_CASEFOLD))
== 0));
verify (((EXCLUDE_ANCHORED | EXCLUDE_INCLUDE | EXCLUDE_WILDCARDS)
& (FNM_PATHNAME | FNM_NOESCAPE | FNM_PERIOD | FNM_LEADING_DIR
| FNM_CASEFOLD))
== 0);
/* An exclude pattern-options pair. The options are fnmatch options
ORed with EXCLUDE_* options. */
@@ -132,6 +117,24 @@ fnmatch_no_wildcards (char const *pattern, char const *f, int options)
}
}
bool
exclude_fnmatch (char const *pattern, char const *f, int options)
{
int (*matcher) (char const *, char const *, int) =
(options & EXCLUDE_WILDCARDS
? fnmatch
: fnmatch_no_wildcards);
bool matched = ((*matcher) (pattern, f, options) == 0);
char const *p;
if (! (options & EXCLUDE_ANCHORED))
for (p = f; *p && ! matched; p++)
if (*p == '/' && p[1] != '/')
matched = ((*matcher) (pattern, p + 1, options) == 0);
return matched;
}
/* Return true if EX excludes F. */
bool
@@ -157,21 +160,7 @@ excluded_file_name (struct exclude const *ex, char const *f)
char const *pattern = exclude[i].pattern;
int options = exclude[i].options;
if (excluded == !! (options & EXCLUDE_INCLUDE))
{
int (*matcher) (char const *, char const *, int) =
(options & EXCLUDE_WILDCARDS
? fnmatch
: fnmatch_no_wildcards);
bool matched = ((*matcher) (pattern, f, options) == 0);
char const *p;
if (! (options & EXCLUDE_ANCHORED))
for (p = f; *p && ! matched; p++)
if (*p == '/' && p[1] != '/')
matched = ((*matcher) (pattern, p + 1, options) == 0);
excluded ^= matched;
}
excluded ^= exclude_fnmatch (pattern, f, options);
}
return excluded;
@@ -243,12 +232,12 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int),
{
char *pattern_end = p;
if (is_space (line_end))
if (isspace ((unsigned char) line_end))
{
for (; ; pattern_end--)
if (pattern_end == pattern)
goto next_pattern;
else if (! is_space (pattern_end[-1]))
else if (! isspace ((unsigned char) pattern_end[-1]))
break;
}

View File

@@ -1,7 +1,7 @@
/* exclude.h -- declarations for excluding file names
Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 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
@@ -41,3 +41,4 @@ void add_exclude (struct exclude *, char const *, int);
int add_exclude_file (void (*) (struct exclude *, char const *, int),
struct exclude *, char const *, int, char);
bool excluded_file_name (struct exclude const *, char const *);
bool exclude_fnmatch (char const *pattern, char const *f, int options);

View File

@@ -21,7 +21,7 @@
/* Get exit() declaration. */
#include <stdlib.h>
/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif

View File

@@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
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

104
lib/fchmodat.c Normal file
View File

@@ -0,0 +1,104 @@
/* Change the protections of file relative to an open directory.
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. */
/* written by Jim Meyering */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "openat.h"
#include <errno.h>
#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
#include "save-cwd.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "openat-priv.h"
/* Some systems don't have ENOSYS. */
#ifndef ENOSYS
# ifdef ENOTSUP
# define ENOSYS ENOTSUP
# else
/* Some systems don't have ENOTSUP either. */
# define ENOSYS EINVAL
# endif
#endif
#ifndef HAVE_LCHMOD
# undef lchmod
# define lchmod(f,m) (errno = ENOSYS, -1)
#endif
/* Solaris 10 has no function like this.
Invoke chmod or lchmod on file, FILE, using mode MODE, in the directory
open on descriptor FD. If possible, do it without changing the
working directory. Otherwise, resort to using save_cwd/fchdir,
then mkdir/restore_cwd. If either the save_cwd or the restore_cwd
fails, then give a diagnostic and exit nonzero.
Note that an attempt to use a FLAG value of AT_SYMLINK_NOFOLLOW
on a system without lchmod support causes this function to fail. */
int
fchmodat (int fd, char const *file, mode_t mode, int flag)
{
struct saved_cwd saved_cwd;
int saved_errno;
int err;
if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file))
return (flag == AT_SYMLINK_NOFOLLOW
? lchmod (file, mode)
: chmod (file, mode));
{
char *proc_file;
BUILD_PROC_NAME (proc_file, fd, file);
err = (flag == AT_SYMLINK_NOFOLLOW
? lchmod (proc_file, mode)
: chmod (proc_file, mode));
/* If the syscall succeeds, or if it fails with an unexpected
errno value, then return right away. Otherwise, fall through
and resort to using save_cwd/restore_cwd. */
if (0 <= err || ! EXPECTED_ERRNO (errno))
return err;
}
if (save_cwd (&saved_cwd) != 0)
openat_save_fail (errno);
err = fchdir (fd);
saved_errno = errno;
if (! err)
{
err = (flag == AT_SYMLINK_NOFOLLOW
? lchmod (file, mode)
: chmod (file, mode));
saved_errno = errno;
if (restore_cwd (&saved_cwd) != 0)
openat_restore_fail (errno);
}
free_cwd (&saved_cwd);
errno = saved_errno;
return err;
}

View File

@@ -18,6 +18,10 @@
/* Written by Paul Eggert. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "fd-reopen.h"
#include <errno.h>

121
lib/fdopendir-glibc.c Normal file
View File

@@ -0,0 +1,121 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdbool.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#if _LIBC
# include <dirstream.h>
# include <not-cancel.h>
#else
# if __GNUC__ < 3
# define __builtin_expect(expr, expected_val) expr
# endif
# include "openat.h"
# define stat64 stat
# define dirent64 dirent
# define __fxstat64(V, fd, sb) fstat(fd, sb)
# define __fcntl fcntl
# define __set_errno(Val) do { errno = (Val); } while (0)
# define __libc_lock_init(NAME) ((NAME) = 0, 0)
# define close_not_cancel_no_status(fd) close (fd)
# ifdef __i386__
# define internal_function __attribute ((regparm (3), stdcall))
# else
# define internal_function
# endif
struct __dirstream
{
int fd; /* File descriptor. */
char *data; /* Directory block. */
size_t allocation; /* Space allocated for the block. */
size_t size; /* Total valid data in the block. */
size_t offset; /* Current offset into the block. */
off_t filepos; /* Position of next entry to read. */
int lock;
};
#endif
#undef _STATBUF_ST_BLKSIZE
static DIR *
internal_function
__alloc_dir (int fd, bool close_fd)
{
if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0)
goto lose;
size_t allocation;
#ifdef _STATBUF_ST_BLKSIZE
if (__builtin_expect ((size_t) statp->st_blksize >= sizeof (struct dirent64),
1))
allocation = statp->st_blksize;
else
#endif
allocation = (BUFSIZ < sizeof (struct dirent64)
? sizeof (struct dirent64) : BUFSIZ);
const int pad = -sizeof (DIR) % __alignof__ (struct dirent64);
DIR *dirp = (DIR *) malloc (sizeof (DIR) + allocation + pad);
if (dirp == NULL)
lose:
{
if (close_fd)
{
int save_errno = errno;
close_not_cancel_no_status (fd);
__set_errno (save_errno);
}
return NULL;
}
memset (dirp, '\0', sizeof (DIR));
dirp->data = (char *) (dirp + 1) + pad;
dirp->allocation = allocation;
dirp->fd = fd;
__libc_lock_init (dirp->lock);
return dirp;
}
DIR *
fdopendir (int fd)
{
#if 0
struct stat64 statbuf;
if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
return NULL;
if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
{
__set_errno (ENOTDIR);
return NULL;
}
/* Make sure the descriptor allows for reading. */
int flags = __fcntl (fd, F_GETFL);
if (__builtin_expect (flags == -1, 0))
return NULL;
if (__builtin_expect ((flags & O_ACCMODE) == O_WRONLY, 0))
{
__set_errno (EINVAL);
return NULL;
}
#endif
return __alloc_dir (fd, false);
}

View File

@@ -1,6 +1,6 @@
/* Convert file size to number of blocks on System V-like machines.
Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005 Free Software
Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@
# ifndef NINDIR
# if defined (__DJGPP__)
# if defined __DJGPP__
typedef long daddr_t; /* for disk address */
# endif

View File

@@ -1,5 +1,7 @@
/* filemode.c -- make a string describing file modes
Copyright (C) 1985, 1990, 1993, 1998-2000, 2004 Free Software Foundation, Inc.
Copyright (C) 1985, 1990, 1993, 1998-2000, 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
@@ -19,129 +21,120 @@
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include "filemode.h"
#include "stat-macros.h"
/* The following is for Cray DMF (Data Migration Facility), which is a
HSM file system. A migrated file has a `st_dm_mode' that is
different from the normal `st_mode', so any tests for migrated
files should use the former. */
#if HAVE_ST_DM_MODE
# define IS_MIGRATED_FILE(statp) \
(S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode))
#else
# define IS_MIGRATED_FILE(statp) 0
#endif
/* Set the 's' and 't' flags in file attributes string CHARS,
according to the file mode BITS. */
static void
setst (mode_t bits, char *chars)
{
if (bits & S_ISUID)
{
if (chars[3] != 'x')
/* Set-uid, but not executable by owner. */
chars[3] = 'S';
else
chars[3] = 's';
}
if (bits & S_ISGID)
{
if (chars[6] != 'x')
/* Set-gid, but not executable by group. */
chars[6] = 'S';
else
chars[6] = 's';
}
if (bits & S_ISVTX)
{
if (chars[9] != 'x')
/* Sticky, but not executable by others. */
chars[9] = 'T';
else
chars[9] = 't';
}
}
#if ! HAVE_DECL_STRMODE
/* Return a character indicating the type of file described by
file mode BITS:
'd' for directories
'D' for doors
'b' for block special files
'c' for character special files
'n' for network special files
'm' for multiplexor files
'M' for an off-line (regular) file
'l' for symbolic links
's' for sockets
'p' for fifos
'C' for contigous data files
'-' for regular files
'?' for any other file type. */
'-' regular file
'b' block special file
'c' character special file
'C' high performance ("contiguous data") file
'd' directory
'D' door
'l' symbolic link
'm' multiplexed file (7th edition Unix; obsolete)
'n' network special file (HP-UX)
'p' fifo (named pipe)
'P' port
's' socket
'w' whiteout (4.4BSD)
'?' some other file type */
static char
ftypelet (mode_t bits)
{
/* These are the most common, so test for them first. */
if (S_ISREG (bits))
return '-';
if (S_ISDIR (bits))
return 'd';
/* Other letters standardized by POSIX 1003.1-2004. */
if (S_ISBLK (bits))
return 'b';
if (S_ISCHR (bits))
return 'c';
if (S_ISDIR (bits))
return 'd';
if (S_ISREG (bits))
return '-';
if (S_ISFIFO (bits))
return 'p';
if (S_ISLNK (bits))
return 'l';
if (S_ISFIFO (bits))
return 'p';
/* Other file types (though not letters) standardized by POSIX. */
if (S_ISSOCK (bits))
return 's';
if (S_ISMPC (bits))
/* Nonstandard file types. */
if (S_ISCTG (bits))
return 'C';
if (S_ISDOOR (bits))
return 'D';
if (S_ISMPB (bits) || S_ISMPC (bits))
return 'm';
if (S_ISNWK (bits))
return 'n';
if (S_ISDOOR (bits))
return 'D';
if (S_ISCTG (bits))
return 'C';
if (S_ISPORT (bits))
return 'P';
if (S_ISWHT (bits))
return 'w';
/* The following two tests are for Cray DMF (Data Migration
Facility), which is a HSM file system. A migrated file has a
`st_dm_mode' that is different from the normal `st_mode', so any
tests for migrated files should use the former. */
if (S_ISOFD (bits))
/* off line, with data */
return 'M';
/* off line, with no data */
if (S_ISOFL (bits))
return 'M';
return '?';
}
/* Like filemodestring, but only the relevant part of the `struct stat'
is given as an argument. */
/* Like filemodestring, but rely only on MODE. */
void
mode_string (mode_t mode, char *str)
strmode (mode_t mode, char *str)
{
str[0] = ftypelet (mode);
str[1] = mode & S_IRUSR ? 'r' : '-';
str[2] = mode & S_IWUSR ? 'w' : '-';
str[3] = mode & S_IXUSR ? 'x' : '-';
str[3] = (mode & S_ISUID
? (mode & S_IXUSR ? 's' : 'S')
: (mode & S_IXUSR ? 'x' : '-'));
str[4] = mode & S_IRGRP ? 'r' : '-';
str[5] = mode & S_IWGRP ? 'w' : '-';
str[6] = mode & S_IXGRP ? 'x' : '-';
str[6] = (mode & S_ISGID
? (mode & S_IXGRP ? 's' : 'S')
: (mode & S_IXGRP ? 'x' : '-'));
str[7] = mode & S_IROTH ? 'r' : '-';
str[8] = mode & S_IWOTH ? 'w' : '-';
str[9] = mode & S_IXOTH ? 'x' : '-';
setst (mode, str);
str[9] = (mode & S_ISVTX
? (mode & S_IXOTH ? 't' : 'T')
: (mode & S_IXOTH ? 'x' : '-'));
str[10] = ' ';
str[11] = '\0';
}
#endif /* ! HAVE_DECL_STRMODE */
/* filemodestring - fill in string STR with an ls-style ASCII
representation of the st_mode field of file stats block STATP.
10 characters are stored in STR; no terminating null is added.
12 characters are stored in STR.
The characters stored in STR are:
0 File type. 'd' for directory, 'c' for character
special, 'b' for block special, 'm' for multiplex,
'l' for symbolic link, 's' for socket, 'p' for fifo,
'-' for regular, '?' for any other file type
0 File type, as in ftypelet above, except that other letters are used
for files whose type cannot be determined solely from st_mode:
'F' semaphore
'M' migrated file (Cray DMF)
'Q' message queue
'S' shared memory object
'T' typed memory object
1 'r' if the owner may read, '-' otherwise.
@@ -167,10 +160,26 @@ mode_string (mode_t mode, char *str)
9 'x' if any user may execute, 't' if the file is "sticky"
(will be retained in swap space after execution), '-'
otherwise.
'T' if the file is sticky but not executable. */
'T' if the file is sticky but not executable.
10 ' ' for compatibility with 4.4BSD strmode,
since this interface does not support ACLs.
11 '\0'. */
void
filemodestring (struct stat *statp, char *str)
filemodestring (struct stat const *statp, char *str)
{
mode_string (statp->st_mode, str);
strmode (statp->st_mode, str);
if (S_TYPEISSEM (statp))
str[0] = 'F';
else if (IS_MIGRATED_FILE (statp))
str[0] = 'M';
else if (S_TYPEISMQ (statp))
str[0] = 'Q';
else if (S_TYPEISSHM (statp))
str[0] = 'S';
else if (S_TYPEISTMO (statp))
str[0] = 'T';
}

View File

@@ -1,6 +1,6 @@
/* Make a string describing file modes.
Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 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
@@ -19,7 +19,14 @@
#ifndef FILEMODE_H_
# include <sys/types.h>
# include <sys/stat.h>
void mode_string (mode_t mode, char *str);
# if HAVE_DECL_STRMODE
# include <string.h>
# else
void strmode (mode_t mode, char *str);
# endif
void filemodestring (struct stat const *statp, char *str);
#endif

View File

@@ -1,7 +1,7 @@
/* Concatenate two arbitrary file names.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
Copyright (C) 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
@@ -64,7 +64,7 @@ longest_relative_suffix (char const *f)
char *
file_name_concat (char const *dir, char const *abase, char **base_in_result)
{
char const *dirbase = base_name (dir);
char const *dirbase = last_component (dir);
size_t dirbaselen = base_len (dirbase);
size_t dirlen = dirbase - dir + dirbaselen;
size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1]));

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
/* Copyright (C) 1991,1992,1993,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
@@ -86,34 +86,10 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
# if defined STDC_HEADERS || !defined isascii
# define ISASCII(c) 1
# else
# define ISASCII(c) isascii(c)
# if ! (defined isblank || HAVE_DECL_ISBLANK)
# define isblank(c) ((c) == ' ' || (c) == '\t')
# endif
# ifdef isblank
# define ISBLANK(c) (ISASCII (c) && isblank (c))
# else
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
# endif
# ifdef isgraph
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
# else
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
# endif
# define ISPRINT(c) (ISASCII (c) && isprint (c))
# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
# define ISALNUM(c) (ISASCII (c) && isalnum (c))
# define ISALPHA(c) (ISASCII (c) && isalpha (c))
# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
# define ISLOWER(c) (ISASCII (c) && islower (c))
# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
# define ISSPACE(c) (ISASCII (c) && isspace (c))
# define ISUPPER(c) (ISASCII (c) && isupper (c))
# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
# if defined _LIBC || WIDE_CHAR_SUPPORT
@@ -169,18 +145,14 @@ static int posixly_correct;
# endif
/* Note that this evaluates C many times. */
# ifdef _LIBC
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
# else
# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
# endif
# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
# define CHAR char
# define UCHAR unsigned char
# define INT int
# define FCT internal_fnmatch
# define EXT ext_match
# define END end_pattern
# define L(CS) CS
# define L_(CS) CS
# ifdef _LIBC
# define BTOWC(C) __btowc (C)
# else
@@ -210,7 +182,7 @@ static int posixly_correct;
# define FCT internal_fnwmatch
# define EXT ext_wmatch
# define END end_wpattern
# define L(CS) L##CS
# define L_(CS) L##CS
# define BTOWC(C) (C)
# ifdef _LIBC
# define STRLEN(S) __wcslen (S)

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
/* Copyright (C) 1991,1992,1993,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
@@ -39,14 +39,14 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
# endif
#endif
while ((c = *p++) != L('\0'))
while ((c = *p++) != L_('\0'))
{
bool new_no_leading_period = false;
c = FOLD (c);
switch (c)
{
case L('?'):
case L_('?'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
int res;
@@ -59,17 +59,17 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (n == string_end)
return FNM_NOMATCH;
else if (*n == L('/') && (flags & FNM_FILE_NAME))
else if (*n == L_('/') && (flags & FNM_FILE_NAME))
return FNM_NOMATCH;
else if (*n == L('.') && no_leading_period)
else if (*n == L_('.') && no_leading_period)
return FNM_NOMATCH;
break;
case L('\\'):
case L_('\\'):
if (!(flags & FNM_NOESCAPE))
{
c = *p++;
if (c == L('\0'))
if (c == L_('\0'))
/* Trailing \ loses. */
return FNM_NOMATCH;
c = FOLD (c);
@@ -78,7 +78,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
return FNM_NOMATCH;
break;
case L('*'):
case L_('*'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
int res;
@@ -89,12 +89,12 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
return res;
}
if (n != string_end && *n == L('.') && no_leading_period)
if (n != string_end && *n == L_('.') && no_leading_period)
return FNM_NOMATCH;
for (c = *p++; c == L('?') || c == L('*'); c = *p++)
for (c = *p++; c == L_('?') || c == L_('*'); c = *p++)
{
if (*p == L('(') && (flags & FNM_EXTMATCH) != 0)
if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0)
{
const CHAR *endp = END (p);
if (endp != p)
@@ -105,13 +105,13 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
}
if (c == L('?'))
if (c == L_('?'))
{
/* A ? needs to match one character. */
if (n == string_end)
/* There isn't another character; no match. */
return FNM_NOMATCH;
else if (*n == L('/')
else if (*n == L_('/')
&& __builtin_expect (flags & FNM_FILE_NAME, 0))
/* A slash does not match a wildcard under
FNM_FILE_NAME. */
@@ -124,7 +124,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
}
if (c == L('\0'))
if (c == L_('\0'))
/* The wildcard(s) is/are the last element of the pattern.
If the name is a file name and contains another slash
this means it cannot match, unless the FNM_LEADING_DIR
@@ -138,7 +138,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
result = 0;
else
{
if (MEMCHR (n, L('/'), string_end - n) == NULL)
if (MEMCHR (n, L_('/'), string_end - n) == NULL)
result = 0;
}
}
@@ -149,15 +149,15 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
{
const CHAR *endp;
endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L('/') : L('\0'),
endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'),
string_end - n);
if (endp == NULL)
endp = string_end;
if (c == L('[')
if (c == L_('[')
|| (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
&& (c == L('@') || c == L('+') || c == L('!'))
&& *p == L('(')))
&& (c == L_('@') || c == L_('+') || c == L_('!'))
&& *p == L_('(')))
{
int flags2 = ((flags & FNM_FILE_NAME)
? flags : (flags & ~FNM_PERIOD));
@@ -168,11 +168,11 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
== 0)
return 0;
}
else if (c == L('/') && (flags & FNM_FILE_NAME))
else if (c == L_('/') && (flags & FNM_FILE_NAME))
{
while (n < string_end && *n != L('/'))
while (n < string_end && *n != L_('/'))
++n;
if (n < string_end && *n == L('/')
if (n < string_end && *n == L_('/')
&& (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags)
== 0))
return 0;
@@ -183,7 +183,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
? flags : (flags & ~FNM_PERIOD));
int no_leading_period2 = no_leading_period;
if (c == L('\\') && !(flags & FNM_NOESCAPE))
if (c == L_('\\') && !(flags & FNM_NOESCAPE))
c = *p;
c = FOLD (c);
for (--p; n < endp; ++n, no_leading_period2 = false)
@@ -197,7 +197,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* If we come here no match is possible with the wildcard. */
return FNM_NOMATCH;
case L('['):
case L_('['):
{
/* Nonzero if the sense of the character class is inverted. */
register bool not;
@@ -210,14 +210,14 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (n == string_end)
return FNM_NOMATCH;
if (*n == L('.') && no_leading_period)
if (*n == L_('.') && no_leading_period)
return FNM_NOMATCH;
if (*n == L('/') && (flags & FNM_FILE_NAME))
if (*n == L_('/') && (flags & FNM_FILE_NAME))
/* `/' cannot be matched. */
return FNM_NOMATCH;
not = (*p == L('!') || (posixly_correct < 0 && *p == L('^')));
not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
if (not)
++p;
@@ -226,9 +226,9 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
c = *p++;
for (;;)
{
if (!(flags & FNM_NOESCAPE) && c == L('\\'))
if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
{
if (*p == L('\0'))
if (*p == L_('\0'))
return FNM_NOMATCH;
c = FOLD ((UCHAR) *p);
++p;
@@ -236,7 +236,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (c == fn)
goto matched;
}
else if (c == L('[') && *p == L(':'))
else if (c == L_('[') && *p == L_(':'))
{
/* Leave room for the null. */
CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
@@ -254,22 +254,22 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
return FNM_NOMATCH;
c = *++p;
if (c == L(':') && p[1] == L(']'))
if (c == L_(':') && p[1] == L_(']'))
{
p += 2;
break;
}
if (c < L('a') || c >= L('z'))
if (c < L_('a') || c >= L_('z'))
{
/* This cannot possibly be a character class name.
Match it as a normal range. */
p = startp;
c = L('[');
c = L_('[');
goto normal_bracket;
}
str[c1++] = c;
}
str[c1] = L('\0');
str[c1] = L_('\0');
#if defined _LIBC || WIDE_CHAR_SUPPORT
wt = IS_CHAR_CLASS (str);
@@ -288,24 +288,24 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
goto matched;
# endif
#else
if ((STREQ (str, L("alnum")) && ISALNUM ((UCHAR) *n))
|| (STREQ (str, L("alpha")) && ISALPHA ((UCHAR) *n))
|| (STREQ (str, L("blank")) && ISBLANK ((UCHAR) *n))
|| (STREQ (str, L("cntrl")) && ISCNTRL ((UCHAR) *n))
|| (STREQ (str, L("digit")) && ISDIGIT ((UCHAR) *n))
|| (STREQ (str, L("graph")) && ISGRAPH ((UCHAR) *n))
|| (STREQ (str, L("lower")) && ISLOWER ((UCHAR) *n))
|| (STREQ (str, L("print")) && ISPRINT ((UCHAR) *n))
|| (STREQ (str, L("punct")) && ISPUNCT ((UCHAR) *n))
|| (STREQ (str, L("space")) && ISSPACE ((UCHAR) *n))
|| (STREQ (str, L("upper")) && ISUPPER ((UCHAR) *n))
|| (STREQ (str, L("xdigit")) && ISXDIGIT ((UCHAR) *n)))
if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
|| (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
|| (STREQ (str, L_("blank")) && isblank ((UCHAR) *n))
|| (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
|| (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
|| (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n))
|| (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
|| (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
|| (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
|| (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
|| (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
|| (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
goto matched;
#endif
c = *p++;
}
#ifdef _LIBC
else if (c == L('[') && *p == L('='))
else if (c == L_('[') && *p == L_('='))
{
UCHAR str[1];
uint32_t nrules =
@@ -313,19 +313,19 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
const CHAR *startp = p;
c = *++p;
if (c == L('\0'))
if (c == L_('\0'))
{
p = startp;
c = L('[');
c = L_('[');
goto normal_bracket;
}
str[0] = c;
c = *++p;
if (c != L('=') || p[1] != L(']'))
if (c != L_('=') || p[1] != L_(']'))
{
p = startp;
c = L('[');
c = L_('[');
goto normal_bracket;
}
p += 2;
@@ -405,7 +405,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
c = *p++;
}
#endif
else if (c == L('\0'))
else if (c == L_('\0'))
/* [ (unterminated) loses. */
return FNM_NOMATCH;
else
@@ -415,7 +415,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
#ifdef _LIBC
bool is_seqval = false;
if (c == L('[') && *p == L('.'))
if (c == L_('[') && *p == L_('.'))
{
uint32_t nrules =
_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
@@ -425,7 +425,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
while (1)
{
c = *++p;
if (c == L('.') && p[1] == L(']'))
if (c == L_('.') && p[1] == L_(']'))
{
p += 2;
break;
@@ -438,7 +438,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* We have to handling the symbols differently in
ranges since then the collation sequence is
important. */
is_range = *p == L('-') && p[1] != L('\0');
is_range = *p == L_('-') && p[1] != L_('\0');
if (nrules == 0)
{
@@ -586,8 +586,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* We have to handling the symbols differently in
ranges since then the collation sequence is
important. */
is_range = (*p == L('-') && p[1] != L('\0')
&& p[1] != L(']'));
is_range = (*p == L_('-') && p[1] != L_('\0')
&& p[1] != L_(']'));
if (!is_range && c == fn)
goto matched;
@@ -596,7 +596,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
c = *p++;
}
if (c == L('-') && *p != L(']'))
if (c == L_('-') && *p != L_(']'))
{
#if _LIBC
/* We have to find the collation sequence
@@ -630,7 +630,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
# endif
is_seqval = false;
if (cend == L('[') && *p == L('.'))
if (cend == L_('[') && *p == L_('.'))
{
uint32_t nrules =
_NL_CURRENT_WORD (LC_COLLATE,
@@ -641,7 +641,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
while (1)
{
c = *++p;
if (c == L('.') && p[1] == L(']'))
if (c == L_('.') && p[1] == L_(']'))
{
p += 2;
break;
@@ -760,9 +760,9 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
else
{
if (!(flags & FNM_NOESCAPE) && cend == L('\\'))
if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
cend = *p++;
if (cend == L('\0'))
if (cend == L_('\0'))
return FNM_NOMATCH;
cend = FOLD (cend);
}
@@ -814,9 +814,9 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
and sometimes fatal consequences. */
UCHAR cend = *p++;
if (!(flags & FNM_NOESCAPE) && cend == L('\\'))
if (!(flags & FNM_NOESCAPE) && cend == L_('\\'))
cend = *p++;
if (cend == L('\0'))
if (cend == L_('\0'))
return FNM_NOMATCH;
/* It is a range. */
@@ -828,7 +828,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
}
if (c == L(']'))
if (c == L_(']'))
break;
}
@@ -843,18 +843,18 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
ignore_next:
c = *p++;
if (c == L('\0'))
if (c == L_('\0'))
/* [... (unterminated) loses. */
return FNM_NOMATCH;
if (!(flags & FNM_NOESCAPE) && c == L('\\'))
if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
{
if (*p == L('\0'))
if (*p == L_('\0'))
return FNM_NOMATCH;
/* XXX 1003.2d11 is unclear if this is right. */
++p;
}
else if (c == L('[') && *p == L(':'))
else if (c == L_('[') && *p == L_(':'))
{
int c1 = 0;
const CHAR *startp = p;
@@ -865,10 +865,10 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (++c1 == CHAR_CLASS_MAX_LENGTH)
return FNM_NOMATCH;
if (*p == L(':') && p[1] == L(']'))
if (*p == L_(':') && p[1] == L_(']'))
break;
if (c < L('a') || c >= L('z'))
if (c < L_('a') || c >= L_('z'))
{
p = startp;
goto ignore_next;
@@ -877,18 +877,18 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
p += 2;
c = *p++;
}
else if (c == L('[') && *p == L('='))
else if (c == L_('[') && *p == L_('='))
{
c = *++p;
if (c == L('\0'))
if (c == L_('\0'))
return FNM_NOMATCH;
c = *++p;
if (c != L('=') || p[1] != L(']'))
if (c != L_('=') || p[1] != L_(']'))
return FNM_NOMATCH;
p += 2;
c = *p++;
}
else if (c == L('[') && *p == L('.'))
else if (c == L_('[') && *p == L_('.'))
{
++p;
while (1)
@@ -897,22 +897,22 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (c == '\0')
return FNM_NOMATCH;
if (*p == L('.') && p[1] == L(']'))
if (*p == L_('.') && p[1] == L_(']'))
break;
}
p += 2;
c = *p++;
}
}
while (c != L(']'));
while (c != L_(']'));
if (not)
return FNM_NOMATCH;
}
break;
case L('+'):
case L('@'):
case L('!'):
case L_('+'):
case L_('@'):
case L_('!'):
if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
{
int res;
@@ -923,7 +923,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
goto normal_match;
case L('/'):
case L_('/'):
if (NO_LEADING_PERIOD (flags))
{
if (n == string_end || c != (UCHAR) *n)
@@ -946,7 +946,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
if (n == string_end)
return 0;
if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L('/'))
if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/'))
/* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */
return 0;
@@ -961,10 +961,10 @@ END (const CHAR *pattern)
const CHAR *p = pattern;
while (1)
if (*++p == L('\0'))
if (*++p == L_('\0'))
/* This is an invalid pattern. */
return pattern;
else if (*p == L('['))
else if (*p == L_('['))
{
/* Handle brackets special. */
if (posixly_correct == 0)
@@ -972,21 +972,21 @@ END (const CHAR *pattern)
/* Skip the not sign. We have to recognize it because of a possibly
following ']'. */
if (*++p == L('!') || (posixly_correct < 0 && *p == L('^')))
if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
++p;
/* A leading ']' is recognized as such. */
if (*p == L(']'))
if (*p == L_(']'))
++p;
/* Skip over all characters of the list. */
while (*p != L(']'))
if (*p++ == L('\0'))
while (*p != L_(']'))
if (*p++ == L_('\0'))
/* This is no valid pattern. */
return pattern;
}
else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
|| *p == L('!')) && p[1] == L('('))
else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
|| *p == L_('!')) && p[1] == L_('('))
p = END (p + 1);
else if (*p == L(')'))
else if (*p == L_(')'))
break;
return p + 1;
@@ -1014,10 +1014,10 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* Parse the pattern. Store the individual parts in the list. */
level = 0;
for (startp = p = pattern + 1; ; ++p)
if (*p == L('\0'))
if (*p == L_('\0'))
/* This is an invalid pattern. */
return -1;
else if (*p == L('['))
else if (*p == L_('['))
{
/* Handle brackets special. */
if (posixly_correct == 0)
@@ -1025,22 +1025,22 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* Skip the not sign. We have to recognize it because of a possibly
following ']'. */
if (*++p == L('!') || (posixly_correct < 0 && *p == L('^')))
if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^')))
++p;
/* A leading ']' is recognized as such. */
if (*p == L(']'))
if (*p == L_(']'))
++p;
/* Skip over all characters of the list. */
while (*p != L(']'))
if (*p++ == L('\0'))
while (*p != L_(']'))
if (*p++ == L_('\0'))
/* This is no valid pattern. */
return -1;
}
else if ((*p == L('?') || *p == L('*') || *p == L('+') || *p == L('@')
|| *p == L('!')) && p[1] == L('('))
else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
|| *p == L_('!')) && p[1] == L_('('))
/* Remember the nesting level. */
++level;
else if (*p == L(')'))
else if (*p == L_(')'))
{
if (level-- == 0)
{
@@ -1051,7 +1051,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
size_t plensize; \
size_t newpsize; \
\
plen = (opt == L('?') || opt == L('@') \
plen = (opt == L_('?') || opt == L_('@') \
? pattern_len \
: p - startp + 1); \
plensize = plen * sizeof (CHAR); \
@@ -1061,7 +1061,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
|| ALLOCA_LIMIT <= newpsize) \
return -1; \
newp = (struct patternlist *) alloca (newpsize); \
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0'); \
*((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \
newp->next = NULL; \
*lastp = newp; \
lastp = &newp->next
@@ -1069,7 +1069,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
break;
}
}
else if (*p == L('|'))
else if (*p == L_('|'))
{
if (level == 0)
{
@@ -1078,17 +1078,17 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
}
}
assert (list != NULL);
assert (p[-1] == L(')'));
assert (p[-1] == L_(')'));
#undef NEW_PATTERN
switch (opt)
{
case L('*'):
case L_('*'):
if (FCT (p, string, string_end, no_leading_period, flags) == 0)
return 0;
/* FALLTHROUGH */
case L('+'):
case L_('+'):
do
{
for (rs = string; rs <= string_end; ++rs)
@@ -1120,12 +1120,12 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* None of the patterns lead to a match. */
return FNM_NOMATCH;
case L('?'):
case L_('?'):
if (FCT (p, string, string_end, no_leading_period, flags) == 0)
return 0;
/* FALLTHROUGH */
case L('@'):
case L_('@'):
do
/* I cannot believe it but `strcat' is actually acceptable
here. Match the entire string with the prefix from the
@@ -1141,7 +1141,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
/* None of the patterns lead to a match. */
return FNM_NOMATCH;
case L('!'):
case L_('!'):
for (rs = string; rs <= string_end; ++rs)
{
struct patternlist *runp;
@@ -1188,5 +1188,5 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
#undef STRCOLL
#undef STRLEN
#undef STRCAT
#undef L
#undef L_
#undef BTOWC

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