Compare commits

...

329 Commits

Author SHA1 Message Date
Jim Meyering
be9f2f6ef6 *** empty log message *** 2001-02-18 16:56:57 +00:00
Jim Meyering
320475d619 *** empty log message *** 2001-02-18 16:27:16 +00:00
Jim Meyering
025068df27 *** empty log message *** 2001-02-18 16:25:57 +00:00
Jim Meyering
b7f166b3fd *** empty log message *** 2001-02-18 16:24:26 +00:00
Jim Meyering
57e7dc4cda `chmod 0 file; rm file' would no longer prompt before removal.
(remove_file): Revert last change.
2001-02-18 16:24:21 +00:00
Jim Meyering
325680aae4 *** empty log message *** 2001-02-18 08:50:35 +00:00
Jim Meyering
7446097d1a rename test input files to avoid conflicts on case-insensitive file systems 2001-02-18 08:50:29 +00:00
Jim Meyering
96bbda7216 Update file names to reflect renamings. 2001-02-18 08:49:52 +00:00
Jim Meyering
7f77515e02 *** empty log message *** 2001-02-18 08:49:07 +00:00
Jim Meyering
2714dd0ed2 . 2001-02-18 08:07:42 +00:00
Jim Meyering
7dfaaf5bf1 fix typo 2001-02-17 18:50:17 +00:00
Jim Meyering
4d30007986 *** empty log message *** 2001-02-17 16:56:27 +00:00
Jim Meyering
d07a45be2b Sync from GNU libc. Use double quotes, not <...>
around included file name.
2001-02-17 16:56:20 +00:00
Jim Meyering
438636be9b *** empty log message *** 2001-02-17 16:53:38 +00:00
Jim Meyering
ff7797f6e2 (__strnlen): Merge in a change from GNU libc. 2001-02-17 16:53:33 +00:00
Jim Meyering
d81e0e6f97 *** empty log message *** 2001-02-17 16:51:03 +00:00
Jim Meyering
787a2cf49f update comments from libc 2001-02-17 16:50:27 +00:00
Jim Meyering
9676083a22 *** empty log message *** 2001-02-17 14:23:54 +00:00
Jim Meyering
8d509a79da (main): `quote' the offending argument. 2001-02-17 14:23:43 +00:00
Jim Meyering
1de5de8401 *** empty log message *** 2001-02-17 13:20:31 +00:00
Jim Meyering
e7a4ab5efa (mbrtowc, mbsinit):
Remove workaround macros for hosts that have mbrtowc but not
mbstate_t, as we now insist on proper declarations for both
before using mbrtowc.
2001-02-17 13:18:56 +00:00
Jim Meyering
c2223ba418 . 2001-02-17 13:18:17 +00:00
Jim Meyering
5bc2860579 . 2001-02-17 13:17:49 +00:00
Jim Meyering
0c2cd33ac8 *** empty log message *** 2001-02-17 13:17:40 +00:00
Jim Meyering
198a0609cf *** empty log message *** 2001-02-17 13:11:22 +00:00
Jim Meyering
8270c52b6b *** empty log message *** 2001-02-17 13:11:12 +00:00
Jim Meyering
5d223fd617 *** empty log message *** 2001-02-17 12:53:40 +00:00
Jim Meyering
a256689440 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
UnixWare 7.1.1.
2001-02-17 12:53:36 +00:00
Jim Meyering
557c8b8ae8 *** empty log message *** 2001-02-17 12:44:04 +00:00
Jim Meyering
22bdd77f67 (mbswidth): Also define as macro, to avoid prototype clash. 2001-02-17 12:43:57 +00:00
Jim Meyering
fba069f78c . 2001-02-17 11:51:48 +00:00
Jim Meyering
2f4ff2ce9f *** empty log message *** 2001-02-17 10:39:50 +00:00
Jim Meyering
ad177f456c (mbrtowc, mbsinit):
Remove workaround macros for hosts that have mbrtowc but not
mbstate_t, as we now insist on proper declarations for both
before using mbrtowc.
2001-02-17 10:39:43 +00:00
Jim Meyering
1f7a13e62e (mbrtowc, mbsinit):
Remove workaround macros for hosts that have mbrtowc but not
mbstate_t, as we now insist on proper declarations for both
before using mbrtowc.
2001-02-17 10:39:17 +00:00
Jim Meyering
78d17132eb *** empty log message *** 2001-02-17 10:37:10 +00:00
Jim Meyering
2a1afebeb4 *** empty log message *** 2001-02-17 10:36:42 +00:00
Jim Meyering
8ec9cd1836 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc., rather than AC_CACHE_VAL. 2001-02-17 10:36:33 +00:00
Jim Meyering
11038c572e bump serial number 2001-02-17 09:35:50 +00:00
Jim Meyering
e3a56266dd bump serial number 2001-02-17 09:35:11 +00:00
Jim Meyering
78e5a1082a (jm_PREREQ_QUOTEARG): Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc). 2001-02-17 09:34:57 +00:00
Jim Meyering
3ede7fb763 (jm_PREREQ_MBSWIDTH):
Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
2001-02-17 09:34:14 +00:00
Jim Meyering
0048e2bb67 New file, defining jm_FUNC_MBRTOWC. 2001-02-17 09:33:25 +00:00
Jim Meyering
09221df9c6 *** empty log message *** 2001-02-17 08:59:19 +00:00
Jim Meyering
5044873647 . 2001-02-17 08:55:17 +00:00
Jim Meyering
4bcbd9c6aa Update from libc. 2001-02-17 07:14:31 +00:00
Jim Meyering
98c5eb08be *** empty log message *** 2001-02-17 07:13:03 +00:00
Jim Meyering
9db34852ce *** empty log message *** 2001-02-17 07:12:17 +00:00
Jim Meyering
cd5ba13ce2 *** empty log message *** 2001-02-17 07:05:58 +00:00
Jim Meyering
ecf425de69 Mention that only English is supported.
Show how to use "date" so that the output is acceptable to getdate.
Mention Z as an abbreviation for UTC.
2001-02-17 07:05:33 +00:00
Jim Meyering
e94c44b8f0 *** empty log message *** 2001-02-16 19:31:18 +00:00
Jim Meyering
9cdff96426 (malloc): Undef before defining, since stdlib.h may have defined it. 2001-02-16 19:28:43 +00:00
Jim Meyering
f77dc12f7f *** empty log message *** 2001-02-11 16:24:54 +00:00
Jim Meyering
37c3f113f5 depend on writable-files po-check once again 2001-02-11 16:24:39 +00:00
Jim Meyering
88287082b0 (emit-rsync-commands): Define.
(alpha): Use it here.
2001-02-11 16:24:01 +00:00
Jim Meyering
787421de85 (alpha): Fix previous, incomplete change. 2001-02-10 09:40:19 +00:00
Jim Meyering
47e01313ad *** empty log message *** 2001-02-10 09:40:09 +00:00
Jim Meyering
ba42a3c5b2 . 2001-02-10 09:22:11 +00:00
Jim Meyering
a103ea415c *** empty log message *** 2001-02-10 09:17:03 +00:00
Jim Meyering
4778b57c26 . 2001-02-08 10:43:44 +00:00
Jim Meyering
70c58eb46a update from libc 2001-02-08 06:49:29 +00:00
Jim Meyering
075c8604cb *** empty log message *** 2001-02-07 11:50:30 +00:00
Jim Meyering
55cebafa24 (jm_INCLUDED_REGEX): Add a test for the latest bug. 2001-02-07 11:50:25 +00:00
Jim Meyering
d5c34a9824 *** empty log message *** 2001-02-07 11:50:01 +00:00
Jim Meyering
b2cb2e804e *** empty log message *** 2001-02-07 11:47:40 +00:00
Jim Meyering
0019b6cebf Update from libc. 2001-02-07 11:47:24 +00:00
Jim Meyering
30323f5739 require 1 argument 2001-02-06 09:56:22 +00:00
Jim Meyering
1de223c226 better comment 2001-02-06 09:53:58 +00:00
Jim Meyering
eeae6e79dd emit a comment, print numbers one per line 2001-02-06 09:34:18 +00:00
Jim Meyering
47b335399c remove parens 2001-02-06 09:04:01 +00:00
Jim Meyering
871c0f6caa move decl of q into loop 2001-02-06 09:03:47 +00:00
Jim Meyering
20f3fe5f32 remove n0 2001-02-06 08:42:33 +00:00
Jim Meyering
0aee2ba653 *** empty log message *** 2001-02-05 22:29:57 +00:00
Jim Meyering
4723d1adde Require autoconf-2.14d (not yet released), because
it includes the patch required for `large file' support with at least
HP-UX's 10.20 /bin/cc.
2001-02-05 22:29:52 +00:00
Jim Meyering
987834edba *** empty log message *** 2001-02-05 10:39:40 +00:00
Jim Meyering
2c618b8359 . 2001-02-04 17:19:51 +00:00
Jim Meyering
45ee51d156 remove --help --version, etc 2001-02-04 16:50:07 +00:00
Jim Meyering
934fbc196c *** empty log message *** 2001-02-04 16:28:49 +00:00
Jim Meyering
e7b9e3e7c1 (usage): Tweak --help output: it prints the _prime_
factors, not just any factors.
2001-02-04 16:28:41 +00:00
Jim Meyering
ff10610d6c (is_prime): Remove function. 2001-02-04 15:52:17 +00:00
Jim Meyering
23d47fb4aa *** empty log message *** 2001-02-04 14:04:42 +00:00
Jim Meyering
6bb0a39d24 *** empty log message *** 2001-02-04 12:42:38 +00:00
Jim Meyering
8b8419e185 *** empty log message *** 2001-02-04 12:29:18 +00:00
Jim Meyering
e2625cbbcd fix typo: s/found/yes/ 2001-02-04 08:28:29 +00:00
Jim Meyering
e7ec75cca0 . 2001-02-03 20:23:26 +00:00
Jim Meyering
a1321f00a8 . 2001-02-03 20:23:05 +00:00
Jim Meyering
d622232fb2 (main): Change type of index variable to `unsigned int' to avoid a warning. 2001-02-03 20:22:58 +00:00
Jim Meyering
6aca235a6f *** empty log message *** 2001-02-03 17:29:53 +00:00
Jim Meyering
d22bee04aa *** empty log message *** 2001-02-03 16:51:23 +00:00
Jim Meyering
c036ffc1cc (long_opts): Use `strip-trailing-slashes',
per the documetation, not `strip-trailing-slash'.
2001-02-03 16:50:34 +00:00
Jim Meyering
99d7f7d422 (long_options): Use `strip-trailing-slashes',
per the documetation, not `strip-trailing-slash'.
2001-02-03 16:50:04 +00:00
Jim Meyering
5cb10ea445 (a_host): Use fencepost.
(real_dir): Use the same name for both.
(alpha): Print commands for both hosts.
2001-02-03 16:47:55 +00:00
Jim Meyering
7a493e5c54 *** empty log message *** 2001-02-03 16:45:30 +00:00
Jim Meyering
da56b3ffb6 (jm_FILE_SYSTEM_USAGE): Restore prior use of
AS_IF, now that it works once again (mysteriously).
2001-02-03 16:45:25 +00:00
Jim Meyering
8525d006fc (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
AS_IF, now that it works once again (mysteriously).
2001-02-03 16:44:52 +00:00
Jim Meyering
3f6077b5bb *** empty log message *** 2001-02-03 13:37:55 +00:00
Jim Meyering
52377e246d Improve the performance of `factor' (more than 2x speed-up for large N).
(wheel_tab): New global table.
(WHEEL_START, WHEEL_END): Define.
(factor): Remove the loop that special-cased `2'.
Instead of incrementing by `2', use the offsets from the wheel table.
From Michael Steffens.
2001-02-03 13:37:37 +00:00
Jim Meyering
c83137adb3 *** empty log message *** 2001-02-03 10:31:39 +00:00
Jim Meyering
ed71d8021e *** empty log message *** 2001-02-03 10:29:01 +00:00
Jim Meyering
3ff0f8076b . 2001-01-31 19:15:41 +00:00
Jim Meyering
3dd1381c64 *** empty log message *** 2001-01-30 21:50:36 +00:00
Jim Meyering
1f8a8b45ff Update for FreeBSD 4.2. 2001-01-30 21:50:32 +00:00
Jim Meyering
78e3f940b7 *** empty log message *** 2001-01-30 13:05:48 +00:00
Jim Meyering
d06b301fd0 *** empty log message *** 2001-01-30 13:04:17 +00:00
Jim Meyering
a772996d99 *** empty log message *** 2001-01-30 08:24:21 +00:00
Jim Meyering
2a4617da4c s/conftestdata/conftest.data/ 2001-01-30 08:24:13 +00:00
Jim Meyering
629c01e2c2 s/conftestdir/conftest.d1/ and s/conftestdir2/conftest.d2/. 2001-01-30 08:21:02 +00:00
Jim Meyering
5326a0b265 Rename conftestchown to conftest.chown. 2001-01-30 08:19:25 +00:00
Jim Meyering
f318f5c4d8 *** empty log message *** 2001-01-28 22:25:48 +00:00
Jim Meyering
30bbbfe67a *** empty log message *** 2001-01-28 22:25:04 +00:00
Jim Meyering
f06dd61f03 *** empty log message *** 2001-01-28 22:24:14 +00:00
Jim Meyering
67998a215f (main): Remove decl of unused local, `len'. 2001-01-28 21:58:19 +00:00
Jim Meyering
94767ce8cf add a comment, reformat a little. 2001-01-28 21:45:36 +00:00
Jim Meyering
577a8f346e (gobble_file): Add a FIXME comment. 2001-01-28 21:43:21 +00:00
Jim Meyering
daf6c50b95 *** empty log message *** 2001-01-28 21:43:15 +00:00
Jim Meyering
b221cf780f *** empty log message *** 2001-01-28 21:35:10 +00:00
Jim Meyering
2bc68d2234 [FULL_TIME]: Define.
(long_options): Use it.
(decode_switches): Make --full-time imply -l.
2001-01-28 21:34:35 +00:00
Jim Meyering
d6f931281e . 2001-01-28 08:10:00 +00:00
Jim Meyering
ae9d89cfe2 (jm_FILE_SYSTEM_USAGE): Open-code what was a use of AS_IF. 2001-01-27 14:06:18 +00:00
Jim Meyering
263fb2dc15 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was a use of AS_IF. 2001-01-27 14:06:04 +00:00
Jim Meyering
e5e92e670c *** empty log message *** 2001-01-27 13:24:36 +00:00
Jim Meyering
d85aac6782 (jm_FILE_SYSTEM_USAGE): Add `[]' between use of
AS_IF and following `dnl'.
2001-01-27 13:24:32 +00:00
Jim Meyering
d54655c623 (jm_LIST_MOUNTED_FILESYSTEMS): Add `[]' between use of
AS_IF and following `dnl'.
2001-01-27 13:24:13 +00:00
Jim Meyering
18656b733d *** empty log message *** 2001-01-26 11:17:34 +00:00
Jim Meyering
ac4936b7b1 bump serial # 2001-01-26 11:17:29 +00:00
Jim Meyering
742625303d (jm_PREREQ_QUOTEARG): Check for stddef.h, now that quotearg.c includes it. 2001-01-26 11:17:19 +00:00
Jim Meyering
9e2606d77b *** empty log message *** 2001-01-26 11:15:53 +00:00
Jim Meyering
c8d0d0ca6f Include stddef.h. 2001-01-26 11:15:37 +00:00
Jim Meyering
0e3fea79f3 *** empty log message *** 2001-01-26 11:13:34 +00:00
Jim Meyering
dcfda51801 [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
line in double quotes so that it evokes a better diagnostic.
[HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
2001-01-26 11:13:28 +00:00
Jim Meyering
fad08d3f31 *** empty log message *** 2001-01-26 11:13:08 +00:00
Jim Meyering
d362235eed (main): Declare local result as non-const, now that it's freed. 2001-01-26 09:24:46 +00:00
Jim Meyering
6ff755a69a . 2001-01-26 09:22:43 +00:00
Jim Meyering
c4bb1d449e *** empty log message *** 2001-01-22 10:54:32 +00:00
Jim Meyering
e673a685ac (remove_file): Correct an expression to avoid making
an unnecessary call to euidaccess for each file.
2001-01-22 10:51:54 +00:00
Jim Meyering
37e38b4941 *** empty log message *** 2001-01-21 22:54:53 +00:00
Jim Meyering
9eabf6d99a *** empty log message *** 2001-01-21 12:27:39 +00:00
Jim Meyering
8efb6d5f7b *** empty log message *** 2001-01-21 12:26:34 +00:00
Jim Meyering
928b1b8300 *** empty log message *** 2001-01-21 10:15:59 +00:00
Jim Meyering
211a6642e2 (jm_ICONV): Also check whether the iconv declaration has const. 2001-01-21 10:15:53 +00:00
Jim Meyering
fd1d1eaa80 *** empty log message *** 2001-01-21 09:40:48 +00:00
Jim Meyering
ad41cbff8a (print_unicode_char): Cast the second iconv() arg,
to avoid a warning.  Add back 'const' to inptr.
2001-01-21 09:40:43 +00:00
Jim Meyering
71611d94f3 . 2001-01-20 19:41:15 +00:00
Jim Meyering
9beeae646e *** empty log message *** 2001-01-20 19:41:01 +00:00
Jim Meyering
67450be04d *** empty log message *** 2001-01-20 19:24:36 +00:00
Jim Meyering
84264973d6 *** empty log message *** 2001-01-20 19:20:53 +00:00
Jim Meyering
5239228c17 *** empty log message *** 2001-01-20 19:18:43 +00:00
Jim Meyering
29940657ab *** empty log message *** 2001-01-20 18:34:44 +00:00
Jim Meyering
a5ab9f78c3 Be sure that headers are checked before used in code compiled
for the type checks.

(jm_MACROS): Remove all header checks.
In place of that, invoke jm_CHECK_ALL_TYPES.
(jm_CHECK_ALL_HEADERS): New functions with the above checks.
(jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
2001-01-20 18:34:32 +00:00
Jim Meyering
01bbd27a4d revert last change 2001-01-20 11:17:33 +00:00
Jim Meyering
df06c5de7b *** empty log message *** 2001-01-20 09:49:24 +00:00
Jim Meyering
706235da55 (jm_PREREQ): Add jm_PREREQ_HASH.
(jm_PREREQ_HASH): New function.
2001-01-20 09:49:10 +00:00
Jim Meyering
403b4c49eb whoops. revert last change 2001-01-20 09:36:19 +00:00
Jim Meyering
c6014bc847 *** empty log message *** 2001-01-20 09:34:34 +00:00
Jim Meyering
c148112941 Fix typo: s/false/0/. 2001-01-20 09:34:20 +00:00
Jim Meyering
19b3a9d102 *** empty log message *** 2001-01-17 10:34:22 +00:00
Jim Meyering
7f9c804f7a (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE, for autoconf-2.49c. 2001-01-17 10:34:16 +00:00
Jim Meyering
4bdc202a00 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise. 2001-01-17 10:33:43 +00:00
Jim Meyering
a80ec26277 . 2001-01-17 10:30:32 +00:00
Jim Meyering
fcdbd9ff15 (main): Likewise. 2001-01-17 10:30:25 +00:00
Jim Meyering
108694f32a (PACKAGE): Likewise. 2001-01-17 10:29:56 +00:00
Jim Meyering
59b34eded2 (main): Likewise. 2001-01-17 10:28:46 +00:00
Jim Meyering
622dcc58ee (case_GETOPT_VERSION_CHAR): Use PACKAGE, not GNU_PACKAGE. 2001-01-17 10:28:03 +00:00
Jim Meyering
770b6c1bb5 *** empty log message *** 2001-01-17 09:48:02 +00:00
Jim Meyering
56c1cbf2e8 (main): Use PACKAGE, not GNU_PACKAGE. 2001-01-17 09:47:41 +00:00
Jim Meyering
bd485671ff (usage): Convert each TAB in --help output to a sequence of 8 spaces. 2001-01-17 09:47:32 +00:00
Jim Meyering
43be299a76 (main): Use PACKAGE, not GNU_PACKAGE. 2001-01-17 09:42:36 +00:00
Jim Meyering
1493e0d650 *** empty log message *** 2001-01-16 08:34:53 +00:00
Jim Meyering
592e22d509 Include <stdio.h>, needed by assert on SunOS4. 2001-01-16 08:34:45 +00:00
Jim Meyering
c8e070ed62 *** empty log message *** 2001-01-15 11:32:45 +00:00
Jim Meyering
ceb3908c6f . 2001-01-14 20:28:14 +00:00
Jim Meyering
4468f22968 *** empty log message *** 2001-01-14 20:28:03 +00:00
Jim Meyering
eb3dc6a095 Remove conftestdir{,2} before trying to create the directory.
Make the entire configure script fail if the mkdir fails.
2001-01-14 20:27:56 +00:00
Jim Meyering
4a65486da9 (UINT_MAX_32_BITS): Define.
Use UINT_MAX_32_BITS in the cpp conditions that determine
the `word32' typedef.  Using a literal `0xffffffff' failed with
HPUX10.20's /bin/cc.
2001-01-14 20:26:28 +00:00
Jim Meyering
07872e486f *** empty log message *** 2001-01-14 16:42:50 +00:00
Jim Meyering
5aba961278 use id's -ng options, not -nG 2001-01-14 16:27:08 +00:00
Jim Meyering
9be1481d17 *** empty log message *** 2001-01-14 15:37:48 +00:00
Jim Meyering
eda1fa3268 *** empty log message *** 2001-01-14 15:37:22 +00:00
Jim Meyering
633a2ace39 *** empty log message *** 2001-01-14 15:36:53 +00:00
Jim Meyering
c2329c797c . 2001-01-14 15:35:19 +00:00
Jim Meyering
4d8de6887f *** empty log message *** 2001-01-14 15:35:07 +00:00
Jim Meyering
5b2304d7b4 Include stdlib.h, string.h or strings.h, and xalloc.h.
Use strip_trailing_slashes rather than open-coding it.
2001-01-14 15:34:22 +00:00
Jim Meyering
b6863fa3c9 *** empty log message *** 2001-01-14 15:28:54 +00:00
Jim Meyering
c0ba4297c5 Use temporary directories named conftestdir{,2}, not
foo and bar.  Create conftestdir/ in the script, not in the C code.
Remove directories in the script, not in the C code.
2001-01-14 15:28:45 +00:00
Jim Meyering
acc13fdc89 from Volker Borchert 2001-01-14 11:08:35 +00:00
Jim Meyering
ee56fd2719 (jm_MACROS): Require vb_FUNC_RENAME. 2001-01-14 11:07:45 +00:00
Jim Meyering
16863fa14e check for SunOS4.1.1U bug in rename 2001-01-14 11:07:28 +00:00
Jim Meyering
c957bbdeae (TESTS): Add trailing-slash. 2001-01-14 11:06:20 +00:00
Jim Meyering
c6a4fe00db from Volker Borchert 2001-01-14 11:05:50 +00:00
Jim Meyering
30fc8c55a3 [RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper. 2001-01-14 11:04:47 +00:00
Jim Meyering
98c8115e96 *** empty log message *** 2001-01-14 09:42:01 +00:00
Jim Meyering
d6b863b09c (update-po): Merge po-files in temporary files
in the build directory, and update the source directory only when
the merged catalog differs from the original.  This fixes the known
`make distcheck' failure due to `make update-po' being called
on up-to-date but read-only files.
2001-01-14 09:41:53 +00:00
Jim Meyering
c730e2d9e8 *** empty log message *** 2001-01-13 15:59:19 +00:00
Jim Meyering
81268e4b67 . 2001-01-13 15:57:48 +00:00
Jim Meyering
896a20a2a9 *** empty log message *** 2001-01-13 15:56:33 +00:00
Jim Meyering
455ce0178b (TESTS): Add into-self-4. 2001-01-13 15:56:29 +00:00
Jim Meyering
e268536dba *** empty log message *** 2001-01-13 15:55:35 +00:00
Jim Meyering
e2aae9e166 add comment to go along with last change 2001-01-13 15:50:01 +00:00
Jim Meyering
8e4dbf5ab0 *** empty log message *** 2001-01-13 15:49:01 +00:00
Jim Meyering
b7138e1052 (same_file_ok): When moving a symlink onto itself,
don't remove the symlink.  Reported by David Luyer as Debian bug#82089,
via Michael Stone.
2001-01-13 15:48:32 +00:00
Jim Meyering
5775f7e864 *** empty log message *** 2001-01-12 23:27:53 +00:00
Jim Meyering
6deb757ba4 * tests/chmod/setgid: If `chmod g+s d' fails, then try to chgrp
to a group of which we're a member, then try the chmod again.
2001-01-12 23:27:43 +00:00
Jim Meyering
a0d25e62aa *** empty log message *** 2001-01-11 16:58:40 +00:00
Jim Meyering
dc38e3a287 *** empty log message *** 2001-01-11 16:04:46 +00:00
Jim Meyering
7b99d77bc6 *** empty log message *** 2001-01-10 23:30:56 +00:00
Jim Meyering
1a79f34996 . 2001-01-10 23:08:51 +00:00
Jim Meyering
ad3ec0add1 *** empty log message *** 2001-01-10 13:44:13 +00:00
Jim Meyering
a3ffafd3fe . 2001-01-10 12:20:03 +00:00
Jim Meyering
2d33b67399 (TESTS): Add into-self. 2001-01-10 12:19:05 +00:00
Jim Meyering
e7e6c322a0 (copy_internal): Add a comment.
Set *copy_into_self in the new code that detects that.
Make diagnostic more consistent: s/won't/will not/.
[move_mode, copy_into_self]: Give a diagnstic here, now that
we have the top_level_* globals.  Remove the corresponding diagnostic
from mv.c.
Add a FIXME comment.
2001-01-10 12:18:19 +00:00
Jim Meyering
9ea9eed873 (do_move): Remove diagnostic, now that copy.c issues it.
Set `fail' to nonzero in the primary `if (copy_into_self)' block
rather than in its own tiny one below.
2001-01-10 12:16:52 +00:00
Jim Meyering
d882d1d100 *** empty log message *** 2001-01-10 11:56:59 +00:00
Jim Meyering
b6e29912be [struct entry] (node): Describe how it's used,
now that we've overloaded it a little, in order to detect and diagnose
the copying-directory-into-self problem.
(new_file): Remove global.
(htab): Declare global to be static.
(remember_created): Insert file name instead of dummy pointer, so
that copy.c can use the just-created directory name to detect
the copying-directory-into-self problem.
2001-01-10 11:54:53 +00:00
Jim Meyering
687ef9f9fe *** empty log message *** 2001-01-10 10:29:57 +00:00
Jim Meyering
4e1f4a8496 *** empty log message *** 2001-01-10 10:27:09 +00:00
Jim Meyering
c1485dd854 *** empty log message *** 2001-01-10 09:58:43 +00:00
Jim Meyering
35099b35ba *** empty log message *** 2001-01-10 09:56:04 +00:00
Jim Meyering
2a5fb11132 (copy_internal): Don't allow cp (or mv, when working
across a partition boundary) to overwrite a non-directory with a directory.
2001-01-10 09:43:36 +00:00
Jim Meyering
a49513bedd *** empty log message *** 2001-01-10 09:42:16 +00:00
Jim Meyering
fc6a8dcfb2 *** empty log message *** 2001-01-10 09:41:46 +00:00
Jim Meyering
cbb4300cc2 (TESTS): Add dir-vs-file. 2001-01-10 09:41:41 +00:00
Jim Meyering
deb79403bd *** empty log message *** 2001-01-10 09:41:15 +00:00
Jim Meyering
9f43a52210 *** empty log message *** 2001-01-10 09:40:47 +00:00
Jim Meyering
6bf0f043cd *** empty log message *** 2001-01-10 09:40:05 +00:00
Jim Meyering
3f1cd6f52a *** empty log message *** 2001-01-10 09:39:57 +00:00
Jim Meyering
d1da062806 *** empty log message *** 2001-01-09 23:13:08 +00:00
Jim Meyering
bce88bc1ae *** empty log message *** 2001-01-09 16:13:29 +00:00
Jim Meyering
8740ecf8c0 add comment 2001-01-09 16:12:59 +00:00
Jim Meyering
e92e87181b (top_level_src_path, top_level_dst_path): New globals.
(copy_internal): Use them.
(copy): Set them.
2001-01-09 16:07:40 +00:00
Jim Meyering
902dacb46a *** empty log message *** 2001-01-09 15:50:13 +00:00
Jim Meyering
134bbf752c whoops. move printf args, too 2001-01-08 08:34:52 +00:00
Jim Meyering
b27dd775ad (usage): Split long message string. 2001-01-07 16:15:37 +00:00
Jim Meyering
e230d9a62b *** empty log message *** 2001-01-07 16:13:34 +00:00
Jim Meyering
7709a02741 Split a string that was longer than 2048 bytes. 2001-01-07 16:13:27 +00:00
Jim Meyering
aaf9e9a820 (usage): Split a string that was longer than 2048 bytes. 2001-01-07 16:11:14 +00:00
Jim Meyering
674fed73ec (usage): Split a string that was longer than 2048 bytes. 2001-01-07 16:10:50 +00:00
Jim Meyering
98d1d862d5 back out last, prematurely-committed, change 2001-01-07 16:07:33 +00:00
Jim Meyering
aaef348f3d Correct the indentation of an `#endif'. 2001-01-07 16:06:27 +00:00
Jim Meyering
9bc96fd932 clean up after commit hook testing 2001-01-07 10:57:29 +00:00
Jim Meyering
7b0658b00f testing -- commit should fail 2001-01-07 10:54:06 +00:00
Jim Meyering
f4034df457 testing -- commit should fail 2001-01-07 10:52:43 +00:00
Jim Meyering
5856751f41 testing -- commit should fail 2001-01-07 10:51:00 +00:00
Jim Meyering
4df9c47ca7 (usage): Untabify. 2001-01-07 10:12:25 +00:00
Jim Meyering
354a71cdc2 *** empty log message *** 2001-01-07 10:12:16 +00:00
Jim Meyering
481c79dfac *** empty log message *** 2001-01-07 09:23:28 +00:00
Jim Meyering
5e32f7c19a s/can not/cannot/ 2001-01-07 09:23:18 +00:00
Jim Meyering
c5b4a727ab *** empty log message *** 2001-01-07 09:21:41 +00:00
Jim Meyering
8c07ff563b (parse_group): Normalize spelling. 2001-01-07 09:21:34 +00:00
Jim Meyering
fa997616ff normalize spelling in comment 2001-01-07 09:20:47 +00:00
Jim Meyering
0edd80c0f2 *** empty log message *** 2001-01-04 17:59:32 +00:00
Jim Meyering
cc49da4ddf (main): Fail when --rfc-822 (-R) is specified along
with a format string.  Reported by Jochen Hein.
2001-01-04 17:59:22 +00:00
Jim Meyering
b7b4bec8df . 2001-01-04 14:00:07 +00:00
Jim Meyering
7aed2f97a5 . 2001-01-04 10:19:49 +00:00
Jim Meyering
89c7458b53 Sync with glibc time/strftime.c 1.81. 2001-01-04 10:19:43 +00:00
Jim Meyering
0809f17d77 . 2001-01-03 21:04:52 +00:00
Jim Meyering
550edf90b2 Use the more precise algorithm of GNU "make" to decide whether
a file is in the future, by looking at high-resolution time
stamps if available.

(TIMESPEC_NS): New macro.
(current_time): Initialize to the minimum value.
(current_time_ns): New var.
(main): Do not bother to initialize current_time;
it's no longer needed.
(get_current_time): New function.
(print_long_format): Use it when a file appears to be in the future.
Get the nanoseconds of the file's time stamp, if available,
and use that to decide whether the file appears	to be in the future.
2001-01-03 21:02:08 +00:00
Jim Meyering
f3aa989205 check for existing behavior 2001-01-03 16:16:56 +00:00
Jim Meyering
f8a894c567 *** empty log message *** 2001-01-03 11:37:46 +00:00
Jim Meyering
a0439c2405 (main): Remove embedded \n from diagnostic. 2001-01-03 11:36:10 +00:00
Jim Meyering
edfabc70d3 *** empty log message *** 2001-01-03 10:16:14 +00:00
Jim Meyering
9e14c22918 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
so `make install' also works in VPATH builds.
2001-01-03 10:16:02 +00:00
Jim Meyering
f3334434ea *** empty log message *** 2001-01-03 10:09:08 +00:00
Jim Meyering
5686f159ab (print_unicode_char): Remove `const' from declaration of
local `inptr' to avoid warning with some system declarations of iconv.
2001-01-03 10:08:43 +00:00
Jim Meyering
b7f12e5291 *** empty log message *** 2001-01-03 10:06:53 +00:00
Jim Meyering
954daed8c2 . 2001-01-03 09:47:20 +00:00
Jim Meyering
b042ca3c0f (long_time_expected_width, print_long_format): Fix
bug: the initial byte passed to strftime wasn't initialized to
a nonzero value after the buffer was reallocated.
2001-01-03 09:47:09 +00:00
Jim Meyering
5d3b5e175a *** empty log message *** 2001-01-03 09:45:43 +00:00
Jim Meyering
1f13191b6f (install-data-yes): If the package is
fileutils, install LC_TIME as an alias for LC_MESSAGES.
2001-01-03 09:45:32 +00:00
Jim Meyering
5aa665a624 (dcgettext): New macro. 2001-01-03 09:44:56 +00:00
Jim Meyering
85a5e683e8 (decode_switches): Use dcgettext with LC_TIME,
not plain gettext, to get the translations of time formats.
2001-01-03 09:44:15 +00:00
Jim Meyering
e646037f4a . 2001-01-03 09:38:55 +00:00
Jim Meyering
536a6dd3ce (long_time_expected_width): New function.
(print_long_format): Use it, so that we don't assume a
particular width for time stamps in an internationalized
environment.
2001-01-03 09:15:22 +00:00
Jim Meyering
701cc3fe2c *** empty log message *** 2001-01-02 15:50:18 +00:00
Jim Meyering
22fc5f7ac9 (ulonglong_t): Define place-holder type to avoid some #if directives.
(LONGEST_INTEGRAL_TYPE): Remove definition.
(MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of LONGEST_INTEGRAL_TYPE.
(print_long_long): Compile this function even on systems without
long long support.
(decode_one_format): Remove #if directive.
2001-01-02 15:48:21 +00:00
Jim Meyering
4dcf0e2c7b . 2001-01-02 15:31:41 +00:00
Jim Meyering
67aea68e97 *** empty log message *** 2001-01-02 10:55:34 +00:00
Jim Meyering
2320b98d89 (decode_one_format): Guard use of print_long_long with
`#if HAVE_UNSIGNED_LONG_LONG'.  From Darren Salt.
Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
2001-01-02 10:54:55 +00:00
Jim Meyering
4f90505509 *** empty log message *** 2001-01-02 10:44:38 +00:00
Jim Meyering
4fcf9133ef *** empty log message *** 2001-01-02 07:21:36 +00:00
Jim Meyering
1f29ee0e02 *** empty log message *** 2001-01-02 07:20:13 +00:00
Jim Meyering
5285933ed8 copyright 2001-01-02 07:19:59 +00:00
Jim Meyering
1efbe325bd (print_long_format):
Report the year for files even slightly in the future.
Avoid overflow problems near Y2038 on 32-bit hosts.
To calculate "six months", take half the average Gregorian
year, not 180 days.
2001-01-02 07:18:56 +00:00
Jim Meyering
1f678f44f9 *** empty log message *** 2001-01-02 07:14:47 +00:00
Jim Meyering
895cf6e91f . 2001-01-01 18:17:10 +00:00
Jim Meyering
682bc57d89 (jm_PREREQ_READUTMP): Include utmp.h (if available), even
on systems with utmpx.h.  It's necessary for the declaration of utmp's
ut_user member.  Reported by Andreas Jaeger.
2001-01-01 18:16:52 +00:00
Jim Meyering
74ac72a78f . 2001-01-01 18:09:31 +00:00
Jim Meyering
f324aa68f9 (jm_CHECK_DECLS): Include grp.h and pwd.h if available.
They are required for the declarations of getgrgid and getpwuid resp.
(_jm_DECL_HEADERS): Check for grp.h and pwd.h.
2001-01-01 18:08:48 +00:00
Jim Meyering
88db6b6944 . 2001-01-01 10:59:50 +00:00
Jim Meyering
387d125c2d *** empty log message *** 2001-01-01 10:52:32 +00:00
Jim Meyering
fd77d94155 *** empty log message *** 2001-01-01 10:51:32 +00:00
Jim Meyering
137c6d5137 (TESTS): Add setgid. 2001-01-01 10:51:22 +00:00
Jim Meyering
671567d496 *** empty log message *** 2001-01-01 10:49:52 +00:00
Jim Meyering
aa3ef39ac8 *** empty log message *** 2000-12-31 13:24:28 +00:00
Jim Meyering
b360fa26e5 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
can be used in subdirectories.
2000-12-31 12:15:42 +00:00
Jim Meyering
168401bef2 *** empty log message *** 2000-12-31 12:12:41 +00:00
Jim Meyering
9ecf7a54be . 2000-12-31 09:51:50 +00:00
Jim Meyering
b46b6af7e3 . 2000-12-31 09:49:33 +00:00
Jim Meyering
318e97ef64 File renamed from tests/sticky-check.
All uses of "sticky" changed to "setgid".
2000-12-31 09:49:23 +00:00
Jim Meyering
9b525d2fe1 sticky-check -> setgid-check 2000-12-31 09:48:35 +00:00
Jim Meyering
7a5e723600 sticky-check -> setgid-check 2000-12-31 09:48:10 +00:00
Jim Meyering
9a2e78d703 sticky-check -> setgid-check 2000-12-31 09:46:15 +00:00
Jim Meyering
b28d611552 *** empty log message *** 2000-12-31 09:21:28 +00:00
Jim Meyering
f39ef82a14 . 2000-12-31 09:19:25 +00:00
Jim Meyering
c76348c318 (TESTS): Add deref-slink. 2000-12-31 09:17:00 +00:00
Jim Meyering
dd9804a4fe New file. Test for the bug fixed by my 2000-12-28 change to copy.c. 2000-12-31 09:15:44 +00:00
Jim Meyering
f0018a3b9c Improve performance by invoking gettext twice at the start,
instead of once for each file.
(long_time_format): New var.
(decode_switches): Initialize it, if format == long_format.
(print_long_format): Use it.
2000-12-31 09:06:54 +00:00
Jim Meyering
9adb2c7cf1 *** empty log message *** 2000-12-31 08:55:58 +00:00
Jim Meyering
857c948551 (print_long_format): Don't dump core if strftime returns the empty string. 2000-12-31 08:55:41 +00:00
Jim Meyering
33cf956fc8 *** empty log message *** 2000-12-31 08:33:59 +00:00
Jim Meyering
66816a3514 (gobble_file): If not using long format, don't invoke acl; it's not needed. 2000-12-31 08:33:49 +00:00
Jim Meyering
6417617d33 *** empty log message *** 2000-12-31 08:30:28 +00:00
Jim Meyering
769b95b751 Avoid an unnecessary `stat' when using --dereference.
(same_file_ok): Use stat only if lstat reported that
the file was a symbolic link.
2000-12-31 08:29:17 +00:00
Jim Meyering
de0ebc7eb6 *** empty log message *** 2000-12-30 16:51:42 +00:00
Jim Meyering
d8271b06b4 append-only directories -> restricted deletion flag,
which is the term that POSIX d5 uses for this notion.
2000-12-30 16:51:24 +00:00
Jim Meyering
206205c6ee *** empty log message *** 2000-12-29 10:32:33 +00:00
Jim Meyering
3336d7cf69 Do not assume that mode_t uses the
traditional octal encoding.  E.g. "chmod 1 FOO" should set
the other-execute bit of FOO even if S_IXOTH != 1.

(SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
WOTH, XOTH, ALLM): New macros.
(S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
Use them.
(S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
(S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
(mode_compile):
No need to use uintmax_t; unsigned long is long enough.
Don't bother to get suffix since we don't use it.
2000-12-29 10:32:09 +00:00
Jim Meyering
c319b5bf3b *** empty log message *** 2000-12-29 08:58:38 +00:00
Jim Meyering
de577f3440 Try /usr/xpg4/bin/id (Solaris 7) if plain 'id' doesn't work. 2000-12-29 08:58:25 +00:00
Jim Meyering
9f0489df43 . 2000-12-28 14:43:13 +00:00
Jim Meyering
46e7805428 Run sticky-check from just-created directory. 2000-12-28 14:40:15 +00:00
Jim Meyering
d4b4519d8d *** empty log message *** 2000-12-28 13:35:28 +00:00
Jim Meyering
b8d4bfe024 . 2000-12-28 13:17:02 +00:00
Jim Meyering
7046dfbc47 tweak comment 2000-12-28 11:52:28 +00:00
Jim Meyering
f119221740 tweak comment 2000-12-28 11:31:44 +00:00
Jim Meyering
fe38ed9d90 *** empty log message *** 2000-12-28 11:23:55 +00:00
Jim Meyering
bc9ff8c14d (same_file_ok): Fix *another* typo from my 2000-09-03 change: s/tmp_dst_sb/tmp_src_sb/. 2000-12-28 11:22:59 +00:00
Jim Meyering
a400a0e081 *** empty log message *** 2000-12-28 09:53:58 +00:00
Jim Meyering
3abbefb5e4 (same_file_ok): Fix typo from my 2000-09-03 change: s/tmp_dst_sb/tmp_src_sb/. 2000-12-28 09:53:34 +00:00
Jim Meyering
51d5f8a438 (same_file_ok): Use a single auto var for
tmp_dst_sb, instead of two static vars.
Likewise for tmp_src_sb.
2000-12-28 09:42:06 +00:00
Jim Meyering
e8c1aced2b *** empty log message *** 2000-12-28 09:41:39 +00:00
114 changed files with 3927 additions and 722 deletions

View File

@@ -85,8 +85,9 @@ alpha_subdir = gnu/fetish
a_url_dir = $(alpha_subdir)
b_url_dir = $(alpha_subdir)
a_real_dir = /fs/share/ftp/$(alpha_subdir)
b_real_dir = fetish-ftp
# This must be the same name on both hosts.
# Make it a symlink that points to the right place.
real_dir = fetish-ftp
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
@@ -159,6 +160,17 @@ wget-update:
$(WGET) $(ftp-gnu)/config/config.sub -O $(srcdir)/config.sub
cvs -d $(automake_repo) co -p automake/depcomp > depcomp
define emit-rsync-commands
echo =====================================
echo =====================================
echo 'for host in $(a_host) $(b_host); do \'
echo ' rsync -e ssh --pro -av $(xd-delta) $(distdir).tar.gz \'
echo ' $$host:$(real_dir); done'
echo '# send the /tmp/announcement e-mail'
echo =====================================
echo =====================================
endef
alpha: writable-files po-check
$(MAKE) cvs-dist
$(MAKE) -s announcement > /tmp/announce-$(distdir)
@@ -170,10 +182,4 @@ alpha: writable-files po-check
chmod a-w $(release-archive-dir)/$(xd-delta)
echo $(VERSION) > $(prev_version_file)
cvs ci -m. $(prev_version_file)
@echo =====================================
@echo =====================================
@echo 'rsync -e ssh --pro -av $(xd-delta) $(distdir).tar.gz \'
@echo ' $(b_host):$(b_real_dir)'
@echo '# send the /tmp/announcement e-mail'
@echo =====================================
@echo =====================================
@$(emit-rsync-commands)

10
THANKS
View File

@@ -34,6 +34,7 @@ Arne H. Juul arnej@solan.unit.no
Arne Henrik Juul arnej@imf.unit.no
Arthur Pool pool@commerce.uq.edu.au
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
Axel Kittenberger Anshil@gmx.net
Bauke Jan Douma bjdouma@xs4all.nl
Bengt Martensson bengt@mathematik.uni-Bremen.de
Bernd Leibing bernd.leibing@rz.uni-ulm.de
@@ -66,8 +67,10 @@ Collin Rogowski collin@rogowski.de
Dan Hagerty hag@gnu.ai.it.edu
Dan Pascu dan@services.iiruc.ro
Daniel Bergstrom noa@melody.se
Darren Salt ds@youmustbejoking.demon.co.uk
David Dyck dcd@tc.fluke.COM
David Godfrey dave@delta.demon.co.uk
David Luyer david_luyer@pacific.net.au
Dennis Henriksen opus@flamingo.osrl.dk
Derek Clegg dclegg@next.com
Dick Streefland dick_streefland@tasking.com
@@ -151,6 +154,7 @@ John Roll john@panic.harvard.edu
John Salmon johns@mullet.anu.edu.au
John Summerfield summer@OS2.ami.com.au
Joost van Baal joostvb@xs4all.nl
Jorge Stolfi stolfi@ic.unicamp.br
Joseph S. Myers jsm28@cam.ac.uk
Jungshik Shin jshin@pantheon.yale.edu
Jürgen Fluk louis@dachau.marco.de
@@ -185,6 +189,7 @@ Mark A. Thomas thommark@access.digex.net
Mark D. Roth roth@uiuc.edu
Mark Harris mark@monitor.designacc.com
Mark Hewitt mhewitt@armature.com
Mark Hounschell markh@compro.net
Mark Kettenis kettenis@phys.uva.nl
Mark Nudelman marknu@flash.net
Mark W. Eichin eichin@cygnus.com
@@ -199,9 +204,11 @@ Masami Takikawa takikawm@CS.ORST.EDU
Mate Wierdl mw@moni.msci.memphis.edu
Matej Vela mvela@public.srce.hr
Matt Perry matt@primefactor.com
Matt Schalit mschalit@pacbell.net
Matthew Braun matthew@ans.net
Matthew Clarke Matthew_Clarke@mindlink.bc.ca
Matthew S. Levine mslevine@theory.lcs.mit.edu
Matthew Smith matts@bluesguitar.org
Matthew Swift swift@alum.mit.edu
Mattias Wadenstein maswan@acc.umu.se
Matthias Urlichs smurf@noris.de
@@ -210,6 +217,8 @@ Michael ??? michael@roka.net
Michael Deutschmann michael@talamasca.ocis.net
Michael Hasselberg mikelh@zonta.ping.de
Michael Hohn hohn@math.utah.edu
Michael J. Croghan mcroghan@usatoday.com
Michael Steffens michael.steffens@s.netic.de
Michael Stone mstone@debian.org
Michael Stutz stutz@dsl.org
Michael Veksler mveksler@techunix.technion.ac.il
@@ -223,6 +232,7 @@ Niklas Edmundsson nikke@acc.umu.se
Noah Friedman friedman@splode.com
Noel Cragg noel@red-bean.com
Olav Morkrid olav@funcom.com
Oskar Liljeblad osk@hem.passagen.se
Ørn E. Hansen oehansen@daimi.aau.dk
Paul Eggert eggert@twinsun.com
Paul Nevai nevai@ops.mps.ohio-state.edu

View File

@@ -100,6 +100,34 @@ When a month is written this way, it is still considered to be written
numerically, instead of being ``spelled in full''; this changes the
allowed strings.
@cindex language, in dates
In the current implementation, only English is supported for words and
abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first},
@samp{January}, @samp{Sunday}, @samp{tomorrow}, and @samp{year}.
@cindex language, in dates
@cindex time zone item
The output of @command{date} is not always acceptable as a date string,
not only because of the language problem, but also because there is no
standard meaning for time zone items like @samp{IST}. When using
@command{date} to generate a date string intended to be parsed later,
specify a date format that is independent of language and that does not
use time zone items other than @samp{UTC} and @samp{Z}. Here are some
ways to do this:
@example
$ LC_ALL=C TZ=UTC0 date
Fri Dec 15 19:48:05 UTC 2000
$ TZ=UTC0 date +"%Y-%m-%d %H:%M:%SZ"
2000-12-15 19:48:05Z
$ date --iso-8601=seconds # a GNU extension
2000-12-15T11:48:05-0800
$ date --rfc-822 # a GNU extension
Fri, 15 Dec 2000 11:48:05 -0800
$ date +"%Y-%m-%d %H:%M:%S %z" # %z is a GNU extension.
2000-12-15 11:48:05 -0800
@end example
@cindex case, ignored in dates
@cindex comments, in dates
Alphabetic case is completely ignored in dates. Comments may be introduced
@@ -238,13 +266,15 @@ but not both.
@cindex time zone item
A @dfn{time zone item} specifies an international time zone, indicated
by a small set of letters, e.g., @samp{UTC} for Coordinated Universal
by a small set of letters, e.g., @samp{UTC} or @samp{Z}
for Coordinated Universal
Time. Any included periods are ignored. By following a
non-daylight-saving time zone by the string @samp{DST} in a separate
word (that is, separated by some white space), the corresponding
daylight saving time zone may be specified.
Time zone items are obsolescent and are not recommended, because they
Time zone items other than @samp{UTC} and @samp{Z}
are obsolescent and are not recommended, because they
are ambiguous; for example, @samp{EST} has a different meaning in
Australia than in the United States. Instead, it's better to use
unambiguous numeric time zone corrections like @samp{-0500}, as

View File

@@ -69,11 +69,12 @@ matter what group the user who creates them is in.
@cindex sticky
@cindex swap space, saving text image in
@cindex text image, saving in swap space
@cindex append-only directories
@cindex restricted deletion flag
save the program's text image on the swap device so it will load more
quickly when run (called the @dfn{sticky bit}). For directories on some
systems, prevent users from removing files that they do not own in the
directory; this is called making the directory @dfn{append-only}.
systems, prevent users from removing or renaming a file in a directory
unless they own the file or the directory; this is called the
@dfn{restriction deletion flag} for the directory.
@end enumerate
@node Symbolic Modes
@@ -118,7 +119,7 @@ format:
@noindent
The spaces between the three parts above are shown for readability only;
symbolic modes can not contain spaces.
symbolic modes cannot contain spaces.
The @var{users} part tells which users' access to the file is changed.
It consists of one or more of the following letters (or it can be empty;
@@ -427,7 +428,7 @@ This number is always interpreted in octal; you do not have to add a
leading 0, as you do in C. Mode 0055 is the same as mode 55.
A numeric mode is usually shorter than the corresponding symbolic
mode, but it is limited in that it can not take into account a file's
mode, but it is limited in that it cannot take into account a file's
previous permissions; it can only set them absolutely.
On most systems, the permissions granted to the user,

View File

@@ -1,3 +1,90 @@
2001-02-17 Jim Meyering <meyering@lucent.com>
* strtoul.c: Sync from GNU libc. Use double quotes, not <...>
around included file name.
* strnlen.c (__strnlen): Merge in a change from GNU libc.
* strftime.c: Update from GNU libc (the only changes were to comments).
2001-02-13 Bruno Haible <haible@clisp.cons.org>
* mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
2001-02-17 Paul Eggert <eggert@twinsun.com>
* mbswidth.c, quotearg.c (mbrtowc, mbsinit):
Remove workaround macros for hosts that have mbrtowc but not
mbstate_t, as we now insist on proper declarations for both
before using mbrtowc.
2001-02-17 Jim Meyering <meyering@lucent.com>
* regex.c: Update from libc.
2001-02-16 Paul Eggert <eggert@twinsun.com>
* lib/alloca.c (malloc): Undef before defining, since stdlib.h
may have defined it. Needed for Encore Umax-3.0.9.16b systems.
Reported by Mark Hounschell via Paul Eggert.
2001-01-30 Bruno Haible <haible@clisp.cons.org>
* config.charset: Update for FreeBSD 4.2.
2001-01-26 Jim Meyering <meyering@lucent.com>
* quotearg.c: Include stddef.h.
* quote.c: Include stddef.h.
Reported by Axel Kittenberger.
* xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
line in double quotes so that it evokes a better diagnostic.
[HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
Reported by Axel Kittenberger.
2001-01-15 Bruno Haible <haible@clisp.cons.org>
* unicodeio.c (print_unicode_char): Cast the second iconv() arg,
to avoid a warning. Add back 'const' to inptr.
2001-01-16 Jim Meyering <meyering@lucent.com>
* basename.c: Include <stdio.h>, needed by assert on SunOS4.
From Bruno Haible.
2001-01-14 Jim Meyering <meyering@lucent.com>
* rename.c: New file. From Volker Borchert.
Include stdlib.h, string.h or strings.h, and xalloc.h.
Use strip_trailing_slashes rather than open-coding it.
2001-01-03 Paul Eggert <eggert@twinsun.com>
* lib/strftime.c: Sync with glibc time/strftime.c 1.81.
2001-01-03 Jim Meyering <meyering@lucent.com>
* unicodeio.c (print_unicode_char): Remove `const' from declaration of
local `inptr' to avoid warning with some system declarations of iconv.
2000-12-29 Paul Eggert <eggert@twinsun.com>
* lib/modechange.c: Do not assume that mode_t uses the
traditional octal encoding. E.g. "chmod 1 FOO" should set
the other-execute bit of FOO even if S_IXOTH != 1.
(SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
WOTH, XOTH, ALLM): New macros.
(S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
Use them.
(S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
(S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
(mode_compile):
No need to use uintmax_t; unsigned long is long enough.
Don't bother to get suffix since we don't use it.
2000-12-24 Jim Meyering <meyering@lucent.com>
* hash.c (is_prime): Return explicit boolean values.

View File

@@ -222,12 +222,12 @@ $(DEPDIR)/mountlist.Po $(DEPDIR)/nanosleep.Po $(DEPDIR)/obstack.Po \
$(DEPDIR)/path-concat$U.Po $(DEPDIR)/physmem$U.Po \
$(DEPDIR)/posixtm$U.Po $(DEPDIR)/putenv.Po $(DEPDIR)/quote$U.Po \
$(DEPDIR)/quotearg$U.Po $(DEPDIR)/readtokens$U.Po $(DEPDIR)/readutmp.Po \
$(DEPDIR)/realloc.Po $(DEPDIR)/regex.Po $(DEPDIR)/rmdir.Po \
$(DEPDIR)/rpmatch.Po $(DEPDIR)/safe-read$U.Po $(DEPDIR)/same$U.Po \
$(DEPDIR)/save-cwd$U.Po $(DEPDIR)/savedir$U.Po $(DEPDIR)/sha$U.Po \
$(DEPDIR)/stat.Po $(DEPDIR)/stime.Po $(DEPDIR)/stpcpy.Po \
$(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po $(DEPDIR)/strdup.Po \
$(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
$(DEPDIR)/realloc.Po $(DEPDIR)/regex.Po $(DEPDIR)/rename.Po \
$(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po $(DEPDIR)/safe-read$U.Po \
$(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po $(DEPDIR)/savedir$U.Po \
$(DEPDIR)/sha$U.Po $(DEPDIR)/stat.Po $(DEPDIR)/stime.Po \
$(DEPDIR)/stpcpy.Po $(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po \
$(DEPDIR)/strdup.Po $(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
$(DEPDIR)/strncasecmp.Po $(DEPDIR)/strndup.Po $(DEPDIR)/strnlen.Po \
$(DEPDIR)/strpbrk.Po $(DEPDIR)/strstr.Po $(DEPDIR)/strtod.Po \
$(DEPDIR)/strtol.Po $(DEPDIR)/strtoul.Po $(DEPDIR)/strtoull.Po \
@@ -243,10 +243,10 @@ error.h euidaccess.c fileblocks.c fnmatch.c fsusage.c ftruncate.c \
getdate.c getgroups.c gethostname.c getline.c getloadavg.c getpass.c \
getusershell.c group-member.c lchown.c malloc.c memchr.c memcmp.c \
memcpy.c memmove.c memrchr.c memset.c mktime.c mountlist.c nanosleep.c \
obstack.c obstack.h putenv.c readutmp.c realloc.c regex.c rmdir.c \
rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c strdup.c strftime.c \
strncasecmp.c strndup.c strnlen.c strpbrk.c strstr.c strtod.c strtol.c \
strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
obstack.c obstack.h putenv.c readutmp.c realloc.c regex.c rename.c \
rmdir.c rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c strdup.c \
strftime.c strncasecmp.c strndup.c strnlen.c strpbrk.c strstr.c \
strtod.c strtol.c strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -446,6 +446,8 @@ realloc_.c: realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c
regex_.c: regex.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > regex_.c
rename_.c: rename.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rename_.c
rmdir_.c: rmdir.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rmdir_.c
rpmatch_.c: rpmatch.c $(ANSI2KNR)
@@ -536,11 +538,11 @@ makepath_.o malloc_.o mbswidth_.o md5_.o memcasecmp_.o memchr_.o \
memcmp_.o memcoll_.o memcpy_.o memmove_.o memrchr_.o memset_.o \
mktime_.o modechange_.o mountlist_.o nanosleep_.o obstack_.o \
path-concat_.o physmem_.o posixtm_.o putenv_.o quote_.o quotearg_.o \
readtokens_.o readutmp_.o realloc_.o regex_.o rmdir_.o rpmatch_.o \
safe-read_.o same_.o save-cwd_.o savedir_.o sha_.o stat_.o stime_.o \
stpcpy_.o strcasecmp_.o strcspn_.o strdup_.o strftime_.o stripslash_.o \
strncasecmp_.o strndup_.o strnlen_.o strpbrk_.o strstr_.o strtod_.o \
strtol_.o strtoul_.o strtoull_.o strtoumax_.o strverscmp_.o \
readtokens_.o readutmp_.o realloc_.o regex_.o rename_.o rmdir_.o \
rpmatch_.o safe-read_.o same_.o save-cwd_.o savedir_.o sha_.o stat_.o \
stime_.o stpcpy_.o strcasecmp_.o strcspn_.o strdup_.o strftime_.o \
stripslash_.o strncasecmp_.o strndup_.o strnlen_.o strpbrk_.o strstr_.o \
strtod_.o strtol_.o strtoul_.o strtoull_.o strtoumax_.o strverscmp_.o \
unicodeio_.o userspec_.o utime_.o version-etc_.o xgetcwd_.o \
xgethostname_.o xmalloc_.o xstrdup_.o xstrtod_.o xstrtol_.o xstrtoul_.o \
xstrtoumax_.o yesno_.o : $(ANSI2KNR)
@@ -660,6 +662,7 @@ maintainer-clean-tags:
@AMDEP@include $(DEPDIR)/readutmp.Po
@AMDEP@include $(DEPDIR)/realloc.Po
@AMDEP@include $(DEPDIR)/regex.Po
@AMDEP@include $(DEPDIR)/rename.Po
@AMDEP@include $(DEPDIR)/rmdir.Po
@AMDEP@include $(DEPDIR)/rpmatch.Po
@AMDEP@include $(DEPDIR)/safe-read$U.Po

View File

@@ -88,6 +88,7 @@ typedef char *pointer;
Callers below should use malloc. */
# ifndef emacs
# undef malloc
# define malloc xmalloc
# endif
extern pointer malloc ();

View File

@@ -1,5 +1,5 @@
/* basename.c -- return the last element in a path
Copyright (C) 1990, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
# include <config.h>
#endif
#include <stdio.h>
#include <assert.h>
#ifndef FILESYSTEM_PREFIX_LEN

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000 Free Software Foundation, Inc.
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
@@ -205,27 +205,39 @@ case "$os" in
echo "UTF-8 UTF-8"
;;
freebsd*)
# FreeBSD 3.3 doesn't have nl_langinfo(CODESET); therefore
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in lt_LN; do
for l in la_LN lt_LN; do
echo "$l.ASCII ASCII"
done
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT lt_LN \
nl_BE nl_NL no_NO pt_PT sv_SE; do
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
echo "$l.ISO_8859-1 ISO-8859-1"
echo "$l.DIS_8859-15 ISO-8859-15"
done
for l in hr_HR hu_HU lt_LN pl_PL sl_SI; do
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
echo "$l.ISO_8859-2 ISO-8859-2"
done
for l in la_LN lt_LT; do
echo "$l.ISO_8859-4 ISO-8859-4"
done
for l in ru_RU ru_SU; do
echo "$l.KOI8-R KOI8-R"
echo "$l.ISO_8859-5 ISO-8859-5"
echo "$l.CP866 CP866"
done
echo "uk_UA.KOI8-U KOI8-U"
echo "zh_TW.BIG5 BIG5"
echo "zh_TW.Big5 BIG5"
echo "zh_CN.EUC GB2312"
echo "ja_JP.EUC EUC-JP"
echo "ja_JP.SJIS SJIS"
echo "ja_JP.Shift_JIS SJIS"
echo "ko_KR.EUC EUC-KR"
;;
beos*)
# BeOS has a single locale, and it has UTF-8 encoding.

View File

@@ -1,5 +1,5 @@
/* hash - hashing table processing.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Jim Meyering, 1992.
This program is free software; you can redistribute it and/or modify

View File

@@ -51,12 +51,6 @@
# define iswprint(wc) 1
#endif
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
#if HAVE_MBRTOWC && defined mbstate_t
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
# define mbsinit(ps) 1
#endif
#ifndef HAVE_DECL_WCWIDTH
"this configure-time declaration test was not run"
#endif

View File

@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a string.
Copyright (C) 2000 Free Software Foundation, Inc.
Copyright (C) 2000-2001 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,6 +34,7 @@
#define MBSW_ACCEPT_UNPRINTABLE 2
/* Returns the number of screen columns needed for STRING. */
#define mbswidth gnu_mbswidth /* avoid clash with UnixWare 7.1.1 function */
extern int mbswidth PARAMS ((const char *string, int flags));
/* Returns the number of screen columns needed for the NBYTES bytes

View File

@@ -1,5 +1,5 @@
/* modechange.c -- file mode manipulation
Copyright (C) 1989, 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001 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
@@ -50,50 +50,65 @@ char *malloc ();
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* The traditional octal values corresponding to each mode bit. */
#define SUID 04000
#define SGID 02000
#define SVTX 01000
#define RUSR 00400
#define WUSR 00200
#define XUSR 00100
#define RGRP 00040
#define WGRP 00020
#define XGRP 00010
#define ROTH 00004
#define WOTH 00002
#define XOTH 00001
#define ALLM 07777 /* all octal mode bits */
#ifndef S_ISUID
# define S_ISUID 04000
# define S_ISUID SUID
#endif
#ifndef S_ISGID
# define S_ISGID 04000
# define S_ISGID SGID
#endif
#ifndef S_ISVTX
# define S_ISVTX 01000
# define S_ISVTX SVTX
#endif
#ifndef S_IRUSR
# define S_IRUSR 0400
# define S_IRUSR RUSR
#endif
#ifndef S_IWUSR
# define S_IWUSR 0200
# define S_IWUSR WUSR
#endif
#ifndef S_IXUSR
# define S_IXUSR 0100
# define S_IXUSR XUSR
#endif
#ifndef S_IRGRP
# define S_IRGRP 0040
# define S_IRGRP RGRP
#endif
#ifndef S_IWGRP
# define S_IWGRP 0020
# define S_IWGRP WGRP
#endif
#ifndef S_IXGRP
# define S_IXGRP 0010
# define S_IXGRP XGRP
#endif
#ifndef S_IROTH
# define S_IROTH 0004
# define S_IROTH ROTH
#endif
#ifndef S_IWOTH
# define S_IWOTH 0002
# define S_IWOTH WOTH
#endif
#ifndef S_IXOTH
# define S_IXOTH 0001
# define S_IXOTH XOTH
#endif
#ifndef S_IRWXU
# define S_IRWXU 0700
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
#endif
#ifndef S_IRWXG
# define S_IRWXG 0070
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
#endif
#ifndef S_IRWXO
# define S_IRWXO 0007
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
#endif
/* All the mode bits that can be affected by chmod. */
@@ -157,8 +172,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
{
struct mode_change *head; /* First element of the linked list. */
struct mode_change *tail; /* An element of the linked list. */
uintmax_t mode_value; /* The mode value, if octal. */
char *string_end; /* Pointer to end of parsed value. */
unsigned long octal_value; /* The mode value, if octal. */
mode_t umask_value; /* The umask value (surprise). */
head = NULL;
@@ -166,12 +180,34 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
tail = NULL;
#endif
if (xstrtoumax (mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
if (xstrtoul (mode_string, NULL, 8, &octal_value, "") == LONGINT_OK)
{
struct mode_change *p;
if (mode_value != (mode_value & CHMOD_MODE_BITS))
mode_t mode;
if (octal_value != (octal_value & ALLM))
return MODE_INVALID;
p = make_node_op_equals ((mode_t) mode_value);
/* Help the compiler optimize the usual case where mode_t uses
the traditional octal representation. */
mode = ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX
&& S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR
&& S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP
&& S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH)
? octal_value
: ((octal_value & SUID ? S_ISUID : 0)
| (octal_value & SGID ? S_ISGID : 0)
| (octal_value & SVTX ? S_ISVTX : 0)
| (octal_value & RUSR ? S_IRUSR : 0)
| (octal_value & WUSR ? S_IWUSR : 0)
| (octal_value & XUSR ? S_IXUSR : 0)
| (octal_value & RGRP ? S_IRGRP : 0)
| (octal_value & WGRP ? S_IWGRP : 0)
| (octal_value & XGRP ? S_IXGRP : 0)
| (octal_value & ROTH ? S_IROTH : 0)
| (octal_value & WOTH ? S_IWOTH : 0)
| (octal_value & XOTH ? S_IXOTH : 0)));
p = make_node_op_equals (mode);
if (p == NULL)
return MODE_MEMORY_EXHAUSTED;
mode_append_entry (&head, &tail, p);
@@ -393,7 +429,7 @@ mode_adjust (mode_t oldmode, const struct mode_change *changes)
/* In order to change only `u', `g', or `o' permissions,
or some combination thereof, clear unselected bits.
This can not be done in mode_compile because the value
This cannot be done in mode_compile because the value
to which the `changes->affected' mask is applied depends
on the old mode of each file. */
value &= changes->affected;

View File

@@ -4,6 +4,9 @@
# include <config.h>
#endif
#if HAVE_STDDEF_H
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <quote.h>

View File

@@ -1,5 +1,5 @@
/* quotearg.c - quote arguments for output
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001 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
@@ -21,6 +21,9 @@
# include <config.h>
#endif
#if HAVE_STDDEF_H
# include <stddef.h> /* For the definition of size_t on windows w/MSVC. */
#endif
#include <sys/types.h>
#include <quotearg.h>
#include <xalloc.h>
@@ -63,13 +66,7 @@
# include <wchar.h>
#endif
#if HAVE_MBRTOWC
size_t mbrtowc ();
# ifdef mbstate_t
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
# define mbsinit(ps) 1
# endif
#else
#if !HAVE_MBRTOWC
/* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the
other macros are defined only for documentation and to satisfy C
syntax. */

File diff suppressed because it is too large Load Diff

68
lib/rename.c Normal file
View File

@@ -0,0 +1,68 @@
/* Work around the bug in some systems whereby rename fails when the source
path has a trailing slash. The rename from SunOS 4.1.1_U1 has this bug.
Copyright (C) 2001 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* written by Volker Borchert */
#include <config.h>
#include <stdio.h>
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#include <xalloc.h>
#ifndef HAVE_DECL_FREE
"this configure-time declaration test was not run"
#endif
#if !HAVE_DECL_FREE
void free ();
#endif
void strip_trailing_slashes ();
/* Rename the file SRC_PATH to DST_PATH, removing any trailing
slashes from SRC_PATH. Needed for SunOS 4.1.1_U1. */
int
rpl_rename (const char *src_path, const char *dst_path)
{
char *src_temp;
int ret_val;
size_t s_len = strlen (src_path);
if (s_len && src_path[s_len - 1] == '/')
{
src_temp = xstrdup (src_path);
strip_trailing_slashes (src_temp);
}
else
src_temp = (char *) src_path;
ret_val = rename (src_temp, dst_path);
if (src_temp != src_path)
free (src_temp);
return ret_val;
}

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -289,7 +289,7 @@ static const CHAR_T zeroes[16] = /* "0000000000000000" */
else if (to_uppcase) \
memcpy_uppcase (p, (s), _n); \
else \
MEMCPY ((PTR) p, (PTR) (s), _n))
MEMCPY ((PTR) p, (const PTR) (s), _n))
#ifdef COMPILE_WIDE
# define widen(os, ws, l) \
@@ -793,10 +793,11 @@ my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == 'E'
&& (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(ERA_D_T_FMT)))
&& (*(subfmt =
(const CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(ERA_D_T_FMT)))
!= '\0')))
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
#else
# if HAVE_STRFTIME
goto underlying_strftime;
@@ -887,10 +888,10 @@ my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
&& (*(subfmt = (CHAR_T *)_NL_CURRENT (LC_TIME,
NLW(ERA_D_FMT)))
&& (*(subfmt =
(const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT)))
!= L_('\0'))))
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
goto subformat;
#else
# if HAVE_STRFTIME
@@ -1067,14 +1068,15 @@ my_strftime (s, maxsize, format, tp ut_argument)
goto underlying_strftime;
#endif
case L_('R'): /* GNU extension. */
case L_('R'): /* ISO C99 extension. */
subfmt = L_("%H:%M");
goto subformat;
case L_('r'): /* POSIX.2 extension. */
#ifdef _NL_CURRENT
if (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(T_FMT_AMPM))) == L_('\0'))
if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(T_FMT_AMPM)))
== L_('\0'))
#endif
subfmt = L_("%I:%M:%S %p");
goto subformat;
@@ -1129,10 +1131,10 @@ my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
&& (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(ERA_T_FMT)))
&& (*(subfmt =
(const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT)))
!= L_('\0'))))
subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
goto subformat;
#else
# if HAVE_STRFTIME
@@ -1159,8 +1161,8 @@ my_strftime (s, maxsize, format, tp ut_argument)
DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7);
case L_('V'):
case L_('g'): /* GNU extension. */
case L_('G'): /* GNU extension. */
case L_('g'): /* ISO C99 extension. */
case L_('G'): /* ISO C99 extension. */
if (modifier == L_('E'))
goto bad_format;
{
@@ -1284,7 +1286,7 @@ my_strftime (s, maxsize, format, tp ut_argument)
#endif
break;
case L_('z'): /* GNU extension. */
case L_('z'): /* ISO C99 extension. */
if (tp->tm_isdst < 0)
break;

View File

@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +51,7 @@ size_t
__strnlen (const char *string, size_t maxlen)
{
const char *end = memchr (string, '\0', maxlen);
return end ? end - string : maxlen;
return end ? (size_t) (end - string) : maxlen;
}
#ifdef weak_alias
weak_alias (__strnlen, strnlen)

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1999, 2001 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -19,4 +19,4 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define UNSIGNED 1
#include <strtol.c>
#include "strtol.c"

View File

@@ -170,7 +170,9 @@ print_unicode_char (FILE *stream, unsigned int code)
outbytesleft = sizeof (outbuf);
/* Convert the character from UTF-8 to the locale's charset. */
res = iconv (utf8_to_local, &inptr, &inbytesleft, &outptr, &outbytesleft);
res = iconv (utf8_to_local,
(ICONV_CONST char **)&inptr, &inbytesleft,
&outptr, &outbytesleft);
if (inbytesleft > 0 || res == (size_t)(-1)
/* Irix iconv() inserts a NUL byte if it cannot convert. */
# if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)

View File

@@ -47,11 +47,11 @@ void free ();
#endif
#ifndef HAVE_DONE_WORKING_MALLOC_CHECK
you must run the autoconf test for a properly working malloc -- see malloc.m4
"you must run the autoconf test for a properly working malloc -- see malloc.m4"
#endif
#ifndef HAVE_DONE_WORKING_REALLOC_CHECK
you must run the autoconf test for a properly working realloc -- see realloc.m4
"you must run the autoconf test for a properly working realloc --see realloc.m4"
#endif
/* Exit value when the requested amount of memory is not available.

View File

@@ -1,3 +1,117 @@
2001-02-17 Jim Meyering <meyering@lucent.com>
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
UnixWare 7.1.1.
* mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
rather than AC_CACHE_VAL.
2001-02-17 Paul Eggert <eggert@twinsun.com>
* mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
* mbswidth.m4 (jm_PREREQ_MBSWIDTH):
Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
* prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
2001-02-07 Jim Meyering <meyering@lucent.com>
* regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
2001-02-05 Jim Meyering <meyering@lucent.com>
* jm-macros.m4: Require autoconf-2.14d (not yet released), because
it includes the patch required for `large file' support with at least
HP-UX's 10.20 /bin/cc.
2001-02-03 Jim Meyering <meyering@lucent.com>
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
AS_IF, now that it works once again (mysteriously).
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
2001-01-30 Jim Meyering <meyering@lucent.com>
Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
* chown.m4: Rename conftestchown to conftest.chown.
* rename.m4: s/conftestdir/conftest.d1/ and s/conftestdir2/conftest.d2/.
* utimes.m4: s/conftestdata/conftest.data/
Inspired by Pavel Roskin's change in autoconf.
2001-01-27 Jim Meyering <meyering@lucent.com>
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
a use of AS_IF.
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
2001-01-26 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
quotearg.c includes it.
2001-01-15 Bruno Haible <haible@clisp.cons.org>
* iconv.m4 (jm_ICONV): Also check whether the iconv declaration
has const.
2001-01-20 Jim Meyering <meyering@lucent.com>
Be sure that headers are checked before used in code compiled
for the type checks.
* jm-macros.m4 (jm_MACROS): Remove all header checks.
In place of that, invoke jm_CHECK_ALL_TYPES.
(jm_CHECK_ALL_HEADERS): New functions with the above checks.
(jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
The check for ssize_t was mistakenly run before the test for unistd.h.
The configure-time check for stdbool.h was missing.
* prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
(jm_PREREQ_HASH): New function.
2001-01-17 Jim Meyering <meyering@lucent.com>
* fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
for autoconf-2.49c.
* ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
2001-01-14 Jim Meyering <meyering@lucent.com>
* rename.m4: Use temporary directories named conftestdir{,2}, not
foo and bar. Create conftestdir/ in the script, not in the C code.
Remove directories in the script, not in the C code.
Remove conftestdir{,2} before trying to create the directory.
Make the entire configure script fail if the mkdir fails.
2001-01-02 Volker Borchert <bt@teknon.de>
* rename.m4: New file.
* jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
2001-01-01 Alexandre Duret-Lutz <duret_g@epita.fr>
* libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
so `make install' also works in VPATH builds.
2001-01-01 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available), even
on systems with utmpx.h. It's necessary for the declaration of utmp's
ut_user member. Reported by Andreas Jaeger.
* check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if available.
They are required for the declarations of getgrgid and getpwuid resp.
(_jm_DECL_HEADERS): Check for grp.h and pwd.h.
Reported by Andreas Jaeger.
2000-12-25 Alexandre Duret-Lutz <duret_g@epita.fr>
* libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
can be used in subdirectories.
2000-12-26 Jim Meyering <meyering@lucent.com>
* dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work better
@@ -85,7 +199,7 @@
2000-08-06 Paul Eggert <eggert@twinsun.com>
* m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
* mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
not char, for compatibility with glibc 2.1.3 strftime.c.
2000-07-23 Paul Eggert <eggert@twinsun.com>

View File

@@ -41,6 +41,7 @@ link-follow.m4 \
ls-mntd-fs.m4 \
lstat.m4 \
malloc.m4 \
mbrtowc.m4 \
mbstate_t.m4 \
mbswidth.m4 \
memcmp.m4 \
@@ -52,6 +53,7 @@ putenv.m4 \
readdir.m4 \
realloc.m4 \
regex.m4 \
rename.m4 \
rmdir-errno.m4 \
search-libs.m4 \
st_dm_mode.m4 \

View File

@@ -156,6 +156,7 @@ link-follow.m4 \
ls-mntd-fs.m4 \
lstat.m4 \
malloc.m4 \
mbrtowc.m4 \
mbstate_t.m4 \
mbswidth.m4 \
memcmp.m4 \
@@ -167,6 +168,7 @@ putenv.m4 \
readdir.m4 \
realloc.m4 \
regex.m4 \
rename.m4 \
rmdir-errno.m4 \
search-libs.m4 \
st_dm_mode.m4 \

View File

@@ -3,7 +3,7 @@ and textutils packages.
These files are used by a program called aclocal (part of the GNU automake
package). aclocal uses these files to create aclocal.m4 which is in turn
used by autoconf to create the configure script at the the top level in
used by autoconf to create the configure script at the top level in
this distribution.
The Makefile.am file in this directory is automatically generated

View File

@@ -1,4 +1,4 @@
#serial 16
#serial 17
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
@@ -41,6 +41,14 @@ AC_DEFUN(jm_CHECK_DECLS,
#if HAVE_UTMP_H
# include <utmp.h>
#endif
#if HAVE_GRP_H
# include <grp.h>
#endif
#if HAVE_PWD_H
# include <pwd.h>
#endif
'
AC_CHECK_DECLS([
@@ -72,6 +80,6 @@ dnl This is a little helper so we can require these header checks.
AC_DEFUN(_jm_DECL_HEADERS,
[
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h \
utmp.h utmpx.h)
AC_CHECK_HEADERS(grp.h memory.h pwd.h string.h strings.h stdlib.h \
unistd.h sys/time.h utmp.h utmpx.h)
])

View File

@@ -1,4 +1,4 @@
#serial 5
#serial 6
dnl From Jim Meyering.
dnl Determine whether chown accepts arguments of -1 for uid and gid.
@@ -21,7 +21,7 @@ AC_DEFUN(jm_FUNC_CHOWN,
int
main ()
{
char *f = "conftestchown";
char *f = "conftest.chown";
struct stat before, after;
if (creat (f, 0600) < 0)

View File

@@ -1,4 +1,4 @@
#serial 4
#serial 7
# From fileutils/configure.in
@@ -179,14 +179,15 @@ if test $ac_fsusage_space = no; then
fi
if test $ac_fsusage_space = no; then
# SVR2
AC_TRY_CPP([#include <sys/filsys.h>],
AC_DEFINE(STAT_READ_FILSYS, 1,
[ Define if there is no specific function for reading filesystems usage
information and you have the <sys/filsys.h> header file. (SVR2)])
ac_fsusage_space=yes)
# SVR2
AC_TRY_CPP([#include <sys/filsys.h>
],
AC_DEFINE(STAT_READ_FILSYS, 1,
[Define if there is no specific function for reading filesystems usage
information and you have the <sys/filsys.h> header file. (SVR2)])
ac_fsusage_space=yes)
fi
AS_IFELSE([test $ac_fsusage_space = yes], [$1], [$2])dnl
AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
])

View File

@@ -1,4 +1,4 @@
#serial 1
#serial 2
dnl From Bruno Haible.
@@ -30,6 +30,27 @@ AC_DEFUN(jm_ICONV,
])
if test "$jm_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(jm_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);
#else
size_t iconv();
#endif
], [], jm_cv_proto_iconv_arg1="", jm_cv_proto_iconv_arg1="const")
jm_cv_proto_iconv="extern size_t iconv (iconv_t cd, $jm_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t* outbytesleft);"])
jm_cv_proto_iconv=`echo "[$]jm_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]jm_cv_proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $jm_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
LIBICONV=
if test "$jm_cv_lib_iconv" = yes; then

View File

@@ -1,10 +1,10 @@
#serial 29 -*- autoconf -*-
#serial 32 -*- autoconf -*-
dnl Misc type-related macros for fileutils, sh-utils, textutils.
AC_DEFUN(jm_MACROS,
[
AC_PREREQ(2.14a)
AC_PREREQ(2.14d)
GNU_PACKAGE="GNU $PACKAGE"
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
@@ -19,45 +19,7 @@ AC_DEFUN(jm_MACROS,
dnl This macro actually runs replacement code. See isc-posix.m4.
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_CHECK_HEADERS( \
errno.h \
fcntl.h \
fenv.h \
float.h \
limits.h \
memory.h \
mntent.h \
mnttab.h \
netdb.h \
paths.h \
stdlib.h \
stddef.h \
stdint.h \
string.h \
sys/acl.h \
sys/filsys.h \
sys/fs/s5param.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
sys/mntent.h \
sys/mount.h \
sys/param.h \
sys/socket.h \
sys/statfs.h \
sys/statvfs.h \
sys/systeminfo.h \
sys/time.h \
sys/timeb.h \
sys/vfs.h \
sys/wait.h \
syslog.h \
termios.h \
unistd.h \
utime.h \
values.h \
)
jm_CHECK_ALL_TYPES
jm_INCLUDED_REGEX([lib/regex.c])
AC_REQUIRE([jm_BISON])
@@ -103,6 +65,7 @@ AC_DEFUN(jm_MACROS,
AC_FUNC_GETLOADAVG([lib])
AC_REQUIRE([jm_SYS_PROC_UPTIME])
AC_REQUIRE([jm_FUNC_FTRUNCATE])
AC_REQUIRE([vb_FUNC_RENAME])
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
AC_REPLACE_FUNCS(dup2)
@@ -227,6 +190,51 @@ AC_DEFUN(jm_MACROS,
])
# These tests must be run before any use of AC_CHECK_TYPE,
# because that macro compiles code that tests e.g., HAVE_UNISTD_H.
# See the definition of ac_includes_default in `configure'.
AC_DEFUN(jm_CHECK_ALL_HEADERS,
[
AC_CHECK_HEADERS( \
errno.h \
fcntl.h \
fenv.h \
float.h \
limits.h \
memory.h \
mntent.h \
mnttab.h \
netdb.h \
paths.h \
stdlib.h \
stddef.h \
stdint.h \
string.h \
sys/acl.h \
sys/filsys.h \
sys/fs/s5param.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
sys/mntent.h \
sys/mount.h \
sys/param.h \
sys/socket.h \
sys/statfs.h \
sys/statvfs.h \
sys/systeminfo.h \
sys/time.h \
sys/timeb.h \
sys/vfs.h \
sys/wait.h \
syslog.h \
termios.h \
unistd.h \
utime.h \
values.h \
)
])
# This macro must be invoked before any tests that run the compiler.
AC_DEFUN(jm_CHECK_ALL_TYPES,
[
@@ -253,6 +261,7 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_LONG_DOUBLE])
AC_REQUIRE([jm_CHECK_ALL_HEADERS])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_MEMBERS([struct stat.st_blksize],,,[$ac_includes_default

View File

@@ -6,7 +6,7 @@
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 109
# serial 110
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
@@ -289,7 +289,7 @@ strdup __argz_count __argz_stringify __argz_next])
dnl Try to locate it.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
MKINSTALLDIRS="`CDPATH=:; cd $ac_aux_dir && pwd`/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"

View File

@@ -1,4 +1,4 @@
#serial 6
#serial 10
dnl From Jim Meyering.
dnl
@@ -6,12 +6,10 @@ dnl This is not pretty. I've just taken the autoconf code and wrapped
dnl it in an AC_DEFUN.
dnl
AC_PREREQ(2.14a)
# jm_LIST_MOUNTED_FILESYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN(jm_LIST_MOUNTED_FILESYSTEMS,
[
AC_CHECK_FUNCS(listmntent getmntent getmntinfo)
AC_CHECK_FUNCS(listmntent getmntinfo)
AC_CHECK_HEADERS(mntent.h)
# Determine how to get the list of mounted filesystems.
@@ -239,6 +237,6 @@ if test -z "$ac_list_mounted_fs"; then
# Can't build mountlist.c or anything that needs its functions
fi
AS_IFELSE([test $ac_list_mounted_fs = found], [$1], [$2])dnl
AS_IF([test $ac_list_mounted_fs = found], [$1], [$2])
])

18
m4/mbrtowc.m4 Normal file
View File

@@ -0,0 +1,18 @@
#serial 2
dnl From Paul Eggert
AC_DEFUN(jm_FUNC_MBRTOWC,
[
AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
jm_cv_func_mbrtowc,
[AC_TRY_LINK(
[@%:@include <wchar.h>],
[mbstate_t state; return ! (sizeof state && mbrtowc);],
jm_cv_func_mbrtowc=yes,
jm_cv_func_mbrtowc=no)])
if test $jm_cv_func_mbrtowc = yes; then
AC_DEFINE(HAVE_MBRTOWC, 1,
[Define to 1 if mbrtowc and mbstate_t are properly declared.])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 2
#serial 4
dnl autoconf tests required for use of mbswidth.c
dnl From Bruno Haible.
@@ -8,7 +8,8 @@ AC_DEFUN(jm_PREREQ_MBSWIDTH,
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AM_C_PROTOTYPES])
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
AC_CHECK_FUNCS(isascii iswprint mbrtowc wcwidth)
AC_CHECK_FUNCS(isascii iswprint wcwidth)
jm_FUNC_MBRTOWC
headers='
# if HAVE_WCHAR_H
# include <wchar.h>

View File

@@ -1,4 +1,4 @@
#serial 13
#serial 17
dnl These are the prerequisite macros for files in the lib/
dnl directories of the fileutils, sh-utils, and textutils packages.
@@ -10,6 +10,7 @@ AC_DEFUN(jm_PREREQ,
jm_PREREQ_DIRNAME
jm_PREREQ_ERROR
jm_PREREQ_GETPAGESIZE
jm_PREREQ_HASH
jm_PREREQ_HUMAN
jm_PREREQ_MBSWIDTH
jm_PREREQ_MEMCHR
@@ -53,6 +54,12 @@ AC_DEFUN(jm_PREREQ_GETPAGESIZE,
AC_CHECK_HEADERS(OS.h unistd.h)
])
AC_DEFUN(jm_PREREQ_HASH,
[
AC_CHECK_HEADERS(stdlib.h stdbool.h)
AC_REQUIRE([jm_CHECK_DECLS])
])
# If you use human.c, you need the following files:
# uintmax_t.m4 inttypes_h.m4 ulonglong.m4
AC_DEFUN(jm_PREREQ_HUMAN,
@@ -70,8 +77,9 @@ AC_DEFUN(jm_PREREQ_MEMCHR,
AC_DEFUN(jm_PREREQ_QUOTEARG,
[
AC_CHECK_FUNCS(isascii iswprint mbrtowc)
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
AC_CHECK_FUNCS(isascii iswprint)
jm_FUNC_MBRTOWC
AC_CHECK_HEADERS(limits.h stddef.h stdlib.h string.h wchar.h wctype.h)
AC_HEADER_STDC
AC_C_BACKSLASH_A
AC_MBSTATE_T
@@ -91,7 +99,8 @@ AC_DEFUN(jm_PREREQ_READUTMP,
$ac_includes_default
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#else
#endif
#ifdef HAVE_UTMP_H
# include <utmp.h>
#endif
"

View File

@@ -1,4 +1,4 @@
#serial 8
#serial 9
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
@@ -28,6 +28,7 @@ AC_DEFUN(jm_INCLUDED_REGEX,
{
static struct re_pattern_buffer regex;
const char *s;
struct re_registers regs;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
/* Add this third left square bracket, [, to balance the
three right ones below. Otherwise autoconf-2.14 chokes. */
@@ -39,7 +40,20 @@ AC_DEFUN(jm_INCLUDED_REGEX,
/* This should succeed, but doesn't for e.g. glibc-2.1.3. */
s = re_compile_pattern ("{1", 2, &regex);
exit (s ? 1 : 0);
if (s)
exit (1);
/* The following example is derived from a problem report
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
s = re_compile_pattern ("[anù]*n", 7, &regex);
if (s)
exit (1);
/* This should match, but doesn't for e.g. glibc-2.2.1. */
if (re_match (&regex, "an", 2, 0, &regs) != 2)
exit (1);
exit (0);
}
],
jm_cv_func_working_re_compile_pattern=yes,

40
m4/rename.m4 Normal file
View File

@@ -0,0 +1,40 @@
#serial 2
dnl From Volker Borchert.
dnl Determine whether rename works for source paths with a trailing slash.
dnl The rename from SunOS 4.1.1_U1 doesn't.
dnl
dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
dnl to compile the wrapper function.
dnl
AC_DEFUN(vb_FUNC_RENAME,
[
AC_CACHE_CHECK([whether rename is broken],
vb_cv_func_rename_trailing_slash_bug,
[
rm -rf conftest.d1 conftest.d2
mkdir conftest.d1 ||
AC_MSG_ERROR([cannot create temporary directory])
AC_TRY_RUN([
# include <stdio.h>
int
main ()
{
exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0);
}
],
vb_cv_func_rename_trailing_slash_bug=no,
vb_cv_func_rename_trailing_slash_bug=yes,
dnl When crosscompiling, assume rename is broken.
vb_cv_func_rename_trailing_slash_bug=yes)
rm -rf conftest.d1 conftest.d2
])
if test $vb_cv_func_rename_trailing_slash_bug = yes; then
AC_LIBOBJ(rename)
AC_DEFINE_UNQUOTED(RENAME_TRAILING_SLASH_BUG, 1,
[Define if rename does not work for source paths with a trailing slash,
like the one from SunOS 4.1.1_U1.])
fi
])

View File

@@ -5,7 +5,7 @@ dnl then do case-insensitive s/utime/utimes/.
AC_DEFUN(jm_FUNC_UTIMES_NULL,
[AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null,
[rm -f conftestdata; > conftestdata
[rm -f conftest.data; > conftest.data
AC_TRY_RUN([
/* In case stat has been defined to rpl_stat, undef it here. */
#undef stat
@@ -13,9 +13,11 @@ AC_TRY_RUN([
#include <sys/stat.h>
main() {
struct stat s, t;
exit(!(stat ("conftestdata", &s) == 0 && utimes("conftestdata", (long *)0) == 0
&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));
exit(!(stat ("conftest.data", &s) == 0
&& utimes("conftest.data", (long *)0) == 0
&& stat("conftest.data", &t) == 0
&& t.st_mtime >= s.st_mtime
&& t.st_mtime - s.st_mtime < 120));
}],
ac_cv_func_utimes_null=yes,
ac_cv_func_utimes_null=no,

View File

@@ -1,10 +1,361 @@
2001-02-18 Jim Meyering <meyering@lucent.com>
* Version 4.0.41.
* depcomp: New version, from automake.
`chmod 0 file; rm file' would no longer prompt before removal.
* src/remove.c (remove_file): Revert last change.
Reported by Vin Shelton.
2001-02-17 Jim Meyering <meyering@lucent.com>
* Version 4.0.40.
* src/chown.c (main): `quote' the offending argument.
2001-02-17 Paul Eggert <eggert@twinsun.com>
Stop trying to support hosts that have nonstandard declarations for
mbrtowc and/or mbstate_t. It's not worth the portability hassle.
* m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
* m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
* m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
* lib/mbswidth.c, lib/quotearg.c, src/ls.c (mbrtowc, mbsinit):
Remove workaround macros for hosts that have mbrtowc but not
mbstate_t, as we now insist on proper declarations for both
before using mbrtowc.
Reported by Matt Schalit.
2001-02-17 Jim Meyering <meyering@lucent.com>
* config.sub: Update from master repository.
* config.guess: Likewise.
2001-02-16 Paul Eggert <eggert@twinsun.com>
* doc/getdate.texi: Mention that only English is supported.
Show how to use "date" so that the output is acceptable to getdate.
Mention Z as an abbreviation for UTC.
2001-02-11 Jim Meyering <meyering@lucent.com>
* Makefile.maint (emit-rsync-commands): Define.
(alpha): Use it here.
2001-02-10 Jim Meyering <meyering@lucent.com>
* Makefile.maint (alpha): Fix previous, incomplete change.
* Version 4.0.39.
* depcomp: New version, from automake.
2001-02-04 Jim Meyering <meyering@lucent.com>
* README: Remove note about now-ancient Sequents.
2001-02-03 Jim Meyering <meyering@lucent.com>
* src/ln.c (main): Change type of index variable to `unsigned int'
to avoid a warning.
* config.guess: Update from master repository.
* Makefile.maint (a_host): Use fencepost.
(real_dir): Use the same name for both.
(alpha): Print commands for both hosts.
* src/mv.c (long_options): Use `strip-trailing-slashes',
per the documetation, not `strip-trailing-slash'.
* src/cp.c (long_opts): Likewise.
Reported by Oskar Liljeblad.
* doc/fileutils.texi (mv invocation): Add a warning about how a trailing
slash makes a difference. Prompted by a report from Oskar Liljeblad
via Michael Stone (Debian bug#83991).
2001-01-31 Jim Meyering <meyering@lucent.com>
* config.sub: Update from master repository.
* config.guess: Likewise.
2001-01-28 Jim Meyering <meyering@lucent.com>
* Version 4.0.38.
* configure, aclocal.m4, etc.: Regenerate using autoconf-2.49c.
* src/ls.c (gobble_file): Add a FIXME comment.
* TODO: Add a few items.
* src/ls.c (enum) [FULL_TIME]: Define.
(long_options): Use it.
(decode_switches): Make --full-time imply -l.
Prompted by a report from Karl Eichwalder.
2001-01-22 Jim Meyering <meyering@lucent.com>
* src/remove.c (remove_file): Correct an expression to avoid making
an unnecessary call to euidaccess for each file.
2001-01-21 Jim Meyering <meyering@lucent.com>
* Version 4.0.37.
2001-01-20 Jim Meyering <meyering@lucent.com>
* configure.in: Remove jm_CHECK_ALL_TYPES.
Now it's invoked by jm_MACROS.
2001-01-17 Jim Meyering <meyering@lucent.com>
* src/sys2.h (case_GETOPT_VERSION_CHAR): Use PACKAGE, not GNU_PACKAGE.
* src/sync.c (main): Likewise.
* src/shred.c (PACKAGE): Likewise.
* src/dd.c (main): Likewise.
2001-01-14 Jim Meyering <meyering@lucent.com>
* Version 4.0.36.
* src/shred.c (UINT_MAX_32_BITS): Define.
Use UINT_MAX_32_BITS in the cpp conditions that determine
the `word32' typedef. Using a literal `0xffffffff' failed with
HPUX10.20's /bin/cc.
* config.sub: Update from master repository.
* config.guess: Likewise.
2001-01-02 Volker Borchert <bt@teknon.de>
Work around a broken rename system call, e.g. on SunOS 4.1.1_U1,
that fails when the source path has a trailing slash.
* src/copy.h [RENAME_TRAILING_SLASH_BUG]: Use the rename wrapper.
* tests/mv/trailing-slash: Test whether the workaround works.
* tests/m4/Makefile.am (TESTS): Add trailing-slash.
2001-01-03 Alexandre Duret-Lutz <duret_g@epita.fr>
* po/Makefile.in.in (update-po): Merge po-files in temporary files
in the build directory, and update the source directory only when
the merged catalog differs from the original. This fixes the known
`make distcheck' failure due to `make update-po' being called
on up-to-date but read-only files.
2001-01-13 Jim Meyering <meyering@lucent.com>
* src/copy.c (same_file_ok): When moving a symlink onto itself,
don't remove the symlink. Reported by David Luyer as Debian bug#82089,
via Michael Stone.
* tests/mv/into-self-4: New test for the above.
* tests/mv/Makefile.am (TESTS): Add into-self-4.
* tests/chmod/setgid: If `chmod g+s d' fails, then try to chgrp
to a group of which we're a member, then try the chmod again.
2001-01-11 Jim Meyering <meyering@lucent.com>
* depcomp: New version, from automake.
2001-01-10 Jim Meyering <meyering@lucent.com>
* src/copy.c (copy_internal): Add a comment.
Set *copy_into_self in the new code that detects that.
Make diagnostic more consistent: s/won't/will not/.
[move_mode, copy_into_self]: Give a diagnstic here, now that
we have the top_level_* globals. Remove the corresponding diagnostic
from mv.c.
Add a FIXME comment.
* src/mv.c (do_move): Remove diagnostic, now that copy.c issues it.
Set `fail' to nonzero in the primary `if (copy_into_self)' block
rather than in its own tiny one below.
* src/copy.c (copy_internal): Don't allow cp (or mv, when working
across a partition boundary) to overwrite a non-directory with a
directory. Reported by Michael J. Croghan.
* tests/cp/dir-vs-file: New test for the above.
* tests/cp/Makefile.am (TESTS): Add dir-vs-file.
2001-01-09 Jim Meyering <meyering@lucent.com>
Give a better diagnostic for `cp -R a a'.
* src/copy.c (top_level_src_path, top_level_dst_path): New globals.
(copy_internal): Use them.
(copy): Set them.
* src/cp-hash.c [struct entry] (node): Describe how it's used,
now that we've overloaded it, in order to detect and diagnose
the copying-directory-into-self problem.
(new_file): Remove global.
(htab): Declare global to be static.
(remember_created): Insert file name instead of dummy pointer, so
that copy.c can use the just-created directory name to detect
the copying-directory-into-self problem.
* tests/cp/into-self: New test for the above.
* tests/cp/Makefile.am (TESTS): Add into-self.
2001-01-07 Jim Meyering <meyering@lucent.com>
* src/cp.c (usage): Split a string that was longer than 2048 bytes.
* doc/perm.texi: s/can not/cannot/
2001-01-07 Karl Eichwalder <ke@suse.de>
* src/chown.c (usage): Split long message string.
2001-01-07 Karl Eichwalder <ke@suse.de>
* src/ls.c (usage): Untabify.
* src/chgrp.c (parse_group): Normalize spelling.
2001-01-03 Paul Eggert <eggert@twinsun.com>
* NEWS: Document the planned --full-time change.
* doc/fileutils.texi: Likewise.
* NEWS: Document that time stamps depend on LC_TIME, not LC_MESSAGES.
2001-01-03 Paul Eggert <eggert@twinsun.com>
Use the more precise algorithm of GNU "make" to decide whether
a file is in the future, by looking at high-resolution time
stamps if available.
* src/ls.c:
(TIMESPEC_NS): New macro.
(current_time): Initialize to the minimum value.
(current_time_ns): New var.
(main): Do not bother to initialize current_time;
it's no longer needed.
(get_current_time): New function.
(print_long_format): Use it when a file appears to be in the future.
Get the nanoseconds of the file's time stamp, if available,
and use that to decide whether the file appears to be in the future.
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): New macros.
2001-01-02 Paul Eggert <eggert@twinsun.com>
* src/ls.c (long_time_expected_width, print_long_format): Fix
bug: the initial byte passed to strftime wasn't initialized to
a nonzero value after the buffer was reallocated.
2001-01-02 Paul Eggert <eggert@twinsun.com>
Make ls -l compatible with POSIX, which requires that the
behavior of time formats must depend only on LC_TIME, not on
LC_MESSAGES.
* po/Makefile.in.in (install-data-yes): If the package is
fileutils, install LC_TIME as an alias for LC_MESSAGES.
* src/sys2.h (dcgettext): New macro.
* src/ls.c (decode_switches): Use dcgettext with LC_TIME,
not plain gettext, to get the translations of time formats.
2001-01-02 Paul Eggert <eggert@twinsun.com>
* src/ls.c (long_time_expected_width): New function.
(print_long_format): Use it, so that we don't assume a
particular width for time stamps in an internationalized
environment.
2001-01-01 Paul Eggert <eggert@twinsun.com>
* doc/fileutils.texi, NEWS:
ls -l now reports the year for files even slightly in the future, as
POSIX requires. This helps warn users about clock skew problems.
* src/ls.c (print_long_format):
Report the year for files even slightly in the future.
Avoid overflow problems near Y2038 on 32-bit hosts.
To calculate "six months", take half the average Gregorian
year, not 180 days.
2001-01-01 Jim Meyering <meyering@lucent.com>
* tests/chmod/Makefile.am (TESTS): Add setgid.
* tests/chmod/setgid: Test for chmod's existing behavior.
Based on a report from Paul Eggert.
2000-12-29 Paul Eggert <eggert@twinsun.com>
Clean up the terminology a tad: some directories were called "sticky"
when they were really setgid.
* tests/Makefile.am (EXTRA_DIST): sticky-check -> setgid-check
* tests/chmod/c-option, tests/cp/cp-parents, tests/mkdir/parents,
tests/mkdir/perm: Likewise.
* tests/setgid-check: File renamed from tests/sticky-check.
All uses of "sticky" changed to "setgid".
2000-12-31 Jim Meyering <meyering@lucent.com>
* tests/cp/Makefile.am (TESTS): Add deref-slink.
* tests/cp/deref-slink: New file. Test for the bug fixed by my
2000-12-28 change to copy.c.
2000-12-30 Paul Eggert <eggert@twinsun.com>
* src/ls.c: Improve performance by invoking gettext twice at the start,
instead of once for each file.
(long_time_format): New var.
(decode_switches): Initialize it, if format == long_format.
(print_long_format): Use it.
2000-12-30 Paul Eggert <eggert@twinsun.com>
* src/ls.c (print_long_format): Don't dump core if strftime
returns the empty string.
2000-12-30 Paul Eggert <eggert@twinsun.com>
* src/ls.c (gobble_file): If not using long format, don't
invoke acl; it's not needed.
2000-12-30 Jim Meyering <meyering@lucent.com>
Avoid an unnecessary `stat' when using --dereference.
* src/copy.c (same_file_ok): Use stat only if lstat reported that
the file was a symbolic link.
2000-12-29 Paul Eggert <eggert@twinsun.com>
* doc/perm.texi: append-only directories -> restricted deletion flag,
which is the term that POSIX d5 uses for this notion.
2000-12-28 Paul Eggert <eggert@twinsun.com>
* tests/group-names: Try /usr/xpg4/bin/id (Solaris 7) if plain
'id' doesn't work.
2000-12-28 Jim Meyering <meyering@lucent.com>
* tests/cp/cp-parents: Run sticky-check from just-created directory.
2000-12-28 Jim Meyering <meyering@lucent.com>
* src/copy.c (same_file_ok): Fix two typos from my 2000-09-03 change:
s/tmp_dst_sb/tmp_src_sb/.
2000-12-27 Paul Eggert <eggert@twinsun.com>
* tests/sticky-check: Turn off the working directory's sticky
bit, so that we don't have to worry about it later.
* src/copy.c (same_file_ok): Use a single auto var for
tmp_dst_sb, instead of two static vars. Likewise for
tmp_src_sb.
2000-12-26 Jim Meyering <meyering@lucent.com>
* Version 4.0.35.
* Regenerate build/config framework to use automake-1.4b and
the latest CVS version autoconf.
* tests/mkdir/perm: Disable the test if the working directory has
the sticky bit set.
* tests/cp/cp-parents: Likewise.
@@ -13,6 +364,7 @@
2000-12-25 Jim Meyering <meyering@lucent.com>
Clean-up to avoid warnings from Irix's c89.
* src/remove.c (hash_compare_active_dir_ents): Return explicit `true'
or `false', rather than relying on implicit int-to-enum cast.
* src/copy.c (same_file_ok): Remove declaration and set of unused

View File

@@ -1,4 +1,30 @@
Changes in release 4.01:
[4.0.41]
* fix bug in rm introduced in 4.0.38: `chmod 0 f; rm f' would no longer prompt
before removal.
[4.0.40]
* portability fixes, mainly for UnixWare 7.1.1
[4.0.39]
* cp and mv accept --strip-trailing-slashes, not just --strip-trailing-slash
[4.0.38]
* ls --full-time now implies -l; before, without -l it was a no-op
[4.0.37]
* portability fixes for SunOS4.1.1, Fujitsu (f300-fujitsu-uxpv4.1_ES),
and Unicos (alphaev5-cray-unicosmk2.0.5.X)
[4.0.36]
* `mv dir/ new-name' no longer fails on SunOS4.1.1U
* attempting to use mv to move a symlink onto itself no longer removes
the symlink
* `cp -R directory file' no longer removes `file'. now it fails and gives
a diagnostic
* The manual now warns that ls's --full-time format string is planned
to change in a future release.
* ls -l's time stamp format now depends on LC_TIME, not LC_MESSAGES,
as POSIX requires.
* ls -l now reports the year for files even slightly in the future, as
POSIX requires. This helps warn users about clock skew problems.
* `cp -d file symlink-to-some-other-file' no longer fails
* performance improvements for ls
[4.0.35]
* ln --backup=simple --suffix=SUFFIX once again uses SUFFIX
* install: Likewise.
@@ -15,7 +41,9 @@ Changes in release 4.01:
[4.0.33]
* dd now accepts skip=nB and seek=nB, to advance past some number of bytes, n,
that need not be a multiple of the block size.
* dd (without conv=notrunc) now uses ftruncate only on regular files
* dd (without conv=notrunc) now complains only when ftruncate fails on a
regular file, a directory, or a shared memory object -- not when it fails
to truncate other types of files, like /dev/fd0.
* chmod --changes (-c) once again issues diagnostics only for the files
with changed permissions
* mkdir now gives one diagnostic (rather than two) for certain failures
@@ -69,7 +97,7 @@ Changes in release 4.01:
* cp -p and mv now try to preserve uid even if you're not root, as per POSIX.2.
This affects behavior only on hosts that let you give files away via chmod.
* du would fail when given `.' or `..' followed by other command line arguments
* Using cp's short-named `-P' option evokes the warning that that the
* Using cp's short-named `-P' option evokes the warning that the
meaning of `-P' will soon change. Use `--parents' instead.
* chgrp, chmod, and chown: when used with the --verbose option, might give an
invalid diagnostic (due to clobbered errno) when failing.

View File

@@ -1,3 +1,36 @@
2001-02-04 Jim Meyering <meyering@lucent.com>
* src/factor.c (usage): Tweak --help output: it prints the _prime_
factors, not just any factors.
2001-02-03 Jim Meyering <meyering@lucent.com>
Improve the performance of `factor' (more than 2x speed-up for large N).
* src/factor.c (wheel_tab): New global table.
(WHEEL_START, WHEEL_END): Define.
(factor): Remove the loop that special-cased `2'.
Instead of incrementing by `2', use the offsets from the wheel table.
From Michael Steffens.
2000-11-27 Prashant TR <rprash@wilco-int.com>
* src/test.c (eaccess) [__MSDOS__]: Just use access.
2001-01-26 Jim Meyering <meyering@lucent.com>
* src/dirname.c (main): Declare local result as non-const, now
that it's freed.
2001-01-20 Jim Meyering <meyering@lucent.com>
* configure.in: Remove jm_CHECK_ALL_TYPES.
Now it's invoked by jm_MACROS.
2001-01-04 Jim Meyering <meyering@lucent.com>
* src/date.c (main): Fail when --rfc-822 (-R) is specified along
with a format string. Reported by Jochen Hein.
2000-12-17 Jim Meyering <meyering@lucent.com>
* doc/texinfo.tex: Update from master repository.

View File

@@ -1,3 +1,48 @@
2001-02-18 Jim Meyering <meyering@lucent.com>
Rename test input files to avoid conflicts on case-insensitive
file systems.
* tests/pr/2-Sf-t_notab: Rename from 2Sf-t_notab.
* tests/pr/2-S_f-t_notab: Rename from 2S_f-t_notab.
* tests/pr/W-72l17f-ll: Rename from W72l17f-ll.
* tests/pr/Test.pm: Update file names to reflect renamings.
Reported by Matthew Smith.
2001-01-20 Jim Meyering <meyering@lucent.com>
* configure.in: Remove jm_CHECK_ALL_TYPES.
Now it's invoked by jm_MACROS.
2001-01-17 Jim Meyering <meyering@lucent.com>
* src/cksum.c (main): Use PACKAGE, not GNU_PACKAGE.
* src/tsort.c (main): Likewise.
* src/sort.c (main): Likewise.
(usage): Convert each TAB in --help output to a sequence of 8 spaces.
2001-01-07 Jim Meyering <meyering@lucent.com>
* src/tail.c (usage): Split a string that was longer than 2048 bytes.
2001-01-03 Jim Meyering <meyering@lucent.com>
* src/sort.c (main): Remove embedded \n from diagnostic.
2001-01-02 Jim Meyering <meyering@lucent.com>
* src/od.c (ulonglong_t): Define place-holder type to avoid some #if
directives.
(LONGEST_INTEGRAL_TYPE): Remove definition.
(MAX_INTEGRAL_TYPE_SIZE): Use ulonglong_t instead of
LONGEST_INTEGRAL_TYPE.
(print_long_long): Compile this function even on systems without
long long support.
(decode_one_format): Remove #if directive.
* src/od.c (decode_one_format): Guard use of print_long_long with
`#if HAVE_UNSIGNED_LONG_LONG'. From Darren Salt.
Change all `#ifdef HAVE_UNSIGNED_LONG_LONG' to use `#if' instead.
2000-12-23 Jim Meyering <meyering@lucent.com>
* src/sys2.h [HAVE_INTTYPES_H]: Include <inttypes.h>.

View File

@@ -150,6 +150,13 @@ install-data-yes: all
true; \
fi; \
fi; \
if test "$(PACKAGE)" = "fileutils"; then \
timedir=$$destdir/$$lang/LC_TIME; \
rm -fr $$timedir; \
ln -s LC_MESSAGES $$timedir \
|| (mkdir $$timedir && ln $$dir/* $$timedir); \
echo "installing $$timedir as an alias for $$dir"; \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
if test -x "$(MKINSTALLDIRS)"; then \
@@ -206,20 +213,25 @@ dist distdir: update-po $(DISTFILES)
update-po: Makefile
$(MAKE) $(PACKAGE).pot
PATH=`pwd`/../src:$$PATH; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
rm -f $$lang.old.po; \
if $(MSGMERGE) $(srcdir)/$$lang.po \
$(srcdir)/$(PACKAGE).pot -o $$lang.new.po; then \
if cmp $$lang.new.po $(srcdir)/$$lang.po >/dev/null; then \
echo "$$lang.po is unchanged"; \
rm -f $$lang.new.po; \
else \
echo "updating $$lang.po"; \
rm -f $(srcdir)/$$lang.po; \
mv $$lang.new.po $(srcdir)/$$lang.po; \
fi; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
rm -f $$lang.new.po; \
exit 1; \
fi; \
done

View File

@@ -1,5 +1,5 @@
/* chgrp -- change group ownership of files
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 89, 90, 91, 1995-2001 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
@@ -91,7 +91,7 @@ parse_group (const char *name, gid_t *g)
struct group *grp;
if (*name == '\0')
error (1, 0, _("can not change to null group"));
error (1, 0, _("cannot change to null group"));
grp = getgrnam (name);
if (grp == NULL)

View File

@@ -1,5 +1,5 @@
/* chown -- change user and group ownership of files
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 89, 90, 91, 1995-2001 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
@@ -126,6 +126,8 @@ Change the owner and/or group of each FILE to OWNER and/or GROUP.\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
"));
printf (_("\
Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
to login group if implied by a `:'. OWNER and GROUP may be numeric as well\n\
as symbolic.\n\
@@ -223,7 +225,7 @@ main (int argc, char **argv)
const char *e = parse_user_spec (argv[optind], &uid, &gid,
&chopt.user_name, &chopt.group_name);
if (e)
error (1, 0, "%s: %s", argv[optind], e);
error (1, 0, "%s: %s", quote (argv[optind]), e);
/* FIXME: set it to the empty string? */
if (chopt.user_name == NULL)

View File

@@ -1,5 +1,5 @@
/* cksum -- calculate and print POSIX.2 checksums and sizes of files
Copyright (C) 92, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 92, 1995-2001 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
@@ -296,7 +296,7 @@ main (int argc, char **argv)
atexit (close_stdout);
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
AUTHORS, usage);
have_read_stdin = 0;

View File

@@ -1,5 +1,5 @@
/* copy.c -- core functions for copying files and directories
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,6 +67,11 @@ static int copy_internal PARAMS ((const char *src_path, const char *dst_path,
int *copy_into_self,
int *rename_succeeded));
/* Pointers to the file names: they're used in the diagnostic that is issued
when we detect the user is trying to copy a directory into itself. */
static char const *top_level_src_path;
static char const *top_level_dst_path;
/* The invocation name of this program. */
extern char *program_name;
@@ -392,6 +397,8 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
{
const struct stat *src_sb_link;
const struct stat *dst_sb_link;
struct stat tmp_dst_sb;
struct stat tmp_src_sb;
int same_link;
int same = (SAME_INODE (*src_sb, *dst_sb));
@@ -415,17 +422,15 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
/* If both the source and destination files are symlinks (and we'll
know this here IFF preserving symlinks (aka xstat == lstat),
then it's ok. */
then it's ok -- as long as they are distinct. */
if (S_ISLNK (src_sb->st_mode) && S_ISLNK (dst_sb->st_mode))
return 1;
return ! same_name (src_path, dst_path);
src_sb_link = src_sb;
dst_sb_link = dst_sb;
}
else
{
static struct stat tmp_dst_sb;
static struct stat tmp_src_sb;
if (!same)
return 1;
@@ -489,7 +494,7 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
return 1;
/* If neither is a symlink, then it's ok as long as they aren't
links to the same file. */
hard links to the same file. */
if (!S_ISLNK (src_sb_link->st_mode) && !S_ISLNK (dst_sb_link->st_mode))
{
if (!SAME_INODE (*src_sb_link, *dst_sb_link))
@@ -504,19 +509,25 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
}
/* It's ok to remove a destination symlink. But that works only when we
unlink before opening the destination and when they're on the same
partition. */
unlink before opening the destination and when the source and destination
files are on the same partition. */
if (x->unlink_dest_before_opening
&& S_ISLNK (dst_sb_link->st_mode))
return src_sb_link->st_dev == src_sb_link->st_dev;
return dst_sb_link->st_dev == src_sb_link->st_dev;
if (x->xstat == lstat)
{
static struct stat tmp_dst_sb;
static struct stat tmp_src_sb;
if (stat (dst_path, &tmp_dst_sb)
|| stat (src_path, &tmp_src_sb)
|| ! SAME_INODE (tmp_dst_sb, tmp_dst_sb))
if ( ! S_ISLNK (src_sb_link->st_mode))
tmp_src_sb = *src_sb_link;
else if (stat (src_path, &tmp_src_sb))
return 1;
if ( ! S_ISLNK (dst_sb_link->st_mode))
tmp_dst_sb = *dst_sb_link;
else if (stat (dst_path, &tmp_dst_sb))
return 1;
if ( ! SAME_INODE (tmp_src_sb, tmp_dst_sb))
return 1;
/* FIXME: shouldn't this be testing whether we're making symlinks? */
@@ -577,6 +588,10 @@ copy_internal (const char *src_path, const char *dst_path,
find created files so as to not copy infinitely if a directory is
copied into itself. */
/* Associate the destination path with the source device and inode
so that if we encounter a matching dev/ino pair in the source tree
we can arrange to create a hard link between the corresponding names
in the destination tree. */
earlier_file = remember_copied (dst_path, src_sb.st_ino, src_sb.st_dev);
src_mode = src_sb.st_mode;
@@ -617,6 +632,14 @@ copy_internal (const char *src_path, const char *dst_path,
return 1;
}
if (S_ISDIR (src_type) && !S_ISDIR (dst_sb.st_mode))
{
error (0, 0,
_("cannot overwrite non-directory %s with directory %s"),
quote_n (0, dst_path), quote_n (1, src_path));
return 1;
}
if (!S_ISDIR (src_type))
{
if (S_ISDIR (dst_sb.st_mode))
@@ -750,8 +773,21 @@ copy_internal (const char *src_path, const char *dst_path,
directories). */
if (S_ISDIR (src_type))
{
error (0, 0, _("won't create hard link %s to directory %s"),
quote_n (0, dst_path), quote_n (1, earlier_file));
/* If src_path and earlier_file refer to the same directory entry,
then warn about copying a directory into itself. */
if (same_name (src_path, earlier_file))
{
error (0, 0, _("cannot copy a directory, %s, into itself, %s"),
quote_n (0, top_level_src_path),
quote_n (1, top_level_dst_path));
*copy_into_self = 1;
}
else
{
error (0, 0, _("will not create hard link %s to directory %s"),
quote_n (0, dst_path), quote_n (1, earlier_file));
}
goto un_backup;
}
@@ -797,7 +833,13 @@ copy_internal (const char *src_path, const char *dst_path,
/* FIXME: this is a little fragile in that it relies on rename(2)
failing with a specific errno value. Expect problems on
non-POSIX systems. */
error (0, 0, _("cannot move %s to a subdirectory of itself, %s"),
quote_n (0, top_level_src_path),
quote_n (1, top_level_dst_path));
*copy_into_self = 1;
/* FIXME-cleanup: Don't return zero here; adjust mv.c accordingly.
The only caller that uses this code (mv.c) ends up setting its
exit status to nonzero when copy_into_self is nonzero. */
return 0;
}
@@ -1161,6 +1203,17 @@ copy (const char *src_path, const char *dst_path,
int move_mode = options->move_mode;
assert (valid_options (options));
/* Record the file names: they're used in case of error, when copying
a directory into itself. I don't like to make these tools do *any*
extra work in the common case when that work is solely to handle
exceptional cases, but in this case, I don't see a way to derive the
top level source and destination directory names where they're used.
An alternative is to use COPY_INTO_SELF and print the diagnostic
from every caller -- but I don't wan't to do that. */
top_level_src_path = src_path;
top_level_dst_path = dst_path;
return copy_internal (src_path, dst_path, nonexistent_dst, 0, NULL,
options, move_mode, copy_into_self, rename_succeeded);
}

View File

@@ -142,6 +142,17 @@ int rpl_lstat PARAMS((const char *, struct stat *));
# define lstat rpl_lstat
# endif
int rename ();
/* Arrange to make rename calls go through the wrapper function
on systems with a rename function that fails for a source path
specified with a trailing slash. */
# if RENAME_TRAILING_SLASH_BUG
int rpl_rename PARAMS((const char *, const char *));
# undef rename
# define rename rpl_rename
# endif
int
copy PARAMS ((const char *src_path, const char *dst_path,
int nonexistent_dst, const struct cp_options *options,

View File

@@ -1,5 +1,5 @@
/* cp-hash.c -- file copying (hash search routines)
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,11 @@ struct entry
{
ino_t ino;
dev_t dev;
char *node; /* Path name, or &new_file for new inodes. */
/* Destination path name (of non-directory or pre-existing directory)
corresponding to the dev/ino of a copied file, or the destination path
name corresponding to a dev/ino pair for a newly-created directory. */
char *node;
struct entry *coll_link; /* 0 = entry not occupied. */
};
@@ -46,8 +50,7 @@ struct htab
struct entry *hash[1]; /* Vector of pointers in `entry_tab'. */
};
struct htab *htab;
char new_file;
static struct htab *htab;
static char *cph_hash_insert PARAMS ((ino_t ino, dev_t dev, const char *node));
@@ -65,7 +68,7 @@ remember_created (const char *path)
return 1;
}
cph_hash_insert (sb.st_ino, sb.st_dev, &new_file);
cph_hash_insert (sb.st_ino, sb.st_dev, path);
return 0;
}

View File

@@ -1,5 +1,5 @@
/* cp.c -- file copying (main routines)
Copyright (C) 89, 90, 91, 1995-2000 Free Software Foundation.
Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -124,7 +124,7 @@ static struct option const long_opts[] =
{"preserve", no_argument, NULL, 'p'},
{"recursive", no_argument, NULL, 'R'},
{"remove-destination", no_argument, NULL, UNLINK_DEST_BEFORE_OPENING},
{"strip-trailing-slash", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
{"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
{"suffix", required_argument, NULL, 'S'},
{"symbolic-link", no_argument, NULL, 's'},
{"target-directory", required_argument, NULL, TARGET_DIRECTORY_OPTION},
@@ -172,6 +172,8 @@ Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n\
special files like FIFOs or /dev/zero\n\
--remove-destination remove each existing destination file before\n\
attempting to open it (contrast with --force)\n\
"));
printf (_("\
--sparse=WHEN control creation of sparse files\n\
-R, --recursive copy directories recursively\n\
--strip-trailing-slashes remove any trailing slashes from each SOURCE\n\

View File

@@ -1,5 +1,5 @@
/* date - print or set the system date and time
Copyright (C) 1989-2000 Free Software Foundation, Inc.
Copyright (C) 1989-2001 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
@@ -355,6 +355,15 @@ argument must be a format string beginning with `+'."),
usage (1);
}
/* Simply ignore --rfc-822 if specified when setting the date. */
if (rfc_format && !set_date && n_args > 0)
{
error (0, 0,
_("a format string may not be specified when using\
the --rfc-822 (-R) option"));
usage (1);
}
if (set_date)
datestr = set_datestr;

View File

@@ -1,5 +1,5 @@
/* dd -- convert a file while copying it.
Copyright (C) 85, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 85, 90, 91, 1995-2001 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
@@ -1111,7 +1111,7 @@ main (int argc, char **argv)
/* Arrange to close stdout if parse_long_options exits. */
atexit (close_stdout_wrapper);
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
AUTHORS, usage);
/* Don't close stdout on exit from here on. */

View File

@@ -1,5 +1,5 @@
/* dirname -- strip filename suffix from pathname
Copyright (C) 1990-1997, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1990-1997, 1999, 2000, 2001 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
@@ -66,8 +66,7 @@ output `.' (meaning the current directory).\n\
int
main (int argc, char **argv)
{
const char *result;
size_t len;
char *result;
program_name = argv[0];
setlocale (LC_ALL, "");

View File

@@ -1,5 +1,5 @@
/* factor -- print factors of n.
Copyright (C) 86, 1995-2000 Free Software Foundation, Inc.
/* factor -- print prime factors of n.
Copyright (C) 86, 1995-2001 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
@@ -45,6 +45,41 @@
than 2^128, this constant (and the algorithm :-) will have to change. */
#define MAX_N_FACTORS 128
/* The trial divisor increment wheel. Use it to skip over divisors that
are composites of 2, 3, 5, 7, or 11. The part from WHEEL_START up to
WHEEL_END is reused periodically, while the "lead in" is used to test
for those primes and to jump onto the wheel. For more information, see
http://www.utm.edu/research/primes/glossary/WheelFactorization.html */
static const unsigned int wheel_tab[] = {
/* lead in: */ 1, 2, 2, 4, 2, /* and the periodic tail: */
4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4,
2, 4, 2, 4,14, 4, 6, 2,10, 2, 6, 6, 4, 2, 4, 6, 2,10, 2, 4,
2,12,10, 2, 4, 2, 4, 6, 2, 6, 4, 6, 6, 6, 2, 6, 4, 2, 6, 4,
6, 8, 4, 2, 4, 6, 8, 6,10, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2,
6, 4, 2, 6,10, 2,10, 2, 4, 2, 4, 6, 8, 4, 2, 4,12, 2, 6, 4,
2, 6, 4, 6,12, 2, 4, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6,10, 2,
4, 6, 2, 6, 4, 2, 4, 2,10, 2,10, 2, 4, 6, 6, 2, 6, 6, 4, 6,
6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 6, 4, 8, 6, 4, 6, 2, 4, 6,
8, 6, 4, 2,10, 2, 6, 4, 2, 4, 2,10, 2,10, 2, 4, 2, 4, 8, 6,
4, 2, 4, 6, 6, 2, 6, 4, 8, 4, 6, 8, 4, 2, 4, 2, 4, 8, 6, 4,
6, 6, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4, 2,10, 2,10, 2,
6, 4, 6, 2, 6, 4, 2, 4, 6, 6, 8, 4, 2, 6,10, 8, 4, 2, 4, 2,
4, 8,10, 6, 2, 4, 8, 6, 6, 4, 2, 4, 6, 2, 6, 4, 6, 2,10, 2,
10, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 6, 6, 4, 6, 8,
4, 2, 4, 2, 4, 8, 6, 4, 8, 4, 6, 2, 6, 6, 4, 2, 4, 6, 8, 4,
2, 4, 2,10, 2,10, 2, 4, 2, 4, 6, 2,10, 2, 4, 6, 8, 6, 4, 2,
6, 4, 6, 8, 4, 6, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6, 6, 4, 6,
6, 2, 6, 6, 4, 2,10, 2,10, 2, 4, 2, 4, 6, 2, 6, 4, 2,10, 6,
2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2,12, 6, 4, 6, 2, 4, 6, 2,
12, 4, 2, 4, 8, 6, 4, 2, 4, 2,10, 2,10, 6, 2, 4, 6, 2, 6, 4,
2, 4, 6, 6, 2, 6, 4, 2,10, 6, 8, 6, 4, 2, 4, 8, 6, 4, 6, 2,
4, 6, 2, 6, 6, 6, 4, 6, 2, 6, 4, 2, 4, 2,10,12, 2, 4, 2,10,
2, 6, 4, 2, 4, 6, 6, 2,10, 2, 6, 4,14, 4, 2, 4, 2, 4, 8, 6,
4, 6, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4,12, 2,12};
#define WHEEL_START (wheel_tab + 5)
#define WHEEL_END (wheel_tab + (sizeof wheel_tab / sizeof wheel_tab[0]))
/* The name this program was run with. */
char *program_name;
@@ -62,7 +97,7 @@ Usage: %s [NUMBER]...\n\
"),
program_name, program_name);
printf (_("\
Print factors of each NUMBER; read standard input with no arguments.\n\
Print the prime factors of each NUMBER.\n\
\n\
--help display this help and exit\n\
--version output version information and exit\n\
@@ -82,17 +117,11 @@ factor (uintmax_t n0, int max_n_factors, uintmax_t *factors)
{
register uintmax_t n = n0, d, q;
int n_factors = 0;
unsigned int const *w = wheel_tab;
if (n < 1)
return n_factors;
while (n % 2 == 0)
{
assert (n_factors < max_n_factors);
factors[n_factors++] = 2;
n /= 2;
}
/* The exit condition in the following loop is correct because
any time it is tested one of these 3 conditions holds:
(1) d divides n
@@ -101,7 +130,7 @@ factor (uintmax_t n0, int max_n_factors, uintmax_t *factors)
If (1) or (2) obviously the right thing happens.
If (3), then since n is composite it is >= d^2. */
d = 3;
d = 2;
do
{
q = n / d;
@@ -112,7 +141,9 @@ factor (uintmax_t n0, int max_n_factors, uintmax_t *factors)
n = q;
q = n / d;
}
d += 2;
d += *(w++);
if (w == WHEEL_END)
w = WHEEL_START;
}
while (d <= q);

View File

@@ -1,5 +1,5 @@
/* `ln' program to create links between files.
Copyright (C) 86, 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 86, 89, 90, 91, 1995-2001 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
@@ -520,7 +520,7 @@ main (int argc, char **argv)
if (target_directory_specified || n_files > 2)
{
int i;
unsigned int i;
unsigned int last_file_idx = (target_directory_specified
? n_files - 1
: n_files - 2);

194
src/ls.c
View File

@@ -1,5 +1,5 @@
/* `dir', `vdir' and `ls' directory listing programs for GNU.
Copyright (C) 85, 88, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 85, 88, 90, 91, 1995-2001 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
@@ -93,12 +93,6 @@
# define iswprint(wc) 1
#endif
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
#if HAVE_MBRTOWC && defined mbstate_t
# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
# define mbsinit(ps) 1
#endif
#ifndef HAVE_DECL_WCWIDTH
"this configure-time declaration test was not run"
#endif
@@ -205,6 +199,12 @@ int rpl_lstat PARAMS((const char *, struct stat *));
# define DT_INIT(Val) /* empty */
#endif
#ifdef ST_MTIM_NSEC
# define TIMESPEC_NS(timespec) ((timespec).ST_MTIM_NSEC)
#else
# define TIMESPEC_NS(timespec) 0
#endif
enum filetype
{
unknown DT_INIT (DT_UNKNOWN),
@@ -383,10 +383,11 @@ struct pending
static struct pending *pending_dirs;
/* Current time (seconds since 1970). When we are printing a file's time,
include the year if it is more than 6 months before this time. */
/* Current time in seconds and nanoseconds since 1970, updated as
needed when deciding whether a file is recent. */
static time_t current_time;
static time_t current_time = TYPE_MINIMUM (time_t);
static int current_time_ns = -1;
/* The number of digits to use for block sizes.
4, or more if needed for bigger numbers. */
@@ -648,6 +649,11 @@ static int format_needs_stat;
static int format_needs_type;
/* strftime formats for non-recent and recent files, respectively, in
-l output. */
static char const *long_time_format[2];
/* The exit status to use if we don't get any fatal errors. */
static int exit_status;
@@ -659,6 +665,7 @@ enum
BLOCK_SIZE_OPTION = CHAR_MAX + 1,
COLOR_OPTION,
FORMAT_OPTION,
FULL_TIME,
INDICATOR_STYLE_OPTION,
QUOTING_STYLE_OPTION,
SHOW_CONTROL_CHARS_OPTION,
@@ -672,7 +679,7 @@ static struct option const long_options[] =
{"escape", no_argument, 0, 'b'},
{"directory", no_argument, 0, 'd'},
{"dired", no_argument, 0, 'D'},
{"full-time", no_argument, &full_time, 1},
{"full-time", no_argument, 0, FULL_TIME},
{"human-readable", no_argument, 0, 'h'},
{"inode", no_argument, 0, 'i'},
{"kilobytes", no_argument, 0, 'k'},
@@ -861,7 +868,6 @@ main (int argc, char **argv)
dir_defaulted = 1;
print_dir_name = 1;
pending_dirs = 0;
current_time = time ((time_t *) 0);
i = decode_switches (argc, argv);
@@ -1277,6 +1283,11 @@ decode_switches (int argc, char **argv)
format = XARGMATCH ("--format", optarg, format_args, format_types);
break;
case FULL_TIME:
format = long_format;
full_time = 1;
break;
case COLOR_OPTION:
if (optarg)
i = XARGMATCH ("--color", optarg, color_args, color_types);
@@ -1352,6 +1363,18 @@ decode_switches (int argc, char **argv)
sort_type = sort_time;
}
if (format == long_format)
{
if (full_time)
long_time_format[0] = long_time_format[1] =
dcgettext (NULL, "%a %b %d %H:%M:%S %Y", LC_TIME);
else
{
long_time_format[0] = dcgettext (NULL, "%b %e %Y", LC_TIME);
long_time_format[1] = dcgettext (NULL, "%b %e %H:%M", LC_TIME);
}
}
return optind;
}
@@ -1873,6 +1896,10 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
files[files_index].linkmode = 0;
files[files_index].linkok = 0;
/* FIXME: this use of ls: `mkdir a; touch a/{b,c,d}; ls -R a'
shouldn't require that ls stat b, c, and d -- at least
not on systems with usable d_type. The problem is that
format_needs_stat is set, because of the -R. */
if (explicit_arg || format_needs_stat
|| (format_needs_type && type == unknown))
{
@@ -1899,9 +1926,10 @@ gobble_file (const char *name, enum filetype type, int explicit_arg,
}
#if USE_ACL
files[files_index].have_acl =
(! S_ISLNK (files[files_index].stat.st_mode)
&& 4 < acl (path, GETACLCNT, 0, NULL));
if (format == long_format)
files[files_index].have_acl =
(! S_ISLNK (files[files_index].stat.st_mode)
&& 4 < acl (path, GETACLCNT, 0, NULL));
#endif
if (S_ISLNK (files[files_index].stat.st_mode)
@@ -2326,6 +2354,80 @@ print_current_files (void)
}
}
/* Return the expected number of columns in a long-format time stamp,
or zero if it cannot be calculated. */
static int
long_time_expected_width (void)
{
static int width = -1;
if (width < 0)
{
time_t epoch = 0;
struct tm const *tm = localtime (&epoch);
char const *fmt = long_time_format[0];
char initbuf[100];
char *buf = initbuf;
size_t bufsize = sizeof initbuf;
size_t len;
for (;;)
{
*buf = '\1';
len = strftime (buf, bufsize, fmt, tm);
if (len || ! *buf)
break;
buf = alloca (bufsize *= 2);
}
width = mbsnwidth (buf, len, 0);
if (width < 0)
width = 0;
}
return width;
}
/* Get the current time. */
static void
get_current_time (void)
{
#if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME
{
struct timespec timespec;
if (clock_gettime (CLOCK_REALTIME, &timespec) == 0)
{
current_time = timespec.tv_sec;
current_time_ns = timespec.tv_nsec;
return;
}
}
#endif
/* The clock does not have nanosecond resolution, so get the maximum
possible value for the current time that is consistent with the
reported clock. That way, files are not considered to be in the
future merely because their time stamps have higher resolution
than the clock resolution. */
#if HAVE_GETTIMEOFDAY
{
struct timeval timeval;
if (gettimeofday (&timeval, NULL) == 0)
{
current_time = timeval.tv_sec;
current_time_ns = timeval.tv_usec * 1000 + 999;
return;
}
}
#endif
current_time = time (NULL);
current_time_ns = 999999999;
}
static void
print_long_format (const struct fileinfo *f)
{
@@ -2345,8 +2447,8 @@ print_long_format (const struct fileinfo *f)
size_t s;
char *p;
time_t when;
int when_ns IF_LINT (= 0);
struct tm *when_local;
const char *fmt;
char *user_name;
#if HAVE_ST_DM_MODE
@@ -2363,38 +2465,18 @@ print_long_format (const struct fileinfo *f)
{
case time_ctime:
when = f->stat.st_ctime;
when_ns = TIMESPEC_NS (f->stat.st_ctim);
break;
case time_mtime:
when = f->stat.st_mtime;
when_ns = TIMESPEC_NS (f->stat.st_mtim);
break;
case time_atime:
when = f->stat.st_atime;
when_ns = TIMESPEC_NS (f->stat.st_atim);
break;
}
if (full_time)
{
fmt = _("%a %b %d %H:%M:%S %Y");
}
else
{
if (current_time > when + 6L * 30L * 24L * 60L * 60L /* Old. */
|| current_time < when - 60L * 60L) /* In the future. */
{
/* The file is fairly old or in the future.
POSIX says the cutoff is 6 months old;
approximate this by 6*30 days.
Allow a 1 hour slop factor for what is considered "the future",
to allow for NFS server/client clock disagreement.
Show the year instead of the time of day. */
fmt = _("%b %e %Y");
}
else
{
fmt = _("%b %e %H:%M");
}
}
p = buf;
if (print_inode)
@@ -2452,9 +2534,35 @@ print_long_format (const struct fileinfo *f)
if ((when_local = localtime (&when)))
{
while (! (s = strftime (p, buf + bufsize - p - 1, fmt, when_local)))
time_t six_months_ago;
int recent;
char const *fmt;
/* If the file appears to be in the future, update the current
time, in case the file happens to have been modified since
the last time we checked the clock. */
if (current_time < when
|| (current_time == when && current_time_ns < when_ns))
get_current_time ();
/* Consider a time to be recent if it is within the past six
months. A Gregorian year has 365.2425 * 24 * 60 * 60 ==
31556952 seconds on the average. Write this value as an
integer constant to avoid floating point hassles. */
six_months_ago = current_time - 31556952 / 2;
recent = (six_months_ago <= when
&& (when < current_time
|| (when == current_time && when_ns <= current_time_ns)));
fmt = long_time_format[recent];
for (;;)
{
char *newbuf = (char *) alloca (bufsize *= 2);
char *newbuf;
*p = '\1';
s = strftime (p, buf + bufsize - p - 1, fmt, when_local);
if (s || ! *p)
break;
newbuf = alloca (bufsize *= 2);
memcpy (newbuf, buf, p - buf);
p = newbuf + (p - buf);
buf = newbuf;
@@ -2471,7 +2579,7 @@ print_long_format (const struct fileinfo *f)
/* The time cannot be represented as a local time;
print it as a huge integer number of seconds. */
char hbuf[LONGEST_HUMAN_READABLE + 1];
int width = full_time ? 24 : 12;
int width = long_time_expected_width ();
if (when < 0)
{
@@ -3148,7 +3256,7 @@ Sort entries alphabetically if none of -cftuSUX nor --sort.\n\
--block-size=SIZE use SIZE-byte blocks\n\
-B, --ignore-backups do not list implied entries ending with ~\n\
-c with -lt: sort by, and show, ctime (time of last\n\
modification of file status information)\n\
modification of file status information)\n\
with -l: show ctime and sort by name\n\
otherwise: sort by ctime\n\
-C list entries by columns\n\

View File

@@ -1,5 +1,5 @@
/* mv -- move or rename files
Copyright (C) 86, 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 86, 89, 90, 91, 1995-2001 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
@@ -72,7 +72,7 @@ static struct option const long_options[] =
{"backup", optional_argument, NULL, 'b'},
{"force", no_argument, NULL, 'f'},
{"interactive", no_argument, NULL, 'i'},
{"strip-trailing-slash", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
{"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
{"suffix", required_argument, NULL, 'S'},
{"target-directory", required_argument, NULL, TARGET_DIRECTORY_OPTION},
{"update", no_argument, NULL, 'u'},
@@ -195,9 +195,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
and failing. */
dir_to_remove = NULL;
error (0, 0,
_("cannot move %s to a subdirectory of itself, %s"),
quote_n (0, source), quote_n (1, dest));
fail = 1;
}
else if (rename_succeeded)
{
@@ -259,9 +257,6 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
if (fail)
error (0, errno, _("cannot remove %s"), quote (dir_to_remove));
}
if (copy_into_self)
fail = 1;
}
return fail;

View File

@@ -1,5 +1,5 @@
/* od -- dump files in octal and other formats
Copyright (C) 92, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 92, 1995-2001 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
@@ -225,13 +225,15 @@ static FILE *in_stream;
/* If nonzero, at least one of the files we read was standard input. */
static int have_read_stdin;
#ifdef HAVE_UNSIGNED_LONG_LONG
# define LONGEST_INTEGRAL_TYPE unsigned long long
#if HAVE_UNSIGNED_LONG_LONG
typedef unsigned long long ulonglong_t;
#else
# define LONGEST_INTEGRAL_TYPE long int
/* This is just a place-holder to avoid a few `#if' directives.
In this case, the type isn't actually used. */
typedef unsigned long int ulonglong_t;
#endif
#define MAX_INTEGRAL_TYPE_SIZE sizeof(LONGEST_INTEGRAL_TYPE)
#define MAX_INTEGRAL_TYPE_SIZE sizeof (ulonglong_t)
static enum size_spec integral_type_size[MAX_INTEGRAL_TYPE_SIZE + 1];
#define MAX_FP_TYPE_SIZE sizeof(LONG_DOUBLE)
@@ -435,19 +437,17 @@ print_long (off_t n_bytes, const char *block, const char *fmt_string)
}
}
#ifdef HAVE_UNSIGNED_LONG_LONG
static void
print_long_long (off_t n_bytes, const char *block, const char *fmt_string)
{
off_t i;
for (i = n_bytes / sizeof (unsigned long long); i > 0; i--)
for (i = n_bytes / sizeof (ulonglong_t); i > 0; i--)
{
unsigned long long tmp = *(const unsigned long long *) block;
ulonglong_t tmp = *(const ulonglong_t *) block;
printf (fmt_string, tmp);
block += sizeof (unsigned long long);
block += sizeof (ulonglong_t);
}
}
#endif
static void
print_float (off_t n_bytes, const char *block, const char *fmt_string)
@@ -1633,8 +1633,8 @@ main (int argc, char **argv)
integral_type_size[sizeof (short int)] = SHORT;
integral_type_size[sizeof (int)] = INT;
integral_type_size[sizeof (long int)] = LONG;
#ifdef HAVE_UNSIGNED_LONG_LONG
integral_type_size[sizeof (long long)] = LONG_LONG;
#if HAVE_UNSIGNED_LONG_LONG
integral_type_size[sizeof (ulonglong_t)] = LONG_LONG;
#endif
for (i = 0; i <= MAX_FP_TYPE_SIZE; i++)

View File

@@ -1,5 +1,5 @@
/* remove.c -- core functions for removing files and directories
Copyright (C) 88, 90, 91, 1994-2000 Free Software Foundation, Inc.
Copyright (C) 88, 90, 91, 1994-2001 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

View File

@@ -117,7 +117,7 @@ char *xstrdup PARAMS ((char const *));
# include <sys/time.h> /* For struct timeval */
# include <sys/stat.h> /* For struct stat */
# define GNU_PACKAGE "standalone"
# define PACKAGE "standalone"
# define VERSION "2.0" /* Kind of arbitrary... */
# if __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5 || __STRICT_ANSI__
@@ -508,16 +508,22 @@ files, most people use the --remove option.\n\
* --------------------------------------------------------------------
*/
#if ULONG_MAX == 0xffffffff
#if defined __STDC__ && __STDC__
# define UINT_MAX_32_BITS 4294967295U
#else
# define UINT_MAX_32_BITS 0xFFFFFFFF
#endif
#if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long word32;
#else
# if UINT_MAX == 0xffffffff
# if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned word32;
# else
# if USHRT_MAX == 0xffffffff
# if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short word32;
# else
# if UCHAR_MAX == 0xffffffff
# if UCHAR_MAX == UINT_MAX_32_BITS
typedef unsigned char word32;
# else
"No 32-bit type available!"

View File

@@ -1,5 +1,5 @@
/* sort - sort lines of text (with all kinds of options).
Copyright (C) 88, 1991-2000 Free Software Foundation, Inc.
Copyright (C) 88, 1991-2001 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
@@ -281,7 +281,7 @@ Usage: %s [OPTION]... [FILE]...\n\
Write sorted concatenation of all FILE(s) to standard output.\n\
\n\
+POS1 [-POS2] start a key at POS1, end it *before* POS2 (obsolescent)\n\
field numbers and character offsets are numbered\n\
field numbers and character offsets are numbered\n\
starting with zero (contrast with the -k option)\n\
-b ignore leading blanks in sort fields or keys\n\
-c check if given files already sorted, do not sort\n\
@@ -290,7 +290,7 @@ Write sorted concatenation of all FILE(s) to standard output.\n\
-g compare according to general numerical value, imply -b\n\
-i consider only printable characters in keys\n\
-k POS1[,POS2] start a key at POS1, end it *at* POS2\n\
field numbers and character offsets are numbered\n\
field numbers and character offsets are numbered\n\
starting with one (contrast with zero-based +POS form)\n\
-m merge already sorted files, do not sort\n\
-M compare (unknown) < `JAN' < ... < `DEC', imply -b\n\
@@ -301,7 +301,7 @@ Write sorted concatenation of all FILE(s) to standard output.\n\
-S SIZE use SIZE for main memory sorting\n\
-t SEP use SEParator instead of non- to whitespace transition\n\
-T DIRECTORY use DIRECTORY for temporary files, not $TMPDIR or %s\n\
multiple -T options specify multiple directories\n\
multiple -T options specify multiple directories\n\
-u with -c, check for strict ordering;\n\
with -m, only output the first of an equal sequence\n\
-z end lines with 0 byte, not newline, for find -print0\n\
@@ -2049,7 +2049,7 @@ main (int argc, char **argv)
#endif /* NLS */
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
AUTHORS, usage);
have_read_stdin = 0;
@@ -2188,7 +2188,7 @@ lacks following character offset"));
{
/* Provoke with `sort -k1.0' */
error (0, 0, _("starting field character offset \
argument to the `-k' option\nmust be positive"));
argument to the `-k' option must be positive"));
badfieldspec (argv[i]);
}
}

View File

@@ -1,5 +1,5 @@
/* sync - update the super block
Copyright (C) 1994-2000 Free Software Foundation, Inc.
Copyright (C) 1994-2001 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
@@ -63,7 +63,7 @@ main (int argc, char **argv)
atexit (close_stdout);
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
AUTHORS, usage);
if (argc != 1)

View File

@@ -264,12 +264,17 @@ char *alloca ();
#if ENABLE_NLS
# include <libintl.h>
# if HAVE_GETTEXT && !HAVE_DCGETTEXT && !defined dcgettext
# define dcgettext(Domain, Text, Category) Text
# endif
# define _(Text) gettext (Text)
#else
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
# undef textdomain
# define textdomain(Domain) /* empty */
# undef dcgettext
# define dcgettext(Domainname, Text, Category) Text
# define _(Text) Text
#endif
#define N_(Text) Text
@@ -459,7 +464,7 @@ enum
#define case_GETOPT_VERSION_CHAR(Program_name, Authors) \
case GETOPT_VERSION_CHAR: \
version_etc (stdout, Program_name, GNU_PACKAGE, VERSION, Authors); \
version_etc (stdout, Program_name, PACKAGE, VERSION, Authors); \
exit (EXIT_SUCCESS); \
break;

View File

@@ -1,5 +1,5 @@
/* tail -- output the last part of file(s)
Copyright (C) 1989, 90, 91, 1995-2000 Free Software Foundation, Inc.
Copyright (C) 1989, 90, 91, 1995-2001 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
@@ -263,6 +263,11 @@ With no FILE, or when FILE is -, read standard input.\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n\
"),
DEFAULT_N_LINES, DEFAULT_N_LINES,
DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS
);
printf (_("\
If the first character of N (the number of bytes or lines) is a `+',\n\
print beginning with the Nth item from the start of each file, otherwise,\n\
print the last N items in the file. N may have a multiplier suffix:\n\
@@ -279,10 +284,7 @@ rotation). Use --follow=name in that case. That causes tail to track the\n\
named file by reopening it periodically to see if it has been removed and\n\
recreated by some other program.\n\
\n\
"),
DEFAULT_N_LINES, DEFAULT_N_LINES,
DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS
);
"));
puts (_("\nReport bugs to <bug-textutils@gnu.org>."));
}
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);

View File

@@ -1,5 +1,5 @@
/* tsort - topological sort.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001 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
@@ -556,7 +556,7 @@ main (int argc, char **argv)
exit_status = 0;
parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION,
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, VERSION,
AUTHORS, usage);
while ((opt = getopt_long (argc, argv, "", long_options, NULL)) != -1)

97
src/wheel-gen.pl Executable file
View File

@@ -0,0 +1,97 @@
#!/usr/bin/perl -w
# -*- perl -*-
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0;
use strict;
(my $program_name = $0) =~ s|.*/||;
sub END
{
use POSIX qw (_exit);
# This is required if the code might send any output to stdout
# E.g., even --version or --help. So it's best to do it unconditionally.
close STDOUT
or (warn "$program_name: closing standard output: $!\n"), _exit (1);
}
sub is_prime ($)
{
my ($n) = @_;
use integer;
$n == 2
and return 1;
my $d = 2;
my $w = 1;
while (1)
{
my $q = $n / $d;
$n == $q * $d
and return 0;
$d += $w;
$q < $d
and last;
$w = 2;
}
return 1;
}
{
@ARGV == 1
or die "$program_name: missing argument\n";
my $wheel_size = $ARGV[0];
my @primes = (2);
my $product = $primes[0];
my $n_primes = 1;
for (my $i = 3; ; $i += 2)
{
if (is_prime $i)
{
push @primes, $i;
$product *= $i;
++$n_primes == $wheel_size
and last;
}
}
my $ws_m1 = $wheel_size - 1;
print <<EOF;
/* The first $ws_m1 elements correspond to the incremental offsets of the
first $wheel_size primes (@primes). The $wheel_size(th) element is the
difference between that last prime and the next largest integer
that is not a multiple of those primes. The remaining numbers
define the wheel. For more information, see
http://www.utm.edu/research/primes/glossary/WheelFactorization.html. */
EOF
my @increments;
my $prev = 2;
for (my $i = 3; ; $i += 2)
{
my $rel_prime = 1;
foreach my $divisor (@primes)
{
$i != $divisor && $i % $divisor == 0
and $rel_prime = 0;
}
if ($rel_prime)
{
#warn $i, ' ', $i - $prev, "\n";
push @increments, $i - $prev;
$prev = $i;
$product + 1 < $i
and last;
}
}
print join (",\n", @increments), "\n";
exit 0;
}

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4c from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
@@ -67,8 +67,6 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
@@ -150,6 +148,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
@@ -274,12 +273,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean: maintainer-clean-am
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: all all-am all-redirect check check-TESTS check-am clean \
clean-generic distclean distclean-generic distdir dvi dvi-am info \
info-am install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.

1
tests/chgrp/.cvsignore Normal file
View File

@@ -0,0 +1 @@
Makefile

View File

@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = equal-x c-option
TESTS = equal-x c-option setgid
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH

View File

@@ -118,7 +118,7 @@ l = @l@
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = equal-x c-option
TESTS = equal-x c-option setgid
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
PATH=`pwd`/../../src:$$PATH

View File

@@ -33,7 +33,7 @@ if test $framework_failure = 1; then
(exit 1); exit
fi
. $abs_srcdir/../sticky-check
. $abs_srcdir/../setgid-check
fail=0

73
tests/chmod/setgid Executable file
View File

@@ -0,0 +1,73 @@
#!/bin/sh
# Make sure GNU chmod works the same way as those of Solaris, HPUX, AIX
# wrt directories with the setgid bit set.
if test "$VERBOSE" = yes; then
set -x
chmod --version
fi
. $srcdir/../envvar-check
. $srcdir/../lang-default
pwd=`pwd`
tmp=setgid.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
# Record absolute path of srcdir and cd back to current dir.
cd $srcdir || framework_failure=1
abs_srcdir=`pwd`
cd $pwd || framework_failure=1
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
. $abs_srcdir/../setgid-check
umask 0
mkdir d || framework_failure=1
chmod g+s d 2> /dev/null ||
{
# This is required because on some systems (at least NetBSD 1.4.2A),
# it may happen that when you create a directory, its group isn't one
# to which you belong. When that happens, the above chmod fails. So
# here, upon failure, we try to set the group, then rerun the chmod command.
group=${FETISH_GROUP-`(id -ng || /usr/xpg4/bin/id -ng) 2>/dev/null`}
if test "$group"; then
chgrp "$group" d || framework_failure=1
chmod g+s d || framework_failure=1
else
framework_failure=1
fi
}
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
chmod 755 d
# To be compatible with chmod from other vendors,
# GNU chmod must not reset a directory's setgid bit.
# The latest POSIX draft (d5) allows either behavior. It says:
#
# For regular files, for each bit set in the octal number
# corresponding to the set-user-ID-on-execution or the
# set-group-ID-on-execution, bits shown in the following table shall
# be set; if these bits are not set in the octal number, they are
# cleared. For other file types, it is implementation-defined whether
# or not requests to set or clear the set-user-ID-on-execution or
# set-group-ID-on-execution bits are honored.
# FIXME: consider changing GNU chmod to work like other versions of chmod.
# For now, this test simply confirms the existing behavior.
p=`ls -ld d|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac
(exit $fail); exit

View File

@@ -4,7 +4,8 @@ AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
same-file cp-mv-backup symlink-slash slink-2-slink fail-perm dir-slash \
perm cp-HL special-bits link dir-rm-dest cp-parents
perm cp-HL special-bits link dir-rm-dest cp-parents deref-slink \
dir-vs-file into-self
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \
MAKE=$(MAKE) \

View File

@@ -121,7 +121,8 @@ AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
backup-1 no-deref-link1 no-deref-link2 no-deref-link3 backup-is-src \
same-file cp-mv-backup symlink-slash slink-2-slink fail-perm dir-slash \
perm cp-HL special-bits link dir-rm-dest cp-parents
perm cp-HL special-bits link dir-rm-dest cp-parents deref-slink \
dir-vs-file into-self
EXTRA_DIST = $(TESTS)
TESTS_ENVIRONMENT = \

View File

@@ -21,11 +21,13 @@ cd $srcdir || framework_failure=1
abs_srcdir=`pwd`
cd $pwd || framework_failure=1
. $abs_srcdir/../sticky-check
. $srcdir/../envvar-check
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
. $abs_srcdir/../setgid-check
mkdir foo bar || framework_failure=1
mkdir -p a/b/c d e || framework_failure=1

32
tests/cp/deref-slink Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
# Demonstrate bug when using -d with an existing destination file
# that is a symlink.
if test "$VERBOSE" = yes; then
set -x
cp --version
fi
. $srcdir/../envvar-check
. $srcdir/../lang-default
pwd=`pwd`
tmp=FIXME.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
touch f slink-target || framework_failure=1
ln -s slink-target slink || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
cp -d f slink || fail=1
(exit $fail); exit

37
tests/cp/dir-vs-file Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/sh
# A directory may not replace an existing file.
if test "$VERBOSE" = yes; then
set -x
cp --version
fi
. $srcdir/../envvar-check
pwd=`pwd`
tmp=dirvfile.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir dir || framework_failure=1
touch file || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
# In 4.0.35, this cp invocation silently succeeded.
cp -R dir file 2>/dev/null && fail=1
# Make sure file is not replaced with a directory.
# In 4.0.35, it was.
test -f file || fail=1
(exit $fail); exit

45
tests/cp/into-self Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/sh
# Confirm that copying a directory into itself gets a proper diagnostic.
# In 4.0.35 and earlier, `mkdir dir && cp -R dir dir' would produce this:
# cp: won't create hard link `dir/dir/dir' to directory `'
# Now it gives this:
# cp: can't copy a directory `dir' into itself `dir/dir'
if test "$VERBOSE" = yes; then
set -x
cp --version
fi
. $srcdir/../envvar-check
. $srcdir/../lang-default
pwd=`pwd`
tmp=into-self.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir dir || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
# This command should exit nonzero.
cp -R dir dir 2> out && fail=1
cat > exp <<\EOF
cp: cannot copy a directory, `dir', into itself, `dir/dir'
EOF
#'
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4b from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4c from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
@@ -67,8 +67,6 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
@@ -181,6 +179,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
@@ -307,12 +306,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean: maintainer-clean-am
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: all all-am all-redirect check check-TESTS check-am clean \
clean-generic distclean distclean-generic distdir dvi dvi-am info \
info-am install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am
$(srcdir)/$x-tests: $(mk_script) Test.pm
$(PERL) -I$(srcdir) -w -- $(mk_script) ../../src/$x > $@.n

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4c from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
@@ -67,8 +67,6 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
@@ -150,6 +148,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
@@ -274,12 +273,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean: maintainer-clean-am
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: all all-am all-redirect check check-TESTS check-am clean \
clean-generic distclean distclean-generic distdir dvi dvi-am info \
info-am install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@@ -2,7 +2,7 @@
# Set `groups' to a space-separated list of at least two groups of which
# the user is a member.
groups=${FETISH_GROUPS-`id -nG 2>/dev/null`}
groups=${FETISH_GROUPS-`(id -nG || /usr/xpg4/bin/id -nG) 2>/dev/null`}
case "$groups" in
*' '*) ;;
*) cat <<EOF 1>&2

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4b from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4b from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4b from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.

View File

@@ -27,7 +27,7 @@ if test $framework_failure = 1; then
(exit 1); exit
fi
. $abs_srcdir/../sticky-check
. $abs_srcdir/../setgid-check
fail=0

View File

@@ -27,7 +27,7 @@ if test $framework_failure = 1; then
(exit 1); exit
fi
. $abs_srcdir/../sticky-check
. $abs_srcdir/../setgid-check
fail=0

View File

@@ -1,9 +1,10 @@
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = i-2 mv-special-1 into-self into-self-2 into-self-3 backup-is-src \
TESTS = i-2 mv-special-1 into-self into-self-2 into-self-3 into-self-4 \
backup-is-src \
i-1 hard-link-1 force partition-perm to-symlink dir-file diag \
part-symlink part-rename
part-symlink part-rename trailing-slash
EXTRA_DIST = $(TESTS) setup
TESTS_ENVIRONMENT = \

View File

@@ -118,9 +118,10 @@ l = @l@
AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = i-2 mv-special-1 into-self into-self-2 into-self-3 backup-is-src \
TESTS = i-2 mv-special-1 into-self into-self-2 into-self-3 into-self-4 \
backup-is-src \
i-1 hard-link-1 force partition-perm to-symlink dir-file diag \
part-symlink part-rename
part-symlink part-rename trailing-slash
EXTRA_DIST = $(TESTS) setup

37
tests/mv/into-self-4 Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/sh
# confirm that `mv symlink symlink' doesn't remove symlink
# Based on an example from David Luyer.
if test "$VERBOSE" = yes; then
set -x
mv --version
fi
. $srcdir/../envvar-check
pwd=`pwd`
tmp=mv-slink2.$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
touch file || framework_failure=1
ln -s file s || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
(exit 1); exit
fi
fail=0
# This must fail.
mv s s 2> /dev/null && fail=1
# But the symlink, s, must not be removed.
# Before 4.0.36, `s' would have been removed.
test -f s || fail=1
(exit $fail); exit

31
tests/mv/trailing-slash Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
# On some operating systems, e.g. SunOS-4.1.1_U1 on sun3x,
# rename() doesn't accept trailing slashes.
if test "$VERBOSE" = yes; then
set -x
mv --version
fi
pwd=`pwd`
tmp=mv-tslash.$$
trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
. $srcdir/../envvar-check
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir foo || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
exit 1
fi
fail=0
mv foo/ bar || fail=1
(exit $fail); exit

View File

@@ -2,17 +2,17 @@
##test-files-begin
x = pr
explicit = 0F 0FF 0FFnt 0FFt 0FnFnt 0FnFt 0Fnt 0Ft 2S_f-t_notab 2Sf-t_notab \
explicit = 0F 0FF 0FFnt 0FFt 0FnFnt 0FnFt 0Fnt 0Ft 2-S_f-t_notab 2-Sf-t_notab \
2f-t_notab 2s_f-t_notab 2s_w60f-t_nota 2sf-t_notab 2sw60f-t_notab \
2w60f-t_notab 3-0F 3-5l17f-t 3-FF 3a2l17-FF 3a3f-0F 3a3l15-t 3a3l8f-t \
3b2l17-FF 3b3f-0F 3b3f-0FF 3b3f-FF 3b3l15-t 3b3l8f-t 3f-0F 3f-FF 3l17f-t \
3l24-t 3ml17f-t 3ml24-FF 3ml24-t 3ml24-t-FF 4-7l24-FF 4l24-FF FF FFn FFtn \
FnFn Ja3l17f-lm Jb3l17f-lm Jml17f-lm-lo W20l17f-ll W26l17f-ll W27l17f-ll \
W28l17f-ll W35Ja3l17f-lm W35Jb3l17f-lm W35Jml17f-lmlo W35a3l17f-lm \
W35b3l17f-lm W35ml17f-lm-lo W72Jl17f-ll W72l17f-ll a2l15-FF a2l17-FF a3-0F \
a3f-0F a3f-0FF a3f-FF a3l15-t a3l17f-lm a3l8f-t b2l15-FF b2l17-FF b3-0F \
b3f-0F b3f-0FF b3f-FF b3l15-t b3l17f-lm b3l8f-t l17f-t l24-FF l24-t loli \
ml17f-0F ml17f-lm-lo ml17f-t ml17f-t-0F ml20-FF-t ml24-FF ml24-t ml24-t-FF \
FnFn Ja3l17f-lm Jb3l17f-lm Jml17f-lm-lo W-72l17f-ll W20l17f-ll W26l17f-ll \
W27l17f-ll W28l17f-ll W35Ja3l17f-lm W35Jb3l17f-lm W35Jml17f-lmlo W35a3l17f-lm \
W35b3l17f-lm W35ml17f-lm-lo W72Jl17f-ll a2l15-FF a2l17-FF a3-0F a3f-0F \
a3f-0FF a3f-FF a3l15-t a3l17f-lm a3l8f-t b2l15-FF b2l17-FF b3-0F b3f-0F \
b3f-0FF b3f-FF b3l15-t b3l17f-lm b3l8f-t l17f-t l24-FF l24-t loli ml17f-0F \
ml17f-lm-lo ml17f-t ml17f-t-0F ml20-FF-t ml24-FF ml24-t ml24-t-FF \
n+2-5l17f-0FF n+2l17f-0FF n+2l17f-bl n+3-7l24-FF n+3l17f-0FF n+3l17f-bl \
n+3ml13f-bl-FF n+3ml17f-bl-tn n+3ml17f-tn-bl n+4-8a2l17-FF n+4b2l10f-0FF \
n+5-8b3l10f-FF n+5a3l6f-0FF n+6a2l17-FF n+6b3l6f-FF n+7l24-FF n+8l20-FF \

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4b from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
@@ -117,17 +117,17 @@ l = @l@
x = pr
explicit = 0F 0FF 0FFnt 0FFt 0FnFnt 0FnFt 0Fnt 0Ft 2S_f-t_notab 2Sf-t_notab \
explicit = 0F 0FF 0FFnt 0FFt 0FnFnt 0FnFt 0Fnt 0Ft 2-S_f-t_notab 2-Sf-t_notab \
2f-t_notab 2s_f-t_notab 2s_w60f-t_nota 2sf-t_notab 2sw60f-t_notab \
2w60f-t_notab 3-0F 3-5l17f-t 3-FF 3a2l17-FF 3a3f-0F 3a3l15-t 3a3l8f-t \
3b2l17-FF 3b3f-0F 3b3f-0FF 3b3f-FF 3b3l15-t 3b3l8f-t 3f-0F 3f-FF 3l17f-t \
3l24-t 3ml17f-t 3ml24-FF 3ml24-t 3ml24-t-FF 4-7l24-FF 4l24-FF FF FFn FFtn \
FnFn Ja3l17f-lm Jb3l17f-lm Jml17f-lm-lo W20l17f-ll W26l17f-ll W27l17f-ll \
W28l17f-ll W35Ja3l17f-lm W35Jb3l17f-lm W35Jml17f-lmlo W35a3l17f-lm \
W35b3l17f-lm W35ml17f-lm-lo W72Jl17f-ll W72l17f-ll a2l15-FF a2l17-FF a3-0F \
a3f-0F a3f-0FF a3f-FF a3l15-t a3l17f-lm a3l8f-t b2l15-FF b2l17-FF b3-0F \
b3f-0F b3f-0FF b3f-FF b3l15-t b3l17f-lm b3l8f-t l17f-t l24-FF l24-t loli \
ml17f-0F ml17f-lm-lo ml17f-t ml17f-t-0F ml20-FF-t ml24-FF ml24-t ml24-t-FF \
FnFn Ja3l17f-lm Jb3l17f-lm Jml17f-lm-lo W-72l17f-ll W20l17f-ll W26l17f-ll \
W27l17f-ll W28l17f-ll W35Ja3l17f-lm W35Jb3l17f-lm W35Jml17f-lmlo W35a3l17f-lm \
W35b3l17f-lm W35ml17f-lm-lo W72Jl17f-ll a2l15-FF a2l17-FF a3-0F a3f-0F \
a3f-0FF a3f-FF a3l15-t a3l17f-lm a3l8f-t b2l15-FF b2l17-FF b3-0F b3f-0F \
b3f-0FF b3f-FF b3l15-t b3l17f-lm b3l8f-t l17f-t l24-FF l24-t loli ml17f-0F \
ml17f-lm-lo ml17f-t ml17f-t-0F ml20-FF-t ml24-FF ml24-t ml24-t-FF \
n+2-5l17f-0FF n+2l17f-0FF n+2l17f-bl n+3-7l24-FF n+3l17f-0FF n+3l17f-bl \
n+3ml13f-bl-FF n+3ml17f-bl-tn n+3ml17f-tn-bl n+4-8a2l17-FF n+4b2l10f-0FF \
n+5-8b3l10f-FF n+5a3l6f-0FF n+6a2l17-FF n+6b3l6f-FF n+7l24-FF n+8l20-FF \

View File

@@ -224,7 +224,7 @@ my @tv = (
# -w/W PAGE_WIDTH [-J] options
['10wa', '-W 72 -J -l17 -f', [\'tFFt-ll'], [\'W72Jl17f-ll'], 0],
['10wb', '-w 72 -J -l17 -f', [\'tFFt-ll'], [\'W72Jl17f-ll'], 0],
['10wc', '-W 72 -l17 -f', [\'tFFt-ll'], [\'W72l17f-ll'], 0],
['10wc', '-W 72 -l17 -f', [\'tFFt-ll'], [\'W-72l17f-ll'], 0],
['10wd', '-w 72 -l17 -f', [\'tFFt-ll'], [\'w72l17f-ll'], 0],
['10we', '-W 28 -l17 -f', [\'tFFt-ll'], [\'W28l17f-ll'], 0],
['10wf', '-W 27 -l17 -f', [\'tFFt-ll'], [\'W27l17f-ll'], 0],
@@ -302,11 +302,11 @@ my @tv = (
#
# new long-options -W/-S/-J disentangle those options (see also No.`10*')
# columns, truncated = 72 / no separator :
['14g', '-2 -S -f', [\'t_notab'], [\'2Sf-t_notab'], 0],
['14g', '-2 -S -f', [\'t_notab'], [\'2-Sf-t_notab'], 0],
# full lines, no truncation / separator = TAB : (Input: -S"<TAB>")
['14h', '-2 -S" " -J -f', [\'t_notab'], [\'2sf-t_notab'], 0],
# columns, truncated = 72 / separator `:' :
['14i', '-2 -S: -f', [\'t_notab'], [\'2S_f-t_notab'], 0],
['14i', '-2 -S: -f', [\'t_notab'], [\'2-S_f-t_notab'], 0],
# full lines, no truncation / separator = `:' :
['14j', '-2 -S: -J -f', [\'t_notab'], [\'2s_f-t_notab'], 0],
# columns, truncated = 60 / separator = space:

View File

@@ -3318,14 +3318,14 @@ if test $code != 0; then
$echo "Test 10wc failed: ../../src/pr return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
cmp 10wc.O $srcdir/W72l17f-ll > /dev/null 2>&1
cmp 10wc.O $srcdir/W-72l17f-ll > /dev/null 2>&1
case $? in
0) if test "$VERBOSE"; then $echo "passed 10wc"; fi;;
1) $echo "Test 10wc failed: files 10wc.O and $srcdir/W72l17f-ll differ" 1>&2
(diff -c 10wc.O $srcdir/W72l17f-ll) 2> /dev/null
1) $echo "Test 10wc failed: files 10wc.O and $srcdir/W-72l17f-ll differ" 1>&2
(diff -c 10wc.O $srcdir/W-72l17f-ll) 2> /dev/null
errors=`expr $errors + 1`;;
2) $echo "Test 10wc may have failed." 1>&2
$echo The command "cmp 10wc.O $srcdir/W72l17f-ll" failed. 1>&2
$echo The command "cmp 10wc.O $srcdir/W-72l17f-ll" failed. 1>&2
errors=`expr $errors + 1`;;
esac
fi
@@ -4254,14 +4254,14 @@ if test $code != 0; then
$echo "Test 14g failed: ../../src/pr return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
cmp 14g.O $srcdir/2Sf-t_notab > /dev/null 2>&1
cmp 14g.O $srcdir/2-Sf-t_notab > /dev/null 2>&1
case $? in
0) if test "$VERBOSE"; then $echo "passed 14g"; fi;;
1) $echo "Test 14g failed: files 14g.O and $srcdir/2Sf-t_notab differ" 1>&2
(diff -c 14g.O $srcdir/2Sf-t_notab) 2> /dev/null
1) $echo "Test 14g failed: files 14g.O and $srcdir/2-Sf-t_notab differ" 1>&2
(diff -c 14g.O $srcdir/2-Sf-t_notab) 2> /dev/null
errors=`expr $errors + 1`;;
2) $echo "Test 14g may have failed." 1>&2
$echo The command "cmp 14g.O $srcdir/2Sf-t_notab" failed. 1>&2
$echo The command "cmp 14g.O $srcdir/2-Sf-t_notab" failed. 1>&2
errors=`expr $errors + 1`;;
esac
fi
@@ -4290,14 +4290,14 @@ if test $code != 0; then
$echo "Test 14i failed: ../../src/pr return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
cmp 14i.O $srcdir/2S_f-t_notab > /dev/null 2>&1
cmp 14i.O $srcdir/2-S_f-t_notab > /dev/null 2>&1
case $? in
0) if test "$VERBOSE"; then $echo "passed 14i"; fi;;
1) $echo "Test 14i failed: files 14i.O and $srcdir/2S_f-t_notab differ" 1>&2
(diff -c 14i.O $srcdir/2S_f-t_notab) 2> /dev/null
1) $echo "Test 14i failed: files 14i.O and $srcdir/2-S_f-t_notab differ" 1>&2
(diff -c 14i.O $srcdir/2-S_f-t_notab) 2> /dev/null
errors=`expr $errors + 1`;;
2) $echo "Test 14i may have failed." 1>&2
$echo The command "cmp 14i.O $srcdir/2S_f-t_notab" failed. 1>&2
$echo The command "cmp 14i.O $srcdir/2-S_f-t_notab" failed. 1>&2
errors=`expr $errors + 1`;;
esac
fi

View File

@@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Makefile.in generated automatically by automake 1.4c from Makefile.am
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
@@ -67,8 +67,6 @@ CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
@@ -150,6 +148,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
tags: TAGS
TAGS:
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; \
srcdir=$(srcdir); export srcdir; \
@@ -274,12 +273,12 @@ maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean: maintainer-clean-am
.PHONY: tags check-TESTS distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
.PHONY: all all-am all-redirect check check-TESTS check-am clean \
clean-generic distclean distclean-generic distdir dvi dvi-am info \
info-am install install-am install-data install-data-am install-exec \
install-exec-am install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.

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