Compare commits

...

352 Commits

Author SHA1 Message Date
Jim Meyering
9cfc53bf54 now it's the 17th 2005-10-16 22:07:00 +00:00
Jim Meyering
2bff118a36 typo 2005-10-16 21:01:48 +00:00
Jim Meyering
9c2e9b49d1 . 2005-10-16 12:28:06 +00:00
Jim Meyering
0652d12852 whoops. Don't put $$today inside single quotes. 2005-10-16 11:00:22 +00:00
Jim Meyering
8fe2b26799 *** empty log message *** 2005-10-16 10:58:02 +00:00
Jim Meyering
a7ffedd708 (VERSION_REGEXP): New variable.
(news-date-check, changelog-check): Use tighter regular expressions.
2005-10-16 10:57:58 +00:00
Jim Meyering
2487210cb4 remove -cvs suffix 2005-10-16 10:38:40 +00:00
Jim Meyering
f0e03c732d *** empty log message *** 2005-10-16 10:36:02 +00:00
Jim Meyering
7baaad040a . 2005-10-16 10:35:27 +00:00
Jim Meyering
284a97768e *** empty log message *** 2005-10-16 10:24:57 +00:00
Jim Meyering
dba603f83a Mention the `mkdir -p' bug fix. 2005-10-16 10:24:41 +00:00
Jim Meyering
2c12c963b1 Remove -cvs suffix from version string. For 5.91. 2005-10-16 09:51:04 +00:00
Jim Meyering
9385c40824 *** empty log message *** 2005-10-16 09:50:13 +00:00
Jim Meyering
d948c0308a (Top, General output formatting, dir invocation):
(vdir invocation): Don't document the old v and d commands.
2005-10-16 07:27:04 +00:00
Jim Meyering
13d8990203 *** empty log message *** 2005-10-16 07:26:42 +00:00
Jim Meyering
7fdc81ede5 *** empty log message *** 2005-10-15 15:23:36 +00:00
Jim Meyering
05da3cb908 *** empty log message *** 2005-10-15 15:01:28 +00:00
Jim Meyering
2fa2315d0c (usage): Undocument deprecated --idle (-i) option. 2005-10-15 15:01:22 +00:00
Jim Meyering
e418d03571 (who invocation): Remove documentation for deprecated --idle (-i). 2005-10-15 14:59:17 +00:00
Jim Meyering
c6ee1b3a32 . 2005-10-15 10:23:47 +00:00
Jim Meyering
b54de31c76 . 2005-10-15 10:21:39 +00:00
Jim Meyering
999a43859a *** empty log message *** 2005-10-15 10:15:56 +00:00
Jim Meyering
15e97882ff (main): Remove --link -l options.
You can use --dereference (-L) instead.
2005-10-15 10:15:48 +00:00
Jim Meyering
f90df192b4 (parse_options): Remove --allow-missing option.
You can use --retry instead.
2005-10-15 10:15:34 +00:00
Jim Meyering
69dc13717a (usage): Document -m, once again.
(main): Warn about use of deprecated long options: --kilobytes and --megabytes.
2005-10-15 10:14:13 +00:00
Jim Meyering
4ecdd8ce4c (decode_switches): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:21 +00:00
Jim Meyering
9624dcd0ee (main): Warn about the deprecated --kilobytes option. 2005-10-15 09:56:03 +00:00
Jim Meyering
a7164e425a *** empty log message *** 2005-10-15 08:34:53 +00:00
Jim Meyering
22449f0d02 (du invocation): Document du's -m option, now that we've decided to keep it. 2005-10-15 08:34:48 +00:00
Jim Meyering
5e3bd56977 *** empty log message *** 2005-10-13 20:12:15 +00:00
Jim Meyering
03e3b41e75 Avoid a few overfull/underfull hboxes. 2005-10-13 20:12:10 +00:00
Jim Meyering
e08cff1ba5 *** empty log message *** 2005-10-13 20:06:11 +00:00
Jim Meyering
146465b816 Sync from gnulib. 2005-10-13 20:06:07 +00:00
Paul Eggert
2ec133706a (make_dir_parents): Don't report an error if an
intermediate directory is in a read-only file system.
2005-10-13 19:05:13 +00:00
Jim Meyering
71a4b4865c *** empty log message *** 2005-10-13 14:16:23 +00:00
Jim Meyering
757e44d875 Document dircolors change of 2005-09-05. 2005-10-13 14:16:19 +00:00
Jim Meyering
898e531c01 *** empty log message *** 2005-10-13 14:12:58 +00:00
Jim Meyering
74583cd9fb (.x.1): Remove temp directory first. 2005-10-13 14:12:51 +00:00
Jim Meyering
76890ff048 *** empty log message *** 2005-10-08 09:06:16 +00:00
Jim Meyering
40bf0efd47 (rpl_openat): Use the promoted type (int), not mode_t,
as second argument to va_arg.  Otherwise, some versions of gcc
warn that `if this code is reached, the program will abort'.
2005-10-08 09:05:08 +00:00
Jim Meyering
f754c25d4c *** empty log message *** 2005-10-07 22:07:36 +00:00
Jim Meyering
82ee4b140c Merge from gnulib.
(SIZE_MAX): New macro, if not already defined.
2005-10-07 22:07:27 +00:00
Jim Meyering
a9ede5e986 . 2005-10-07 19:42:03 +00:00
Jim Meyering
8f8a513667 *** empty log message *** 2005-10-07 19:30:26 +00:00
Jim Meyering
cb16682ede revert last change 2005-10-07 19:29:44 +00:00
Paul Eggert
bff08feb9b * stdbool.m4 (AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test. 2005-10-07 18:53:41 +00:00
Paul Eggert
25041cf0f9 (AC_HEADER_STDBOOL): Add an "#ifdef __xlc__" test,
since yesterday's attempt didn't work.
2005-10-07 18:53:20 +00:00
Paul Eggert
b17333e415 Redo previous change to sort.c. 2005-10-07 18:48:55 +00:00
Paul Eggert
4778617abc (sortlines_temp): Redo previous change, since I'm no longer confident
that the m4/stdbool.m4 patch suffices.
2005-10-07 18:48:28 +00:00
Paul Eggert
a0d42f7861 Generalize the patch for the AIX bool bug. 2005-10-06 16:42:22 +00:00
Paul Eggert
cb797070ce (AC_HEADER_STDBOOL): Check that bool
promotes to int, not unsigned int, to catch the AIX 5.3
compiler bug.
2005-10-06 16:40:36 +00:00
Paul Eggert
38ffebe4ac (sortlines_temp): Undo previous change, since
today's change to m4/stdbool.m4 should catch it.
2005-10-06 16:40:13 +00:00
Jim Meyering
028b5117d4 *** empty log message *** 2005-10-06 14:12:52 +00:00
Jim Meyering
e1cd990287 *** empty log message *** 2005-10-06 14:06:54 +00:00
Jim Meyering
84f1db3726 rm: add support for a -I option, like that from FreeBSD's rm. 2005-10-06 14:06:51 +00:00
Jim Meyering
132aaa2eac Add a comment to go with the last change. 2005-10-05 18:56:29 +00:00
Jim Meyering
b185a8b904 *** empty log message *** 2005-10-05 18:53:59 +00:00
Jim Meyering
111bac9943 (sortlines_temp): Declare temporary as `int' rather
than `bool' to work around AIX 5.3 compiler bug in 64-bit mode.
2005-10-05 18:53:55 +00:00
Jim Meyering
3614c42902 *** empty log message *** 2005-10-05 14:54:20 +00:00
Jim Meyering
05e1975d08 (libcoreutils_a_DEPENDENCIES): Remove definition.
Once it's gone, automake generates an equivalent one.
2005-10-05 14:54:17 +00:00
Jim Meyering
d3b8165328 Merge from gnulib. 2005-10-05 09:09:33 +00:00
Jim Meyering
df2b4d3451 *** empty log message *** 2005-10-05 09:09:27 +00:00
Jim Meyering
ed558df65b *** empty log message *** 2005-10-04 15:51:25 +00:00
Jim Meyering
4dffc10f08 Merge from gnulib.
Include sys/types.h before other headers.
2005-10-04 15:51:20 +00:00
Jim Meyering
2928a59fe5 . 2005-10-03 16:13:06 +00:00
Jim Meyering
70a7e357d6 *** empty log message *** 2005-10-03 12:12:21 +00:00
Jim Meyering
c7676c0b6b (MAX_N_FACTORS): Define in terms of sizeof (uintmax_t)
rather than hard-coding to 128.  From Thomas M.Ott.
2005-10-03 12:12:14 +00:00
Jim Meyering
314397e7c5 *** empty log message *** 2005-10-03 12:11:49 +00:00
Paul Eggert
ca7be84526 Import getdelim.c from gnulib (to fix unused var warnings) then
apply the following fixes:
Include getdelim.h first.  Include <limits.h>.
(SSIZE_MAX): New macro, if not already defined.
(getdelim): Fix buffer overrun on 64-bit hosts with lines longer
than 2 GiB.
2005-10-02 22:49:49 +00:00
Jim Meyering
fbc02ac784 *** empty log message *** 2005-10-02 10:09:18 +00:00
Jim Meyering
1cf46dda93 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
against `yes', rather than just testing for nonempty.
2005-10-02 10:09:14 +00:00
Jim Meyering
e7d6dd7451 *** empty log message *** 2005-10-02 06:29:31 +00:00
Jim Meyering
b0dcbf34a5 (sc_unmarked_diagnostics): Search only cvs-controlled files. 2005-10-02 06:29:26 +00:00
Jim Meyering
286411fd74 *** empty log message *** 2005-10-02 06:28:15 +00:00
Jim Meyering
8653e104a3 Add lib/euidaccess-stat.c. 2005-10-02 06:28:12 +00:00
Jim Meyering
994ae8ed47 Add .x-sc_unmarked_diagnostics. 2005-10-02 06:27:32 +00:00
Jim Meyering
e470936662 *** empty log message *** 2005-10-02 06:27:09 +00:00
Jim Meyering
e102280994 . 2005-10-02 06:22:00 +00:00
Jim Meyering
1f022b6b96 Include sys/types.h for sys/socket.h, on FreeBSD and Darwin. 2005-10-01 11:59:08 +00:00
Jim Meyering
a2a3fc0ac7 *** empty log message *** 2005-10-01 11:58:50 +00:00
Jim Meyering
adcbbb9946 . 2005-10-01 09:51:00 +00:00
Jim Meyering
22c2d2efaf *** empty log message *** 2005-10-01 09:50:09 +00:00
Jim Meyering
4a6b465285 *** empty log message *** 2005-10-01 09:49:40 +00:00
Jim Meyering
8050751a86 Protect #include's of sys/socket.h and netdb.h.
Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
AI_* and EAI_* definitions.  Protect function declarations.
2005-10-01 09:49:36 +00:00
Jim Meyering
e1170f4d9e *** empty log message *** 2005-10-01 09:49:14 +00:00
Jim Meyering
614623a670 (gl_PREREQ_GETADDRINFO): Use AC_GNU_SOURCE,
GNU declares only getaddrinfo as an (POSIX) extension.
Check for sys/types.h, sys/socket.h, and netdb.h too,
needed by getaddrinfo.h.
Check if getaddrinfo, freeaddrinfo and gai_strerror are
declared by the POSIX headers.
Check if struct addrinfo is declared.
2005-10-01 09:49:09 +00:00
Jim Meyering
5c8ecd2831 Add a test for this:
(main): Don't stop processing arguments upon the first invalid one.
2005-10-01 08:02:09 +00:00
Jim Meyering
9c06ae5cff *** empty log message *** 2005-10-01 08:01:40 +00:00
Jim Meyering
46f0e13d5b *** empty log message *** 2005-10-01 08:01:30 +00:00
Jim Meyering
157712c3cb (main): Don't stop processing arguments upon the first invalid one. 2005-10-01 08:01:25 +00:00
Jim Meyering
5664caead1 . 2005-10-01 07:44:04 +00:00
Jim Meyering
18794c7464 *** empty log message *** 2005-10-01 06:54:15 +00:00
Jim Meyering
b364a72c6b (gl_GETADDRINFO): Look for getservbyname in these
libraries [inet nsl socket xnet].  Nelson Beebe reported that with
native cc on Solaris 7, getaddrinfo.c requires -lsocket.
2005-10-01 06:54:11 +00:00
Jim Meyering
f9c10dab98 *** empty log message *** 2005-09-30 15:21:26 +00:00
Jim Meyering
9b1facc61f (gl_FUNC_OPENAT): Check for fdopendir. 2005-09-30 15:21:19 +00:00
Jim Meyering
03866dcfb9 (fdopendir): Do not define if HAVE_FDOPENDIR. 2005-09-30 15:19:47 +00:00
Jim Meyering
5230885d13 (fdopendir): Do not define if HAVE_FDOPENDIR.
Remove AT_FDCWD test.
Do not consume the fd unless successful.
2005-09-30 15:19:24 +00:00
Jim Meyering
e94c88d4a2 Use 5.91-cvs as the version string. 2005-09-30 05:46:48 +00:00
Paul Eggert
85f86d456d * src/dd.c (main): Don't assume size_t has the same width as unsigned long. 2005-09-30 05:07:49 +00:00
Paul Eggert
86b4df4f0d (main): Don't assume size_t has the same width
as unsigned long.  Problem reported by Eric Blake.
2005-09-30 05:07:11 +00:00
Paul Eggert
a93720f8ac Clarify "tail - f" example. 2005-09-30 04:50:48 +00:00
Jim Meyering
89e6ed115f . 2005-09-29 18:10:25 +00:00
Jim Meyering
a28944042e . 2005-09-29 17:26:44 +00:00
Paul Eggert
c683e67618 "they wants" -> "they want" 2005-09-29 17:24:21 +00:00
Paul Eggert
63e88f7cef Rely on gettimeofday failure too. 2005-09-29 17:22:19 +00:00
Paul Eggert
37016136c9 (settime): If settimeofday fails, give up right away. 2005-09-29 17:21:44 +00:00
Paul Eggert
346afb38ab * settime.c (settime): Fix { typo in previous patch. Also, don't
bother returning ENOSYS; just let stime return whatever errno it
wants to return.
2005-09-29 17:19:58 +00:00
Paul Eggert
8c871e2391 (settime): Fix { typo in previous patch. Also, don't
boether returning ENOSYS; just let stime return whatever errno it
wants to return.
2005-09-29 17:19:30 +00:00
Jim Meyering
abeaf74fcb . 2005-09-29 17:17:28 +00:00
Jim Meyering
6fd4cff540 *** empty log message *** 2005-09-29 17:12:28 +00:00
Jim Meyering
ecb80e4add Version 5.90.
Add today's date.
2005-09-29 17:12:16 +00:00
Jim Meyering
032ca6e791 Remove -cvs suffix from version string. 2005-09-29 17:11:58 +00:00
Jim Meyering
9ac64b8013 . 2005-09-29 17:10:23 +00:00
Paul Eggert
96e3593902 * xtime.h (XTIME_PRECISION): Now of type int, not long long int. 2005-09-29 16:51:58 +00:00
Paul Eggert
970dc8e4a8 (XTIME_PRECISION): Now of type int, not long long int,
so that the code works even with ancient cpp.  Portability problem
with GCC 2.7.2.1 reported by Thomas M.Ott.
2005-09-29 16:51:40 +00:00
Jim Meyering
c060bb702a . 2005-09-29 13:14:33 +00:00
Jim Meyering
6204a2d1bd *** empty log message *** 2005-09-29 13:13:53 +00:00
Jim Meyering
33b113c638 (settime): Move the HAVE_STIME block `up' into an #elif
block, so that we don't even try to compile it if settimeofday is
available.  This works around a compilation failure on OSF1 V5.1,
due to stime requiring a `long int*' while tv_sec is `int'.
2005-09-29 13:13:49 +00:00
Jim Meyering
21e670cb0d *** empty log message *** 2005-09-29 06:32:30 +00:00
Jim Meyering
abab5e5812 mention stat bug fix 2005-09-29 06:32:25 +00:00
Jim Meyering
bb0cdc99f2 . 2005-09-28 22:26:26 +00:00
Paul Eggert
d6897a1553 * src/system.h (LONGEST_MODIFIER): Use ULONG_MAX_LT_ULLONG_MAX
instead of ULLONG_MAX, as the latter doesn't work with GCC 2.7.2.1.
2005-09-28 22:11:06 +00:00
Jim Meyering
3f2693ee63 . 2005-09-28 22:10:51 +00:00
Paul Eggert
6f8ed252b4 (gl_ULLONG_MAX): Simplify so that it merely
defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
ULLONG_MAX doesn't work with 2.7.2.1.
2005-09-28 22:08:46 +00:00
Jim Meyering
6e212cc850 *** empty log message *** 2005-09-28 21:48:05 +00:00
Jim Meyering
9d1978df97 Use 5.90-cvs as the version string. 2005-09-28 21:47:30 +00:00
Jim Meyering
f78ad95853 *** empty log message *** 2005-09-28 18:34:37 +00:00
Jim Meyering
8607248c90 remove note about FreeBSD make test failure. 2005-09-28 18:34:26 +00:00
Jim Meyering
bfb5ed16a2 Work around a bug in FreeBSD 5.0. 2005-09-28 18:33:11 +00:00
Jim Meyering
3a14fbb06a *** empty log message *** 2005-09-28 08:27:04 +00:00
Jim Meyering
a71e238667 *** empty log message *** 2005-09-28 08:21:33 +00:00
Jim Meyering
f1f4e1ada3 add a FIXME comment 2005-09-27 09:40:39 +00:00
Jim Meyering
b2d2351330 *** empty log message *** 2005-09-27 08:59:54 +00:00
Jim Meyering
4e8e195401 *** empty log message *** 2005-09-27 08:59:04 +00:00
Jim Meyering
0ffc4a7d84 [HAVE_CONFIG_H]: Include <config.h>. 2005-09-27 08:58:55 +00:00
Jim Meyering
52e05089cc [HAVE_CONFIG_H]: Include <config.h> conditionally,
to be consistent with gnulib.
2005-09-27 08:44:07 +00:00
Jim Meyering
3cf3a44bbd Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef HAVE_CONFIG_H. 2005-09-27 08:33:47 +00:00
Jim Meyering
9346282a5d *** empty log message *** 2005-09-27 08:21:35 +00:00
Jim Meyering
2d7c20c891 Include <config.h> here, now that strnumcmp-in.h no longer includes it. 2005-09-27 08:21:28 +00:00
Jim Meyering
e247f4874c *** empty log message *** 2005-09-27 06:56:44 +00:00
Paul Eggert
b115bf4d44 Test "touch -" too, and change "touch -c - >&-" so that it does not
report an error, since that's more logical.
2005-09-26 23:03:53 +00:00
Paul Eggert
4b2dd7730a Test "touch -" too. 2005-09-26 23:02:34 +00:00
Paul Eggert
2f897e7258 (touch): Handle "touch -c - >&-" by checking for EBADF
and ENOSYS.
Do not pass "-" to futimens; pass NULL instead.
If close (STDIN_FILENO) fails, report the error separately instead
of letting the 'close' pollute errno.
2005-09-26 23:02:14 +00:00
Paul Eggert
80065b498b utimens.c portability fixes. 2005-09-26 23:01:25 +00:00
Paul Eggert
a6c8a8e6d4 Include unistd.h, for dup2.
(futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
(futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
2005-09-26 23:01:00 +00:00
Jim Meyering
a49740f33b *** empty log message *** 2005-09-26 09:10:54 +00:00
Jim Meyering
99fa7a0e8e (gl_FUNC_UTIMES): Detect the version of utimes
from glibc-2.2.5 that fails for read-only files.
2005-09-26 09:10:50 +00:00
Jim Meyering
8149b5a566 . 2005-09-26 07:34:41 +00:00
Jim Meyering
43bdd9709a *** empty log message *** 2005-09-26 07:33:53 +00:00
Jim Meyering
7019fe1a9a *** empty log message *** 2005-09-26 07:32:14 +00:00
Jim Meyering
e3ce1ce8f7 (TESTS): Add read-only. 2005-09-26 07:32:08 +00:00
Jim Meyering
8507dc0375 New test, for root of chmod/usage failure. 2005-09-26 07:31:57 +00:00
Jim Meyering
012c33d39c *** empty log message *** 2005-09-26 07:25:29 +00:00
Jim Meyering
6540422861 Work around the root cause of alpha-linux-1.sf.net test failure.
Remove all files in inner loop.
Otherwise, with a touch program that fails on unwritable files,
(this happens at least on linux-2.2.20) a -w file left behind
from a previous iteration could cause a spurious test failure.
2005-09-26 07:25:23 +00:00
Jim Meyering
c5e9d78786 Undo the s/files/file/ change, but add
comments about why the old version was desired.
2005-09-26 07:20:22 +00:00
Jim Meyering
31b44eef6e *** empty log message *** 2005-09-25 20:46:34 +00:00
Jim Meyering
b1e97405b2 (setuid-etc): Work around output mismatch when
a just-created test file cannot be made set-group-ID.
2005-09-25 20:46:30 +00:00
Jim Meyering
2c5def0462 . 2005-09-25 17:01:54 +00:00
Jim Meyering
0e5662fd54 . 2005-09-25 12:54:04 +00:00
Jim Meyering
3d9687a4e0 *** empty log message *** 2005-09-25 09:59:30 +00:00
Jim Meyering
e080496968 *** empty log message *** 2005-09-25 09:59:23 +00:00
Jim Meyering
4f8eb86b55 *** empty log message *** 2005-09-25 09:58:04 +00:00
Jim Meyering
ae296eb195 Use newer trap and tmpdir-creation framework.
Fix apparent typos (s/files/file/) in inner loop.
2005-09-25 09:58:00 +00:00
Jim Meyering
23b9299247 Protect against multiple inclusion. 2005-09-25 06:14:33 +00:00
Paul Eggert
e3513e1895 (touch): "touch -" now touches standard output.
(usage): Document this.
2005-09-25 06:12:21 +00:00
Paul Eggert
17ccbf8844 "touch -" now touches standard output. 2005-09-25 06:11:45 +00:00
Paul Eggert
124cc0e9e6 "touch -" now touches standard output. 2005-09-25 06:09:51 +00:00
Paul Eggert
7ee48d8ffb Support having a null PATH if the file descriptor is nonnegative. 2005-09-25 06:09:22 +00:00
Paul Eggert
4f001e7a13 (ENOSYS): Define if not already defined.
(ftimens): Support having a null PATH if the file descriptor
is nonnegative.
2005-09-25 06:08:45 +00:00
Paul Eggert
add931ac28 (touch invocation): "touch -" now touches standard output. 2005-09-25 06:08:17 +00:00
Paul Eggert
4f688f0b3f "touch -" now touches standard output. 2005-09-25 06:07:48 +00:00
Paul Eggert
443ddc13e6 Upgrade regex_internal.h patch. 2005-09-25 04:18:54 +00:00
Paul Eggert
793ffcaac0 (__GNUC_PREREQ, always_inline, inline, pure):
Remove.
(__attribute): Define to empty unless GCC 3.1 or later.
This works around a core dump on OpenBSD 3.4, which has GCC
2.95.3, which dumps core when given __attribute__(()).  It also
simplifies other tests, since we really don't want to bother with
worrying about which ancient version of GCC supported what.
Original problem reported by Yoann Vandoorselaere, with part of
the fix suggested by Derek Price.
2005-09-25 04:18:39 +00:00
Paul Eggert
1e32f96bf2 Prefer fchown to chown and fchmod to chmod when copying regular files. 2005-09-25 03:08:40 +00:00
Paul Eggert
aa5f98288a * jm-macros.m4 (gl_MACROS): Check for fchmod and fchown. 2005-09-25 03:08:15 +00:00
Paul Eggert
33247c7169 (gl_MACROS): Check for fchmod and fchown. 2005-09-25 03:07:53 +00:00
Paul Eggert
7fc308db7e (HAVE_FCHMOD, HAVE_FCHOWN): Define to 0 if not defined.
(copy_reg): New args CHOWN_SUCCEDED and DST_SB.  All callers changed.
Add a "goto close_src_and_dst_desc;" that was missing in the
previous patch.
(copy_reg) [HAVE_FCHOWN]: Prefer fchown to chown.
(copy_reg) [HAVE_FCHMOD]: Prefer fchmod to chmod.
(copy_internal): Don't invoke chown if fchown worked,
and likewise for chmod and fchmod.
2005-09-25 03:07:33 +00:00
Paul Eggert
545dd954d9 * Makefile.am (libcoreutils_a_SOURCES): Remove mbchar.c. 2005-09-24 23:14:21 +00:00
Paul Eggert
944e020290 (libcoreutils_a_SOURCES): Remove mbchar.c, since
it doesn't build in OpenBSD 3.4.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
2005-09-24 23:14:04 +00:00
Paul Eggert
6c3d9ae4c4 * mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. 2005-09-24 23:13:42 +00:00
Paul Eggert
a9d12230c8 (gl_MBCHAR): Check for wchar.h and wctype.h, and
don't compile mbchar.c unless both headers exist.  See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
2005-09-24 23:13:19 +00:00
Paul Eggert
fd02208ad2 * regex_internal.h (__attribute): Define to nothing for GCC 2. 2005-09-24 22:59:22 +00:00
Paul Eggert
5a29d2d430 (__attribute): Define to nothing for GCC 2.
This works around a core dump on OpenBSD 3.4, which has GCC
2.95.3, which dumps core when given __attribute__(()).
2005-09-24 22:59:06 +00:00
Jim Meyering
ed3a66aa5e . 2005-09-24 13:42:39 +00:00
Jim Meyering
d3ddaff1a5 *** empty log message *** 2005-09-24 13:42:30 +00:00
Jim Meyering
0f6f7b428e (EXTRA_DIST): Add .x-sc_no_if_have_config_h. 2005-09-24 13:41:48 +00:00
Jim Meyering
eae3fa54bf (sc_no_if_have_config_h): New rule.
(syntax-check-rules): Add it.
2005-09-24 13:41:20 +00:00
Jim Meyering
26ddff0c17 *** empty log message *** 2005-09-24 13:41:01 +00:00
Jim Meyering
8daf4759f4 Use #ifdef HAVE_CONFIG_H', not #if HAVE_CONFIG_H', for consistency with gnulib. 2005-09-24 13:40:37 +00:00
Jim Meyering
26405733e9 . 2005-09-24 13:36:20 +00:00
Jim Meyering
5e6117b9ec *** empty log message *** 2005-09-24 13:32:36 +00:00
Jim Meyering
58e399c289 Use #ifdef HAVE_CONFIG_H', not #if HAVE_CONFIG_H', for consistency with gnulib. 2005-09-24 13:32:31 +00:00
Jim Meyering
7bf8267334 *** empty log message *** 2005-09-24 13:27:41 +00:00
Jim Meyering
f6dbf542b4 Include <config.h> from strintcmp.c, not from here. 2005-09-24 13:27:34 +00:00
Jim Meyering
d447dba13d Include <config.h> here, not from strnumcmp-in.h. 2005-09-24 13:26:41 +00:00
Jim Meyering
a14fc71370 *** empty log message *** 2005-09-24 10:44:33 +00:00
Jim Meyering
7a2163735e (gl_GETADDRINFO): Check for gethostbyname
in the inet and nsl libraries.  Required on Solaris 5.7.
2005-09-24 10:44:30 +00:00
Jim Meyering
b1ae384b23 *** empty log message *** 2005-09-24 10:06:36 +00:00
Jim Meyering
78e2e5d5a5 (eq-wid-1, eq-wid-2): Disable these tests for now.
They fail with non-gcc compilers and some combinations
of options and libraries on Solaris systems.
2005-09-24 10:06:29 +00:00
Jim Meyering
e122fe5ae9 *** empty log message *** 2005-09-24 07:57:42 +00:00
Jim Meyering
01b7701a24 (uninit-64): Restore this test.
Add start-up code to detect, and work around, the cases in
which the test might fail.
2005-09-24 07:57:36 +00:00
Paul Eggert
2cb5253b1f * tests/misc/date (uninit-64): Remove this test. 2005-09-24 07:05:52 +00:00
Paul Eggert
0c42a4951b (uninit-64): Remove this test. It wasn't
portable in theory (it doesn't work on hosts where 'int' is 64
bits, example) or in practice (Solaris 8 localtime returns garbage
in tm_year for the specified date, but that's not coreutils's
fault).
2005-09-24 07:05:27 +00:00
Jim Meyering
0f31fc1440 . 2005-09-24 06:53:27 +00:00
Jim Meyering
8f4700c9e1 *** empty log message *** 2005-09-23 23:05:44 +00:00
Jim Meyering
8dbb507ee8 (verify_type__): Use `unsigned int' as the bitfield type
so we can once again use a positive bitfield width of 1 -- now we
don't have to explain why we were using a bitfield width of 2.
2005-09-23 23:05:39 +00:00
Jim Meyering
6d8b96f653 *** empty log message *** 2005-09-23 23:05:16 +00:00
Jim Meyering
b610709f70 *** empty log message *** 2005-09-23 22:49:10 +00:00
Jim Meyering
3e2b8d355e Add lib/gai_strerror.c. 2005-09-23 22:49:05 +00:00
Paul Eggert
ebca458e8e Use 2, not 1, for bitfield size in verify.h. 2005-09-23 21:49:59 +00:00
Paul Eggert
45079da973 (verify_type__): Use 2, not 1, for bitfield size, to avoid
a warning with Irix 6.5 cc.
2005-09-23 21:49:31 +00:00
Paul Eggert
28475f652b Log recent changes. 2005-09-23 21:40:12 +00:00
Paul Eggert
7ba23f15c4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
and similarly for the other external symbols.  Problem reported
by James Gallager.
2005-09-23 21:17:57 +00:00
Jim Meyering
0fc8cac57d *** empty log message *** 2005-09-23 20:56:54 +00:00
Paul Eggert
8e4680db2f (install_file_in_file): Be more conservative about the previous patch:
set time stamps on all non-regular files.
2005-09-23 20:50:49 +00:00
Paul Eggert
63b77aac44 (change_timestamps): First arg is source
struct stat, not file name.  All uses changed.
(install_file_in_file): Stat the source file if necessary.
Don't try to change time stamps if copy_file did it.
2005-09-23 20:39:04 +00:00
Paul Eggert
35044438af (copy_reg): Preserve time stamps if
x->preserve_timestamps is set, using futimens so that
we needn't resolve the path again.
(copy_internal): Don't preserve time stamps if copy_reg did it
already.
2005-09-23 20:38:34 +00:00
Paul Eggert
2c4a088886 Don't include utime.h; not needed.
(struct utimbuf) [!defined HAVE_STRUCT_UTIMBUF]: Remove; not needed.
2005-09-23 20:35:41 +00:00
Paul Eggert
cf37a8b41a (gl_MACROS): Don't require gl_CHECK_TYPE_STRUCT_UTIMBUF.
(gl_CHECK_ALL_HEADERS): Don't check for utime.h.
2005-09-23 20:35:14 +00:00
Paul Eggert
061601cdd7 Update copyright. 2005-09-23 20:26:09 +00:00
Paul Eggert
588034d101 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
bug reported by Jim Meyering.
2005-09-23 20:23:59 +00:00
Jim Meyering
a40376f4c5 . 2005-09-23 20:14:20 +00:00
Jim Meyering
886979b6fc *** empty log message *** 2005-09-23 20:14:01 +00:00
Jim Meyering
d3e8a40be3 Use `verify' to ensure that our hard-coded
bytes_to_*_digits arrays are long enough.  Of course, 17+-byte
integral types aren't on the near horizon, but just in case...
(MAX_INTEGRAL_TYPE_SIZE): Move definition to precede new first use.
(bytes_to_oct_digits, bytes_to_signed_dec_digits):
(bytes_to_unsigned_dec_digits, bytes_to_hex_digits): Change base
type from `char' to the clearer `unsigned int'.
2005-09-23 20:13:49 +00:00
Jim Meyering
b726021672 *** empty log message *** 2005-09-23 20:00:19 +00:00
Jim Meyering
4b17e15531 (gl_MACROS): AC_REQUIRE([gl_SOCKLEN_T]) here,
now that it's no longer required by getaddrinfo.m4.
2005-09-23 19:59:07 +00:00
Paul Eggert
a169837d87 not needed, since socklen is a prerequisite module. 2005-09-23 19:40:04 +00:00
Paul Eggert
b9830cafa1 * lib/utimens.c (futimens): Use futimesat if available.
Prefer it to futimes since it doesn't have the futimes bug.
* m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
2005-09-23 19:18:27 +00:00
Paul Eggert
d6ed244c5a Fix typo in comment. 2005-09-23 17:52:22 +00:00
Paul Eggert
ef999bc74a (GL_CONCAT0, GL_CONCAT): Remove.
(verify): Don't use the __LINE__ trick, as it doesn't work in general.
Instead, declare a function that returns a pointer to an array,
and use verify_type__ to declare the size of the array.
Problem and germ of a solution reported by Bruno Haible.
2005-09-23 17:47:15 +00:00
Jim Meyering
6137da3427 *** empty log message *** 2005-09-23 14:50:22 +00:00
Jim Meyering
185069538b *** empty log message *** 2005-09-23 14:48:21 +00:00
Jim Meyering
434de88614 from gnulib 2005-09-23 14:48:14 +00:00
Jim Meyering
ee0d6b604c (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T. 2005-09-23 14:47:58 +00:00
Jim Meyering
a6821efce3 *** empty log message *** 2005-09-23 12:44:07 +00:00
Jim Meyering
81d380e377 Include <config.h>. Otherwise builds with strict
C89 (e.g., Sun's /opt/SUNWspro/bin/c89) would fail due to the use
of `inline'.
2005-09-23 12:42:45 +00:00
Paul Eggert
769a736867 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h. 2005-09-23 05:13:15 +00:00
Paul Eggert
9fd31b8beb * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
Problem reported by Eric Blake.
(getaddrinfo): Initialize se so that it's not garbage.
Redo internal storage allocation so that it doesn't make unportable
assumptions about alignment.
Fix a memory leak.
2005-09-23 05:12:50 +00:00
Jim Meyering
fc6f1f7f9c . 2005-09-22 09:47:36 +00:00
Jim Meyering
3117f633cc *** empty log message *** 2005-09-22 07:10:17 +00:00
Paul Eggert
9bbbf30543 Regenerate. 2005-09-22 07:07:36 +00:00
Paul Eggert
ca9acc01a6 Sync from gnulib. 2005-09-22 07:06:16 +00:00
Paul Eggert
211a8d5cb0 Include canon-host.h rather than declaring canon_host ourselves. 2005-09-22 07:01:24 +00:00
Paul Eggert
144c6536d0 Include canon-host.h rather than declaring
canon_host ourselves.
2005-09-22 07:01:07 +00:00
Paul Eggert
3779124b3f Include strcase.h. 2005-09-22 07:00:49 +00:00
Paul Eggert
b58dc08a58 (gl_PREREQ): Require gl_FUNC_GETLINE rather than
AM_FUNC_GETLINE.  Require gl_FUNC_GETPASS_GNU rather than
gl_FUNC_GETPASS.  Require gl_MBCHAR and gl_MBITER.
2005-09-22 07:00:24 +00:00
Paul Eggert
e5801001a3 no longer needed.
(gl_CHECK_ALL_HEADERS): Don't check for memory.h, mntent.h, mnttab.h,
netdb.h, stdlib.h, stdint.h, string.h, sys/filsys.h, sys/fs/s5param.h,
sys/fs_types.h, sys/fstyp.h, sys/mntent.h, sys/socket.h, sys/stafs.h,
sys/timeb.h, unistd.h.  No longer needed.
2005-09-22 06:59:55 +00:00
Paul Eggert
5a02b1d907 (_gl_DECL_HEADERS): Don't bother checking for
standard C headers, or for headers we no longer use.
2005-09-22 06:59:24 +00:00
Paul Eggert
cab86383b8 (libcoreutils_a_SOURCES): Add getaddrinfo.h,
mbchar.c, mbchar.h, mbuiter.h, strcase.h, strlen1.c, strnlen1.h,
strstr.h.
2005-09-22 06:58:56 +00:00
Paul Eggert
b52d569ca1 (EEXIST, ENOTEMPTY): Remove unused macros. 2005-09-22 06:56:21 +00:00
Paul Eggert
eba2793d11 Nontrivial sync from gnulib. 2005-09-22 06:44:26 +00:00
Paul Eggert
da6ced8651 Add getline.h, getpass.c 2005-09-22 06:43:48 +00:00
Paul Eggert
75b92233d8 (GL_CONCAT): Remove.
Include "verify.h" instead.
(ARGMATCH_CONSTRAINT, ARGMATCH_ASSERT): Remove.
(ARGMATCH_VERIFY): Rewrite in terms of new verify macros.
2005-09-22 06:39:14 +00:00
Paul Eggert
99eda9943e (X2NREALLOC, X2REALLOC): Moved here from
../lib/xalloc.h, with args properly parenthesized, and using
verify_expr rather than the old VERIFY_EXPR.
2005-09-22 06:33:40 +00:00
Paul Eggert
fe4ed6c408 (VERIFY_EXPR, X2NREALLOC, X2REALLOC): Remove.
The latter two macros are moving to ../src/system.h for now.
This reverts this file to the gnulib version.
2005-09-22 06:32:52 +00:00
Paul Eggert
8cec6716df Remove; no longer used. 2005-09-22 06:26:54 +00:00
Paul Eggert
3833e2bc34 New file, from gnulib. 2005-09-22 06:22:44 +00:00
Paul Eggert
0ed6bb9a65 Add getaddrinfo.h, getdelim.h, mbchar.h,
mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
2005-09-22 06:22:31 +00:00
Paul Eggert
2d0c5eefd0 Sync from gnulib. 2005-09-22 06:05:39 +00:00
Paul Eggert
5a43b499b1 Sort. 2005-09-22 05:47:40 +00:00
Paul Eggert
0adb008b03 (ENOSYS): Define to EEXIST if not defined.
(make_dir_parents): Treat ENOSYS like EEXIST.
2005-09-22 05:42:26 +00:00
Jim Meyering
08c07f2a1c . 2005-09-21 17:07:09 +00:00
Jim Meyering
3ed1ba12da . 2005-09-21 16:43:17 +00:00
Jim Meyering
cfda132680 *** empty log message *** 2005-09-21 14:05:50 +00:00
Jim Meyering
a559a19405 Require that this test be run as non-root.
Otherwise, it fails due to the fact that the chmod 0 . doesn't
affect root.
2005-09-21 14:05:45 +00:00
Jim Meyering
7ac0294e28 *** empty log message *** 2005-09-20 17:48:07 +00:00
Jim Meyering
d6b83b2f9b (write_protected_non_symlink): Change comment to agree with the code. 2005-09-20 17:48:02 +00:00
Jim Meyering
b0ecfaf324 *** empty log message *** 2005-09-20 13:51:20 +00:00
Jim Meyering
5205b73810 (fdopendir): Be sure to close the supplied
file descriptor before returning.  This makes our replacement
implementation a little closer to Solaris's, where fdopendir
ties the file descriptor to the returned DIR* pointer.
2005-09-20 13:51:01 +00:00
Jim Meyering
3fcdbfdfda tweak 2005-09-20 13:24:29 +00:00
Jim Meyering
ea66df2090 *** empty log message *** 2005-09-19 15:45:09 +00:00
Jim Meyering
ee8931ea8e (unlinkat): New function. 2005-09-19 15:45:05 +00:00
Jim Meyering
a1052bb3d9 (unlinkat): Add prototype. 2005-09-19 15:44:57 +00:00
Jim Meyering
fa3f61611b *** empty log message *** 2005-09-19 13:34:51 +00:00
Jim Meyering
a9d57e3f26 (remove_dir): Return RM_ERROR, not `1',
when attempting to remove `/' with --preserve-root.
2005-09-19 13:34:47 +00:00
Jim Meyering
bcf48ff8a1 *** empty log message *** 2005-09-19 06:48:06 +00:00
Jim Meyering
f721f10682 (remove_cwd_entries): Syntactic tweak: move an
assignment out of an if-expression.
2005-09-19 06:47:47 +00:00
Jim Meyering
864947764d *** empty log message *** 2005-09-17 09:14:52 +00:00
Jim Meyering
609d835a06 (usage): Request that additions be sent to bug-coreutils@gnu.org, too. 2005-09-17 09:14:48 +00:00
Paul Eggert
772dc5bcd0 coreutils.texi (who invocation): Remove a stray '+'. 2005-09-17 07:45:02 +00:00
Paul Eggert
25b89569c1 (who invocation): Remove a stray '+'. 2005-09-17 07:44:42 +00:00
Paul Eggert
90306bc508 (set_stat_atime, set_stat_ctime, set_stat_mtime): Remove; they were
buggy in the HAVE_STRUCT_STAT_ST_SPARE1 case, and they were dubious
anyway.  I rewrote 'tar' to not use them any more.
2005-09-17 06:54:22 +00:00
Jim Meyering
f9b7acd5a2 *** empty log message *** 2005-09-16 18:19:57 +00:00
Jim Meyering
941882cd1c *** empty log message *** 2005-09-16 18:07:50 +00:00
Jim Meyering
105ae85e38 (rfc822-1): Compensate for Solaris 5.9's /bin/sh,
which emits a diagnostic to stderr when this test's LC_ALL=de_DE
cannot be honored.
2005-09-16 18:07:46 +00:00
Jim Meyering
525faa8a75 *** empty log message *** 2005-09-16 17:54:56 +00:00
Jim Meyering
d43700c169 whoops. Update expected output, too. 2005-09-16 17:54:34 +00:00
Jim Meyering
b02c170d2f (subfmt-up1): Put quotes around format string
to protect `^' from interpretation by some shells.
Add a use of OUT_SUBST to compensate for Solaris strftime's slightly
different formatting of %c.
2005-09-16 17:53:40 +00:00
Jim Meyering
7dd6db69af *** empty log message *** 2005-09-16 09:36:04 +00:00
Jim Meyering
27747f4a66 (main): When failing to truncate, mention both the seek block count
and the block size, in case the block size is very large.
2005-09-16 09:35:47 +00:00
Jim Meyering
31fc497b9a *** empty log message *** 2005-09-16 08:19:00 +00:00
Jim Meyering
dda1650e4a *** empty log message *** 2005-09-16 08:10:15 +00:00
Jim Meyering
d5eda08be3 Include fprintftime.h.
Don't include strftime.h or xanstrftime.h -- no longer needed.
(show_date): Use new fprintftime function rather than xanstrftime.
Correct comment: this function no longer handles a NULL format string.
2005-09-16 08:08:32 +00:00
Jim Meyering
4fdd25e012 (show_date): Correct comment: this function no longer handles a
NULL format string.
2005-09-16 08:08:00 +00:00
Jim Meyering
d5763af839 (show_date): Remove now-spurious braces. 2005-09-16 07:59:20 +00:00
Paul Eggert
96971b59be Regenerate. 2005-09-16 07:58:03 +00:00
Paul Eggert
555bbf598d Import file time stamp resolution improvements from gnulib. 2005-09-16 07:55:12 +00:00
Jim Meyering
60da98e144 . 2005-09-16 07:53:31 +00:00
Paul Eggert
158d982669 Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
2005-09-16 07:50:33 +00:00
Paul Eggert
3ecd35f56f Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
(get_mtime): Renamed from age_of.  All uses changed.
2005-09-16 07:42:56 +00:00
Paul Eggert
b95a4ed1ce Remove; no longer needed. 2005-09-16 07:41:10 +00:00
Paul Eggert
5926f89242 (gl_TIMESPEC): Require AC_C_INLINE.
Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
2005-09-16 07:40:48 +00:00
Paul Eggert
0bc67e2851 (gl_PREREQ): Require gl_STAT_TIME. 2005-09-16 07:40:19 +00:00
Paul Eggert
b946f4c96b (gl_CHECK_ALL_TYPES): Do not require
AC_STRUCT_ST_MTIM_NSEC; it's obsolete.
2005-09-16 07:40:02 +00:00
Paul Eggert
e9f5a9b719 Include stat-time.h.
(SYSCALL_RESOLUTION): Depend on whether various struct stat
members exist, not on the obsolescent ST_MTIM_NSEC.
(utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
2005-09-16 07:39:41 +00:00
Paul Eggert
b5a377a22b (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
(MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
in a different way.
(timespec_cmp): New function.
2005-09-16 07:39:18 +00:00
Jim Meyering
27d4959a08 *** empty log message *** 2005-09-16 07:39:08 +00:00
Paul Eggert
0877688dc8 New file. 2005-09-16 07:38:17 +00:00
Paul Eggert
24e27d10f9 New file. 2005-09-16 07:36:48 +00:00
Paul Eggert
2bc8e10316 Add stat-time.h. 2005-09-16 07:36:35 +00:00
Jim Meyering
3da8b9a6d8 *** empty log message *** 2005-09-16 07:35:32 +00:00
Jim Meyering
1e7fb2186b *** empty log message *** 2005-09-16 07:33:41 +00:00
Jim Meyering
d514933c67 Include fprintftime.h.
Don't include strftime.h or xanstrftime.h -- no longer needed.
(show_date): Use fprintftime rather than xanstrftime.
2005-09-16 07:33:36 +00:00
Jim Meyering
4fa029bd7d (libcoreutils_a_SOURCES): Add fprintftime.c and fprintftime.h. 2005-09-16 07:32:13 +00:00
Jim Meyering
5d8614cf2f *** empty log message *** 2005-09-16 07:31:34 +00:00
Jim Meyering
0277ce3913 [FPRINTFTIME] (fprintftime): Provide a new interface:
size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
		    int utc, int nanoseconds);
Background:
date should not have to allocate a megabyte of virtual memory to
handle a format argument like +%1048575T.  When implemented with
strftime, it must allocate such a buffer, use strftime to fill it
in, print it, then free it.

With fprintftime, it simply prints everything and exits.
With no need for memory allocation, that's one fewer way to fail.
2005-09-16 07:31:29 +00:00
Jim Meyering
ab526003e4 *** empty log message *** 2005-09-16 07:01:00 +00:00
Jim Meyering
f7711ee699 *** empty log message *** 2005-09-16 06:54:26 +00:00
Jim Meyering
8a11d99e7d (subfmt-up1): Test the combination of the
to-upper-case modifier (^) and a conversion specifier that
expands to a string containing lower case characters.
2005-09-16 06:54:19 +00:00
Paul Eggert
d2fa6df35e (usage, main): uname -a no longer generates the -p and -i outputs if
they are unknown.
2005-09-15 19:57:04 +00:00
Paul Eggert
a2365f2d84 uname -a no longer generates the -p and -i outputs if they are unknown. 2005-09-15 19:56:35 +00:00
Paul Eggert
0144e1ae89 Rewrite previous strftime change slightly. 2005-09-15 18:48:13 +00:00
Paul Eggert
a08b44ea30 (my_strftime): Rewrite the previous change slightly,
to make it a bit faster and (I hope) clearer.
2005-09-15 18:47:56 +00:00
Jim Meyering
5185512286 *** empty log message *** 2005-09-14 16:10:41 +00:00
Jim Meyering
cc4800dd1b (my_strftime): Be sure to use L_('x') for literals. 2005-09-14 16:10:38 +00:00
Jim Meyering
9d55b89d59 *** empty log message *** 2005-09-14 10:02:57 +00:00
Jim Meyering
ad98202690 (my_strftime): Parse the colons of %:::z *after* the
optional field width, not before, so we accept %9:z, not %:9z.
2005-09-14 10:02:54 +00:00
Jim Meyering
4da7283547 *** empty log message *** 2005-09-14 09:54:27 +00:00
Jim Meyering
f6198493b8 (tz-5w, tz-5wf): Test new %:z format with a field width. 2005-09-14 09:54:15 +00:00
Paul Eggert
e386e5642d Fix typos noted by Eric Blake. 2005-09-14 06:59:17 +00:00
Paul Eggert
20b858a1e6 Add tz-1 through tz-5. 2005-09-14 06:58:44 +00:00
Paul Eggert
33b49b7cac (my_strftime): Fix typo in octal number introduced in last change. 2005-09-14 06:58:08 +00:00
Paul Eggert
a487dcee70 du and pr also have +:z etc. 2005-09-14 06:57:35 +00:00
Paul Eggert
5b0ca7f5c1 Merge md5 from libc, and clean up some sha1 glitches. 2005-09-13 23:32:50 +00:00
Paul Eggert
bf0cc9f753 (SWAP): Renamed from NOTSWAP, to avoid a horrible misnaming.
All uses changed.  Remove the old SWAP.
Remove obvious comment about BLOCKSIZE.
(rol): New macro, moved here from md5.h.
(sha1_process_block): Remove an incoherent FIXME comment.
2005-09-13 23:32:35 +00:00
Paul Eggert
9a5d4089bc (struct sha1_ctx): Mark buffer as being aligned. 2005-09-13 23:32:15 +00:00
Paul Eggert
14d1fdaec1 (CYCLIC): New macro. All uses of rol changed to use CYCLIC.
Redo comment to minimize changes from libc.
2005-09-13 23:32:01 +00:00
Paul Eggert
a19c71988b (__GNUC_PREREQ, __THROW, __attribute__): New macros.
(__md5_buffer): Renamed from md5_buffer.  Add a macro undoing this
if _LIBC is not defined.  Add __THROW.
(__md5_finish_ctx, __md5_init_ctx, __md5_process_block):
(__md5_process_bytes, __md5_read_ctx, __md5_stream): Likewise.
(struct md5_ctx): Mark buffer as being aligned.
(rol): Remove; all uses changed to CYCLIC.
2005-09-13 23:31:37 +00:00
Paul Eggert
9e64eb8369 Fix wording in previous patch. 2005-09-13 23:01:59 +00:00
Paul Eggert
f4e071662d (uname invocation): Mention that Linux outputs "unknown" for -i and -p. 2005-09-13 22:57:25 +00:00
Paul Eggert
36081fa635 * src/dd.c: Detect some very unlikely buffer overflows.
(INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP): New macros.
(MAX_BLOCKSIZE): Now accepts an arg.  All uses changed.
(page_size): New var.
(scanargs, skip, main): Use more-straightforward way to detect overflow.
(dd_copy): Use page_size rather than invoking getpagesize.
Use INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP.
(main): Set page_size.
Avoid a call to stat in the usual case where ftruncate succeeds.
2005-09-13 22:43:11 +00:00
Paul Eggert
360b98042f (docolon): Add IF_LINT check to avoid GCC warning. 2005-09-13 22:30:56 +00:00
Paul Eggert
24cae62c93 * configure.ac: Don't invoke AC_CONFIGURE_HOST directly. 2005-09-13 22:20:25 +00:00
Paul Eggert
b673eeb49c Add date --rfc-3339. 2005-09-13 22:09:25 +00:00
Paul Eggert
7cc7ac0574 Add tests for --rfc-3339. 2005-09-13 22:09:03 +00:00
Paul Eggert
2c29ba03ac (TIME_SPEC_DATE): No longer needs to be nonzero, so
remove the "=1".
(TIME_SOEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put
them there.
(time_spec_string, time_spec): Hours and minutes must be at
start now, so put them there.
(rfc_2822_format): Now a string constant, not a boolean.  All uses
changed.
(iso_8601_format, rfc_format): Remove.
(RFC_3339_OPTION): New constant.
(long_options): Add --rfc-3339.
(usage): Add --rfc-3339.  Don't mention --iso-8601.
Mention %:z, %::z, %:::z.
(main): Simplify calculation of 'format'; it was getting too hairy
to follow.  Add --rfc-3339.
(show_date): Assume format arg is not NULL, which is the case
now.  The default code is moved to 'main'.  This simplifies things
and allows the default to be calculated just once.
2005-09-13 22:08:41 +00:00
Paul Eggert
7846768c6c (my_strftime): Add support for %:z, %::z, %:::z.
Fix bug in formats like %2N.
2005-09-13 22:08:18 +00:00
Paul Eggert
602043e0b8 (Time conversion specifiers, Options for date):
Document date --rfc-3339 and new specifiers %:z, %::z, %:::z.  Use
"date and time" consistently; the old version sometimes said "time
and date".  Fix a minor bug in the documentation for --rfc-2822:
it claimed day-of-month < 10 had leading space, not leading zero.
Use a consistent format for terms like "RFC".
2005-09-13 22:07:58 +00:00
Paul Eggert
a6a9495c14 date has a new --rfc-3339 option, and the old --iso-8601
option is deprecated.  date and ls also have new time format
specifiers %:z, %::z, %:::z.
2005-09-13 22:07:34 +00:00
Jim Meyering
2859e85770 tweak comment 2005-09-13 21:25:21 +00:00
Jim Meyering
3e4d8edce9 *** empty log message *** 2005-09-13 21:11:29 +00:00
Jim Meyering
8fc8f946c4 Revert unintended change that removed definitions
of X2REALLOC and X2NREALLOC.
2005-09-13 21:11:25 +00:00
394 changed files with 95458 additions and 89373 deletions

View File

@@ -1 +1 @@
5.3.0
5.90

View File

View File

@@ -5,5 +5,6 @@ config-log
tests/misc/nl
po/de.po
m4/lib-ld.m4
m4/lib-prefix.m4
m4/po.m4
aclocal.m4

View File

@@ -0,0 +1 @@
^lib/xstrtol\.h$

358
ChangeLog
View File

@@ -1,6 +1,360 @@
2005-09-13 Jim Meyering <jim@meyering.net>
2005-10-16 Jim Meyering <jim@meyering.net>
* Version 5.3.1-cvs.
* Version 5.91.
* Makefile.maint (VERSION_REGEXP): New variable.
(news-date-check, changelog-check): Use tighter regular expressions.
* configure.ac: Remove -cvs suffix from version string.
* NEWS: Add today's date.
* NEWS: Mention the `mkdir -p' bug fix.
2005-10-15 Jim Meyering <jim@meyering.net>
* src/who.c (usage): Undocument deprecated --idle (-i) option.
* src/df.c (main): Warn about the deprecated --kilobytes option.
* src/ls.c (decode_switches): Likewise.
* src/du.c (usage): Document -m, once again.
(main): Warn about use of deprecated long options:
--kilobytes and --megabytes.
* src/tail.c (parse_options): Remove --allow-missing option.
You can use --retry instead.
* src/stat.c (main): Remove --link -l options.
You can use --dereference (-L) instead.
2005-09-30 Eric Blake <ebb9@byu.net> (tiny change)
* man/Makefile.am (.x.1): Remove temp directory first.
* NEWS: Document dircolors change of 2005-09-05.
2005-10-07 Paul Eggert <eggert@cs.ucla.edu>
* src/sort.c (sortlines_temp): Redo previous change, since I'm
no longer confident that the m4/stdbool.m4 patch suffices.
2005-10-06 Paul Eggert <eggert@cs.ucla.edu>
* src/sort.c (sortlines_temp): Undo previous change, since
today's change to m4/stdbool.m4 should catch it.
2005-10-06 Jim Meyering <jim@meyering.net>
* TODO: rm: add support for a -I option, like that from FreeBSD's.
2005-10-05 Jim Meyering <jim@meyering.net>
* src/sort.c (sortlines_temp): Declare temporary as `int' rather
than `bool' to work around AIX 5.3 compiler bug in 64-bit mode.
From James Lemley.
2005-10-03 Jim Meyering <jim@meyering.net>
* src/factor.c (MAX_N_FACTORS): Define in terms of sizeof (uintmax_t)
rather than hard-coding to 128. From Thomas M.Ott.
2005-10-02 Jim Meyering <jim@meyering.net>
* Makefile.maint (sc_unmarked_diagnostics):
Search only cvs-controlled files.
* .x-sc_unmarked_diagnostics: New file.
* Makefile.am (EXTRA_DIST): Add it.
2005-10-01 Jim Meyering <jim@meyering.net>
* src/factor.c (main): Don't stop processing arguments upon
the first invalid one. Suggestion from Eric Blake
* tests/factor/basic: Add a test for this.
2005-09-30 Jim Meyering <jim@meyering.net>
* configure.ac: Use 5.91-cvs as the version string.
* NEWS: Adjust accordingly.
2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
* src/dd.c (main): Don't assume size_t has the same width
as unsigned long. Problem reported by Eric Blake.
* NEWS: Clarify "tail - f" example.
2005-09-29 Jim Meyering <jim@meyering.net>
* Version 5.90.
* configure.ac: Remove -cvs suffix from version string.
* NEWS: Add today's date.
* NEWS: Mention this bug fix:
stat now exits nonzero if a file operand does not exist
2005-09-28 Paul Eggert <eggert@cs.ucla.edu>
* src/system.h (LONGEST_MODIFIER): Use ULONG_MAX_LT_ULLONG_MAX
instead of ULLONG_MAX, as the latter doesn't work with GCC 2.7.2.1.
2005-09-28 Jim Meyering <jim@meyering.net>
* configure.ac: Use 5.90-cvs as the version string, not 5.3.1-cvs.
* NEWS: Adjust accordingly.
* README: Remove note about FreeBSD make test failure.
2005-09-28 Paul Eggert <eggert@cs.ucla.edu>
* tests/install/trap: Work around a bug in FreeBSD 5.0.
2005-09-28 Jim Meyering <jim@meyering.net>
* README: Warn about a (now-)known problem on FreeBSD 5.0:
2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
* src/touch.c (touch): Handle "touch -c - >&-" by checking for EBADF
and ENOSYS.
Do not pass "-" to futimens; pass NULL instead.
If close (STDIN_FILENO) fails, report the error separately instead
of letting the 'close' pollute errno.
* tests/touch/empty-file: Test "touch -" too.
* tests/touch/no-create-missing: Likewise.
* tests/touch/read-only: Likewise.
2005-09-26 Jim Meyering <jim@meyering.net>
* tests/touch/read-only: New test, for root of chmod/usage failure.
* tests/touch/Makefile.am (TESTS): Add read-only.
Work around the root cause of alpha-linux-1.sf.net test failure.
* tests/chmod/usage: Remove *all* files before each inner loop
iteration. Otherwise, with a touch program that fails on unwritable
files, (this happens at least on linux-2.2.20) a -w file left behind
from a previous iteration could cause a spurious test failure.
2005-09-25 Paul Eggert <eggert@cs.ucla.edu>
* tests/chmod/usage: Undo the s/files/file/ change, but add
comments about why the old version was desired.
2005-09-25 Jim Meyering <jim@meyering.net>
* tests/ls-2/tests (setuid-etc): Work around output mismatch when
a just-created test file cannot be made set-group-ID.
Avoid test failures on alpha-linux-1.sf.net.
* tests/chmod/usage: Use newer trap and tmpdir-creation framework.
Fix apparent typos (s/files/file/) in inner loop.
2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: "touch -" now touches standard output.
* src/touch.c (touch): Implement this.
(usage): Document this.
* src/copy.c (HAVE_FCHMOD, HAVE_FCHOWN): Define to 0 if not defined.
(copy_reg): New args CHOWN_SUCCEDED and DST_SB. All callers changed.
Add a "goto close_src_and_dst_desc;" that was missing in the
previous patch.
(copy_reg) [HAVE_FCHOWN]: Prefer fchown to chown.
(copy_reg) [HAVE_FCHMOD]: Prefer fchmod to chmod.
(copy_internal): Don't invoke chown if fchown worked,
and likewise for chmod and fchmod.
2005-09-24 Jim Meyering <jim@meyering.net>
* src/shred.c: Use `#ifdef HAVE_CONFIG_H', not `#if HAVE_CONFIG_H',
for consistency with gnulib.
* src/dircolors.c: Likewise.
* Makefile.maint (sc_no_if_have_config_h): New rule.
(syntax-check-rules): Add it.
.x-sc_no_if_have_config_h: New file.
* Makefile.am (EXTRA_DIST): Add it.
* tests/seq/basic (eq-wid-1, eq-wid-2): Disable these tests for now.
They fail with non-gcc compilers and some combinations
of options and libraries on Solaris systems.
* tests/misc/date (uninit-64): Restore this test.
Add start-up code to detect, and work around, the cases in
which the test might fail.
2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
* tests/misc/date (uninit-64): Remove this test. It wasn't
portable in theory (it doesn't work on hosts where 'int' is 64
bits, example) or in practice (Solaris 8 localtime returns garbage
in tm_year for the specified date, but that's not coreutils's
fault).
2005-09-23 Paul Eggert <eggert@cs.ucla.edu>
* src/copy.c (copy_reg): Preserve time stamps if
x->preserve_timestamps is set, using futimens so that
we needn't resolve the path again.
(copy_internal): Don't preserve time stamps if copy_reg did it
already.
* src/install.c (change_timestamps): First arg is source
struct stat, not file name. All uses changed.
(install_file_in_file): Stat the source file.
Don't try to change time stamps if copy_file did it.
* src/system.h: Don't include utime.h; not needed.
(struct utimbuf) [!defined HAVE_STRUCT_UTIMBUF]: Remove; not needed.
2005-09-23 Jim Meyering <jim@meyering.net>
* src/od.c: Use `verify' to ensure that our hard-coded
bytes_to_*_digits arrays are long enough. Of course, 17+-byte
integral types aren't on the near horizon, but just in case...
(MAX_INTEGRAL_TYPE_SIZE): Move definition to precede new first use.
(bytes_to_oct_digits, bytes_to_signed_dec_digits):
(bytes_to_unsigned_dec_digits, bytes_to_hex_digits): Change base
type from `char' to the clearer `unsigned int'.
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
* src/rmdir.c (EEXIST, ENOTEMPTY): Remove unused macros.
Sync from gnulib.
* src/dircolors.c: Include strcase.h.
* src/pinky.c: Include canon-host.h rather than declaring
canon_host ourselves.
* src/who.c: Likewise.
* src/system.h (X2NREALLOC, X2REALLOC): Moved here from
../lib/xalloc.h, with args properly parenthesized, and using
verify_expr rather than the old VERIFY_EXPR.
2005-09-21 Jim Meyering <jim@meyering.net>
* tests/install/basic-1: Require that this test be run as non-root.
Otherwise, it fails due to the fact that the chmod 0 . doesn't
affect root.
2005-09-20 Jim Meyering <jim@meyering.net>
* src/remove.c (write_protected_non_symlink): Change comment to
agree with the code.
2005-09-19 Jim Meyering <jim@meyering.net>
* src/remove.c (remove_dir): Return RM_ERROR, not `1',
when attempting to remove `/' with --preserve-root.
* src/remove.c (remove_cwd_entries): Syntactic tweak: move an
assignment out of an if-expression.
2005-09-17 Jim Meyering <jim@meyering.net>
* src/extract-magic (usage): Request that additions be sent to
bug-coreutils@gnu.org, too.
2005-09-16 Jim Meyering <jim@meyering.net>
* tests/misc/date (rfc822-1): Compensate for Solaris 5.9's /bin/sh,
which emits a diagnostic to stderr when this test's LC_ALL=de_DE
setting cannot be honored.
* tests/misc/date (subfmt-up1): Put quotes around format string
to protect `^' from interpretation by some shells.
Add a use of OUT_SUBST to compensate for Solaris strftime's slightly
different formatting of %c.
* src/dd.c (main): When failing to truncate, mention both the seek
block count and the block size, in case the block size is very large.
Now `make distcheck' should pass, once again.
2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
* src/copy.c: Include stat-time.h.
(copy_internal): Use its functions instead of the obsolete
TIMESPEC_NS macro.
* src/cp.c (re_protect): Likewise.
* src/date.c (main): Likewise.
* src/du.c (struct duinfo, duinfo_init, duinfo_set, duinfo_add):
(show_date, print_size, process_file): Likewise.
* src/install.c (change_timestamps): Likewise.
* src/ls.c (cmp_ctime, cmp_mtime, cmp_atime, print_long_format):
Likewise.
* src/pr.c (init_header): Likewise.
* src/stat.c (human_time, print_stat): Likewise.
* src/tail.c (record_open_fd, tail_forever): Likewise.
* src/test.c (get_mtime, binary_operator): Likewise.
* src/touch.c (touch, main): Likewise.
* src/test.c (get_mtime): Renamed from age_of. All uses changed.
2005-09-16 Jim Meyering <jim@meyering.net>
Date no longer needs to allocate virtual memory to do its job,
so it can no longer fail due to an out-of-memory condition.
* src/date.c: Include fprintftime.h.
Don't include strftime.h or xanstrftime.h -- no longer needed.
(show_date): Use new fprintftime function rather than xanstrftime.
Correct comment: this function no longer handles a NULL format string.
* src/du.c: Likewise.
* NEWS: Mention this.
* tests/misc/date (subfmt-up1): Test the combination of the
to-upper-case modifier (^) and a conversion specifier that
expands to a string containing lower case characters.
2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: uname -a no longer generates the -p and -i outputs if they
are unknown.
* src/uname.c (usage): Document this.
(main): Implement this.
2005-09-14 Jim Meyering <jim@meyering.net>
* tests/misc/date (tz-5w, tz-5wf): Test new %:z format with
a field width.
2005-09-13 Paul Eggert <eggert@cs.ucla.edu>
* src/dd.c: Detect some very unlikely buffer overflows.
(INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP): New macros.
(MAX_BLOCKSIZE): Now accepts an arg. All uses changed.
(page_size): New var.
(scanargs, skip, main): Use more-straightforward way to detect overflow.
(dd_copy): Use page_size rather than invoking getpagesize.
Use INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP.
(main): Set page_size.
Avoid a call to stat in the usual case where ftruncate succeeds.
* src/expr.c (docolon): Add IF_LINT check to avoid GCC warning.
* configure.ac: Don't invoke AC_CONFIGURE_HOST directly; AB_INIT
does it for us, and our invocation evokes a diagnostic from
Autoconf 2.59.
* NEWS: date has a new --rfc-3339 option, and the old --iso-8601
option is deprecated. date, du, ls, and pr also have new time format
specifiers %:z, %::z, %:::z.
* src/date.c (TIME_SPEC_DATE): No longer needs to be nonzero, so
remove the "=1".
(TIME_SPEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put
them there.
(time_spec_string, time_spec): Hours and minutes must be at
start now, so put them there.
(rfc_2822_format): Now a string constant, not a boolean. All uses
changed.
(iso_8601_format, rfc_format): Remove.
(RFC_3339_OPTION): New constant.
(long_options): Add --rfc-3339.
(usage): Add --rfc-3339. Don't mention --iso-8601.
Mention %:z, %::z, %:::z.
(main): Simplify calculation of 'format'; it was getting too hairy
to follow. Add --rfc-3339.
(show_date): Assume format arg is not NULL, which is the case
now. The default code is moved to 'main'. This simplifies things
and allows the default to be calculated just once.
* tests/misc/date: Add tests for --rfc-3339, %:z, %::z, %:::z.
2005-09-13 Jim Meyering <jim@meyering.net>
* Makefile.maint (GZIP_ENV): Add --rsyncable option.
(makefile-check): Escape a `$' in a diagnostic.

View File

@@ -5,7 +5,9 @@ EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
announce-gen \
m4/ChangeLog \
old/fileutils/ChangeLog \

View File

@@ -48,10 +48,11 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/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/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 \
@@ -70,8 +71,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/getcwd-path-max.m4 \
$(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
@@ -96,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
@@ -123,9 +126,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/st_mtim.m4 \
$(top_srcdir)/m4/stat-macros.m4 $(top_srcdir)/m4/stat-prog.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
@@ -151,12 +155,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/xanstrftime.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/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 \
@@ -272,6 +276,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
@@ -322,7 +327,9 @@ EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
.x-sc_space_tab .x-sc_sun_os_names \
.x-sc_file_system .x-sc_obsolete_symbols \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
.x-sc_no_if_have_config_h \
announce-gen \
m4/ChangeLog \
old/fileutils/ChangeLog \

View File

@@ -35,6 +35,7 @@ ifeq ($(origin prev_version_file), undefined)
endif
PREV_VERSION := $(shell cat $(prev_version_file))
VERSION_REGEXP = $(subst .,\.,$(VERSION))
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
tag-this-version = $(subst .,_,$(VERSION))
@@ -74,6 +75,7 @@ syntax-check-rules = \
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 \
@@ -98,6 +100,12 @@ syntax-check: $(syntax-check-rules)
# 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] && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
@@ -148,6 +156,13 @@ sc_file_system:
'rewrite to use "file system"' 1>&2; \
exit 1; } || :
sc_no_if_have_config_h:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep '^# *if HAVE_CONFIG_H' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) && \
{ echo '$(ME): found use of #if HAVE_CONFIG_H; use #ifdef' \
1>&2; exit 1; } || :
sc_obsolete_symbols:
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E '\<(HAVE_FCNTL_H)\>' \
@@ -243,8 +258,10 @@ sc_trailing_blank:
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep -E \
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
@( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
grep -E \
'\<error \([^"]*"[^"]*[a-z]{3}' \
$$($(CVS_LIST) | grep -vEf .x-$@ ) \
| grep -v '_(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
@@ -282,15 +299,17 @@ makefile-check:
news-date-check: NEWS
today=`date +%Y-%m-%d`; \
if head NEWS | grep '^\*.*'$$today >/dev/null; then \
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
>/dev/null; then \
:; \
else \
echo "today's date is not in NEWS" 1>&2; \
echo "version or today's date is not in NEWS" 1>&2; \
exit 1; \
fi
changelog-check:
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
>/dev/null; then \
:; \
else \
echo "$(VERSION) not in ChangeLog" 1>&2; \

51
NEWS
View File

@@ -1,6 +1,29 @@
GNU coreutils NEWS -*- outline -*-
* Major changes in release 5.3.1-cvs (2005-??-??) [unstable]
* Major changes in release 5.91 (2005-10-17) [stable candidate]
** Bug fixes
"mkdir -p /a/b/c" no longer fails merely because a leading prefix
directory (e.g., /a or /a/b) exists on a read-only file system.
** Removed options
tail's --allow-missing option has been removed. Use --retry instead.
stat's --link and -l options have been removed.
Use --dereference (-L) instead.
** Deprecated options
Using ls, du, or df with the --kilobytes option now evokes a warning
that the long-named option is deprecated. Use `-k' instead.
du's long-named --megabytes option now evokes a warning.
Use -m instead.
* Major changes in release 5.90 (2005-09-29) [unstable]
** Bring back support for `head -NUM', `tail -NUM', etc. even when
conforming to POSIX 1003.1-2001. The following changes apply only
@@ -38,11 +61,14 @@ GNU coreutils NEWS -*- outline -*-
POSIX 1003.2-1992 POSIX 1003.1-2001
sort +4 sort -k 5 sort ./+4
tail +4 tail -n +4 tail ./+4
tail - main.c tail main.c tail -- - main.c
tail - f tail f [see (*) below]
tail -c 4 tail -c 10 ./4 tail -c4
touch 12312359 f touch -t 12312359 f touch ./12312359 f
uniq +4 uniq -s 4 uniq ./+4
(*) "tail - f" does not conform to POSIX 1003.1-2001; to read
standard input and then "f", use the command "tail -- - f".
These changes are in response to decisions taken in the January 2005
Austin Group standardization meeting. For more details, please see
"Utility Syntax Guidelines" in the Minutes of the January 2005
@@ -161,6 +187,14 @@ GNU coreutils NEWS -*- outline -*-
"pr -D FORMAT" now accepts the same formats that "date +FORMAT" does.
stat now exits nonzero if a file operand does not exist
** Improved robustness
Date no longer needs to allocate virtual memory to do its job,
so it can no longer fail due to an out-of-memory condition,
no matter how large the result.
** Improved portability
hostid now prints exactly 8 hexadecimal digits, possibly with leading zeros,
@@ -182,9 +216,18 @@ GNU coreutils NEWS -*- outline -*-
cp and mv: the --reply=X option is deprecated
date accepts the new option --rfc-3339=TIMESPEC. The old --iso-8602 (-I)
option is deprecated; it still works, but new applications should avoid it.
date, du, ls, and pr's time formats now support new %:z, %::z, %:::z
specifiers for numeric time zone offsets like -07:00, -07:00:00, and -07.
dd has new iflag= and oflag= flags "binary" and "text", which have an
effect only on nonstandard platforms that distinguish text from binary I/O.
dircolors now supports SETUID, SETGID, STICKY_OTHER_WRITABLE,
OTHER_WRITABLE, and STICKY, with ls providing default colors for these
categories if not specified by dircolors.
du accepts new options: --time[=TYPE] and --time-style=STYLE
join now supports a NUL field separator, e.g., "join -t '\0'".
@@ -205,6 +248,10 @@ GNU coreutils NEWS -*- outline -*-
stat -f's default output format has been changed to output this size as well.
stat -f recognizes file systems of type XFS and JFS
"touch -" now touches standard output, not a file named "-".
uname -a no longer generates the -p and -i outputs if they are unknown.
* Major changes in release 5.3.0 (2005-01-08) [unstable]
** Bug fixes

6
README
View File

@@ -58,6 +58,7 @@ If you run the tests on a SunOS4.1.4 system, expect the ctime-part of
the ls `time-1' test to fail. I believe that is due to a bug in the
way Sun implemented link(2) and chmod(2).
***********************
HPUX 11.x build failure
-----------------------
@@ -114,6 +115,11 @@ would run this command:
env VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1
For some tests, you can get even more detail by including
DEBUG=yes in the environment:
env DEBUG=yes VERBOSE=yes make check -C tests/mv TESTS=hard-link-1 >> log 2>&1
and then include the contents of the file `log' in your bug report.
***************************************

View File

@@ -18,8 +18,8 @@ pwd=`pwd`
srcdir=$pwd/src
path='export PATH='$srcdir':${PATH#*:}'
pre='#!/bin/sh\n'"$path"'\n'
n=9
vg='exec /usr/bin/valgrind --logfile-fd=3 --leak-check=yes --track-fds=yes --quiet --num-callers='$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
cat <<EOF > src/vg/gen
for i in $coreutils; do
printf "$pre$vg \$i"' "\$@"\n' > \$i

1
THANKS
View File

@@ -443,6 +443,7 @@ Theodore Ts'o tytso@rsts-11.mit.edu
Thomas Bushnell thomas@gnu.ai.mit.edu
Thomas Goerlich thomas@schnappmatik.de
Thomas Luzat thomas@luzat.com
Thomas M.Ott thmo-13@gmx.de
Thomas Quinot thomas@Cuivre.FR.EU.ORG
Thomas Wolff mined@towo.net
Tim J. Robbins tjr@FreeBSD.org

9
TODO
View File

@@ -144,9 +144,6 @@ Changes expected to go in, post-5.2.1:
A more efficient version of factor, and possibly one that
accepts inputs of size 2^64 and larger.
Re-add a separate test for du's stack space usage (like the one removed
from tests/rm/deep-1).
dd: consider adding an option to suppress `bytes/block read/written'
output to stderr. Suggested here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
@@ -218,3 +215,9 @@ Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
(preferably `no') cost when operating in single-byte mode.
Remove all uses of the `register' keyword
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.

10
aclocal.m4 vendored
View File

@@ -880,6 +880,7 @@ m4_include([m4/allocsa.m4])
m4_include([m4/argmatch.m4])
m4_include([m4/assert.m4])
m4_include([m4/atexit.m4])
m4_include([m4/autobuild.m4])
m4_include([m4/backupfile.m4])
m4_include([m4/basename.m4])
m4_include([m4/bison.m4])
@@ -923,9 +924,11 @@ 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-path-max.m4])
m4_include([m4/getcwd.m4])
m4_include([m4/getdate.m4])
m4_include([m4/getdelim.m4])
m4_include([m4/getgroups.m4])
m4_include([m4/gethostname.m4])
m4_include([m4/gethrxtime.m4])
@@ -969,6 +972,8 @@ m4_include([m4/longdouble.m4])
m4_include([m4/longlong.m4])
m4_include([m4/ls-mntd-fs.m4])
m4_include([m4/lstat.m4])
m4_include([m4/mbchar.m4])
m4_include([m4/mbiter.m4])
m4_include([m4/mbrtowc.m4])
m4_include([m4/mbstate_t.m4])
m4_include([m4/mbswidth.m4])
@@ -1024,11 +1029,13 @@ m4_include([m4/settime.m4])
m4_include([m4/sha1.m4])
m4_include([m4/sig2str.m4])
m4_include([m4/signed.m4])
m4_include([m4/socklen.m4])
m4_include([m4/sockpfaf.m4])
m4_include([m4/ssize_t.m4])
m4_include([m4/st_dm_mode.m4])
m4_include([m4/st_mtim.m4])
m4_include([m4/stat-macros.m4])
m4_include([m4/stat-prog.m4])
m4_include([m4/stat-time.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stdint_h.m4])
m4_include([m4/stdio-safer.m4])
@@ -1079,7 +1086,6 @@ m4_include([m4/version-etc.m4])
m4_include([m4/wchar_t.m4])
m4_include([m4/wint_t.m4])
m4_include([m4/xalloc.m4])
m4_include([m4/xanstrftime.m4])
m4_include([m4/xfts.m4])
m4_include([m4/xgetcwd.m4])
m4_include([m4/xnanosleep.m4])

View File

@@ -1,3 +1,11 @@
2005-10-13 Jim Meyering <jim@meyering.net>
* texinfo.tex: Sync from gnulib.
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
* install-sh, config.guess: Sync from gnulib.
2005-07-01 Jim Meyering <jim@meyering.net>
* config.guess, config.sub, mdate-sh, missing, mkinstalldirs:

View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-08-03'
timestamp='2005-09-19'
# 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
@@ -1185,7 +1185,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-07-09.12
scriptversion=2005-09-13.16
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -58,7 +58,21 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
posix_glob=
posix_mkdir=
# Symbolic mode for testing mkdir with directories.
# It is the same as 755, but also tests that "u+" works.
test_mode=u=rwx,g=rx,o=rx,u+wx
# Desired mode of installed file.
mode=0755
# Desired mode of newly created intermediate directories.
# It is empty if not known yet.
intermediate_mode=
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
@@ -111,7 +125,7 @@ while test -n "$1"; do
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
-m) mode=$2
shift
shift
continue;;
@@ -164,6 +178,8 @@ if test -z "$1"; then
exit 0
fi
test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
for src
do
# Protect names starting with `-'.
@@ -173,15 +189,11 @@ do
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@@ -208,53 +220,122 @@ do
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
obsolete_mkdir_used=false
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
case $dstdir in
/*) pathcomp=/ ;;
-*) pathcomp=./ ;;
*) pathcomp= ;;
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
posix_mkdir=false
if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
posix_mkdir=true
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
fi ;;
esac
oIFS=$IFS
IFS=/
set fnord $dstdir
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
if
$posix_mkdir && {
pathcomp=$pathcomp$d
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit 1
fi
pathcomp=$pathcomp/
done
# With -d, create the new directory with the user-specified mode.
# Otherwise, create it using the same intermediate mode that
# mkdir -p would use when creating intermediate directories.
# POSIX says that this mode is "$(umask -S),u+wx", so use that
# if umask -S works.
if test -n "$dir_arg"; then
mkdir_mode=$mode
else
case $intermediate_mode in
'')
if umask_S=`(umask -S) 2>/dev/null`; then
intermediate_mode=$umask_S,u+wx
else
intermediate_mode=$test_mode
fi ;;
esac
mkdir_mode=$intermediate_mode
fi
$mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
}
then :
else
# mkdir does not conform to POSIX, or it failed possibly due to
# a race condition. Create the directory the slow way, step by
# step, checking for races as we go.
case $dstdir in
/*) pathcomp=/ ;;
-*) pathcomp=./ ;;
*) pathcomp= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS
IFS=/
$posix_glob && set -f
set fnord $dstdir
shift
$posix_glob && set +f
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# Don't fail if two instances are running concurrently.
test -d "$pathcomp" || exit 1
fi
pathcomp=$pathcomp/
done
obsolete_mkdir_used=true
fi
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@@ -262,7 +343,6 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
@@ -276,10 +356,10 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
&& { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
@@ -291,11 +371,12 @@ do
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
if test -f "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
@@ -304,16 +385,13 @@ do
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
$doit $mvcmd "$dsttmp" "$dst"
}
}
fi || { (exit 1); exit 1; }
done
} || exit 1
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
trap - 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)

View File

@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2005-08-15.08}
\def\texinfoversion{2005-10-10.17}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
@@ -7103,7 +7103,7 @@ should work if nowhere else does.}
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
% Same as @turnoffactive below, but backslash retains it's normal definition.
% (Before 2004-08-15, this macro explicitly assigned @let\=@normalbackslash,
% (Before 2005-08-15, this macro explicitly assigned @let\=@normalbackslash,
% but it doesn't seem to be necessary. --kasal)
\def\normalturnoffactive{%
\let"=\normaldoublequote

View File

@@ -115,9 +115,6 @@
/* 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
@@ -218,6 +215,10 @@
*/
#undef HAVE_DECL_FREE
/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
don't. */
#undef HAVE_DECL_FREEADDRINFO
/* Define to 1 if you have the declaration of `funlockfile', and to 0 if you
don't. */
#undef HAVE_DECL_FUNLOCKFILE
@@ -226,6 +227,14 @@
you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
don't. */
#undef HAVE_DECL_GAI_STRERROR
/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you
don't. */
#undef HAVE_DECL_GETADDRINFO
/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_GETCHAR_UNLOCKED
@@ -238,6 +247,10 @@
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
don't. */
#undef HAVE_DECL_GETDELIM
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#undef HAVE_DECL_GETENV
@@ -254,6 +267,10 @@
don't. */
#undef HAVE_DECL_GETHRTIME
/* Define to 1 if you have the declaration of `getline', and to 0 if you
don't. */
#undef HAVE_DECL_GETLINE
/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
don't. */
#undef HAVE_DECL_GETLOGIN
@@ -427,9 +444,21 @@
/* Define to 1 if you have the `fchdir' function. */
#undef HAVE_FCHDIR
/* Define to 1 if you have the `fchmod' function. */
#undef HAVE_FCHMOD
/* Define to 1 if you have the `fchown' function. */
#undef HAVE_FCHOWN
/* Define to 1 if you have the `fdatasync' function. */
#undef HAVE_FDATASYNC
/* Define to 1 if you have the `fdopendir' function. */
#undef HAVE_FDOPENDIR
/* Define to 1 if you have the `flockfile' function. */
#undef HAVE_FLOCKFILE
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
@@ -445,12 +474,21 @@
/* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE
/* Define to 1 if you have the `funlockfile' function. */
#undef HAVE_FUNLOCKFILE
/* Define to 1 if you have the `futimes' function. */
#undef HAVE_FUTIMES
/* Define to 1 if you have the `futimesat' function. */
#undef HAVE_FUTIMESAT
/* Define if struct statfs has the f_fstypename member. */
#undef HAVE_F_FSTYPENAME_IN_STATFS
/* Define to 1 if you have the `gai_strerror' function. */
#undef HAVE_GAI_STRERROR
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
@@ -460,12 +498,6 @@
/* Define to 1 if your system has a working `getgroups' function. */
#undef HAVE_GETGROUPS
/* Define to 1 if you have the `gethostbyaddr' function. */
#undef HAVE_GETHOSTBYADDR
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostid' function. */
#undef HAVE_GETHOSTID
@@ -490,9 +522,6 @@
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the `getpass' function. */
#undef HAVE_GETPASS
/* Define to 1 if you have the `getspnam' function. */
#undef HAVE_GETSPNAM
@@ -520,9 +549,6 @@
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
@@ -536,6 +562,12 @@
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define to 1 if <sys/socket.h> defines AF_INET. */
#undef HAVE_IPV4
/* Define to 1 if <sys/socket.h> defines AF_INET6. */
#undef HAVE_IPV6
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
@@ -610,7 +642,7 @@
/* Define to 1 if you have the `mbrlen' function. */
#undef HAVE_MBRLEN
/* Define to 1 if you have the `mbrtowc' function. */
/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
#undef HAVE_MBRTOWC
/* Define to 1 if you have the `mbsinit' function. */
@@ -655,9 +687,6 @@
/* Define to 1 if you have the <mntent.h> header file. */
#undef HAVE_MNTENT_H
/* Define to 1 if you have the <mnttab.h> header file. */
#undef HAVE_MNTTAB_H
/* Define to 1 if you have the `modf' function. */
#undef HAVE_MODF
@@ -813,9 +842,6 @@
/* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strcoll' function and it is properly defined.
*/
#undef HAVE_STRCOLL
@@ -850,9 +876,6 @@
/* Define to 1 if you have the `strpbrk' function. */
#undef HAVE_STRPBRK
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the `strtoimax' function. */
#undef HAVE_STRTOIMAX
@@ -871,6 +894,9 @@
/* Define to 1 if you have the `strtoumax' function. */
#undef HAVE_STRTOUMAX
/* Define to 1 if the system has the type `struct addrinfo'. */
#undef HAVE_STRUCT_ADDRINFO
/* Define if there is a member named d_type in the struct describing directory
headers. */
#undef HAVE_STRUCT_DIRENT_D_TYPE
@@ -917,6 +943,18 @@
/* Define to 1 if `f_type' is member of `struct statvfs'. */
#undef HAVE_STRUCT_STATVFS_F_TYPE
/* Define to 1 if `st_atimensec' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
/* Define to 1 if `st_atimespec.tv_nsec' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
/* Define to 1 if `st_atim.st__tim.tv_nsec' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
/* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
/* Define to 1 if `st_author' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_AUTHOR
@@ -926,6 +964,9 @@
/* Define to 1 if `st_blocks' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if `st_spare1' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_SPARE1
/* Define if struct timespec is declared in <time.h>. */
#undef HAVE_STRUCT_TIMESPEC
@@ -1031,9 +1072,6 @@
/* Define to 1 if you have the <sys/filsys.h> header file. */
#undef HAVE_SYS_FILSYS_H
/* Define to 1 if you have the <sys/fstyp.h> header file. */
#undef HAVE_SYS_FSTYP_H
/* Define to 1 if you have the <sys/fs/s5param.h> header file. */
#undef HAVE_SYS_FS_S5PARAM_H
@@ -1095,9 +1133,6 @@
/* Define to 1 if you have the <sys/table.h> header file. */
#undef HAVE_SYS_TABLE_H
/* Define to 1 if you have the <sys/timeb.h> header file. */
#undef HAVE_SYS_TIMEB_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
@@ -1116,9 +1151,15 @@
/* Define to 1 if you have the `table' function. */
#undef HAVE_TABLE
/* Define to 1 if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR
/* Define to 1 if you have the `tcgetpgrp' function. */
#undef HAVE_TCGETPGRP
/* Define to 1 if you have the `tcsetattr' function. */
#undef HAVE_TCSETATTR
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
@@ -1230,6 +1271,9 @@
/* Define to 1 if you have the `__fpending' function. */
#undef HAVE___FPENDING
/* Define to 1 if you have the `__fsetlocking' function. */
#undef HAVE___FSETLOCKING
/* Define to 1 if you have the `__secure_getenv' function. */
#undef HAVE___SECURE_GETENV
@@ -1410,10 +1454,6 @@
/* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P
/* Define to be the nanoseconds member of struct stat's st_mtim, if it exists.
*/
#undef ST_MTIM_NSEC
/* Define to 1 on System V Release 4. */
#undef SVR4
@@ -1437,9 +1477,9 @@
a pointer exists and the standard includes do not define UINTPTR_MAX. */
#undef UINTPTR_MAX
/* Define as the maximum value of the type 'unsigned long long int', if the
system doesn't define it, and if the system has that type. */
#undef ULLONG_MAX
/* Define if ULONG_MAX < ULLONG_MAX, even if your compiler does not support
ULLONG_MAX. */
#undef ULONG_MAX_LT_ULLONG_MAX
/* Define to 1 for Encore UMAX. */
#undef UMAX
@@ -1550,6 +1590,9 @@
/* Define to a replacement function name for getline(). */
#undef getline
/* Define to a replacement function name for getpass(). */
#undef getpass
/* Define to rpl_gettimeofday if the replacement function should be used. */
#undef gettimeofday
@@ -1616,9 +1659,54 @@
/* Define to rpl_putenv if the replacement function should be used. */
#undef putenv
/* Define to rpl_re_comp if the replacement should be used. */
#undef re_comp
/* Define to rpl_re_compile_fastmap if the replacement should be used. */
#undef re_compile_fastmap
/* Define to rpl_re_compile_pattern if the replacement should be used. */
#undef re_compile_pattern
/* Define to rpl_re_exec if the replacement should be used. */
#undef re_exec
/* Define to rpl_re_match if the replacement should be used. */
#undef re_match
/* Define to rpl_re_match_2 if the replacement should be used. */
#undef re_match_2
/* Define to rpl_re_search if the replacement should be used. */
#undef re_search
/* Define to rpl_re_search_2 if the replacement should be used. */
#undef re_search_2
/* Define to rpl_re_set_registers if the replacement should be used. */
#undef re_set_registers
/* Define to rpl_re_set_syntax if the replacement should be used. */
#undef re_set_syntax
/* Define to rpl_re_syntax_options if the replacement should be used. */
#undef re_syntax_options
/* Define to rpl_realloc if the replacement function should be used. */
#undef realloc
/* Define to rpl_regcomp if the replacement should be used. */
#undef regcomp
/* Define to rpl_regerror if the replacement should be used. */
#undef regerror
/* Define to rpl_regexec if the replacement should be used. */
#undef regexec
/* Define to rpl_regfree if the replacement should be used. */
#undef regfree
/* Define to rpl_rename if the replacement function should be used. */
#undef rename
@@ -1632,9 +1720,15 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Map `socklen_t' to `int' if it is missing. */
#undef socklen_t
/* Define as a signed type of the same size as size_t. */
#undef ssize_t
/* Define to rpl_strcasecmp always. */
#undef strcasecmp
/* Define to rpl_strnlen if the replacement function should be used. */
#undef strnlen

29804
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@ dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
dnl Written by Jim Meyering.
AC_INIT([GNU coreutils],[5.3.1-cvs],[bug-coreutils@gnu.org])
AC_INIT([GNU coreutils],[5.91],[bug-coreutils@gnu.org])
AC_CONFIG_SRCDIR(src/ls.c)
AC_CONFIG_AUX_DIR(build-aux)
@@ -36,7 +36,6 @@ AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_PROG_RANLIB
AC_PROG_LN_S
AC_CANONICAL_HOST
AC_CHECK_FUNCS(uname,

View File

@@ -1,3 +1,43 @@
2005-10-15 Paul Eggert <eggert@cs.ucla.edu>
* doc/coreutils.texi (Top, General output formatting, dir invocation):
(vdir invocation): Don't document the old v and d commands.
2005-10-15 Jim Meyering <jim@meyering.net>
* coreutils.texi (du invocation): Document du's -m option,
now that we've decided to keep it.
(who invocation): Remove documentation for deprecated --idle (-i).
2005-10-13 Jim Meyering <jim@meyering.net>
* coreutils.texi: Avoid a few overfull/underfull hboxes.
2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (touch invocation):
"touch -" now touches standard output.
2005-09-17 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (who invocation): Remove a stray '+'.
2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (uname invocation): uname -a no longer generates
the -p and -i outputs if they are unknown.
2005-09-13 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (Time conversion specifiers, Options for date):
Document date --rfc-3339 and new specifiers %:z, %::z, %:::z. Use
"date and time" consistently; the old version sometimes said "time
and date". Fix a minor bug in the documentation for --rfc-2822:
it claimed day-of-month < 10 had leading space, not leading zero.
Use a consistent format for terms like "RFC".
(uname invocation): Mention that Linux outputs "unknown" for
-i and -p.
2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (nice invocation): Document "niceness" versus

View File

@@ -42,10 +42,11 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/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/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 \
@@ -64,8 +65,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/getcwd-path-max.m4 \
$(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
@@ -90,6 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
@@ -117,9 +120,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/st_mtim.m4 \
$(top_srcdir)/m4/stat-macros.m4 $(top_srcdir)/m4/stat-prog.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
@@ -145,12 +149,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/xanstrftime.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/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
@@ -268,6 +272,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@

View File

@@ -175,7 +175,7 @@ Free Documentation License''.
* Operating on sorted files:: sort uniq comm ptx tsort
* Operating on fields within a line:: cut paste join
* Operating on characters:: tr expand unexpand
* Directory listing:: ls dir vdir d v dircolors
* Directory listing:: ls dir vdir dircolors
* Basic operations:: cp dd install mv rm shred
* Special file types:: ln mkdir rmdir mkfifo mknod
* Changing file attributes:: chgrp chmod chown touch
@@ -4497,8 +4497,8 @@ line that contains no delimiter character, unless the
@itemx --delimiter=@var{input_delim_byte}
@opindex -d
@opindex --delimiter
For @option{-f}, fields are separated in the input by the first character
in @var{input_delim_byte} (default is TAB).
With @option{-f}, use the first byte of @var{input_delim_byte} as
the input fields separator (default is TAB).
@item -n
@opindex -n
@@ -5153,9 +5153,9 @@ If only one tab stop is given, set the tabs @var{tab1} spaces apart
last tab stop given with single spaces. Tab stops can be separated by
blanks as well as by commas.
For compatibility @command{expand} also supports an obsolete
option syntax @option{-@var{tab1}[,@var{tab2}]@dots{}}. New scripts
should use @option{-t @var{tab1}[,@var{tab2}]@dots{}} instead.
For compatibility, GNU @command{expand} also accepts the obsolete
option syntax, @option{-@var{t1}[,@var{t2}]@dots{}}. New scripts
should use @option{-t @var{t1}[,@var{t2}]@dots{}} instead.
@item -i
@itemx --initial
@@ -5206,7 +5206,7 @@ instead of the default 8. Otherwise, set the tabs at columns
beyond the tab stops given unchanged. Tab stops can be separated by
blanks as well as by commas. This option implies the @option{-a} option.
For compatibility @command{unexpand} supports an obsolete option syntax
For compatibility, GNU @command{unexpand} supports the obsolete option syntax,
@option{-@var{tab1}[,@var{tab2}]@dots{}}, where tab stops must be
separated by commas. (Unlike @option{-t}, this obsolete option does
not imply @option{-a}.) New scripts should use @option{--first-only -t
@@ -5813,7 +5813,7 @@ output is not a terminal.
@opindex vertical @r{sorted files in columns}
List files in columns, sorted vertically. This is the default for
@command{ls} if standard output is a terminal. It is always the default
for the @command{dir} and @command{d} programs.
for the @command{dir} program.
@sc{gnu} @command{ls} uses variable width columns to display as many files as
possible in the fewest lines.
@@ -6168,7 +6168,7 @@ This is the default unless the output is a terminal and the program is
@pindex dir
@cindex directory listing, brief
@command{dir} (also installed as @command{d}) is equivalent to @code{ls -C
@command{dir} is equivalent to @code{ls -C
-b}; that is, by default files are listed in columns, sorted vertically,
and special characters are represented by backslash escape sequences.
@@ -6181,7 +6181,7 @@ and special characters are represented by backslash escape sequences.
@pindex vdir
@cindex directory listing, verbose
@command{vdir} (also installed as @command{v}) is equivalent to @code{ls -l
@command{vdir} is equivalent to @code{ls -l
-b}; that is, by default files are listed in long format and special
characters are represented by backslash escape sequences.
@@ -8541,6 +8541,9 @@ touch [@var{option}]@dots{} @var{file}@dots{}
@cindex empty files, creating
Any @var{file} that does not exist is created empty.
A @var{file} of @samp{-} causes @command{touch} to change the
times of the file associated with standard output.
@cindex permissions, for changing file timestamps
If changing both the access and modification times to the current
time, @command{touch} can change the timestamps for files that the user
@@ -9001,6 +9004,13 @@ Dereference symbolic links (show the disk space used by the file
or directory that the link points to instead of the space used by
the link).
@item -m
@opindex -m
@cindex mebibytes for file sizes
Print sizes in 1,048,576-byte blocks, overriding the default block size
(@pxref{Block size}).
This option is equivalent to @option{--block-size=1M}.
@item -P
@itemx --no-dereference
@opindex -P
@@ -11422,7 +11432,7 @@ line, login time, and remote hostname or X display.
@flindex wtmp
If given one non-option argument, @command{who} uses that instead of
a default system-maintained file (often @file{/var/run/utmp} or
+@file{/etc/utmp}) as the name of the file containing the record of
@file{/etc/utmp}) as the name of the file containing the record of
users logged on. @file{/var/log/wtmp} is commonly given as an argument
to @command{who} to look at who has previously logged on.
@@ -11467,13 +11477,6 @@ Print information corresponding to dead processes.
@opindex --heading
Print column headings.
@item -i
@itemx --idle
@opindex -i
@opindex --idle
Include idle time in HOURS:MINUTES, @samp{.} (to indicate
current process), or @samp{old}.
@item -m
@opindex -m
Same as @samp{who am i}.
@@ -11489,16 +11492,12 @@ Overrides all other options.
@opindex -s
Ignored; for compatibility with other versions of @command{who}.
@item -i
@itemx -u
@itemx --idle
@opindex -i
@opindex -u
@opindex --idle
@cindex idle time
After the login time, print the number of hours and minutes that the
user has been idle. @samp{.} means the user was active in last minute.
@samp{old} means the user was idle for more than 24 hours.
user has been idle. @samp{.} means the user was active in the last minute.
@samp{old} means the user has been idle for more than 24 hours.
@item -l
@itemx --login
@@ -11593,7 +11592,7 @@ is not set. @xref{TZ Variable,, Specifying the Time Zone with
@cindex time formats
@cindex formatting times
If given an argument that starts with a @samp{+}, @command{date} prints the
current time and date (or the time and date specified by the
current date and time (or the date and time specified by the
@option{--date} option, see below) in the format defined by that argument,
which is similar to that of the @code{strftime} function. Except for
conversion specifiers, which start with @samp{%}, characters in the
@@ -11664,14 +11663,29 @@ This may be @samp{60} if leap seconds are supported.
@item %X
locale's time representation (e.g., @samp{23:13:48})
@item %z
@w{RFC 2822/ISO 8601} style numeric time zone (e.g., @samp{-0600}
or @samp{+0100}), or nothing if no
@w{@acronym{RFC} 2822/@acronym{ISO} 8601} style numeric time zone
(e.g., @samp{-0600} or @samp{+0530}), or nothing if no
time zone is determinable. This value reflects the numeric time zone
appropriate for the current time, using the time zone rules specified
by the @env{TZ} environment variable.
The time (and optionally, the time zone rules) can be overridden
by the @option{--date} option.
This is a @acronym{GNU} extension.
@item %:z
@w{@acronym{RFC} 3339/@acronym{ISO} 8601} style numeric time zone with
@samp{:} (e.g., @samp{-06:00} or @samp{+05:30}), or nothing if no time
zone is determinable.
This is a @acronym{GNU} extension.
@item %::z
Numeric time zone to the nearest second with @samp{:} (e.g.,
@samp{-06:00:00} or @samp{+05:30:00}), or nothing if no time zone is
determinable.
This is a @acronym{GNU} extension.
@item %:::z
Numeric time zone with @samp{:} using the minimum necessary precision
(e.g., @samp{-06}, @samp{+05:30}, or @samp{-04:56:02}), or nothing if
no time zone is determinable.
This is a @acronym{GNU} extension.
@item %Z
alphabetic time zone abbreviation (e.g., @samp{EDT}), or nothing if no
time zone is determinable. See @samp{%z} for how it is determined.
@@ -11860,11 +11874,11 @@ is available, it is ignored.
@cindex appropriate privileges
If given an argument that does not start with @samp{+}, @command{date} sets
the system clock to the time and date specified by that argument (as
the system clock to the date and time specified by that argument (as
described below). You must have appropriate privileges to set the
system clock. The @option{--date} and @option{--set} options may not be
used with such an argument. The @option{--universal} option may be used
with such an argument to indicate that the specified time and date are
with such an argument to indicate that the specified date and time are
relative to Coordinated Universal Time rather than to the local time
zone.
@@ -11912,8 +11926,8 @@ The program accepts the following options. Also see @ref{Common options}.
@opindex tomorrow
@opindex next @var{day}
@opindex last @var{day}
Display the time and date specified in @var{datestr} instead of the
current time and date. @var{datestr} can be in almost any common
Display the date and time specified in @var{datestr} instead of the
current date and time. @var{datestr} can be in almost any common
format. It can contain month names, time zones, @samp{am} and @samp{pm},
@samp{yesterday}, etc. For example, @option{--date="2004-02-27
14:19:13.489392193 +0530"} specifies the instant of time that is
@@ -11926,38 +11940,17 @@ time zone that is 5 hours and 30 minutes east of @acronym{UTC}.
@opindex -f
@opindex --file
Parse each line in @var{datefile} as with @option{-d} and display the
resulting time and date. If @var{datefile} is @samp{-}, use standard
resulting date and time. If @var{datefile} is @samp{-}, use standard
input. This is useful when you have many dates to process, because the
system overhead of starting up the @command{date} executable many times can
be considerable.
@item -I[@var{timespec}]
@itemx --iso-8601[=@var{timespec}]
@opindex -I[@var{timespec}]
@opindex --iso-8601[=@var{timespec}]
Display the date using the @acronym{ISO} 8601 format, @samp{%Y-%m-%d}.
The argument @var{timespec} specifies the number of additional
terms of the time to include. It can be one of the following:
@table @samp
@item auto
Print just the date. This is the default if @var{timespec} is omitted.
@item hours
Append the hour of the day to the date.
@item minutes
Append the hours and minutes.
@item seconds
Append the hours, minutes, and seconds.
@item ns
Append the hours, minutes, seconds, and nanoseconds.
@end table
If showing any time terms, then include the time zone using the format
@samp{%z}.
@item -r @var{file}
@itemx --reference=@var{file}
@opindex -r
@opindex --reference
Display the date and time of the last modification of @var{file},
instead of the current date and time.
@item -R
@itemx --rfc-822
@@ -11965,31 +11958,58 @@ If showing any time terms, then include the time zone using the format
@opindex -R
@opindex --rfc-822
@opindex --rfc-2822
Display the time and date using the format @samp{%a, %d %b %Y %H:%M:%S
Display the date and time using the format @samp{%a, %d %b %Y %H:%M:%S
%z}, evaluated in the C locale so abbreviations are always in English.
For example:
@example
Fri,@ @ 1 Aug 2003 23:05:56 -0700
Fri, 09 Sep 2005 13:51:39 -0700
@end example
This format conforms to
@uref{ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt, RFC 2822} and
@uref{ftp://ftp.rfc-editor.org/in-notes/rfc822.txt, RFC 822}, the
@uref{ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt, Internet
@acronym{RFCs} 2822} and
@uref{ftp://ftp.rfc-editor.org/in-notes/rfc822.txt, 822}, the
current and previous standards for Internet email.
@item -r @var{file}
@itemx --reference=@var{file}
@opindex -r
@opindex --reference
Display the time and date reference according to the last modification
time of @var{file}, instead of the current time and date.
@item --rfc-3339=@var{timespec}
@opindex --rfc-3339=@var{timespec}
Display the date using a format specified by
@uref{ftp://ftp.rfc-editor.org/in-notes/rfc3339.txt, Internet
@acronym{RFC} 3339}. This is a subset of the @acronym{ISO} 8601
format, except that it also permits applications to use a space rather
than a @samp{T} to separate dates from times. Unlike the other
standard formats, @acronym{RFC} 3339 format is always suitable as
input for the @option{--date} (@option{-d}) and @option{--file}
(@option{-f}) options, regardless of the current locale.
The argument @var{timespec} specifies how much of the time to include.
It can be one of the following:
@table @samp
@item date
Print just the full-date, e.g., @samp{2005-09-14}.
This is equivalent to the format @samp{%Y-%m-%d}.
@item seconds
Print the full-date and full-time separated by a space, e.g.,
@samp{2005-09-14 00:56:06+05:30}. The output ends with a numeric
time-offset; here the @samp{+05:30} means that local time is five
hours and thirty minutes east of @acronym{UTC}. This is equivalent to
the format @samp{%Y-%m-%d %H:%M:%S%:z}.
@item ns
Like @samp{seconds}, but also print nanoseconds, e.g.,
@samp{2005-09-14 00:56:06.998458565+05:30}.
This is equivalent to the format @samp{%Y-%m-%d %H:%M:%S.%N%:z}.
@end table
@item -s @var{datestr}
@itemx --set=@var{datestr}
@opindex -s
@opindex --set
Set the time and date to @var{datestr}. See @option{-d} above.
Set the date and time to @var{datestr}. See @option{-d} above.
@item -u
@itemx --utc
@@ -12078,11 +12098,11 @@ date --set='+2 minutes'
@end example
@item
To print the date in the format specified by RFC-2822,
use @samp{date --rfc-2822}. I just did and saw this:
To print the date in @acronym{RFC} 2822 format,
use @samp{date --rfc-2822}. Here is some example output:
@example
Thu, 31 Jul 2003 13:13:05 -0700
Fri, 09 Sep 2005 13:51:39 -0700
@end example
@anchor{%s-examples}
@@ -12193,7 +12213,8 @@ The program accepts the following options. Also see @ref{Common options}.
@itemx --all
@opindex -a
@opindex --all
Print all of the below information.
Print all of the below information, except omit the processor type
and the hardware platform name if they are unknown.
@item -i
@itemx --hardware-platform
@@ -12204,6 +12225,8 @@ Print all of the below information.
@cindex platform, hardware
Print the hardware platform name
(sometimes called the hardware implementation).
Print @samp{unknown} if the kernel does not make this information
easily available, as is the case with Linux kernels.
@item -m
@itemx --machine
@@ -12231,6 +12254,8 @@ Print the network node hostname.
@cindex host processor type
Print the processor type (sometimes called the instruction set
architecture or ISA).
Print @samp{unknown} if the kernel does not make this information
easily available, as is the case with Linux kernels.
@item -o
@itemx --operating-system

View File

@@ -5,6 +5,9 @@ exit.h
fnmatch_.h
fts.c
fts_.h
getaddrinfo.h
getdelim.h
getline.h
getndelim2.h
getopt.c
getopt.h
@@ -12,8 +15,11 @@ getopt1.c
getopt_.h
getopt_int.h
getpagesize.h
getpass.c
gettext.h
localcharset.h
mbchar.h
mbuiter.h
md5.h
obstack.h
printf-args.h
@@ -23,9 +29,13 @@ regex.c
regex.h
regex_internal.c
regex_internal.h
stat-time.h
stdbool_.h
strcase.h
strdup.h
strndup.h
strnlen.h
strnlen1.h
strtoul.c
time_r.h
utimecmp.h

View File

@@ -2,11 +2,11 @@
Makefile
alloca.h
charset.alias
fnmatch.h
fts.h
getdate.c
getdate.tab.c
getopt.h
fnmatch.h
fts.h
lstat.c
poll.h
ref-add.sed

View File

@@ -1,5 +1,299 @@
2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
* mkdir-p.c (make_dir_parents): Don't report an error if an
intermediate directory is in a read-only file system. Problem
reported by Eric Blake.
2005-10-08 Jim Meyering <jim@meyering.net>
* openat.c (rpl_openat): Use the promoted type (int), not mode_t,
as second argument to va_arg. Otherwise, some versions of gcc
warn that `if this code is reached, the program will abort'.
Update from gnulib.
* getdelim.c: (SIZE_MAX): New macro, if not already defined.
2005-10-05 Jim Meyering <jim@meyering.net>
* Makefile.am (libcoreutils_a_DEPENDENCIES): Remove definition.
Once it's gone, automake generates an equivalent one.
Suggestion from Stepan Kasal.
* getaddrinfo.h: Merge from gnulib.
2005-10-04 Jim Meyering <jim@meyering.net>
Merge from gnulib.
* getaddrinfo.h: Include sys/types.h before other headers.
2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
* getdelim.c: Import from gnulib (to fix unused var warnings) then
apply the following fixes:
Include getdelim.h first. Include <limits.h>.
(SSIZE_MAX): New macro, if not already defined.
(getdelim): Fix buffer overrun on 64-bit hosts with lines longer
than 2 GiB.
2005-10-01 Simon Josefsson <jas@extundo.com>
* getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO. Protect
AI_* and EAI_* definitions. Protect function declarations.
2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
* openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
Remove AT_FDCWD test.
Do not consume the fd unless successful.
* openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
* xtime.h (XTIME_PRECISION): Now of type int, not long long int,
so that the code works even with ancient cpp. Portability problem
with GCC 2.7.2.1 reported by Thomas M.Ott.
* settime.c (settime): Fix { typo in previous patch. Also, don't
bother returning ENOSYS if settimeofday or stime fails; just let
them return whatever errno they want to return.
2005-09-29 Jim Meyering <jim@meyering.net>
* settime.c (settime): Move the HAVE_STIME block `up' into an #elif
block, so that we don't even try to compile it if settimeofday is
available. This works around a compilation failure on OSF1 V5.1,
due to stime requiring a `long int*' while tv_sec is `int'.
2005-09-27 Jim Meyering <jim@meyering.net>
* fprintftime.c [HAVE_CONFIG_H]: Include <config.h> conditionally,
to be consistent with gnulib.
* getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef HAVE_CONFIG_H.
* fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
* strnumcmp.c [HAVE_CONFIG_H]: Include <config.h> here, now that
strnumcmp-in.h no longer includes it.
2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
* utimens.c: Include unistd.h, for dup2.
(futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
(futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
2005-09-25 Jim Meyering <jim@meyering.net>
* strnumcmp-in.h: Protect against multiple inclusion.
2005-09-24 Paul Eggert <eggert@cs.ucla.edu>
* utimens.c (ENOSYS): Define if not already defined.
(futimens): Support having a null PATH if the file descriptor
is nonnegative.
* Makefile.am (libcoreutils_a_SOURCES): Remove mbchar.c, since
it doesn't build in OpenBSD 3.4. See
<http://lists.gnu.org/archive/html/bug-gnulib/2005-09/msg00242.html>.
* regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
Remove.
(__attribute): Define to empty unless GCC 3.1 or later.
This works around a core dump on OpenBSD 3.4, which has GCC
2.95.3, which dumps core when given __attribute__(()). It also
simplifies other tests, since we really don't want to bother with
worrying about which ancient version of GCC supported what.
Original problem reported by Yoann Vandoorselaere, with part of
the fix suggested by Derek Price.
2005-09-24 Jim Meyering <jim@meyering.net>
* openat-die.c, root-dev-ino.c, setenv.c, stdopen.c:
* tsearch.c, unsetenv.c, xfts.c: Use `#ifdef HAVE_CONFIG_H',
not `#if HAVE_CONFIG_H', for consistency with gnulib.
* strintcmp.c: Include <config.h> here, ...
* strnumcmp-in.h: ..., not here.
Sync from gnulib.
* verify.h (verify_type__): Use `unsigned int' as the bitfield type
so we can once again use a positive bitfield width of 1 -- now we
don't have to explain why we were using a bitfield width of 2.
2005-09-23 Paul Eggert <eggert@cs.ucla.edu>
* utimens.c (futimens): Use futimesat if available.
Prefer it to futimes since it doesn't have the futimes bug.
* verify.h (GL_CONCAT0, GL_CONCAT): Remove.
(verify): Don't use the __LINE__ trick, as it doesn't work in general.
Instead, declare a function that returns a pointer to an array,
and use verify_type__ to declare the size of the array.
Problem and germ of a solution reported by Bruno Haible.
(verify_type__): Use 2, not 1, for bitfield size, to avoid
a warning with Irix 6.5 cc. Problem reported by Bruno Haible.
2005-09-23 Jim Meyering <jim@meyering.net>
* strnumcmp-in.h: Include <config.h>. Otherwise builds with strict
C89 (e.g., Sun's /opt/SUNWspro/bin/c89) would fail due to the use
of `inline'.
2005-09-22 Paul Eggert <eggert@cs.ucla.edu>
* getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
Problem reported by Eric Blake.
(getaddrinfo): Initialize se so that it's not garbage.
Redo internal storage allocation so that it doesn't make unportable
assumptions about alignment.
Fix a memory leak.
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
Sync from gnulib.
* Makefile.am (libcoreutils_a_SOURCES): Add getaddrinfo.h,
mbchar.c, mbchar.h, mbuiter.h, strcase.h, strlen1.c, strnlen1.h,
strstr.h.
* argmatch.h (GL_CONCAT): Remove.
Include "verify.h" instead.
(ARGMATCH_CONSTRAINT, ARGMATCH_ASSERT): Remove.
(ARGMATCH_VERIFY): Rewrite in terms of new verify macros.
* xalloc.h (VERIFY_EXPR, X2NREALLOC, X2REALLOC): Remove.
The latter two macros are moving to ../src/system.h for now.
This reverts this file to the gnulib version.
* xanstrftime.c, xanstrftime.h: Remove; no longer used.
* .cppi-disable: Add getaddrinfo.h, getdelim.h, mbchar.h,
mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
* canon-host.h, gai_strerror.c, getaddrinfo.c, getaddrinfo.h:
* getdelim.c, getdelim.h, mbchar.c, mbchar.h, mbuiter.h:
* strcase.h, strnlen.h, strnlen1.c, strnlen1.h, strstr.h:
New files, from gnulib.
* __fpending.c, __fpending.h, acl.c, argmatch.c, atexit.c:
* backupfile.c, basename.c, calloc.c, canonicalize.c:
* chdir-long.c, chown.c, cloexec.c, closeout.c, creat-safer.c:
* cycle-check.c, dirfd.c, dirfd.h, dirname.c, dup-safer.c:
* dup2.c, euidaccess.c, exclude.c, exitfail.c, fchown-stub.c:
* fd-safer.c, file-type.c, fileblocks.c, filemode.c:
* filenamecat.c, fnmatch.c, fopen-safer.c, free.c, fsusage.c:
* ftruncate.c, full-write.c, getcwd.c, getcwd.h, getdate.h:
* getgroups.c, getndelim2.c, getopt1.c, getopt_.h:
* gettimeofday.c, getugroups.c, group-member.c, hard-locale.c:
* hash-pjw.c, hash.c, human.c, human.h, idcache.c, inttostr.c:
* inttostr.h, lchown.c, long-options.c, lstat.c, malloc.c:
* memcasecmp.c, memchr.c, memcmp.c, memcoll.c, memcpy.c:
* memmove.c, mkdir.c, mkstemp.c, mktime.c, modechange.c:
* mountlist.c, nanosleep.c, open-safer.c, openat.c, physmem.c:
* pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c:
* quotearg.c, raise.c, readlink.c, readtokens0.c, readutmp.c:
* realloc.c, regex.c, regex_internal.h, rename.c, rmdir.c:
* rpmatch.c, safe-read.c, same.c, save-cwd.c, savedir.c:
* settime.c, sig2str.c, strcspn.c, stripslash.c, strndup.c:
* strnlen.c, strtod.c, strtoimax.c, strtol.c, strverscmp.c:
* tempname.c, time_r.c, time_r.h, timespec.h, unicodeio.h:
* unistd--.h, unlinkdir.c, userspec.c, utimecmp.c:
* version-etc-fsf.c, version-etc.c, xalloc-die.c, xgetcwd.c:
* xgethostname.c, xmalloc.c, xmemcoll.c, xnanosleep.c:
* xreadlink.c, xstrndup.c, xstrtoimax.c, xstrtol.c:
* xstrtoumax.c, yesno.c:
Sync from gnulib.
* canon-host.c, getline.c, getline.h, getpass.c, strcasecmp.c:
* strncasecmp.c, strstr.c:
Nontrivial sync from gnulib.
* .cvsignore: Sort entries.
* mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
(make_dir_parents): Treat ENOSYS like EEXIST.
2005-09-20 Jim Meyering <jim@meyering.net>
* openat.c (fdopendir): Be sure to close the supplied
file descriptor before returning. This makes our replacement
implementation a little closer to Solaris's, where fdopendir
ties the file descriptor to the returned DIR* pointer.
2005-09-19 Jim Meyering <jim@meyering.net>
* openat.c (unlinkat): New function.
* openat.h (unlinkat): Add prototype.
2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
Import from gnulib.
* stat-time.h: New file.
* timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
(MTIME_CMP, TIMESPEC_NS): Remove. Now done by stat-time.h,
in a different way.
(timespec_cmp): New function.
* utimecmp.c: Include stat-time.h.
(SYSCALL_RESOLUTION): Depend on whether various struct stat
members exist, not on the obsolescent ST_MTIM_NSEC.
(utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
* .cppi-disable: Add stat-time.h.
2005-09-16 Jim Meyering <jim@meyering.net>
* strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
int utc, int nanoseconds);
Background:
date should not have to allocate a megabyte of virtual memory to
handle a format argument like +%1048575T. When implemented with
strftime, it must allocate such a buffer, use strftime to fill it
in, print it, then free it.
With fprintftime, it simply prints everything and exits.
With no need for memory allocation, that's one fewer way to fail.
* fprintftime.c, fprintftime.h: New files.
* Makefile.am (libcoreutils_a_SOURCES):
Add fprintftime.c and fprintftime.h.
2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
* strftime.c (my_strftime): Rewrite the previous change slightly,
to make it a bit faster and (I hope) clearer.
2005-09-14 Jim Meyering <jim@meyering.net>
* strftime.c (my_strftime): Parse the colons of %:::z *after* the
optional field width, not before, so we accept %9:z, not %:9z.
(my_strftime): Be sure to use L_('x') for literals.
2005-09-13 Paul Eggert <eggert@cs.ucla.edu>
Merge md5 from libc, and clean up some sha1 glitches.
* md5.h (__GNUC_PREREQ, __THROW, __attribute__): New macros.
(__md5_buffer): Renamed from md5_buffer. Add a macro undoing this
if _LIBC is not defined. Add __THROW.
(__md5_finish_ctx, __md5_init_ctx, __md5_process_block):
(__md5_process_bytes, __md5_read_ctx, __md5_stream): Likewise.
(struct md5_ctx): Mark buffer as being aligned.
(rol): Remove; all uses changed to CYCLIC.
* md5.c (CYCLIC): New macro. All uses of rol changed to use CYCLIC.
Redo comment to minimize changes from libc.
* sha1.h (struct sha1_ctx): Mark buffer as being aligned.
* sha1.c (SWAP): Renamed from NOTSWAP, to avoid a horrible misnaming.
All uses changed. Remove the old SWAP.
Remove obvious comment about BLOCKSIZE.
(rol): New macro, moved here from md5.h.
(sha1_process_block): Remove an incoherent FIXME comment.
* strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
Fix bug in formats like %2N.
2005-09-13 Jim Meyering <jim@meyering.net>
* xalloc.h: Revert unintended change that removed definitions
of X2REALLOC and X2NREALLOC.
* backupfile.c: Use ARGMATCH_VERIFY, just in case.
2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
@@ -66,6 +360,12 @@
%0Ns wouldn't work. Before this change, `date -d @-22 +%05s' would
print `00-22'. Now, it prints `-0022', as it should.
2005-08-15 Bruno Haible <bruno@clisp.org>
Import from gnulib.
* regex.h (__restrict_arr): Don't define to __restrict if __cplusplus
is defined.
2005-08-13 Jim Meyering <jim@meyering.net>
* getdate.y (get_date): Undo part of the 2005-04-04 change, so that
@@ -5186,7 +5486,7 @@
* exclude.c (bool): Declare, perhaps by including stdbool.h.
(<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
(<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
Include if available.
Include if available.
(<xalloc.h>): Include
(SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
(verify): New macro. Use it to verify that EXCLUDE macros do not

View File

@@ -29,12 +29,19 @@ 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 \
@@ -52,7 +59,6 @@ libcoreutils_a_SOURCES += \
vasnprintf.h
libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
lib_OBJECTS = $(libcoreutils_a_OBJECTS)

View File

@@ -45,7 +45,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
ChangeLog TODO __fpending.c __fpending.h acl.c acl.h alloca.c \
argmatch.c argmatch.h asnprintf.c asprintf.c atexit.c \
backupfile.c backupfile.h basename.c c-strtod.c c-strtod.h \
c-strtold.c calloc.c canon-host.c canonicalize.c \
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 \
@@ -55,53 +55,55 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
fd-reopen.c fd-reopen.h fd-safer.c file-type.c file-type.h \
fileblocks.c filemode.c filemode.h filenamecat.c filenamecat.h \
fnmatch.c fopen-safer.c free.c fsusage.c fsusage.h ftruncate.c \
fts-cycle.c fts.c fts_.h getcwd.c getcwd.h getdate.h getdate.y \
getgroups.c gethostname.c gethrxtime.c gethrxtime.h getline.c \
getline.h getloadavg.c getndelim2.c getopt.c getopt1.c \
getpagesize.h getpass.c getpass.h gettime.c gettimeofday.c \
getugroups.c getusershell.c group-member.c group-member.h \
hard-locale.c hard-locale.h hash-pjw.c hash-pjw.h hash.c \
hash.h human.c human.h idcache.c imaxtostr.c intprops.h \
inttostr.c inttostr.h lchown.c lchown.h linebuffer.c \
linebuffer.h long-options.c long-options.h lstat.c lstat.h \
malloc.c 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 stdio--.h stdio-safer.h stdlib--.h \
fts-cycle.c fts.c fts_.h gai_strerror.c getaddrinfo.c getcwd.c \
getcwd.h getdate.h getdate.y getdelim.c getdelim.h getgroups.c \
gethostname.c gethrxtime.c gethrxtime.h getline.c getline.h \
getloadavg.c getndelim2.c getopt.c getopt1.c getpagesize.h \
getpass.c getpass.h gettime.c gettimeofday.c getugroups.c \
getusershell.c group-member.c group-member.h hard-locale.c \
hard-locale.h hash-pjw.c hash-pjw.h hash.c hash.h human.c \
human.h idcache.c imaxtostr.c intprops.h inttostr.c inttostr.h \
lchown.c lchown.h linebuffer.c linebuffer.h long-options.c \
long-options.h lstat.c lstat.h malloc.c mbchar.c md5.c md5.h \
memcasecmp.c memcasecmp.h memchr.c memcmp.c memcoll.c \
memcoll.h memcpy.c memmove.c mempcpy.c mempcpy.h memrchr.c \
memrchr.h memset.c mkdir-p.c mkdir-p.h mkdir.c mkstemp-safer.c \
mkstemp.c mktime.c modechange.c modechange.h mountlist.c \
mountlist.h nanosleep.c obstack.c obstack.h offtostr.c \
open-safer.c openat-die.c openat.c openat.h pathmax.h \
physmem.c physmem.h pipe-safer.c posixtm.c posixtm.h \
posixver.c posixver.h printf-args.c printf-parse.c putenv.c \
quote.c quote.h quotearg.c quotearg.h raise.c readlink.c \
readtokens.c readtokens.h readutmp.c readutmp.h realloc.c \
regcomp.c regex.c regex.h regex_internal.c regex_internal.h \
regexec.c rename.c rmdir.c root-dev-ino.c root-dev-ino.h \
rpmatch.c safe-read.c safe-read.h safe-write.c safe-write.h \
same.c same.h save-cwd.c save-cwd.h savedir.c savedir.h \
setenv.c setenv.h settime.c sha1.c sha1.h sig2str.c sig2str.h \
stat-macros.h stat-time.h stdio--.h stdio-safer.h stdlib--.h \
stdlib-safer.h stpcpy.c strcasecmp.c strcspn.c strdup.c \
strdup.h strftime.c strftime.h strintcmp.c stripslash.c \
strncasecmp.c strndup.c strndup.h strnlen.c strnumcmp-in.h \
strnumcmp.c strnumcmp.h strpbrk.c strstr.c strtod.c \
strtoimax.c strtol.c strtoll.c strtoul.c strtoull.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 xanstrftime.c xanstrftime.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
xalloc.h xfts.c xfts.h xgetcwd.c xgetcwd.h xmalloc.c \
xnanosleep.c xnanosleep.h xreadlink.c xreadlink.h xstrtod.c \
xstrtod.h xstrtol.c xstrtol.h xstrtoul.c xtime.h yesno.c \
yesno.h
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \
$(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/assert.m4 \
$(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/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/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 \
@@ -120,8 +122,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/getcwd-path-max.m4 \
$(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdate.m4 \
$(top_srcdir)/m4/fts.m4 $(top_srcdir)/m4/getaddrinfo.m4 \
$(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
$(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
$(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \
$(top_srcdir)/m4/gethrxtime.m4 $(top_srcdir)/m4/getline.m4 \
$(top_srcdir)/m4/getndelim2.m4 $(top_srcdir)/m4/getopt.m4 \
@@ -146,6 +149,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.m4 \
$(top_srcdir)/m4/long-options.m4 \
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/ls-mntd-fs.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/mbchar.m4 $(top_srcdir)/m4/mbiter.m4 \
$(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \
$(top_srcdir)/m4/mbswidth.m4 $(top_srcdir)/m4/md5.m4 \
$(top_srcdir)/m4/memcasecmp.m4 $(top_srcdir)/m4/memchr.m4 \
@@ -173,9 +177,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/st_mtim.m4 \
$(top_srcdir)/m4/stat-macros.m4 $(top_srcdir)/m4/stat-prog.m4 \
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/socklen.m4 \
$(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.m4 \
$(top_srcdir)/m4/st_dm_mode.m4 $(top_srcdir)/m4/stat-macros.m4 \
$(top_srcdir)/m4/stat-prog.m4 $(top_srcdir)/m4/stat-time.m4 \
$(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint_h.m4 \
$(top_srcdir)/m4/stdio-safer.m4 \
$(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stpcpy.m4 \
@@ -201,12 +206,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/afs.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/xanstrftime.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/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
@@ -218,11 +223,15 @@ ARFLAGS = cru
libcoreutils_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 = @LIBOBJS@
am__DEPENDENCIES_2 = @ALLOCA@
am_libcoreutils_a_OBJECTS = allocsa.$(OBJEXT) full-read.$(OBJEXT) \
full-write.$(OBJEXT) localcharset.$(OBJEXT) mbswidth.$(OBJEXT) \
readtokens0.$(OBJEXT) time_r.$(OBJEXT) unicodeio.$(OBJEXT) \
xalloc-die.$(OBJEXT) xgethostname.$(OBJEXT) xmemcoll.$(OBJEXT) \
xstrndup.$(OBJEXT) xstrtoimax.$(OBJEXT) xstrtoumax.$(OBJEXT)
libcoreutils_a_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2)
am_libcoreutils_a_OBJECTS = allocsa.$(OBJEXT) fprintftime.$(OBJEXT) \
full-read.$(OBJEXT) full-write.$(OBJEXT) \
localcharset.$(OBJEXT) mbswidth.$(OBJEXT) \
readtokens0.$(OBJEXT) strnlen1.$(OBJEXT) time_r.$(OBJEXT) \
unicodeio.$(OBJEXT) xalloc-die.$(OBJEXT) \
xgethostname.$(OBJEXT) xmemcoll.$(OBJEXT) xstrndup.$(OBJEXT) \
xstrtoimax.$(OBJEXT) xstrtoumax.$(OBJEXT)
libcoreutils_a_OBJECTS = $(am_libcoreutils_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
t_fpending_SOURCES = t-fpending.c
@@ -329,6 +338,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
YFLAGS = @YFLAGS@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
@@ -378,15 +388,15 @@ noinst_LIBRARIES = libcoreutils.a
LDADD = $(noinst_LIBRARIES)
AM_CPPFLAGS = -I.. -I$(srcdir)
libcoreutils_a_SOURCES = allocsa.c allocsa.h euidaccess.h exit.h \
full-read.c full-read.h full-write.c full-write.h gettext.h \
localcharset.c localcharset.h mbswidth.c mbswidth.h \
readtokens0.c readtokens0.h time_r.c time_r.h unicodeio.c \
unicodeio.h verify.h xalloc-die.c xgethostname.c \
xgethostname.h xmemcoll.c xmemcoll.h xstrndup.c xstrndup.h \
xstrtoimax.c xstrtoumax.c printf-args.h printf-parse.h \
vasprintf.h vasnprintf.h
fprintftime.c fprintftime.h full-read.c full-read.h \
full-write.c full-write.h getaddrinfo.h gettext.h \
localcharset.c localcharset.h mbchar.h mbswidth.c mbswidth.h \
mbuiter.h readtokens0.c readtokens0.h strcase.h strnlen1.c \
strnlen1.h strstr.h time_r.c time_r.h unicodeio.c unicodeio.h \
verify.h xalloc-die.c xgethostname.c xgethostname.h xmemcoll.c \
xmemcoll.h xstrndup.c xstrndup.h xstrtoimax.c xstrtoumax.c \
printf-args.h printf-parse.h vasprintf.h vasnprintf.h
libcoreutils_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
lib_OBJECTS = $(libcoreutils_a_OBJECTS)
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(ALLOCA_H) $(FNMATCH_H) \
$(GETOPT_H)
@@ -498,9 +508,12 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ftruncate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fts-cycle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gai_strerror.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getcwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdate.y@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdelim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getgroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gethostname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gethrxtime.Po@am__quote@
@@ -527,6 +540,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/long-options.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mbchar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
@@ -614,7 +628,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/version-etc-fsf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/version-etc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xanstrftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xfts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xgetcwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xmalloc.Po@am__quote@
@@ -625,11 +638,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/xstrtoul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/yesno.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fprintftime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbswidth.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readtokens0.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/t-fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodeio.Po@am__quote@

View File

@@ -17,7 +17,7 @@
/* Written by Jim Meyering. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,7 +1,3 @@
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stddef.h>
#include <stdio.h>

View File

@@ -18,7 +18,7 @@
Written by Paul Eggert. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -20,7 +20,7 @@
/* Written by David MacKenzie <djm@ai.mit.edu>
Modified by Akim Demaille <demaille@inf.enst.fr> */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -25,34 +25,15 @@
# include <stddef.h>
# ifndef verify_dcl
# define GL_CONCAT0(x, y) x##y
# define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
/* Verify requirement, R, at compile-time, as a declaration.
The implementation uses a struct declaration whose name includes the
expansion of __LINE__, so there is a small chance that two uses of
verify_dcl from different files will end up colliding (for example,
f.c includes f.h and verify_dcl is used on the same line in each). */
# define verify_dcl(R) \
struct GL_CONCAT (ct_assert_, __LINE__) { char a[(R) ? 1 : -1]; }
# endif
# include "verify.h"
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
(ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
/* Assert there are as many real arguments as there are values
(argument list ends with a NULL guard). ARGMATCH_VERIFY is
preferred, since it is guaranteed to be checked at compile-time.
ARGMATCH_ASSERT is for backward compatibility only. */
(argument list ends with a NULL guard). */
# define ARGMATCH_VERIFY(Arglist, Vallist) \
verify_dcl (ARGMATCH_CONSTRAINT (Arglist, Vallist))
# define ARGMATCH_ASSERT(Arglist, Vallist) \
assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
/* Return the index of the element of ARGLIST (NULL terminated) that
matches with ARG. If VALLIST is not NULL, then use it to resolve

View File

@@ -1,7 +1,9 @@
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
/* This function is in the public domain. --Mike Stump. */
#include "config.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
int
atexit (void (*f) (void))

View File

@@ -21,7 +21,7 @@
/* Written by Paul Eggert and David MacKenzie.
Some algorithms adapted from GNU Emacs. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -18,7 +18,7 @@
/* written by Jim Meyering */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef calloc

View File

@@ -1,9 +1,8 @@
/* Host name canonicalization
Copyright (C) 1995, 1999, 2000, 2002, 2003, 2004, 2005 Free Software
Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
Written by Derek Price <derek@ximbiot.com>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -23,103 +22,69 @@
# include <config.h>
#endif
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#include "canon-host.h"
#include "getaddrinfo.h"
#include "strdup.h"
/* Returns the canonical hostname associated with HOST (allocated in a static
buffer), or NULL if it can't be determined. */
/* Store the last error for the single-threaded version of this function. */
static int last_cherror;
/* Single-threaded of wrapper for canon_host_r. After a NULL return, error
messages may be retrieved via ch_strerror(). */
char *
canon_host (char const *host)
canon_host (const char *host)
{
char *h_addr_copy = NULL;
#if HAVE_GETADDRINFO
{
struct addrinfo hint = { 0, };
struct addrinfo *res = NULL;
hint.ai_flags = AI_CANONNAME;
if (getaddrinfo (host, NULL, &hint, &res) == 0)
{
h_addr_copy = strdup (res->ai_canonname);
freeaddrinfo (res);
}
}
#elif HAVE_GETHOSTBYNAME
{
struct hostent *he = gethostbyname (host);
if (he)
{
# ifdef HAVE_GETHOSTBYADDR
char *addr = NULL;
/* Try and get an ascii version of the numeric host address. */
switch (he->h_addrtype)
{
# ifdef HAVE_INET_NTOA
case AF_INET:
addr = inet_ntoa (*(struct in_addr *) he->h_addr);
break;
# endif /* HAVE_INET_NTOA */
}
if (addr && strcmp (he->h_name, addr) == 0)
{
/* gethostbyname has returned a string representation of the IP
address, for example, "127.0.0.1". So now, look up the host
name via the address. Although it may seem reasonable to look
up the host name via the address, we must not pass `he->h_addr'
directly to gethostbyaddr because on some systems he->h_addr
is located in a static library buffer that is reused in the
gethostbyaddr call. Make a copy and use that instead. */
h_addr_copy = (char *) malloc (he->h_length);
if (h_addr_copy == NULL)
he = NULL;
else
{
memcpy (h_addr_copy, he->h_addr, he->h_length);
he = gethostbyaddr (h_addr_copy, he->h_length, he->h_addrtype);
free (h_addr_copy);
}
}
# endif /* HAVE_GETHOSTBYADDR */
if (he)
h_addr_copy = strdup (he->h_name);
}
}
#endif /* HAVE_GETHOSTBYNAME */
return h_addr_copy;
return canon_host_r (host, &last_cherror);
}
#ifdef TEST_CANON_HOST
int
main (int argc, char **argv)
/* Return a malloc'd string containing the canonical hostname associated with
HOST, or NULL if a canonical name cannot be determined. On NULL return,
if CHERROR is not NULL, set *CHERROR to an error code as returned by
getaddrinfo(). Use ch_strerror_r() or gai_strerror() to convert a *CHERROR
value to a string suitable for error messages.
WARNINGS
HOST must be a string representation of a resolvable name for this host.
Strings containing an IP address in dotted decimal notation will be
returned as-is, without further resolution.
The use of the word "canonical" in this context is unfortunate but
entrenched. The value returned by this function will be the end result
of the resolution of any CNAME chains in the DNS. There may only be one
such value for any given hostname, though the actual IP address
referenced by this value and the device using that IP address may each
actually have any number of such "canonical" hostnames. See the POSIX
getaddrinfo spec <http://www.opengroup.org/susv3xsh/getaddrinfo.html">,
RFC 1034 <http://www.faqs.org/rfcs/rfc1034.html>, & RFC 2181
<http://www.faqs.org/rfcs/rfc2181.html> for more on what this confusing
term really refers to. */
char *
canon_host_r (char const *host, int *cherror)
{
int i;
for (i = 1; i < argc; i++)
char *retval = NULL;
static struct addrinfo hints;
struct addrinfo *res = NULL;
int status;
hints.ai_flags = AI_CANONNAME;
status = getaddrinfo (host, NULL, &hints, &res);
if (!status)
{
char *s = canon_host (argv[i]);
printf ("%s: %s\n", argv[i], (s ? s : "<undef>"));
retval = strdup (res->ai_canonname);
if (!retval && cherror)
*cherror = EAI_MEMORY;
freeaddrinfo (res);
}
exit (0);
else if (cherror)
*cherror = status;
return retval;
}
/* Return a string describing the last error encountered by canon_host. */
const char *
ch_strerror (void)
{
return gai_strerror (last_cherror);
}
#endif /* TEST_CANON_HOST */

30
lib/canon-host.h Normal file
View File

@@ -0,0 +1,30 @@
/* Host name canonicalization
Copyright (C) 2005 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef CANON_HOST_H
# define CANON_HOST_H 1
char *canon_host (char const *host);
char *canon_host_r (char const *host, int *cherror);
const char *ch_strerror (void);
# define ch_strerror_r(cherror) gai_strerror (cherror);
#endif /* !CANON_HOST_H */

View File

@@ -22,17 +22,8 @@
#include "canonicalize.h"
#ifdef STDC_HEADERS
# include <stdlib.h>
#else
void free ();
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#include <stdlib.h>
#include <string.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>

View File

@@ -17,7 +17,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "chdir-long.h"

View File

@@ -18,7 +18,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Disable the definition of chown to rpl_chown (from config.h) in this
file. Otherwise, we'd get conflicting prototypes for rpl_chown on

View File

@@ -1,5 +1,5 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004 Free Software Foundation, Inc.
Copyright (C) 1991, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,14 +17,13 @@
The code is taken from glibc/manual/llio.texi */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "cloexec.h"
#include <unistd.h>
#include <fcntl.h>
#ifndef FD_CLOEXEC

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
/* Written by Jim Meyering. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -19,7 +19,7 @@
/* Written by Jim Meyering */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
/* Written by Jim Meyering. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,10 +17,6 @@
Written by Jim Meyering. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#if HAVE_DIRENT_H

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,5 +1,5 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004 Free Software Foundation, Inc.
Copyright (C) 1999, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,14 +17,12 @@
/* written by Paul Eggert */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#ifndef F_DUPFD

View File

@@ -22,7 +22,7 @@
/* Written by David MacKenzie and Torbjorn Granlund.
Adapted for GNU C library by Roland McGrath. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -20,7 +20,7 @@
/* Written by Paul Eggert <eggert@twinsun.com> */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -35,6 +35,7 @@
#include "exclude.h"
#include "fnmatch.h"
#include "strcase.h"
#include "xalloc.h"
#if USE_UNLOCKED_IO

View File

@@ -17,7 +17,7 @@
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,4 +1,6 @@
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <errno.h>

View File

@@ -18,7 +18,7 @@
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -19,7 +19,7 @@
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,6 +1,7 @@
/* Convert file size to number of blocks on System V-like machines.
Copyright (C) 1990, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
/* Written by Brian L. Matthews, blm@6sceng.UUCP. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -19,7 +19,7 @@
/* Written by Jim Meyering. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
/* Written by Paul Eggert. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

7
lib/fprintftime.c Normal file
View File

@@ -0,0 +1,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "fprintftime.h"
#define FPRINTFTIME 1
#include "strftime.c"

12
lib/fprintftime.h Normal file
View File

@@ -0,0 +1,12 @@
#include <stdio.h>
#include <time.h>
/* A cross between fprintf and nstrftime, that prints directly
to the output stream, without the need for the potentially
large buffer that nstrftime would require.
Output to stream FP the result of formatting (according to the
nstrftime format string, FMT) the time data, *TM, and the UTC
and NANOSECONDS values. */
size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
int utc, int nanoseconds);

View File

@@ -18,7 +18,7 @@
/* written by Paul Eggert */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef free

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,7 +1,7 @@
/* ftruncate emulations that work on some System V's.
This file is in the public domain. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -18,6 +18,10 @@
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 "cycle-check.h"
#include "hash.h"

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

78
lib/gai_strerror.c Normal file
View File

@@ -0,0 +1,78 @@
/* Copyright (C) 1997, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
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
#ifndef _LIBC
# include "getaddrinfo.h"
#endif
#include <stdio.h>
#include <netdb.h>
#ifdef _LIBC
# include <libintl.h>
#else
# include "gettext.h"
# define _(String) gettext (String)
# define N_(String) String
#endif
static struct
{
int code;
const char *msg;
}
values[] =
{
{ EAI_ADDRFAMILY, N_("Address family for hostname not supported") },
{ EAI_AGAIN, N_("Temporary failure in name resolution") },
{ EAI_BADFLAGS, N_("Bad value for ai_flags") },
{ EAI_FAIL, N_("Non-recoverable failure in name resolution") },
{ EAI_FAMILY, N_("ai_family not supported") },
{ EAI_MEMORY, N_("Memory allocation failure") },
{ EAI_NODATA, N_("No address associated with hostname") },
{ EAI_NONAME, N_("Name or service not known") },
{ EAI_SERVICE, N_("Servname not supported for ai_socktype") },
{ EAI_SOCKTYPE, N_("ai_socktype not supported") },
{ EAI_SYSTEM, N_("System error") },
#ifdef __USE_GNU
{ EAI_INPROGRESS, N_("Processing request in progress") },
{ EAI_CANCELED, N_("Request canceled") },
{ EAI_NOTCANCELED, N_("Request not canceled") },
{ EAI_ALLDONE, N_("All requests done") },
{ EAI_INTR, N_("Interrupted by a signal") },
{ EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") }
#endif
};
const char *
gai_strerror (int code)
{
size_t i;
for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
if (values[i].code == code)
return _(values[i].msg);
return _("Unknown error");
}
#ifdef _LIBC
libc_hidden_def (gai_strerror)
#endif

237
lib/getaddrinfo.c Normal file
View File

@@ -0,0 +1,237 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "getaddrinfo.h"
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
/* Get calloc. */
#include <stdlib.h>
/* Get memcpy. */
#include <string.h>
#include <stdbool.h>
#include "gettext.h"
#define _(String) gettext (String)
#define N_(String) String
#include "strdup.h"
static inline bool
validate_family (int family)
{
/* FIXME: Support more families. */
#if HAVE_IPV4
if (family == PF_INET)
return true;
#endif
#if HAVE_IPV6
if (family == PF_INET6)
return true;
#endif
if (family == PF_UNSPEC)
return true;
return false;
}
/* Translate name of a service location and/or a service name to set of
socket addresses. */
int
getaddrinfo (const char *restrict nodename,
const char *restrict servname,
const struct addrinfo *restrict hints,
struct addrinfo **restrict res)
{
struct addrinfo *tmp;
struct servent *se = NULL;
struct hostent *he;
void *storage;
size_t size;
#if HAVE_IPV6
struct v6_pair {
struct addrinfo addrinfo;
struct sockaddr_in6 sockaddr_in6;
};
#endif
#if HAVE_IPV4
struct v4_pair {
struct addrinfo addrinfo;
struct sockaddr_in sockaddr_in;
};
#endif
if (hints && (hints->ai_flags & ~AI_CANONNAME))
/* FIXME: Support more flags. */
return EAI_BADFLAGS;
if (hints && !validate_family (hints->ai_family))
return EAI_FAMILY;
if (hints &&
hints->ai_socktype != SOCK_STREAM && hints->ai_socktype != SOCK_DGRAM)
/* FIXME: Support other socktype. */
return EAI_SOCKTYPE; /* FIXME: Better return code? */
if (!nodename)
/* FIXME: Support server bind mode. */
return EAI_NONAME;
if (servname)
{
const char *proto =
(hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp";
/* FIXME: Use getservbyname_r if available. */
se = getservbyname (servname, proto);
if (!se)
return EAI_SERVICE;
}
/* FIXME: Use gethostbyname_r if available. */
he = gethostbyname (nodename);
if (!he || he->h_addr_list[0] == NULL)
return EAI_NONAME;
switch (he->h_addrtype)
{
#if HAVE_IPV6
case PF_INET6:
size = sizeof (struct v6_pair);
break;
#endif
#if HAVE_IPV4
case PF_INET:
size = sizeof (struct v4_pair);
break;
#endif
default:
return EAI_NODATA;
}
storage = calloc (1, size);
if (!storage)
return EAI_MEMORY;
switch (he->h_addrtype)
{
#if HAVE_IPV6
case PF_INET6:
{
struct v6_pair *p = storage;
struct sockaddr_in6 *sinp = &p->sockaddr_in6;
tmp = &p->addrinfo;
if (se)
sinp->sin6_port = se->s_port;
if (he->h_length != sizeof (sinp->sin6_addr))
{
free (storage);
return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */
}
memcpy (&sinp->sin6_addr, he->h_addr_list[0], sizeof sinp->sin6_addr);
tmp->ai_addr = (struct sockaddr *) sinp;
tmp->ai_addrlen = sizeof *sinp;
}
break;
#endif
#if HAVE_IPV4
case PF_INET:
{
struct v4_pair *p = storage;
struct sockaddr_in *sinp = &p->sockaddr_in;
tmp = &p->addrinfo;
if (se)
sinp->sin_port = se->s_port;
if (he->h_length != sizeof (sinp->sin_addr))
{
free (storage);
return EAI_SYSTEM; /* FIXME: Better return code? Set errno? */
}
memcpy (&sinp->sin_addr, he->h_addr_list[0], sizeof sinp->sin_addr);
tmp->ai_addr = (struct sockaddr *) sinp;
tmp->ai_addrlen = sizeof *sinp;
}
break;
#endif
default:
free (storage);
return EAI_NODATA;
}
if (hints && hints->ai_flags & AI_CANONNAME)
{
const char *cn;
if (he->h_name)
cn = he->h_name;
else
cn = nodename;
tmp->ai_canonname = strdup (cn);
if (!tmp->ai_canonname)
{
free (storage);
return EAI_MEMORY;
}
}
tmp->ai_protocol = (hints) ? hints->ai_protocol : 0;
tmp->ai_socktype = (hints) ? hints->ai_socktype : 0;
tmp->ai_addr->sa_family = he->h_addrtype;
/* FIXME: If more than one address, create linked list of addrinfo's. */
*res = tmp;
return 0;
}
/* Free `addrinfo' structure AI including associated storage. */
void
freeaddrinfo (struct addrinfo *ai)
{
while (ai)
{
struct addrinfo *cur;
cur = ai;
ai = ai->ai_next;
if (cur->ai_canonname) free (cur->ai_canonname);
free (cur);
}
}

110
lib/getaddrinfo.h Normal file
View File

@@ -0,0 +1,110 @@
/* Get address information.
Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef GETADDRINFO_H
# define GETADDRINFO_H
/* sys/socket.h in i386-unknown-freebsd4.10 and
powerpc-apple-darwin5.5 require sys/types.h, so include it first.
Then we'll also get 'socklen_t' and 'struct sockaddr' which are
used below. */
# include <sys/types.h>
/* Get all getaddrinfo related declarations, if available. */
# include <sys/socket.h>
# include <netdb.h>
# ifndef HAVE_STRUCT_ADDRINFO
/* Structure to contain information about address of a service provider. */
struct addrinfo
{
int ai_flags; /* Input flags. */
int ai_family; /* Protocol family for socket. */
int ai_socktype; /* Socket type. */
int ai_protocol; /* Protocol for socket. */
socklen_t ai_addrlen; /* Length of socket address. */
struct sockaddr *ai_addr; /* Socket address for socket. */
char *ai_canonname; /* Canonical name for service location. */
struct addrinfo *ai_next; /* Pointer to next in list. */
};
# endif
/* Possible values for `ai_flags' field in `addrinfo' structure. */
# ifndef AI_PASSIVE
# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */
# define AI_CANONNAME 0x0002 /* Request for canonical name. */
# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */
# define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */
# define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
# define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
returned address type.. */
# endif
/* Error values for `getaddrinfo' function. */
# ifndef EAI_BADFLAGS
# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */
# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
# define EAI_AGAIN -3 /* Temporary failure in name resolution. */
# define EAI_FAIL -4 /* Non-recoverable failure in name res. */
# define EAI_NODATA -5 /* No address associated with NAME. */
# define EAI_FAMILY -6 /* `ai_family' not supported. */
# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
# define EAI_MEMORY -10 /* Memory allocation failure. */
# define EAI_SYSTEM -11 /* System error returned in `errno'. */
# define EAI_OVERFLOW -12 /* Argument buffer overflow. */
# endif
# ifdef __USE_GNU
# ifndef EAI_INPROGRESS
# define EAI_INPROGRESS -100 /* Processing request in progress. */
# define EAI_CANCELED -101 /* Request canceled. */
# define EAI_NOTCANCELED -102 /* Request not canceled. */
# define EAI_ALLDONE -103 /* All requests done. */
# define EAI_INTR -104 /* Interrupted by a signal. */
# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
# endif
# endif
# ifndef HAVE_DECL_GETADDRINFO
/* Translate name of a service location and/or a service name to set of
socket addresses.
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */
extern int getaddrinfo (const char *restrict nodename,
const char *restrict servname,
const struct addrinfo *restrict hints,
struct addrinfo **restrict res);
# endif
# ifndef HAVE_DECL_FREEADDRINFO
/* Free `addrinfo' structure AI including associated storage.
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */
extern void freeaddrinfo (struct addrinfo *ai);
# endif
# ifndef HAVE_DECL_GAI_STRERROR
/* Convert error return from getaddrinfo() to a string.
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/gai_strerror.html>. */
extern const char *gai_strerror (int ecode);
# endif
#endif /* GETADDRINFO_H */

View File

@@ -16,8 +16,8 @@
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"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if !_LIBC

View File

@@ -1,6 +1,6 @@
/* Get the working directory, compatibly with the GNU C Library.
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,5 +34,7 @@
# define __GETCWD_XCONCAT(x, y) __GETCWD_CONCAT (x, y)
# define __GETCWD_ID(y) __GETCWD_XCONCAT (__GETCWD_PREFIX, y)
# define getcwd __GETCWD_ID (getcwd)
/* See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getcwd.html>. */
char *getcwd (char *, size_t);
#endif

View File

@@ -16,10 +16,6 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdbool.h>
#include "timespec.h"

128
lib/getdelim.c Normal file
View File

@@ -0,0 +1,128 @@
/* getdelim.c --- Implementation of replacement getdelim function.
Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* Ported from glibc by Simon Josefsson. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "getdelim.h"
#include <limits.h>
#include <stdlib.h>
#include <errno.h>
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
#ifndef SSIZE_MAX
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
#if !HAVE_FLOCKFILE
# undef flockfile
# define flockfile(x) ((void) 0)
#endif
#if !HAVE_FUNLOCKFILE
# undef funlockfile
# define funlockfile(x) ((void) 0)
#endif
/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'ed as
necessary. Returns the number of characters read (not including
the null terminator), or -1 on error or EOF. */
ssize_t
getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
{
ssize_t result;
size_t cur_len = 0;
if (lineptr == NULL || n == NULL || fp == NULL)
{
errno = EINVAL;
return -1;
}
flockfile (fp);
if (*lineptr == NULL || *n == 0)
{
*n = 120;
*lineptr = (char *) malloc (*n);
if (*lineptr == NULL)
{
result = -1;
goto unlock_return;
}
}
for (;;)
{
int i;
i = getc (fp);
if (i == EOF)
{
result = -1;
break;
}
/* Make enough space for len+1 (for final NUL) bytes. */
if (cur_len + 1 >= *n)
{
size_t needed_max =
SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
size_t needed = 2 * *n + 1; /* Be generous. */
char *new_lineptr;
if (needed_max < needed)
needed = needed_max;
if (cur_len + 1 >= needed)
{
result = -1;
goto unlock_return;
}
new_lineptr = (char *) realloc (*lineptr, needed);
if (new_lineptr == NULL)
{
result = -1;
goto unlock_return;
}
*lineptr = new_lineptr;
*n = needed;
}
(*lineptr)[cur_len] = i;
cur_len++;
if (i == delimiter)
break;
}
(*lineptr)[cur_len] = '\0';
result = cur_len ? cur_len : result;
unlock_return:
funlockfile (fp);
return result;
}

28
lib/getdelim.h Normal file
View File

@@ -0,0 +1,28 @@
/* getdelim.h --- Prototype for replacement getdelim function.
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 Simon Josefsson. */
/* Get size_t, FILE, ssize_t. And getdelim, if available. */
# include <stddef.h>
# include <stdio.h>
# include <sys/types.h>
#if !HAVE_DECL_GETDELIM
ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream);
#endif /* !HAVE_GETDELIM */

View File

@@ -17,7 +17,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>

View File

@@ -1,44 +1,32 @@
/* getline.c -- Replacement for GNU C library function getline
/* getline.c --- Implementation of replacement getline function.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is 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.
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. */
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 Jan Brittenson, bson@gnu.ai.mit.edu. */
/* Written by Simon Josefsson. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "getdelim.h"
#include "getline.h"
#if ! (defined __GNU_LIBRARY__ && HAVE_GETDELIM)
# include "getndelim2.h"
ssize_t
getdelim (char **lineptr, size_t *linesize, int delimiter, FILE *stream)
getline (char **lineptr, size_t *n, FILE *stream)
{
return getndelim2 (lineptr, linesize, 0, GETNLINE_NO_LIMIT, delimiter, EOF,
stream);
}
#endif
ssize_t
getline (char **lineptr, size_t *linesize, FILE *stream)
{
return getdelim (lineptr, linesize, '\n', stream);
return getdelim (lineptr, n, '\n', stream);
}

View File

@@ -1,39 +1,28 @@
/* Replacement for GNU C library function getline
/* getline.h --- Prototype for replacement getline function.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 1999, 2000, 2001, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is 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.
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. */
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 GETLINE_H_
# define GETLINE_H_ 1
/* Written by Simon Josefsson. */
/* Get size_t, FILE, ssize_t. And getline, if available. */
# include <stddef.h>
# include <stdio.h>
/* Get ssize_t. */
# include <sys/types.h>
/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
# if __GLIBC__ < 2
extern ssize_t getline (char **_lineptr, size_t *_linesize, FILE *_stream);
extern ssize_t getdelim (char **_lineptr, size_t *_linesize, int _delimiter,
FILE *_stream);
# endif
#endif /* not GETLINE_H_ */
#if !HAVE_DECL_GETLINE
ssize_t getline (char **lineptr, size_t *n, FILE *stream);
#endif /* !HAVE_GETLINE */

View File

@@ -20,7 +20,7 @@
/* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -18,7 +18,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#ifdef _LIBC

View File

@@ -1,5 +1,5 @@
/* Declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004
Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1992-2001, 2003, 2004 Free Software Foundation, Inc.
/* Copyright (C) 1992-2001, 2003, 2004, 2005 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
@@ -15,47 +15,32 @@
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if !_LIBC
# include "getpass.h"
#endif
#include "getpass.h"
#if _LIBC
# define HAVE_STDIO_EXT_H 1
#endif
#include <stdio.h>
#if !defined _WIN32
#include <stdbool.h>
#include <stdio.h>
#if HAVE_STDIO_EXT_H
# include <stdio_ext.h>
#else
# define __fsetlocking(stream, type) /* empty */
#endif
#if !_LIBC
# include "getline.h"
#if !HAVE___FSETLOCKING
# define __fsetlocking(stream, type) /* empty */
#endif
#include <termios.h>
#include <unistd.h>
#if _LIBC
# include <wchar.h>
#if HAVE_TERMIOS_H
# include <termios.h>
#endif
#if _LIBC
# define NOTCANCEL_MODE "c"
#else
# define NOTCANCEL_MODE
#endif
#include "getline.h"
#if _LIBC
# define flockfile(s) _IO_flockfile (s)
# define funlockfile(s) _IO_funlockfile (s)
#elif USE_UNLOCKED_IO
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
#else
# if !HAVE_DECL_FFLUSH_UNLOCKED
@@ -80,18 +65,6 @@
# endif
#endif
#if _LIBC
# include <bits/libc-lock.h>
#else
# define __libc_cleanup_push(function, arg) /* empty */
# define __libc_cleanup_pop(execute) /* empty */
#endif
#if !_LIBC
# define __getline getline
# define __tcgetattr tcgetattr
#endif
/* It is desirable to use this bit on systems that have it.
The only bit of terminal state we want to twiddle is echoing, which is
done in software; there is no need to change the state of the terminal
@@ -114,7 +87,7 @@ getpass (const char *prompt)
FILE *tty;
FILE *in, *out;
struct termios s, t;
bool tty_changed;
bool tty_changed = false;
static char *buf;
static size_t bufsize;
ssize_t nread;
@@ -122,7 +95,7 @@ getpass (const char *prompt)
/* Try to write to and read from the terminal if we can.
If we can't open the terminal, use stderr and stdin. */
tty = fopen ("/dev/tty", "w+" NOTCANCEL_MODE);
tty = fopen ("/dev/tty", "w+");
if (tty == NULL)
{
in = stdin;
@@ -136,39 +109,26 @@ getpass (const char *prompt)
out = in = tty;
}
/* Make sure the stream we opened is closed even if the thread is
canceled. */
__libc_cleanup_push (call_fclose, tty);
flockfile (out);
/* Turn echoing off if it is on now. */
if (__tcgetattr (fileno (in), &t) == 0)
#if HAVE_TCGETATTR
if (tcgetattr (fileno (in), &t) == 0)
{
/* Save the old one. */
s = t;
/* Tricky, tricky. */
t.c_lflag &= ~(ECHO|ISIG);
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
t.c_lflag &= ~(ECHO | ISIG);
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &t) == 0);
}
else
tty_changed = false;
#endif
/* Write the prompt. */
#ifdef USE_IN_LIBIO
if (_IO_fwide (out, 0) > 0)
__fwprintf (out, L"%s", prompt);
else
#endif
fputs_unlocked (prompt, out);
fputs_unlocked (prompt, out);
fflush_unlocked (out);
/* Read the password. */
nread = __getline (&buf, &bufsize, in);
#if !_LIBC
/* As far as is known, glibc doesn't need this no-op fseek. */
nread = getline (&buf, &bufsize, in);
/* According to the C standard, input may not be followed by output
on the same stream without an intervening call to a file
@@ -180,7 +140,6 @@ getpass (const char *prompt)
from POSIX version to POSIX version, so play it safe and invoke
fseek even if in != out. */
fseek (out, 0, SEEK_CUR);
#endif
if (buf != NULL)
{
@@ -193,25 +152,75 @@ getpass (const char *prompt)
if (tty_changed)
{
/* Write the newline that was not echoed. */
#ifdef USE_IN_LIBIO
if (_IO_fwide (out, 0) > 0)
putwc_unlocked (L'\n', out);
else
#endif
putc_unlocked ('\n', out);
putc_unlocked ('\n', out);
}
}
}
/* Restore the original setting. */
#if HAVE_TCSETATTR
if (tty_changed)
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
tcsetattr (fileno (in), TCSAFLUSH | TCSASOFT, &s);
#endif
funlockfile (out);
__libc_cleanup_pop (0);
call_fclose (tty);
return buf;
}
#else /* WIN32 */
/* Windows implementation by Martin Lambers <marlam@marlam.de>,
improved by Simon Josefsson. */
/* For PASS_MAX. */
#include <limits.h>
#ifndef PASS_MAX
# define PASS_MAX 512
#endif
char *
getpass (const char *prompt)
{
char getpassbuf[PASS_MAX + 1];
size_t i = 0;
int c;
if (prompt)
{
fputs (prompt, stderr);
fflush (stderr);
}
for (;;)
{
c = _getch ();
if (c == '\r')
{
getpassbuf[i] = '\0';
break;
}
else if (i < PASS_MAX)
{
getpassbuf[i++] = c;
}
if (i >= PASS_MAX)
{
getpassbuf[i] = '\0';
break;
}
}
if (prompt)
{
fputs ("\r\n", stderr);
fflush (stderr);
}
return strdup (getpassbuf);
}
#endif

View File

@@ -20,7 +20,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Disable the definitions of these functions (from config.h)
so we can use the library versions here. */

View File

@@ -1,6 +1,6 @@
/* getugroups.c -- return a list of the groups a user is in
Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004 Free
Copyright (C) 1990, 1991, 1998, 1999, 2000, 2003, 2004, 2005 Free
Software Foundation.
This program is free software; you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/* group-member.c -- determine whether group id is in calling user's group list
Copyright (C) 1994, 1997, 1998, 2003 Free Software Foundation, Inc.
Copyright (C) 1994, 1997, 1998, 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
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -24,7 +24,7 @@
/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead
of malloc. If you change USE_OBSTACK, you have to recompile! */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -19,7 +19,7 @@
/* Written by Paul Eggert and Larry McVoy. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -22,10 +22,6 @@
#ifndef HUMAN_H_
# define HUMAN_H_ 1
# if HAVE_CONFIG_H
# include <config.h>
# endif
# include <limits.h>
# include <stdbool.h>

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -18,6 +18,9 @@
/* Written by Paul Eggert */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "inttostr.h"
/* Convert I to a printable string in BUF, which must be at least

View File

@@ -18,10 +18,6 @@
/* Written by Paul Eggert */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#endif
@@ -29,9 +25,7 @@
# include <stdint.h>
#endif
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include <sys/types.h>
#include "intprops.h"

View File

@@ -17,7 +17,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -19,7 +19,7 @@
/* Written by Jim Meyering. */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -19,7 +19,9 @@
/* written by Jim Meyering */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* The specification of these functions is in sys_stat.h. But we cannot
include this include file here, because on some systems, a

View File

@@ -17,7 +17,7 @@
/* written by Jim Meyering */
#if HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef malloc

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