Compare commits

...

841 Commits
v5.0 ... v5.0.1

Author SHA1 Message Date
Jim Meyering
441c8ebc90 *** empty log message *** 2003-07-15 06:55:22 +00:00
Jim Meyering
272a1b3903 (print_changelog_deltas): Change the .sig suffix to .asc here, too. 2003-07-15 06:55:19 +00:00
Jim Meyering
5efe3f8221 . 2003-07-15 06:52:10 +00:00
Jim Meyering
d5c938e2ba *** empty log message *** 2003-07-15 06:39:54 +00:00
Jim Meyering
b5dfcc1d0d (uname invocation): Explain the POSIX terminology behind uname -m and uname -s. 2003-07-15 06:39:49 +00:00
Jim Meyering
54a31f6d9a . 2003-07-15 06:21:13 +00:00
Jim Meyering
a0edaedbf3 *** empty log message *** 2003-07-15 06:07:10 +00:00
Jim Meyering
39458c8430 (%.asc): Remove target first, so gpg doesn't prompt us about it. 2003-07-15 06:06:58 +00:00
Jim Meyering
7d0b66769a . 2003-07-15 06:05:15 +00:00
Jim Meyering
120506c26d Remove stray `:' in first regexp.
Fix *both* tests.
2003-07-15 06:05:04 +00:00
Jim Meyering
4f32d876d8 *** empty log message *** 2003-07-15 00:01:04 +00:00
Jim Meyering
5693cbd8fe (print_changelog_deltas): Relax test for matching version-number line in NEWS. 2003-07-15 00:01:01 +00:00
Jim Meyering
eda3639e19 . 2003-07-14 22:37:16 +00:00
Jim Meyering
a6b45f1ed4 *** empty log message *** 2003-07-14 18:58:28 +00:00
Jim Meyering
40ab0a7c72 Add copyright. 2003-07-14 18:58:25 +00:00
Jim Meyering
b4713a2899 *** empty log message *** 2003-07-14 18:39:37 +00:00
Jim Meyering
1109bcd1f7 *** empty log message *** 2003-07-14 16:48:37 +00:00
Jim Meyering
b461b366d2 Correct comment on first line. 2003-07-14 16:48:31 +00:00
Jim Meyering
e4c013c0f4 *** empty log message *** 2003-07-14 06:30:32 +00:00
Jim Meyering
3eecca631b . 2003-07-14 06:29:45 +00:00
Jim Meyering
123a296dd2 *** empty log message *** 2003-07-13 22:22:39 +00:00
Jim Meyering
90830646f1 (%.asc): Renamed from %.sig.
Generate and use ascii-armored signatures.
2003-07-13 22:22:18 +00:00
Jim Meyering
285eeddfd5 . 2003-07-13 22:15:08 +00:00
Jim Meyering
bc87c668c4 *** empty log message *** 2003-07-13 09:52:47 +00:00
Jim Meyering
ab8e35d397 put makepath.c back. 2003-07-13 09:52:32 +00:00
Jim Meyering
8effe1d8af *** empty log message *** 2003-07-13 09:38:07 +00:00
Jim Meyering
db425e487a (nohup invocation): Tell what happens when stdout is not a terminal.
Based on a suggestion from Steven Mocking.
2003-07-13 09:38:04 +00:00
Jim Meyering
f2176e82ad *** empty log message *** 2003-07-13 09:37:45 +00:00
Jim Meyering
d61aba00f0 add another test 2003-07-13 09:27:34 +00:00
Jim Meyering
83c37b47f8 *** empty log message *** 2003-07-13 09:25:24 +00:00
Jim Meyering
48606016b8 (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.
(main): Use them.
2003-07-13 09:25:21 +00:00
Jim Meyering
7c4f69a2fa *** empty log message *** 2003-07-13 09:03:20 +00:00
Jim Meyering
c42926bf1e (syntax-check): Move each individual check into its own target.
(syntax-check-rules): This is the list of syntax-check targets.
(sc_unmarked_diagnostics, sc_cast_of_argument_to_free):
(sc_cast_of_x_alloc_return_value, sc_space_tab):
(sc_error_exit_success, sc_xalloc_h_in_src):  New targets.
2003-07-13 09:03:13 +00:00
Jim Meyering
8329b522c0 *** empty log message *** 2003-07-13 08:46:53 +00:00
Jim Meyering
15c5a31fb5 *** empty log message *** 2003-07-13 08:46:21 +00:00
Jim Meyering
cad299f354 Use @code, not (nonexistent) @function. 2003-07-13 08:45:39 +00:00
Jim Meyering
ca08290d8b *** empty log message *** 2003-07-13 08:44:39 +00:00
Jim Meyering
5ef577f0e7 Include <stdlib.h> for declaration of free. 2003-07-13 08:44:23 +00:00
Jim Meyering
803a3441b1 *** empty log message *** 2003-07-13 08:43:02 +00:00
Jim Meyering
497560dfe9 (xgethostname): Return NULL, rather than exiting,
upon any non-malloc/realloc error.
2003-07-13 08:42:40 +00:00
Jim Meyering
f24368a67a *** empty log message *** 2003-07-13 08:15:15 +00:00
Jim Meyering
fad1b46e08 (chown invocation): Warn that chown
now clears set-user-ID and set-group-ID bits on some systems.
2003-07-13 08:15:11 +00:00
Jim Meyering
32a2c6f6d9 . 2003-07-12 20:47:23 +00:00
Jim Meyering
58354c9643 *** empty log message *** 2003-07-12 18:49:44 +00:00
Jim Meyering
252d2d236c Remove uses of OPTIONAL_BIN_ZCRIPTS and last traces of the nohup script. 2003-07-12 18:49:41 +00:00
Jim Meyering
1307f23068 Restore AC_SUBST(OPTIONAL_BIN_PROGS). *It* is used. 2003-07-12 18:47:29 +00:00
Jim Meyering
69c63039b9 *** empty log message *** 2003-07-12 18:47:07 +00:00
Jim Meyering
9aecd7ec8a *** empty log message *** 2003-07-12 18:44:42 +00:00
Jim Meyering
46a8f2d4f5 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS): Remove unused variables. 2003-07-12 18:44:39 +00:00
Jim Meyering
a3c0bb50f3 (bin_SCRIPTS): Remove use of just-removed $(OPTIONAL_BIN_ZCRIPTS). 2003-07-12 18:43:36 +00:00
Jim Meyering
37ffd45ac8 *** empty log message *** 2003-07-12 18:29:38 +00:00
Jim Meyering
016d23cb89 (BUILT_SOURCES): Use `BUILT_SOURCES += $(STDBOOL_H)'
rather than `all-local: $(STDBOOL_H)'.  The latter didn't force
creation of stdbool.h before most other targets.
Likewise for $(ALLOCA_H).
2003-07-12 18:29:35 +00:00
Jim Meyering
d51ca19934 *** empty log message *** 2003-07-12 18:26:07 +00:00
Jim Meyering
12237951e6 (localedir.h): Put the 2>&1' after the redirect target, not before the >'. 2003-07-12 18:25:51 +00:00
Jim Meyering
19add5a9f2 . 2003-07-12 16:49:08 +00:00
Jim Meyering
39935bf2f5 Remove lib/makepath.c. 2003-07-12 16:48:58 +00:00
Jim Meyering
19332b9ce5 . 2003-07-12 16:48:26 +00:00
Jim Meyering
be823d745c *** empty log message *** 2003-07-12 16:22:47 +00:00
Jim Meyering
4f78b3f40f (remove_dir): Give a diagnostic upon failed save_cwd,
now that that function no longer calls `error'.
2003-07-12 16:22:39 +00:00
Jim Meyering
c8f1cbc602 (find_mount_point): Emit a diagnostic for each
failed syscall, rather than relying on caller to do that.
The caller couldn't do a good job, anyhow -- too many different
ways to fail (each with a different referent).
Give a diagnostic upon failed save_cwd, now that that function
no longer calls `error'.
(show_point): Don't diagnose find_mount_point's errors, now that
it handles them itself.
2003-07-12 16:21:45 +00:00
Jim Meyering
7e815d32f3 tweak spacing 2003-07-12 16:17:14 +00:00
Jim Meyering
959a2409fe Don't emit diagnostics. Let callers do that.
Don't include "error.h".
(save_cwd): Don't call error.  Ensure that errno is valid
when returning nonzero.
2003-07-12 16:07:30 +00:00
Jim Meyering
6599007a62 *** empty log message *** 2003-07-12 15:45:14 +00:00
Jim Meyering
21f65c951c (find_mount_point): Don't let free clobber errno upon failed chdir 2003-07-12 15:44:14 +00:00
Jim Meyering
354996bc09 *** empty log message *** 2003-07-12 11:40:13 +00:00
Jim Meyering
a29f991b84 * src/sys2.h: Remove alloca-related block.
* src/system.h: Include <alloca.h> here, instead.
2003-07-12 11:40:03 +00:00
Jim Meyering
64521cfa9a It appears that the `#pragma alloca' included via "system.h" is
adequate, since join.c uses alloca, yet lacked an in-file #pragma.

Remove `#pragma alloca'.
2003-07-12 11:38:43 +00:00
Jim Meyering
1b0d576996 *** empty log message *** 2003-07-12 11:32:31 +00:00
Jim Meyering
b5125cf5f0 *** empty log message *** 2003-07-12 11:31:55 +00:00
Jim Meyering
e5e207df7c *** empty log message *** 2003-07-12 09:40:44 +00:00
Jim Meyering
d68aa4125b Update from gnulib. 2003-07-12 09:40:40 +00:00
Jim Meyering
ba53da9675 *** empty log message *** 2003-07-12 08:37:53 +00:00
Jim Meyering
8e34468f61 (change_file_owner): Do not restore any special
permission bits (e.g., set-user-ID, set-group-ID) that are reset
by chown(2) on some systems.  Suggestion and insistence :-) from
Michael Stone.
2003-07-12 08:37:36 +00:00
Jim Meyering
32a804c941 *** empty log message *** 2003-07-12 07:35:39 +00:00
Jim Meyering
adde093823 (make_path): Enclose diagnostic in _(...). 2003-07-12 07:35:34 +00:00
Jim Meyering
d24393e12d *** empty log message *** 2003-07-12 07:33:41 +00:00
Jim Meyering
f328802261 Also check `test -t 1'.
This is necessary on linux-2.4.21, otherwise, the test
stty/basic-1 would hang when run in the background.
2003-07-12 07:33:35 +00:00
Jim Meyering
4e85b8c0c8 . 2003-07-11 22:26:40 +00:00
Jim Meyering
6f7b4ca60a ARgh. nearly every test depends on whether stdout and/or stderr is a tty. 2003-07-11 21:57:18 +00:00
Jim Meyering
ae90f9f16e *** empty log message *** 2003-07-11 20:45:10 +00:00
Jim Meyering
6d7db642c3 Add src/nohup.c and src/setuidgid.c. 2003-07-11 20:45:05 +00:00
Jim Meyering
d4bac14488 *** empty log message *** 2003-07-11 20:41:46 +00:00
Jim Meyering
1d2f905052 (nohup.1): Depend on nohup.c, rather than nohup.sh. 2003-07-11 20:41:35 +00:00
Jim Meyering
eabefdb575 . 2003-07-11 20:40:56 +00:00
Jim Meyering
cb88f838b9 *** empty log message *** 2003-07-11 20:40:41 +00:00
Jim Meyering
a79673ff2a Also fail if cat-to-create-expected-output
fails.  Otherwise, if both `exp' and `out' end up empty because
of e.g., a full disk, they would mistakenly compare equal.
2003-07-11 20:40:28 +00:00
Jim Meyering
6568f37384 *** empty log message *** 2003-07-11 20:38:52 +00:00
Jim Meyering
96f7791a8b . 2003-07-11 20:38:23 +00:00
Jim Meyering
0f46c3a0aa (EXTRA_SCRIPTS): Remove definition.
(bin_PROGRAMS): Add nohup.
(EXTRA_DIST): Remove nohup.sh.
(all_programs): Remove use of $(EXTRA_SCRIPTS).
2003-07-11 20:37:15 +00:00
Jim Meyering
326b48f041 (TESTS): Add nohup. 2003-07-11 20:35:29 +00:00
Jim Meyering
6f7e60b1f4 tests for the new nohup.c 2003-07-11 20:34:58 +00:00
Jim Meyering
761fec62a5 *** empty log message *** 2003-07-11 20:34:35 +00:00
Jim Meyering
8db77b8978 New file. Rewrite of nohup.sh in C.
This solves a portability problem: on at least Solaris systems,
when nohup.sh used the vendor /bin/sh, it would exit with status
of `1' rather than the required 126 or 127 upon failure to exec
the specified program.
2003-07-11 20:34:29 +00:00
Jim Meyering
9c557c0a27 *** empty log message *** 2003-07-11 11:12:53 +00:00
Jim Meyering
d111de83e5 *** empty log message *** 2003-07-11 11:12:48 +00:00
Jim Meyering
e1584f504f (diagnose_copy_fd_failure): New function, renamed from
the macro, COPY_FD_DIAGNOSE.
(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
(head_file): Likewise.
2003-07-11 11:12:44 +00:00
Jim Meyering
1dae2a560a (change_attributes): Enclose diagnostic in _(...). 2003-07-11 11:10:53 +00:00
Jim Meyering
208b8da666 (batch_convert): Use the quote function rather than using literal `...' in
a diagnostic.
2003-07-11 10:38:39 +00:00
Jim Meyering
7c6b61d57d Include "quote.h".
Use the quote function rather than using literal `...' in a diagnostic.
2003-07-11 10:37:21 +00:00
Jim Meyering
63861fc012 (main): Enclose diagnostic in _(...). 2003-07-11 10:35:38 +00:00
Jim Meyering
53cca5451c (main): Enclose diagnostic in _(...). 2003-07-11 10:34:50 +00:00
Jim Meyering
4927015380 (tac_seekable): Enclose diagnostic in _(...). 2003-07-11 10:34:08 +00:00
Jim Meyering
e96ddb3907 (main): Enclose diagnostic in _(...). 2003-07-11 10:33:12 +00:00
Jim Meyering
b8760e0f09 (main): Enclose diagnostic in _(...). 2003-07-11 10:18:45 +00:00
Jim Meyering
f37e7c032a (main): Enclose diagnostic in _(...). 2003-07-11 10:17:53 +00:00
Jim Meyering
112cba9a8b . 2003-07-11 06:07:04 +00:00
Jim Meyering
ff443fffa3 *** empty log message *** 2003-07-10 20:43:48 +00:00
Jim Meyering
5b9ea05b6a Include "posixver.h".
(parse_user_spec): Accept `.' as a separator only in pre-POSIX-200112 mode.
2003-07-10 20:43:42 +00:00
Jim Meyering
c9ed2d4e4b *** empty log message *** 2003-07-10 20:42:52 +00:00
Jim Meyering
6b31ccecb8 . 2003-07-10 20:16:41 +00:00
Jim Meyering
b34abb6f44 (Standards conformance): Mention that uses like
`tail -1' and `head -1', like `sort +1', are non conforming.
(chown invocation): Say that using `.' as a separator may not work.
2003-07-10 19:48:43 +00:00
Jim Meyering
b194aad646 *** empty log message *** 2003-07-10 19:39:20 +00:00
Jim Meyering
d574f4a249 (usage): Use 1024*1024 in place of 1048576. 2003-07-10 19:39:04 +00:00
Jim Meyering
f5f030cd09 *** empty log message *** 2003-07-10 16:45:03 +00:00
Jim Meyering
d4e2672d7c . 2003-07-10 15:49:37 +00:00
Jim Meyering
a61ffc8c12 *** empty log message *** 2003-07-10 15:49:29 +00:00
Jim Meyering
6b46572468 *** empty log message *** 2003-07-10 15:49:23 +00:00
Jim Meyering
317a34daf8 (noinst_PROGRAMS): Define to setuidgid. 2003-07-10 15:49:17 +00:00
Jim Meyering
aacb015d41 Now that we have setuidgid, use it in place of the kludge in this test. 2003-07-10 15:47:36 +00:00
Jim Meyering
0dca45f310 *** empty log message *** 2003-07-10 14:37:11 +00:00
Jim Meyering
d743e47970 New program, solely for testing (not installed). 2003-07-10 14:37:04 +00:00
Jim Meyering
477fd9c12e . 2003-07-10 11:25:59 +00:00
Jim Meyering
14031cbf92 New files, in support of new asprintf use. From gnulib. 2003-07-10 11:23:31 +00:00
Jim Meyering
f928e16280 *** empty log message *** 2003-07-10 11:23:16 +00:00
Jim Meyering
35ded2ce44 (jm_MACROS): Require gl_FUNC_VASPRINTF and gl_FUNC_VASNPRINTF. 2003-07-10 11:23:09 +00:00
Jim Meyering
116f76d19c . 2003-07-10 11:22:20 +00:00
Jim Meyering
b269489ba1 Now that a program (`who') uses asprintf, we need all of these:
* asnprintf.c, asprintf.c, printf-args.c, printf-args.h, printf-parse.c:
* printf-parse.h, vasnprintf.c, vasnprintf.h, vasprintf.c, vasprintf.h:
New files, from gnulib.
2003-07-10 11:15:20 +00:00
Jim Meyering
5624c49daf *** empty log message *** 2003-07-10 11:11:23 +00:00
Jim Meyering
32f2b4d3ca *** empty log message *** 2003-07-10 11:10:57 +00:00
Jim Meyering
4720108b1c Indent cpp directives (via cppi). 2003-07-10 11:09:11 +00:00
Jim Meyering
a42c0ab2e7 Indent cpp directives (via cppi). 2003-07-10 11:08:40 +00:00
Jim Meyering
79977fa157 *** empty log message *** 2003-07-10 11:07:35 +00:00
Jim Meyering
755af34510 . 2003-07-10 11:07:30 +00:00
Jim Meyering
d5cf04bd31 (libfetish_a_SOURCES): Add these:
printf-args.h, printf-parse.h, vasprintf.h, vasnprintf.h.
2003-07-10 11:07:22 +00:00
Jim Meyering
0efd253b5d *** empty log message *** 2003-07-10 11:06:15 +00:00
Jim Meyering
d52a2f1542 *** empty log message *** 2003-07-10 11:01:09 +00:00
Jim Meyering
e2e3a9a41c (change_file_owner): Don't leak file descriptors when dereferencing symlinks. 2003-07-10 10:59:47 +00:00
Jim Meyering
864de4b741 . 2003-07-10 08:35:28 +00:00
Jim Meyering
ba2eb10a80 *** empty log message *** 2003-07-10 08:35:11 +00:00
Jim Meyering
77723f8252 From gnulib.
Help replace my old inttypes.m4.
2003-07-10 08:35:02 +00:00
Jim Meyering
d495468b37 From gnulib.
Help replace my old inttypes.m4.
2003-07-10 08:33:46 +00:00
Jim Meyering
33f0fe8094 Remove file (make it empty, actually).
Use intmax_t.m4 and uintmax_t.m4 from gnulib, instead.
2003-07-10 07:57:43 +00:00
Jim Meyering
c7eab83c3e Switch from LGPL to GPL. 2003-07-10 07:06:25 +00:00
Jim Meyering
3a7b7b002d . 2003-07-09 17:55:29 +00:00
Jim Meyering
42d3f8ff68 *** empty log message *** 2003-07-09 17:54:57 +00:00
Jim Meyering
3bfb395872 Update from gnulib. 2003-07-09 17:54:54 +00:00
Jim Meyering
e496ebd4f9 *** empty log message *** 2003-07-09 13:16:52 +00:00
Jim Meyering
c2374d61cd *** empty log message *** 2003-07-09 10:00:46 +00:00
Jim Meyering
859428bfaa Fix the bug that would make du /' omit the /' on the last line.
E.g., `du --exclude '[^/]*' -x /' would print only "4\t\n" for me.

(ftw_dir): Don't clobber the leading `/'.
Reported by Chris Lesniewski as http://bugs.debian.org/200542.
2003-07-09 10:00:42 +00:00
Jim Meyering
4ad6473e4f *** empty log message *** 2003-07-09 10:00:15 +00:00
Jim Meyering
6d2bd321e8 (TESTS): Add slash 2003-07-09 10:00:09 +00:00
Jim Meyering
6d43a16e3f New file/test for today's lib/ftw.c fix. 2003-07-09 09:59:58 +00:00
Jim Meyering
51ceee4577 *** empty log message *** 2003-07-09 09:51:34 +00:00
Jim Meyering
3ac852c895 *** empty log message *** 2003-07-09 09:11:41 +00:00
Jim Meyering
c2ff181eca *** empty log message *** 2003-07-09 08:54:30 +00:00
Jim Meyering
83ca2782f9 (xlseek): Avoid warning about ``return without value
from function returning non-void''.
2003-07-09 08:54:24 +00:00
Jim Meyering
0a2917372d *** empty log message *** 2003-07-08 21:08:27 +00:00
Jim Meyering
133f79583f Add END handler to close STDOUT and check for errors. 2003-07-08 21:08:17 +00:00
Jim Meyering
c540aafa3f Update to version 1.29. 2003-07-08 21:00:01 +00:00
Jim Meyering
b30d80a586 *** empty log message *** 2003-07-06 06:13:29 +00:00
Jim Meyering
5c01750b43 *** empty log message *** 2003-07-06 06:12:28 +00:00
Jim Meyering
05731b4717 Add support for a "[" that conforms to the GNU coding standards,
i.e., that does not depend on its name.

(LBRACKET): Define to 0 if not defined.
(main): Use LBRACKET rather than argv[0].

----------
(one_argument): Do not check for -t if POSIXLY_CORRECT.

(main): Do not recognize --help or --version if
POSIXLY_CORRECT, when invoked as "test".  Handle "[ ]" correctly.
Do not bother testing that margv[margc] is non-null.
2003-07-06 06:12:20 +00:00
Jim Meyering
138fd919b8 (bin_PROGRAMS): Add "[".
(__SOURCES): New var.
2003-07-06 06:10:36 +00:00
Jim Meyering
59aca01693 (programs): Ignore "[", since it doesn't have a separate man page. 2003-07-06 06:09:44 +00:00
Jim Meyering
12e8f82540 New file. 2003-07-06 06:08:40 +00:00
Jim Meyering
2ec0b8355c Add [. 2003-07-06 06:08:17 +00:00
Jim Meyering
bc92090949 update from master 2003-07-05 09:03:44 +00:00
Jim Meyering
b358b98f1c *** empty log message *** 2003-07-04 12:26:22 +00:00
Jim Meyering
b50457c5b3 *** empty log message *** 2003-07-04 12:25:57 +00:00
Jim Meyering
47dfac7b19 (print_line): Rewrite to use asprintf, in order to be
able to avoid emitting trailing blanks.
2003-07-04 12:25:29 +00:00
Jim Meyering
8f85628841 *** empty log message *** 2003-07-04 11:38:43 +00:00
Jim Meyering
2ada37fa94 Include <sys/types.h> unconditionally, instead of
having it depend on HAVE_SYS_TYPES_H.
2003-07-04 11:38:37 +00:00
Jim Meyering
aae3b8e336 *** empty log message *** 2003-07-04 10:15:52 +00:00
Jim Meyering
fb864a8db7 Add tests of head's new --lines=-N
option, and perform the 1600 invocations of head IFF the envvar
RUN_EXPENSIVE_TESTS is set.
2003-07-04 10:15:47 +00:00
Jim Meyering
89d9530643 (do_copy): Give a better diagnostic when failing due
to nonexistent destination directory.  Reported by Dmitry Rutsky.
See http://bugs.debian.org/199730 for details.
2003-07-04 10:01:35 +00:00
Jim Meyering
4c8f617f70 *** empty log message *** 2003-07-03 17:09:10 +00:00
Jim Meyering
3cdc49b0ee *** empty log message *** 2003-07-03 17:09:03 +00:00
Jim Meyering
d85a6aa4a5 . 2003-07-03 14:15:08 +00:00
Jim Meyering
b01dd9232d *** empty log message *** 2003-06-29 06:35:37 +00:00
Jim Meyering
6e036c0593 tweak comment to fit in 80 columns 2003-06-28 10:30:04 +00:00
Jim Meyering
307fbc8ae6 *** empty log message *** 2003-06-27 12:17:55 +00:00
Jim Meyering
28b3b79f30 *** empty log message *** 2003-06-27 07:51:33 +00:00
Jim Meyering
0c2dd1fe07 Also use --verbose and compare stderr output with what we'd expect. 2003-06-27 07:51:30 +00:00
Jim Meyering
d294e440c3 *** empty log message *** 2003-06-27 07:44:23 +00:00
Jim Meyering
bcf7749785 *** empty log message *** 2003-06-27 07:42:02 +00:00
Jim Meyering
9e6e479047 split's --verbose option did nothing
(longopts): Use `1', not `0' as the value for for &verbose.
2003-06-27 07:41:55 +00:00
Jim Meyering
8b2c8b091c *** empty log message *** 2003-06-25 09:48:49 +00:00
Jim Meyering
161d3c8d76 (Time directives) [%s]: Add a cross reference to the related examples.
(Examples of date): Add an @anchor here, along with a few more examples.
2003-06-25 09:48:43 +00:00
Jim Meyering
3914dba415 *** empty log message *** 2003-06-19 22:01:55 +00:00
Jim Meyering
5fe0d2293d (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
Use `error_t' (rather than int) as type for local `err'.
2003-06-19 22:01:47 +00:00
Jim Meyering
3dade24681 *** empty log message *** 2003-06-19 21:17:53 +00:00
Jim Meyering
f0a5712f74 (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
Fix author preservation code.
2003-06-19 21:17:48 +00:00
Jim Meyering
2b04698566 *** empty log message *** 2003-06-19 11:41:31 +00:00
Jim Meyering
0bf9e8687d (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
(do_link): Don't warn about hard link to symlink.
2003-06-19 11:38:16 +00:00
Jim Meyering
2b5eb31b81 update from upstream 2003-06-18 13:21:05 +00:00
Jim Meyering
efa6493662 *** empty log message *** 2003-06-18 11:00:20 +00:00
Jim Meyering
35e65fbf15 *** empty log message *** 2003-06-18 10:19:36 +00:00
Jim Meyering
8c9de91ad1 (PARAMS): Remove. All uses removed. 2003-06-18 10:19:33 +00:00
Jim Meyering
03f3bf246b . 2003-06-18 10:18:17 +00:00
Jim Meyering
a46ae031d3 update from gnulib 2003-06-18 10:16:47 +00:00
Jim Meyering
f9b9a990c4 *** empty log message *** 2003-06-18 09:24:50 +00:00
Jim Meyering
04dd482b80 *** empty log message *** 2003-06-18 08:15:17 +00:00
Jim Meyering
95857d75da Merge in change from gnulib.
Remove block of alloca-related code in favor
of an unconditional `#include <alloca.h>'.
2003-06-18 08:15:14 +00:00
Jim Meyering
e0418912ff *** empty log message *** 2003-06-18 08:10:10 +00:00
Jim Meyering
8ea48114d3 Use `1990-2000' notation in Copyright line until Emacs'
copyright-update function learns how to handle a comma-separated
list of years that spans a line boundary.
2003-06-18 08:10:03 +00:00
Jim Meyering
8a615a4bf7 Include <stddef.h>.
Remove unnecessary parentheses.
2003-06-18 08:07:02 +00:00
Jim Meyering
ff85d09b52 from gnulib: add copyright notice 2003-06-18 08:03:45 +00:00
Jim Meyering
a44ae437d1 from gnulib: update comments 2003-06-18 08:02:24 +00:00
Jim Meyering
8a75477940 from gnulib: add copyright notice 2003-06-18 08:01:08 +00:00
Jim Meyering
970d452fbb from gnulib: add copyright notice 2003-06-18 08:00:31 +00:00
Jim Meyering
4246f6ed52 *** empty log message *** 2003-06-18 07:59:22 +00:00
Jim Meyering
91c698cb2f Include "getdelim2.h", not "getstr.h".
Reflect renaming: getstr -> getdelim2.
2003-06-18 07:59:14 +00:00
Jim Meyering
5fdac01e0c . 2003-06-18 07:58:08 +00:00
Jim Meyering
09c6cc9f9c (libfetish_a_SOURCES): Add getdelim2.c and getdelim2.h. 2003-06-18 07:58:03 +00:00
Jim Meyering
42cd1376ed (PARAMS): Remove. All uses removed. 2003-06-18 07:57:26 +00:00
Jim Meyering
dfbef7497d (PARAMS): Remove. All uses removed. 2003-06-18 07:55:39 +00:00
Jim Meyering
d5ebb3b6fa (PARAMS): Remove. All uses removed. 2003-06-18 07:54:53 +00:00
Jim Meyering
5ff2043ef2 (PARAMS): Remove. All uses removed. 2003-06-18 07:54:10 +00:00
Jim Meyering
b289f42fdf (PARAMS): Remove. All uses removed.
Do not include config.h; no longer needed.
Anyway, config.h should always be included before any other file.
2003-06-18 07:53:12 +00:00
Jim Meyering
de4077cbe3 (PARAMS): Remove. All uses removed.
Do not include config.h; no longer needed.
Anyway, config.h should always be included before any other file.
2003-06-18 07:52:28 +00:00
Jim Meyering
33a46de4ad (PARAMS): Remove. All uses removed. 2003-06-18 07:51:52 +00:00
Jim Meyering
cad207ec23 remove bogus comment 2003-06-18 07:51:08 +00:00
Jim Meyering
8b384adc97 (PARAMS): Remove. All uses removed.
Do not include config.h; no longer needed.
Anyway, config.h should always be included before any other file.
2003-06-18 07:50:09 +00:00
Jim Meyering
6cf1fd0c87 (PARAMS): Remove. All uses removed. 2003-06-18 07:49:35 +00:00
Jim Meyering
38a0ec7565 (PARAMS): Remove. All uses removed. 2003-06-18 07:48:56 +00:00
Jim Meyering
cee8853f77 *** empty log message *** 2003-06-18 07:48:38 +00:00
Jim Meyering
3ed2170b64 (PARAMS): Remove. All uses removed.
Do not include config.h; no longer needed.
Anyway, config.h should always be included before any other file.
2003-06-18 07:48:30 +00:00
Jim Meyering
30b2b9caaf (PARAMS): Remove. All uses removed. 2003-06-18 07:46:31 +00:00
Jim Meyering
cc0274b020 *** empty log message *** 2003-06-18 07:45:11 +00:00
Jim Meyering
5acac69fde (getdelim2): Move this function into its own file. 2003-06-18 07:44:56 +00:00
Jim Meyering
432d98178d *** empty log message *** 2003-06-18 07:42:50 +00:00
Jim Meyering
b605919f56 Extracted from getstr.c. 2003-06-18 07:42:21 +00:00
Jim Meyering
08c0001e89 *** empty log message *** 2003-06-18 07:40:49 +00:00
Jim Meyering
6d6f7c4ab0 *** empty log message *** 2003-06-18 07:39:42 +00:00
Jim Meyering
ee1dffc94c Update from gnulib. 2003-06-18 07:39:28 +00:00
Jim Meyering
1c0e2e41d0 . 2003-06-18 07:38:28 +00:00
Jim Meyering
4f1ec3fd54 Reflect renaming: readline -> readlinebuffer. 2003-06-18 07:37:29 +00:00
Jim Meyering
9341d1f804 *** empty log message *** 2003-06-18 06:53:30 +00:00
Jim Meyering
0b958357b0 Update from gnulib. 2003-06-18 06:53:26 +00:00
Jim Meyering
4545986b08 expand copyright years to sync with gnulib 2003-06-18 06:14:01 +00:00
Jim Meyering
62b9c742e9 Update from gnulib. 2003-06-18 06:11:45 +00:00
Jim Meyering
91dea2139e *** empty log message *** 2003-06-17 19:57:46 +00:00
Jim Meyering
719c0b709c Update from gnulib. 2003-06-17 19:57:27 +00:00
Jim Meyering
ff72da8ce0 *** empty log message *** 2003-06-17 19:53:59 +00:00
Jim Meyering
8ccf7c033d Merge in changes from gnulib.
Include <stdbool.h> unconditionally.
Include <limits.h>.
(CHAR_BIT): Don't define.
2003-06-17 19:53:53 +00:00
Jim Meyering
cd40ac8029 *** empty log message *** 2003-06-17 18:40:11 +00:00
Jim Meyering
a5edf93f28 *** empty log message *** 2003-06-17 18:39:50 +00:00
Jim Meyering
9ce9757db1 Include sys/types.h before system.h (because
the latter includes sys/stat.h).  Required on Ultrix 4.3.
2003-06-17 18:39:20 +00:00
Jim Meyering
2e17bffdb5 *** empty log message *** 2003-06-17 18:35:45 +00:00
Jim Meyering
4d599fe1f9 Include sys/types.h before sys/stat.h.
Required on Ultrix 4.3.
2003-06-17 18:35:42 +00:00
Jim Meyering
acd0f0af4b *** empty log message *** 2003-06-17 18:35:12 +00:00
Jim Meyering
392f0ff40c . 2003-06-17 18:13:41 +00:00
Jim Meyering
6bcd4b08ba (main): Call initialize_main. 2003-06-17 18:13:23 +00:00
Jim Meyering
1844eee69a (initialize_main): Define. 2003-06-17 18:12:26 +00:00
Jim Meyering
83563c918a *** empty log message *** 2003-06-17 18:11:20 +00:00
Jim Meyering
dc9d2eaaa0 *** empty log message *** 2003-06-17 17:40:51 +00:00
Jim Meyering
588e9f6a69 Fix for build failure on Ultrix 4.3.
Include sys/statvfs.h in preference to sys/vfs.h.
Include sys/param.h and sys/mount.h on ultrix.
2003-06-17 17:40:45 +00:00
Jim Meyering
d14b702016 add comma 2003-06-16 10:51:29 +00:00
Jim Meyering
0e733fb3db *** empty log message *** 2003-06-16 10:47:06 +00:00
Jim Meyering
0d6c9af250 (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): New definitions.
Moved here from touch.c, with one change: define EISDIR to -1, not 0.
2003-06-16 10:46:59 +00:00
Jim Meyering
9253fdd9a2 (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove definitions.
Moved to system.h.
2003-06-16 10:45:18 +00:00
Jim Meyering
11fb977675 *** empty log message *** 2003-06-16 09:11:45 +00:00
Jim Meyering
b8735ae4a0 (cat): Remove `#ifndef ENOSYS', now that it's
guaranteed to be defined.
2003-06-16 09:11:39 +00:00
Jim Meyering
0e79eb8a57 (ENOSYS, ENOTSUP): Define to -1 if not defined. 2003-06-16 09:10:53 +00:00
Jim Meyering
c75911b034 *** empty log message *** 2003-06-16 07:53:27 +00:00
Jim Meyering
b669dfeb11 *** empty log message *** 2003-06-16 07:53:23 +00:00
Jim Meyering
d2bebfab0e Mention the CVS repository.
Encourage addition of test cases.
2003-06-16 07:53:18 +00:00
Jim Meyering
40959940d9 . 2003-06-12 20:02:07 +00:00
Jim Meyering
417a6cd6f5 *** empty log message *** 2003-06-12 08:17:59 +00:00
Jim Meyering
aa85d5d6c7 (touch): Call close only if necessary. 2003-06-12 08:17:49 +00:00
Jim Meyering
738b7eb8e4 *** empty log message *** 2003-06-12 07:34:58 +00:00
Jim Meyering
19fbe90711 *** empty log message *** 2003-06-12 06:59:49 +00:00
Jim Meyering
07cc4078f1 Also change lines' to newlines'. 2003-06-12 06:59:45 +00:00
Jim Meyering
e75cbaa337 Correct wording: wc prints counts in the order `newline, word, byte'.
And change `lines' to `newlines'.
2003-06-12 06:57:34 +00:00
Jim Meyering
65fccc2340 *** empty log message *** 2003-06-12 06:56:28 +00:00
Jim Meyering
92bbc5bbaf (usage): Correct wording: wc prints counts in the order `newline, word, byte'. 2003-06-12 06:55:57 +00:00
Jim Meyering
e07c146aa1 *** empty log message *** 2003-06-12 06:52:53 +00:00
Jim Meyering
e7c3673528 (wc invocation): Tweak wording: wc prints them in
the order `line, word, byte'.  Suggestion from Keith M. Briggs.
2003-06-12 06:52:49 +00:00
Jim Meyering
2a7d10a766 *** empty log message *** 2003-06-11 08:50:16 +00:00
Jim Meyering
c393a4fa20 [LSTAT]: Compile/use slash_aware_lstat only if it is necessary. 2003-06-11 08:50:01 +00:00
Jim Meyering
383db808ef *** empty log message *** 2003-06-10 06:38:16 +00:00
Jim Meyering
b9baae93b4 *** empty log message *** 2003-06-10 06:37:09 +00:00
Jim Meyering
068f2224f9 Add a test for the new format, e.g., May-23-2003. 2003-06-10 06:37:03 +00:00
Jim Meyering
208b95e198 Also accept dates of the form May-23-2003. 2003-06-10 06:28:00 +00:00
Jim Meyering
3ceea0946b . 2003-06-09 20:57:03 +00:00
Jim Meyering
edbfa74a8a *** empty log message *** 2003-06-09 20:53:22 +00:00
Jim Meyering
de678f9321 Also undefine gmtime.
(rpl_gmtime): New function.  Suggestion from Paul Eggert.
2003-06-09 20:53:15 +00:00
Jim Meyering
633fbb7c66 *** empty log message *** 2003-06-09 20:52:22 +00:00
Jim Meyering
4a6f13aa2f (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also define gmtime. 2003-06-09 20:52:15 +00:00
Jim Meyering
954603b708 (gl_FUNC_TZSET_CLOBBER): Also define gmtime. 2003-06-09 20:51:46 +00:00
Jim Meyering
f6b3325690 *** empty log message *** 2003-06-08 18:03:03 +00:00
Jim Meyering
44c64b7810 [!_LIBC]: Ensure that the required autoconf test has been run. 2003-06-08 18:03:01 +00:00
Jim Meyering
507ecb8d3e *** empty log message *** 2003-06-08 18:01:16 +00:00
Jim Meyering
bf7a41befb Update from gnulib. 2003-06-08 18:01:09 +00:00
Jim Meyering
3c5cd2319b . 2003-06-08 17:45:11 +00:00
Jim Meyering
351f9f7436 . 2003-06-08 17:44:21 +00:00
Jim Meyering
450f30c5da change some names, reverse sense of tests
Also define TZSET_CLOBBERS_LOCALTIME_BUFFER.
Arrange to compile gettimeofday.
2003-06-08 17:43:53 +00:00
Jim Meyering
9de1b71bda *** empty log message *** 2003-06-08 17:42:42 +00:00
Jim Meyering
218d2a739c (_jm_STRFTIME_PREREQS): Require gl_FUNC_TZSET_CLOBBER. 2003-06-08 17:42:31 +00:00
Jim Meyering
45840e899f Clean up, as part of merge with emacs version of strftime.c.
(my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
Remove function, now that we can rely on a working tzset function.
Ensure that the required autoconf test has been run.
2003-06-08 17:41:07 +00:00
Jim Meyering
60f6a7d72f Also undef tzset.
(rpl_tzset): New function.
2003-06-08 17:37:48 +00:00
Jim Meyering
a647c23ca2 *** empty log message *** 2003-06-07 16:30:04 +00:00
Jim Meyering
6a9dbd3e33 New file. Used by strftime.m4. 2003-06-07 16:30:02 +00:00
Jim Meyering
98a799ac0a *** empty log message *** 2003-06-07 16:28:39 +00:00
Jim Meyering
e7ae9459f9 New file, used by strftime.m4. 2003-06-07 16:28:23 +00:00
Jim Meyering
43596a06a3 Update from gnulib. 2003-06-07 16:27:44 +00:00
Jim Meyering
0ba7b84893 Remove definition and uses of __P. 2003-06-07 10:27:54 +00:00
Jim Meyering
70e17d65dd Add copyright notice.
Include <stdio.h>.
2003-06-07 10:27:08 +00:00
Jim Meyering
82f74da190 *** empty log message *** 2003-06-07 10:20:52 +00:00
Jim Meyering
0db39dc64d Include alloca.h unconditionally. 2003-06-07 10:20:42 +00:00
Jim Meyering
465e39e101 *** empty log message *** 2003-06-07 10:15:15 +00:00
Jim Meyering
18944fe439 Remove unnecessary parentheses around malloc. 2003-06-07 10:15:12 +00:00
Jim Meyering
84faaa2188 *** empty log message *** 2003-06-07 10:13:50 +00:00
Jim Meyering
474db3e6a4 Put `Free Software Foundation' in place of my name
in the copyright comment.
2003-06-07 10:13:29 +00:00
Jim Meyering
3784619db7 *** empty log message *** 2003-06-07 10:11:56 +00:00
Jim Meyering
f1d7d48ebb Include <stddef.h>. 2003-06-07 10:11:39 +00:00
Jim Meyering
2c8b39745b add copyright years from gnulib 2003-06-07 10:09:18 +00:00
Jim Meyering
aac3c83ed0 *** empty log message *** 2003-06-06 23:08:00 +00:00
Jim Meyering
1e0d9f6c44 (syntax-check): Add commented-out (over-aggressive) rule. 2003-06-06 23:07:53 +00:00
Jim Meyering
a15096482c . 2003-06-06 23:06:42 +00:00
Jim Meyering
1e006fb1ea . 2003-06-06 23:04:56 +00:00
Jim Meyering
0bf3b0e892 (MOSTLYCLEANFILES): Add alloca.h and alloca.ht.
(MOSTLYCLEANFILES): Add stdbool.ht.
2003-06-06 23:04:39 +00:00
Jim Meyering
fcd7666d6e . 2003-06-06 22:54:40 +00:00
Jim Meyering
01b2facd29 . 2003-06-06 22:46:44 +00:00
Jim Meyering
ded8e8e6f4 New file. From gnulib. 2003-06-06 22:46:09 +00:00
Jim Meyering
404585e739 *** empty log message *** 2003-06-06 22:37:28 +00:00
Jim Meyering
6118590130 Include <stdio.h>, once again, for declaration of sprintf. 2003-06-06 22:37:23 +00:00
Jim Meyering
c6fdfa80ff *** empty log message *** 2003-06-06 22:34:12 +00:00
Jim Meyering
f43ec51105 Include <stddef.h> unconditionally.
Include <inttypes.h> as an alternative to <stdint.h>.
2003-06-06 22:34:04 +00:00
Jim Meyering
fbb7e6632b *** empty log message *** 2003-06-06 22:30:51 +00:00
Jim Meyering
8f92b22d98 Include <stdint.h> as an alternative to <inttypes.h>. 2003-06-06 22:30:28 +00:00
Jim Meyering
563aaa8d0b Include <stdint.h> as an alternative to <inttypes.h>. 2003-06-06 22:30:03 +00:00
Jim Meyering
611702a917 *** empty log message *** 2003-06-06 22:20:31 +00:00
Jim Meyering
6926a9ca67 Include <stddef.h>, not <sys/types.h>. 2003-06-06 22:20:29 +00:00
Jim Meyering
2ebe20a54b *** empty log message *** 2003-06-06 22:18:01 +00:00
Jim Meyering
51fd72e0ea Include <stddef.h>.
(NULL): Don't define, since <stddef.h> does that.
2003-06-06 22:17:57 +00:00
Jim Meyering
501a8e54b9 *** empty log message *** 2003-06-06 21:04:32 +00:00
Jim Meyering
481fd54919 Include <limits.h> without checking for HAVE_LIMITS_H.
Include <stddefs.h> unconditionally.
(NULL): Don't define, since <stddef.h> does that.
2003-06-06 21:04:15 +00:00
Jim Meyering
01d33d71dc *** empty log message *** 2003-06-06 21:01:55 +00:00
Jim Meyering
c8023d768a #undef rename before defining rpl_rename.
[HAVE_CONFIG_H]: Guard inclusion of config.h.
2003-06-06 21:01:52 +00:00
Jim Meyering
63c87fccb3 *** empty log message *** 2003-06-06 21:00:20 +00:00
Jim Meyering
8408a9a92a Include <stddef.h> rather than <sys/types.h>, as we merely need size_t. 2003-06-06 21:00:16 +00:00
Jim Meyering
91d8522cbe *** empty log message *** 2003-06-06 20:48:48 +00:00
Jim Meyering
a5dbfa1756 Include <stddef.h> rather than <sys/types.h>, as we merely need size_t. 2003-06-06 20:48:43 +00:00
Jim Meyering
fcf3830db0 *** empty log message *** 2003-06-06 20:45:53 +00:00
Jim Meyering
361f358a64 Dont include <stddef.h> or <sys/types.h>; not needed. 2003-06-06 20:45:46 +00:00
Jim Meyering
b97f30e0a1 *** empty log message *** 2003-06-06 20:19:53 +00:00
Jim Meyering
352b014540 from gnulib 2003-06-06 20:19:37 +00:00
Jim Meyering
ef07d7b020 *** empty log message *** 2003-06-06 20:18:17 +00:00
Jim Meyering
01170d044a Include <stddef.h>.
(NULL): Don't define, since <stddef.h> does that.
2003-06-06 20:17:37 +00:00
Jim Meyering
a4fa7bc1f0 *** empty log message *** 2003-06-06 20:14:10 +00:00
Jim Meyering
eaf4e73506 Include <stddef.h>, to get size_t. 2003-06-06 20:14:02 +00:00
Jim Meyering
2861487e31 *** empty log message *** 2003-06-06 20:13:05 +00:00
Jim Meyering
2e637905f9 Include "memcoll.h", which gets us size_t and checks
our interface, instead of including <sys/types.h>
(memcoll): Fall back on a simple algorithm using
memcmp if strcoll doesn't work.
2003-06-06 20:12:59 +00:00
Jim Meyering
353c4cbcd4 *** empty log message *** 2003-06-06 20:10:24 +00:00
Jim Meyering
20bbe4ed6b Include <stddef.h>. From gnulib. 2003-06-06 20:10:20 +00:00
Jim Meyering
199e0abbe0 Don't include <sys/types.h>. From gnulib. 2003-06-06 20:08:58 +00:00
Jim Meyering
3bb7c314bd *** empty log message *** 2003-06-06 20:04:53 +00:00
Jim Meyering
ec8405327c (main): Avoid newer 3-arg form of open,
so this script works also with e.g., perl5.005_03.
2003-06-06 20:04:39 +00:00
Jim Meyering
9d8449fbeb *** empty log message *** 2003-06-06 19:58:32 +00:00
Jim Meyering
e53217d245 (EXTRA_DIST): Add alloca_.h.
(all-local $(lib_OBJECTS)): Depend on $(ALLOCA_H).
(alloca.h): New rule.
2003-06-06 19:58:26 +00:00
Jim Meyering
2e2f4032ef *** empty log message *** 2003-06-06 19:54:20 +00:00
Jim Meyering
46e8766586 from gnulib 2003-06-06 19:54:14 +00:00
Jim Meyering
9a687b646b Require gl_FUNC_ALLOCA. 2003-06-06 19:54:05 +00:00
Jim Meyering
81c26ff410 Merge from gnulib. 2003-06-06 19:46:45 +00:00
Jim Meyering
5b06e5f698 Update from gnulib. 2003-06-06 19:42:03 +00:00
Jim Meyering
43cab34a90 Update from gnulib. 2003-06-06 19:41:19 +00:00
Jim Meyering
dab683385b Update from gnulib. 2003-06-06 19:40:14 +00:00
Jim Meyering
941f333849 Update from gnulib. 2003-06-06 19:39:07 +00:00
Jim Meyering
c2d5a2ac32 *** empty log message *** 2003-06-06 19:37:43 +00:00
Jim Meyering
5084ad7014 Update from gnulib. 2003-06-06 19:37:13 +00:00
Jim Meyering
5dc10e1e85 Update from gnulib. 2003-06-06 19:36:28 +00:00
Jim Meyering
06b486287f Update from gnulib. 2003-06-06 19:36:00 +00:00
Jim Meyering
54978a766d *** empty log message *** 2003-06-06 19:33:47 +00:00
Jim Meyering
8b0170befa Update from gnulib. 2003-06-06 19:33:44 +00:00
Jim Meyering
510f263a2c Include <string.h> and <stdlib.h> unconditionally.
(memcpy): Remove definition.
2003-06-06 19:32:21 +00:00
Jim Meyering
9f818bb79f . 2003-06-06 19:19:57 +00:00
Jim Meyering
6d1208ecf2 Include <stdbool.h> unconditionally. 2003-06-06 19:18:54 +00:00
Jim Meyering
271dade11d . 2003-06-06 19:18:18 +00:00
Jim Meyering
864b4ae3a1 *** empty log message *** 2003-06-06 19:17:54 +00:00
Jim Meyering
da5cbe5ef8 Include <stdbool.h> unconditionally. 2003-06-06 19:17:37 +00:00
Jim Meyering
e5818cca68 Include <stdbool.h> unconditionally. 2003-06-06 19:16:31 +00:00
Jim Meyering
4a57eac20d Merge from gnulib. 2003-06-06 19:16:06 +00:00
Jim Meyering
47158d0de8 Merge from gnulib. 2003-06-06 19:15:40 +00:00
Jim Meyering
2aad14c59a . 2003-06-06 07:23:31 +00:00
Jim Meyering
ccda0b0c8b tweak again 2003-06-06 07:23:22 +00:00
Jim Meyering
4f23b932ed make var names match 2003-06-06 07:16:29 +00:00
Jim Meyering
62ce772497 *** empty log message *** 2003-06-06 07:15:02 +00:00
Jim Meyering
7304b6fa17 Update from gnulib. 2003-06-06 07:14:57 +00:00
Jim Meyering
ad5d1a84fe . 2003-06-06 07:14:22 +00:00
Jim Meyering
04c93a0e13 . 2003-06-06 07:13:24 +00:00
Jim Meyering
46cab6debc *** empty log message *** 2003-06-06 07:07:17 +00:00
Jim Meyering
4b048826c7 (jm_PREREQ): Use gl_HUMAN, not jm_PREREQ_HUMAN.
(jm_prereq_HUMAN): Remove.
2003-06-06 07:07:13 +00:00
Jim Meyering
53a32e5fe4 New file, from gnulib. 2003-06-06 07:06:35 +00:00
Jim Meyering
71bf6b1420 . 2003-06-06 07:04:45 +00:00
Jim Meyering
009bf56df8 *** empty log message *** 2003-06-05 21:56:00 +00:00
Jim Meyering
75edcde81a Assume freestanding C89 or better.
(HAVE_LIMITS_H): Remove.  Assume it's 1.
(__P): Remove; not used.
(CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
(mktime, not_equal_tm, print_tm, check_result,
main): Use prototypes.  Use const * where appropriate.
(main): Fix typo in testing code that uncovered by above changes.
(Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
2003-06-05 21:55:47 +00:00
Jim Meyering
e86ab6d4d2 *** empty log message *** 2003-06-05 16:28:53 +00:00
Jim Meyering
4c89642c83 *** empty log message *** 2003-06-04 12:43:10 +00:00
Jim Meyering
88a30ac10e *** empty log message *** 2003-06-04 12:36:05 +00:00
Jim Meyering
52f5243a92 . 2003-06-04 12:22:59 +00:00
Jim Meyering
1bc914b7de *** empty log message *** 2003-06-04 12:22:44 +00:00
Jim Meyering
8c34e76480 (check-programs-vs-x): Rename target
from check-programs-vs-1.  Adjust rule to check for the
primary (.x) file, not the generated one (.1).
2003-06-04 12:22:06 +00:00
Jim Meyering
4a4a7de6a2 (dist_man_MANS): Add kill.1.
(kill.1): New rule.
2003-06-04 12:16:02 +00:00
Jim Meyering
c3078fa05a *** empty log message *** 2003-06-04 12:15:36 +00:00
Jim Meyering
0ab9c4a0fa (check-programs-vs-1): New phony target.
(check-local): Depend on it.
2003-06-04 11:58:59 +00:00
Jim Meyering
dba7483095 . 2003-06-03 13:00:22 +00:00
Jim Meyering
bf1245e2f3 *** empty log message *** 2003-06-03 08:46:06 +00:00
Jim Meyering
e53732b471 Avoid unnecessary copying of environment.
(main): Rather than clearing the environment and --
unless told to ignore environment -- copying all settings from
the saved, original environment, clear the environment only when
that is requested.  Suggested by Jens Elkner.
2003-06-03 08:29:41 +00:00
Jim Meyering
ebe74e183e *** empty log message *** 2003-06-03 07:52:51 +00:00
Jim Meyering
4ad5932cda *** empty log message *** 2003-06-03 06:53:45 +00:00
Jim Meyering
095fcca5a5 *** empty log message *** 2003-06-02 08:15:45 +00:00
Jim Meyering
1f9186195f (MOSTLYCLEANFILES): Initialize.
(stdbool.h): New rule.
(all-local $(lib_OBJECTS)): Depend on $(STDBOOL_H)
(MOSTLYCLEANFILES): Add stdbool.h.
(EXTRA_DIST): Add stdbool.h.
2003-06-02 08:15:38 +00:00
Jim Meyering
5594c4570e New file. From gnulib. 2003-06-02 08:15:16 +00:00
Jim Meyering
86b58740ce *** empty log message *** 2003-06-02 07:47:08 +00:00
Jim Meyering
fcd082a280 (jm_MACROS): Require AM_STDBOOL_H. 2003-06-02 07:46:55 +00:00
Jim Meyering
38c68676ac *** empty log message *** 2003-06-02 06:58:27 +00:00
Jim Meyering
e606dacc98 *** empty log message *** 2003-06-02 06:58:22 +00:00
Jim Meyering
6b6141eb01 [!TEST_STANDALONE]: Remove #if-0'd block.
(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.
2003-06-02 06:58:18 +00:00
Jim Meyering
885d681dff Always include <string.h>, since we assume C89.
Include <limits.h> without checking for HAVE_LIMITS_H.
2003-06-02 06:56:30 +00:00
Jim Meyering
0dd2834cd2 . 2003-06-01 21:42:54 +00:00
Jim Meyering
72944b4c69 Avoid a race condition in `tail -f' described by Ken Raeburn in
http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html

(file_lines): Add new parameter, *read_pos, and set it.
(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
(tail_bytes, tail_lines, tail): Likewise.
(tail_file): Use the new `read_pos' value as the size,
rather than stats.st_size from the fstat call.
2003-06-01 18:26:38 +00:00
Jim Meyering
4e8485f525 *** empty log message *** 2003-06-01 18:24:46 +00:00
Jim Meyering
9362cd7fa7 *** empty log message *** 2003-06-01 12:02:20 +00:00
Jim Meyering
c9f1c50085 *** empty log message *** 2003-06-01 08:48:10 +00:00
Jim Meyering
ab74875511 *** empty log message *** 2003-06-01 08:47:18 +00:00
Jim Meyering
afb5da4098 *** empty log message *** 2003-06-01 08:44:52 +00:00
Jim Meyering
bfa07fbaaa update from gnulib again 2003-05-30 16:05:56 +00:00
Jim Meyering
749de53b9d *** empty log message *** 2003-05-30 16:01:07 +00:00
Jim Meyering
fadd323677 Update from gnulib. 2003-05-30 16:01:04 +00:00
Jim Meyering
db417f264e Update from gnulib. 2003-05-30 07:39:20 +00:00
Jim Meyering
ba2b74806e . 2003-05-29 19:54:40 +00:00
Jim Meyering
ddfb52fb2f . 2003-05-29 19:53:52 +00:00
Jim Meyering
7665d4286a *** empty log message *** 2003-05-29 12:09:50 +00:00
Jim Meyering
1b9d382b97 *** empty log message *** 2003-05-29 12:09:42 +00:00
Jim Meyering
efc545bd54 Make the %r format directive honor any locale setting.
(my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]:
Use underlying_strftime for %r.
2003-05-29 12:09:06 +00:00
Jim Meyering
95fa743ec4 . 2003-05-28 18:07:17 +00:00
Jim Meyering
a50b49d429 *** empty log message *** 2003-05-28 18:06:03 +00:00
Jim Meyering
38f8cadb9c Allow expansion of `$file' in the here-
document corresponding to comment at the top of fs.h.
2003-05-28 18:05:46 +00:00
Jim Meyering
e46a15ec9c upgrade to 1.7.5 2003-05-26 21:08:58 +00:00
Jim Meyering
1ab36ba392 *** empty log message *** 2003-05-26 20:23:31 +00:00
Jim Meyering
e4ac725a11 Fix portability problem on FreeBSD5.0: don't include
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
Use #if/#elif/... cascade so we get only one set of include files.
2003-05-26 20:23:14 +00:00
Jim Meyering
1df8b738db (UTILS_FUNC_DIRFD): Merge in change from gnulib, fixing an M4 quoting bug. 2003-05-26 19:37:26 +00:00
Jim Meyering
f8fd2a622b . 2003-05-26 19:30:23 +00:00
Jim Meyering
4fcd535089 *** empty log message *** 2003-05-26 19:30:14 +00:00
Jim Meyering
7d70fd68c5 (AM_PATH_PROG_WITH_TEST): Use TAB-SP, not SP-TAB when setting IFS. 2003-05-26 19:30:10 +00:00
Jim Meyering
e587321214 (AC_LIB_PROG_LD_GNU): Use TAB-SP, not SP-TAB when setting IFS. 2003-05-26 19:29:28 +00:00
Jim Meyering
364c12825c . 2003-05-24 18:18:57 +00:00
Jim Meyering
c7b2637d88 *** empty log message *** 2003-05-24 17:22:06 +00:00
Jim Meyering
55dab17c42 (split_3): Accept the BSD format only when in MD5 mode. 2003-05-24 16:55:37 +00:00
Jim Meyering
fab4d80dfb New tests for --check exit status, and for BSD-style checksum files. 2003-05-24 16:55:21 +00:00
Jim Meyering
75247be90c (bsd_split_3): New function.
(split_3): Detect checksums from BSD 'md5' command and handle them
using bsd_split_3.
2003-05-24 16:51:52 +00:00
Jim Meyering
92359d2df0 Make sure `sha1sum --check' doesn't accept the BSD format. 2003-05-24 16:49:40 +00:00
Jim Meyering
e2ceb48225 *** empty log message *** 2003-05-21 09:30:08 +00:00
Jim Meyering
dadd6992a2 (elide_tail_lines_pipe): Fix a thinko.
This sort of thing is why it'd be *Really Good* to factor
out the common code used here and in tail.c.
2003-05-21 09:29:50 +00:00
Jim Meyering
23dbc2747d . 2003-05-20 18:48:24 +00:00
Jim Meyering
8f3b0f9c1f *** empty log message *** 2003-05-15 20:12:31 +00:00
Jim Meyering
7651fac5e3 Remove a space before a TAB. 2003-05-15 20:12:26 +00:00
Jim Meyering
6fcc182f3f *** empty log message *** 2003-05-14 14:43:16 +00:00
Jim Meyering
c86a6cc089 (usage): Document new feature: --bytes=-N and --lines=-N. 2003-05-14 14:43:13 +00:00
Jim Meyering
b438bad2a8 . 2003-05-14 14:21:18 +00:00
Jim Meyering
5bd6b069d9 *** empty log message *** 2003-05-14 14:20:58 +00:00
Jim Meyering
5c6ae386f4 *** empty log message *** 2003-05-14 14:20:32 +00:00
Jim Meyering
8f4221ebd2 Skip this test if `.' is on an XFS file system. 2003-05-14 14:20:23 +00:00
Jim Meyering
aade1ba993 *** empty log message *** 2003-05-14 14:20:04 +00:00
Jim Meyering
9a00ec8821 *** empty log message *** 2003-05-14 13:58:16 +00:00
Jim Meyering
d4b2b56f61 (head invocation): Document --bytes=-N and --lines=-N. 2003-05-14 13:58:13 +00:00
Jim Meyering
48450c549f *** empty log message *** 2003-05-14 10:08:25 +00:00
Jim Meyering
4b9b4b374d (TESTS): Add fd-leak. 2003-05-14 10:08:21 +00:00
Jim Meyering
9992038455 *** empty log message *** 2003-05-14 10:08:07 +00:00
Jim Meyering
b09ee97a1a New file. Test for the bug in du that
was fixed by the 2003-05-12 change to lib/ftw.c.
2003-05-14 10:08:02 +00:00
Jim Meyering
13f017568f . 2003-05-14 09:50:55 +00:00
Jim Meyering
39beb31640 . 2003-05-14 09:50:38 +00:00
Jim Meyering
56e1e5d825 . 2003-05-14 09:36:01 +00:00
Jim Meyering
c3e009a84a . 2003-05-14 09:35:33 +00:00
Jim Meyering
c358b6fe16 . 2003-05-14 09:34:36 +00:00
Jim Meyering
4f821757d2 . 2003-05-14 09:33:42 +00:00
Jim Meyering
b121f086e8 *** empty log message *** 2003-05-14 09:20:37 +00:00
Jim Meyering
85ad1d09c1 (AUTHORS): Enclose string in N_(...), now that it includes `and'. 2003-05-14 09:20:32 +00:00
Jim Meyering
0625941fb3 *** empty log message *** 2003-05-14 09:13:47 +00:00
Jim Meyering
dc7b620a31 (usage): Don't use `,' as the thousands separator
in e.g. 1,000,000 and 1,048,576.  Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-14 09:13:26 +00:00
Jim Meyering
e83a04a9d7 (usage): Don't use `,' as the thousands separator
in e.g. 1,000,000 and 1,048,576.  Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
2003-05-14 09:12:43 +00:00
Jim Meyering
5413c2bbae Test that 'uniq -d -u' outputs nothing. 2003-05-14 08:35:57 +00:00
Jim Meyering
c6ba6cc22e *** empty log message *** 2003-05-14 08:35:18 +00:00
Jim Meyering
ad54994c9b Fix uniq to conform to POSIX, which requires that "uniq -d -u"
must output nothing.  Problem reported by Josh Hyman.

(enum output_mode, mode): Remove, replacing with:
(output_unique, output_first_repeated, output_later_repeated):
New vars.  All uses of "mode" changed to use these variables,
which are not mutually exclusive as "mode" was.
(writeline): New arg "match", used to control whether to
obey output_first_repeated or output_later_repeated.
All callers changed.
(check_file, main): Adjust to above changes.
2003-05-14 08:34:56 +00:00
Jim Meyering
88e00a1d3b *** empty log message *** 2003-05-14 08:05:49 +00:00
Jim Meyering
227971e576 (syntax-check): Add another check. 2003-05-14 08:05:44 +00:00
Jim Meyering
5d51fc8a5b (uniq invocation, squeezing, The uniq command):
Use "repeated" rather than "duplicate" to describe adjacent
duplicates; this simplifies the description and makes it more
consistent with POSIX.
(uniq invocation): Make it clear that -d and -u suppress the
output of lines, rather than cause some lines to be output.
Mention what happens if a line lacks enough fields or characters.
2003-05-14 07:58:40 +00:00
Jim Meyering
5f62a53f9c *** empty log message *** 2003-05-14 06:30:23 +00:00
Jim Meyering
01d63f13e8 Use tr's \n notation rather than \012. 2003-05-14 06:26:34 +00:00
Jim Meyering
00a770a30e Use tr's \n notation rather than \012. 2003-05-14 06:25:08 +00:00
Jim Meyering
6fb0b1d366 Use tr's \n notation rather than \012. 2003-05-14 06:24:43 +00:00
Jim Meyering
a9335b4704 *** empty log message *** 2003-05-13 17:04:46 +00:00
Jim Meyering
98e8b5e058 Handle argc < optind. 2003-05-13 17:03:58 +00:00
Jim Meyering
5c0abf663a (elide_tail_lines_pipe): Don't apply cast to argument of free. 2003-05-13 14:54:31 +00:00
Jim Meyering
3a5e722af0 *** empty log message *** 2003-05-13 14:49:07 +00:00
Jim Meyering
1aa55ac277 (alloca): Don't apply cast to argument of free. 2003-05-13 14:48:36 +00:00
Jim Meyering
56a5857660 (rpl_putenv): Don't apply cast to argument of free. 2003-05-13 14:47:15 +00:00
Jim Meyering
f775835533 (setenv): Don't apply cast to argument of free. 2003-05-13 14:46:55 +00:00
Jim Meyering
9d52ad8c28 *** empty log message *** 2003-05-13 14:45:33 +00:00
Jim Meyering
3b7798ab52 (struct F_triple) [name]: Remove const attribute.
(triple_free): Don't apply cast to argument of free.
(seen_file): Add cast here instead.
2003-05-13 14:45:00 +00:00
Jim Meyering
6fc0245123 (sort): Don't apply cast to argument of free. 2003-05-13 14:43:43 +00:00
Jim Meyering
40b700eadb (struct Src_to_dest) [name]: Remove const attribute.
(src_to_dest_free): Don't apply cast to argument of free.
2003-05-13 14:40:50 +00:00
Jim Meyering
80d799b8a2 (OLD): Don't apply cast to argument of free. 2003-05-13 14:38:40 +00:00
Jim Meyering
2a1e8507f4 (delseq, freeline): Don't apply cast to argument of free. 2003-05-13 14:38:18 +00:00
Jim Meyering
aeec25d170 shorten long line 2003-05-13 14:37:45 +00:00
Jim Meyering
038a9b42a6 (init_fps, init_store_cols): Don't apply cast to argument of free. 2003-05-13 14:37:33 +00:00
Jim Meyering
25227196a8 (zaptemp): Don't apply cast to argument of free. 2003-05-13 14:36:29 +00:00
Jim Meyering
b20134e12c Remove unnecessary cast of argument to free. twice more 2003-05-13 14:32:10 +00:00
Jim Meyering
949f3a3c76 Remove unnecessary cast of argument to free. 2003-05-13 14:31:39 +00:00
Jim Meyering
26532ef1f2 Include "quote.h".
Use quote in diagnostics.  Change many error format strings
from just `%s' to e.g., `error reading %s'.
(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
Rewrite newline-counting loop to use memchr.
2003-05-13 13:25:10 +00:00
Jim Meyering
4641ffbefa *** empty log message *** 2003-05-13 12:42:16 +00:00
Jim Meyering
eb66adf96f *** empty log message *** 2003-05-13 12:42:13 +00:00
Jim Meyering
4421b1a969 (true invocation): Mention that it is possible to
make true --help or true --version (in non-POSIX mode) exit nonzero.
2003-05-13 12:42:02 +00:00
Jim Meyering
8566426512 *** empty log message *** 2003-05-13 10:21:31 +00:00
Jim Meyering
0035f73f02 *** empty log message *** 2003-05-13 10:21:22 +00:00
Jim Meyering
5352c4a62b (elide_tail_lines_pipe): Use `if', not an assert.
Now that assert is no longer used, don't include <assert.h>.
2003-05-13 10:21:13 +00:00
Jim Meyering
320da0f8a8 *** empty log message *** 2003-05-12 15:12:11 +00:00
Jim Meyering
d7b1b67638 *** empty log message *** 2003-05-12 15:07:09 +00:00
Jim Meyering
17adb8367a (ftw_startup): Always call free_cwd after restore_cwd. 2003-05-12 14:51:02 +00:00
Jim Meyering
e55a05cecf *** empty log message *** 2003-05-12 09:36:38 +00:00
Jim Meyering
8f59417689 Include <assert.h>.
(AUTHORS): Add my name.
(elide_tail_lines_pipe): New function.
2003-05-12 09:36:26 +00:00
Jim Meyering
216fe27e16 *** empty log message *** 2003-05-12 08:23:00 +00:00
Jim Meyering
1a056dabfd *** empty log message *** 2003-05-12 08:19:14 +00:00
Jim Meyering
a12ea0b255 (my_strftime): Let the `-' (no-pad) flag affect
the space-padded-by-default conversion specifiers, %e, %k, %l.
2003-05-12 08:19:05 +00:00
Jim Meyering
ab2a67a331 . 2003-05-11 13:20:15 +00:00
Jim Meyering
3c95527a01 . 2003-05-11 09:18:44 +00:00
Jim Meyering
5b5557e3a3 . 2003-05-11 06:35:10 +00:00
Jim Meyering
92f900fdf3 (main): Handle argc < optind. 2003-05-11 06:32:47 +00:00
Jim Meyering
6a0019aa78 (main): Handle argc < optind. 2003-05-10 20:27:56 +00:00
Jim Meyering
4fd6d22880 (main): Handle argc == 0. 2003-05-10 20:27:16 +00:00
Jim Meyering
c2173890f0 (main): Handle argc < optind. 2003-05-10 20:01:32 +00:00
Jim Meyering
2c199e6990 *** empty log message *** 2003-05-10 20:00:59 +00:00
Jim Meyering
9eb8322209 (main): Handle argc == 0. 2003-05-10 20:00:54 +00:00
Jim Meyering
888d3d38d9 Handle argc < optind. 2003-05-10 19:58:04 +00:00
Jim Meyering
a6a4c372c0 (main): Handle argc == 0. 2003-05-10 19:56:49 +00:00
Jim Meyering
74de8e29a8 Handle argc < optind. 2003-05-10 19:56:10 +00:00
Jim Meyering
e2cad9b457 (send_signals): Don't check command line arguments here.
(main): Check them here instead.  Handle argc < optind.
2003-05-10 15:45:00 +00:00
Jim Meyering
9153514495 Handle argc < optind. 2003-05-10 15:39:39 +00:00
Jim Meyering
f01fcb05a9 Handle argc < optind. 2003-05-10 15:00:00 +00:00
Jim Meyering
9b652d0790 Handle argc < optind. 2003-05-10 14:59:04 +00:00
Jim Meyering
8a7f744635 Handle argc < optind. 2003-05-10 14:58:15 +00:00
Jim Meyering
ddc5610b88 (main): Set program_name before first use.
Remove that (redundant) first use.
Don't exit successfully just because --verbose was specified.
Pass 0, not EXIT_SUCCESS, as first argument to error; when that
parameter is 0, error does not exit.
2003-05-10 14:54:23 +00:00
Jim Meyering
ea67851e7e *** empty log message *** 2003-05-10 14:53:51 +00:00
Jim Meyering
cc43b4e784 (syntax-check): Check for `error (EXIT_SUCCESS,'. 2003-05-10 14:53:47 +00:00
Jim Meyering
f6d13ddf6d (main): Handle argc < optind. 2003-05-10 14:39:16 +00:00
Jim Meyering
b037820eb4 (main): Handle argc < optind. 2003-05-10 14:37:12 +00:00
Jim Meyering
7afaa765d3 *** empty log message *** 2003-05-10 14:34:24 +00:00
Jim Meyering
8eb2464d3e (main): Handle argc < optind. 2003-05-10 14:33:24 +00:00
Jim Meyering
007103be2e add semicolon 2003-05-10 14:19:44 +00:00
Jim Meyering
dfd12de6b9 (main): When failing due to too few arguments, also say
that rather than just "Try `uname --help' for more information.".
2003-05-10 14:17:46 +00:00
Jim Meyering
13f9aa90fa *** empty log message *** 2003-05-10 14:14:51 +00:00
Jim Meyering
49f700b61c (main): When failing due to unaccepted arguments,
also say `too many arguments' rather than just `Try `uname --help'
for more information.'.
2003-05-10 13:47:38 +00:00
Jim Meyering
f4c0d12cb0 (main): Handle argc < optind. 2003-05-10 13:42:48 +00:00
Jim Meyering
6c1a29f06f (main): Don't segfault when argc < optind. 2003-05-10 13:39:05 +00:00
Jim Meyering
2de1d40446 (main): Use error, rather than fprintf, for the sake of consistency. 2003-05-10 13:36:50 +00:00
Jim Meyering
0919600481 (main): Test for the case of no arguments before computing n_files. 2003-05-10 13:30:26 +00:00
Jim Meyering
3de521ebf9 (main): Test for `missing argument' before computing n_files. 2003-05-10 13:25:41 +00:00
Jim Meyering
9f763671c0 Include error.h. 2003-05-10 10:41:14 +00:00
Jim Meyering
06dacc0d6d (More details about version sort): Note that strverscmp, and hence
`ls -v', does not use LC_COLLATE.
2003-05-10 09:42:14 +00:00
Jim Meyering
a228d68c33 *** empty log message *** 2003-05-10 09:41:50 +00:00
Jim Meyering
b99914ff5b *** empty log message *** 2003-05-10 06:27:08 +00:00
Jim Meyering
4a389e1d0b (Exit status): Remove `uniq' from the list. It uses standard exit codes. 2003-05-10 06:27:04 +00:00
Jim Meyering
0b65f598c8 (main): Don't overrun array bound if argc is 0. 2003-05-09 22:25:12 +00:00
Jim Meyering
12844e5674 fix off-by-one error in last change 2003-05-09 22:16:22 +00:00
Jim Meyering
0dedf7cad1 *** empty log message *** 2003-05-09 08:50:44 +00:00
Jim Meyering
6476197bcb (main): Don't overrun array bound if argc is 0.
That would happen when invoked via: execl ("/usr/bin/sort", NULL);
2003-05-09 08:50:37 +00:00
Jim Meyering
883159c855 *** empty log message *** 2003-05-09 08:49:46 +00:00
Jim Meyering
8a3a1ce11f *** empty log message *** 2003-05-08 09:26:42 +00:00
Jim Meyering
de261015e8 (timespec_subtract): Don't modify the 2nd arg.
Work even if X-Y overflows when subtracting.  Make explicit the
assumption that tv_nsec must be in range.
(clock_get_realtime): Remove.  All callers changed to invoke gettime,
for simplicity.
(xnanosleep): Check for gettime failure every time.
2003-05-08 09:26:34 +00:00
Jim Meyering
f197628cb2 (clock_get_realtime): Use gettime.c's gettime function,
rather than an inferior, open-coded version that would fail on
AIX systems due to clock_gettime failing with errno == ENOSYS.
2003-05-08 06:26:00 +00:00
Jim Meyering
96242be0c1 *** empty log message *** 2003-05-07 16:21:56 +00:00
Jim Meyering
61ba51a61e Implement support so that `head --lines=-N' works on seekable files.
(enum Copy_fd_status): Define.
(COPY_FD_DIAGNOSE): New macro.
(elide_tail_lines_seekable): New funtion.
(elide_tail_lines_file): Call it here.
2003-05-07 16:21:52 +00:00
Jim Meyering
f8fdfad624 *** empty log message *** 2003-05-07 07:25:08 +00:00
Jim Meyering
b8dcf7b6e4 *** empty log message *** 2003-05-06 22:22:06 +00:00
Jim Meyering
d16d49b67a *** empty log message *** 2003-05-06 13:33:26 +00:00
Jim Meyering
ad06bb9c5a (CHAR_BIT): Remove duplicate definition. 2003-05-06 13:33:12 +00:00
Jim Meyering
ef4ee07f31 *** empty log message *** 2003-05-06 08:51:30 +00:00
Jim Meyering
00d70feed3 (GL_FUNC_GETCWD_PATH_MAX): Check for the
declaration of getcwd *before* checking for the getcwd kernel bug.
Otherwise, configure-time `checking ...' messages would be intermixed.
2003-05-06 08:51:26 +00:00
Jim Meyering
78986d419d *** empty log message *** 2003-05-05 07:55:18 +00:00
Jim Meyering
a8916294ec (struct dummy): Ensure that at least the number of
initializers matches the number of members in the corresponding enum.
2003-05-05 07:54:19 +00:00
Jim Meyering
95623ba86e (enum Ftw_option): Name this previously-anonymous enum.
(enum Ftw_option) [FTW_N_MEMBERS]: New member.
2003-05-05 07:52:26 +00:00
Jim Meyering
75fa058191 Avoid array overrun.
(nftw_arr): Update to reflect complete list of members.
(ftw_arr): Likewise
2003-05-05 07:31:49 +00:00
Jim Meyering
8670b14045 *** empty log message *** 2003-05-05 07:30:45 +00:00
Jim Meyering
1048ef4240 . 2003-05-04 14:07:26 +00:00
Jim Meyering
f53eda1b81 . 2003-05-04 14:07:07 +00:00
Jim Meyering
8a79d3d630 Remove tests of --bytes=-N; using that framework
caused the addition of thousands of small files to the tar archive.
2003-05-04 14:06:52 +00:00
Jim Meyering
0a8019497e *** empty log message *** 2003-05-04 14:01:02 +00:00
Jim Meyering
832fdc2a2e *** empty log message *** 2003-05-04 13:56:47 +00:00
Jim Meyering
997f9e72d2 (TESTS): Add head-elide-tail. 2003-05-04 13:56:43 +00:00
Jim Meyering
beaff195ed Exercise head's --bytes=-N option. 2003-05-04 13:46:52 +00:00
Jim Meyering
f1ce5dbf0e . 2003-05-04 08:45:17 +00:00
Jim Meyering
28e9fb4f73 *** empty log message *** 2003-05-04 08:44:40 +00:00
Jim Meyering
3a6d6ae776 *** empty log message *** 2003-05-04 08:43:39 +00:00
Jim Meyering
57d138d144 *** empty log message *** 2003-05-04 08:40:45 +00:00
Jim Meyering
21c8705b3c *** empty log message *** 2003-05-04 08:39:14 +00:00
Jim Meyering
f4fbb39dfd *** empty log message *** 2003-05-04 08:30:25 +00:00
Jim Meyering
8b4a10178b *** empty log message *** 2003-05-04 08:30:09 +00:00
Jim Meyering
6754f257e0 (__set_errno, LOCK, UNLOCK): Define.
(unsetenv): Update from GNU libc.
Ifdef-out this function, since the only caller
is putenv.c and that file now has its own copy.
2003-05-04 08:30:01 +00:00
Jim Meyering
986b5eca57 *** empty log message *** 2003-05-04 08:26:15 +00:00
Jim Meyering
cf09ab79a3 This avoids a core dump on systems without GNU putenv,
when running `env -u SOME_ALREADY_UNSET_VARIABLE'.

(unsetenv): New static function, from libc.
(rpl_putenv): Use it.
2003-05-04 08:26:09 +00:00
Jim Meyering
e3ea089119 *** empty log message *** 2003-05-04 07:10:25 +00:00
Jim Meyering
87c13cce86 (HAVE_WORKING_READDIR): Define to 0 if not defined.
(IF_READDIR_NEEDS_REWINDDIR): Remove.
(remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR,
which was a bit weird because it couldn't be emulated by a function.
2003-05-04 07:10:21 +00:00
Jim Meyering
c48100ccf1 *** empty log message *** 2003-05-03 20:14:20 +00:00
Jim Meyering
34bd9f31cc *** empty log message *** 2003-05-03 15:11:25 +00:00
Jim Meyering
75fc3fd6a0 Add lots of tests to exercise --bytes=-N. 2003-05-03 15:11:20 +00:00
Jim Meyering
cbbdaf78f8 *** empty log message *** 2003-05-03 15:10:22 +00:00
Jim Meyering
57c1158f02 Extend head to accept --lines=-N (--bytes=-N) and to print all
but the N lines (bytes) at the end of the file.

Include full-write.h, full-read.h, inttostr.h, quote.h.
Use quote() in diagnostics, rather than literal `' marks.
(copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file):
New functions.
(elide_tail_lines_pipe, elide_tail_lines_file): New functions.
(head_file): Reorganize so as to call head from only one place.
(main): Likewise, for head_file.
Handle new, undocumented option, --presume-input-pipe.
Handle negative line and byte counts.
2003-05-03 15:10:13 +00:00
Jim Meyering
61d5480f00 *** empty log message *** 2003-05-03 14:56:22 +00:00
Jim Meyering
b9c9a002d8 *** empty log message *** 2003-05-03 14:24:48 +00:00
Jim Meyering
46c548cab4 Skip test if the file system of `.' doesn't support
sparse files -- otherwise it'd create a file of size 8GB.
This happens on Darwin6.5 with a file system of type `hfs'.
2003-05-03 14:24:37 +00:00
Jim Meyering
1867521304 . 2003-05-03 07:13:25 +00:00
Jim Meyering
3b0e09ef8c *** empty log message *** 2003-05-02 21:43:00 +00:00
Jim Meyering
35cad8ae05 (canonicalize_file_name) [!HAVE_RESOLVEPATH]:
A memory-allocation error could result in heap corruption.  Fix it
by also updating `dest' when rpath may be changed by xrealloc.
2003-05-02 21:42:51 +00:00
Jim Meyering
478239f404 *** empty log message *** 2003-05-02 19:52:59 +00:00
Jim Meyering
c4ff976e20 (usage): Don't mention obsolescent -WIDTH option.
Instead explain about `-' and standard input.
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
2003-05-02 19:52:48 +00:00
Jim Meyering
1e97469e5a Give a proper diagnostic for e.g., `fmt -c -72'. 2003-05-02 19:52:34 +00:00
Jim Meyering
52c96899dc *** empty log message *** 2003-05-02 19:49:06 +00:00
Jim Meyering
cfed14f3cc Include "quote.h".
Use quote() in diagnostics, rather than literal `' marks.
(main): Exit nonzero when unable to open an input file.
2003-05-02 19:37:23 +00:00
Jim Meyering
d500b3f1e6 make sure we fail when unable to open an input file 2003-05-02 19:36:48 +00:00
Jim Meyering
63f2e7dba0 make sure -72x elicits an error 2003-05-02 19:20:18 +00:00
Jim Meyering
7747a57abc (main): Diagnose invalid suffix on obsolescent width specifications like `-72x'. 2003-05-02 19:15:19 +00:00
Jim Meyering
7f5d536dc3 . 2003-05-02 13:03:28 +00:00
Jim Meyering
3ee2423ea2 *** empty log message *** 2003-05-02 13:02:54 +00:00
Jim Meyering
171d577cd1 bump serial number 2003-05-02 13:02:48 +00:00
Jim Meyering
c49747c6f8 (jm_MACROS): Require GL_FUNC_READDIR. 2003-05-02 13:02:40 +00:00
Jim Meyering
a7c15d1cbd (GL_FUNC_READDIR): Revive dead file. Change name to
have GL_ (not jm_) prefix.  Adjust cache variables similarly.
Create 500 rather than just 300 files, to exercise bug on
Darwin6.5, too.
2003-05-02 13:01:28 +00:00
Jim Meyering
4ed5c260a3 Work around nasty readdir bug with Darwin6.5 and hfs file system.
(IF_READDIR_NEEDS_REWINDDIR): Define.
[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
returned NULL and there has been at least one successful unlink or
rmdir call since the opendir or previous rewinddir, then call
rewinddir and reiterate the loop.
2003-05-02 12:53:02 +00:00
Jim Meyering
ee0dc0c2ce *** empty log message *** 2003-05-02 10:44:41 +00:00
Jim Meyering
4f6fe96afe Factor out common code.
(readdir_ignoring_dotdirs): New function.
(is_empty_dir): Use it here.
(remove_cwd_entries): Use it here.
2003-05-02 10:44:32 +00:00
Jim Meyering
e25854fbd7 revive dead file 2003-05-02 07:13:10 +00:00
Jim Meyering
0ce4463dfa *** empty log message *** 2003-05-01 17:52:40 +00:00
Jim Meyering
2729b8b6fe *** empty log message *** 2003-05-01 17:51:52 +00:00
Jim Meyering
7a672ec046 *** empty log message *** 2003-05-01 17:49:47 +00:00
Jim Meyering
07b1707f8e Create 500 rather than just 300 files.
There's a bug in Darwin6.5's readdir that shows up only with
338 or more files.
Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
has two components.
2003-05-01 17:49:41 +00:00
Jim Meyering
a9477ed058 *** empty log message *** 2003-05-01 16:25:34 +00:00
Jim Meyering
c8e2fca40c Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
(dump_remainder): Move two declarations `down' into the scope
where they are used.
(xlseek): Return the resulting offset.
(file_lines): Rename parameter, file_length, to end_pos.
(pipe_lines): Don't coerce safe_read return value to `int'.
Adapt tests accordingly.
(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
to `unsigned int'.
Change type of `total_bytes' from `int' to `size_t',
since the former wouldn't always be wide enough.
Don't coerce safe_read return value to `int',
and adapt tests accordingly.
Now that testing for a read error no longer involves
using `tmp', handle that case *after* freeing `tmp'.
(start_bytes): Clean up.
(tail_bytes): Now that `n_bytes' may be larger than
OFF_T_MAX, test for that condition and, if it's true, don't
use lseek optimizations.
(parse_options): Don't fail just because N_UNITS is larger than
the maximum size of a file -- tail may be applied to an input
stream (e.g., a pipe) with more data than that.
2003-05-01 16:25:13 +00:00
Jim Meyering
5bc75bf6a0 (file_lines): Rename parameter, file_length, to end_pos. 2003-05-01 13:22:19 +00:00
Jim Meyering
713c7903b9 *** empty log message *** 2003-05-01 13:19:37 +00:00
Jim Meyering
84ddd12f18 (syntax-check): Rename from alloc-check.
Also check for SPACE-TAB sequences.
Also check for malloc/calloc/realloc casts.
2003-05-01 13:19:28 +00:00
Jim Meyering
7968d80a80 *** empty log message *** 2003-05-01 11:49:17 +00:00
Jim Meyering
882edccbd6 (start_lines): Rewrite to use memchr. Clean up. 2003-05-01 11:49:12 +00:00
Jim Meyering
67fa85dc34 *** empty log message *** 2003-04-28 20:29:27 +00:00
Jim Meyering
5ac1c72305 Send two tokens, not just one, so we don't
make the now-more-picky tsort fail.
2003-04-28 20:29:22 +00:00
Jim Meyering
8cfd51fbe5 . 2003-04-28 19:41:01 +00:00
Jim Meyering
0553d6683a correct grammar in comment 2003-04-28 16:07:33 +00:00
Jim Meyering
412c38a757 *** empty log message *** 2003-04-26 06:44:50 +00:00
Jim Meyering
110e377d26 *** empty log message *** 2003-04-25 18:42:21 +00:00
Jim Meyering
241673725e (GL_FUNC_GETCWD_PATH_MAX): If PATH_MAX
is not defined, don't run the test, and don't use the wrapper.
Otherwise, on the Hurd, it would take a long time to create
and remove a hierarchy about 4000 levels deep.
Based on a patch from Robert Millan.
2003-04-25 18:42:16 +00:00
Jim Meyering
b45a0ca42e *** empty log message *** 2003-04-25 18:20:02 +00:00
Jim Meyering
fa4150ded7 . 2003-04-24 13:51:05 +00:00
Jim Meyering
a68a1cdd7f *** empty log message *** 2003-04-24 13:50:32 +00:00
Jim Meyering
034fcf16e3 (tsort): Remove unnecessary test of have_read_stdin.
(main): Minor syntactic clean-up.
2003-04-24 13:50:27 +00:00
Jim Meyering
a3c951764e (tsort): Fail if the input contains an odd number of tokens. 2003-04-24 13:48:54 +00:00
Jim Meyering
eafe3a6878 (only-one): add another test 2003-04-24 13:36:03 +00:00
Jim Meyering
4c91ec1e02 add localedir.h 2003-04-24 09:09:23 +00:00
Jim Meyering
2abc1e61f2 *** empty log message *** 2003-04-23 22:24:55 +00:00
Jim Meyering
5b0f78ffc1 make sure tsort fails given an odd number of input tokens 2003-04-23 22:24:24 +00:00
Jim Meyering
52c0030080 update from master 2003-04-23 13:11:08 +00:00
Jim Meyering
d548a76009 . 2003-04-23 08:39:10 +00:00
Jim Meyering
a06b5aaf21 Fix printf POSIX compatibility bug reported by Ben Harris in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.

(printf invocation): It's \NNN in the format,
\0NNN in the %b operand.
2003-04-23 08:39:00 +00:00
Jim Meyering
d446eecbf5 Change an occurrence of [ \t] to [\t ]. 2003-04-22 08:22:22 +00:00
Jim Meyering
4247ffb57c (print_esc): Tweak spelling of new variable. 2003-04-21 18:02:00 +00:00
Jim Meyering
e52152349f *** empty log message *** 2003-04-21 18:00:49 +00:00
Jim Meyering
8e004296ce *** empty log message *** 2003-04-21 18:00:24 +00:00
Jim Meyering
4bcefa6248 Fix printf POSIX compatibility bug reported by Ben Harris in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.

* doc/coreutils.texi (printf invocation): It's \NNN in the format,
\0NNN in the %b operand.
* src/printf.c (usage): Likewise.
(print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN
is desired.  All uses changed.  Behave like Bash printf if %b
operand uses \NNN where the initial N is not 0.
2003-04-21 17:59:21 +00:00
Jim Meyering
d8b7cd1983 *** empty log message *** 2003-04-21 16:47:02 +00:00
Jim Meyering
edfc78a913 Add tests for the printf fixes of 2003-04-20. 2003-04-21 16:46:56 +00:00
Jim Meyering
4fc74c6897 *** empty log message *** 2003-04-21 15:13:50 +00:00
Jim Meyering
1cc2dc28d0 New version, now that this file is now on the list in ../Makefile.cfg. 2003-04-21 15:13:43 +00:00
Jim Meyering
4e8c9bb52d (cvs_files): Add $(srcdir)/config/depcomp to the list. 2003-04-21 15:12:46 +00:00
Jim Meyering
1d96791cf1 remove SPCs before TAB 2003-04-21 15:09:23 +00:00
Jim Meyering
a71727efbd *** empty log message *** 2003-04-17 07:36:32 +00:00
Jim Meyering
089e298e0c Remove uses of PROTOTYPE macro. 2003-04-17 07:36:24 +00:00
Jim Meyering
22de99d217 *** empty log message *** 2003-04-16 22:16:56 +00:00
Jim Meyering
06a1e47a5c *** empty log message *** 2003-04-16 22:16:36 +00:00
Jim Meyering
06e65c2c68 *** empty log message *** 2003-04-16 21:54:45 +00:00
Jim Meyering
8051312432 *** empty log message *** 2003-04-16 21:43:07 +00:00
Jim Meyering
9a94899976 regenerate, using new ../Makefile.am.in 2003-04-15 22:21:43 +00:00
Jim Meyering
79b611f24e regenerate, using new ../Makefile.am.in 2003-04-15 22:21:07 +00:00
Jim Meyering
f543e3d9f5 *** empty log message *** 2003-04-15 22:18:58 +00:00
Jim Meyering
2c97f3f75b Use $(VAR) rather than @VAR@, now that we can rely on automake to
emit a definition for each substituted variable.
Remove definition of PERL.
2003-04-15 22:18:12 +00:00
Jim Meyering
304665f224 remove SPCs before TAB 2003-04-15 17:04:18 +00:00
Jim Meyering
4c4b16d783 remove SPCs before TAB 2003-04-15 16:12:44 +00:00
Jim Meyering
07cb5b4b7d *** empty log message *** 2003-04-15 16:11:41 +00:00
Jim Meyering
2a2d8eaf10 *** empty log message *** 2003-04-15 06:27:50 +00:00
Jim Meyering
0c48a61ea4 *** empty log message *** 2003-04-15 06:27:18 +00:00
Jim Meyering
aa9d23e551 Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:26:49 +00:00
Jim Meyering
e86f0c1699 *** empty log message *** 2003-04-15 06:23:27 +00:00
Jim Meyering
5efadd5e0f Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:22:54 +00:00
Jim Meyering
7e4874c0d8 Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:22:33 +00:00
Jim Meyering
533c50216e Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:21:52 +00:00
Jim Meyering
b694daa08f Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:21:29 +00:00
Jim Meyering
c2f1bf1c95 Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:19:03 +00:00
Jim Meyering
d882eab2f2 Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-15 06:18:05 +00:00
Jim Meyering
c4b4c0a76d *** empty log message *** 2003-04-13 09:11:18 +00:00
Jim Meyering
be897d7f42 (is_empty_dir): Don't closedir (NULL). 2003-04-13 09:10:50 +00:00
Jim Meyering
de6a08aca7 *** empty log message *** 2003-04-12 19:54:00 +00:00
Jim Meyering
cd4d79b1c3 *** empty log message *** 2003-04-12 19:52:38 +00:00
Jim Meyering
b7fcd8d3ed add test corresponding to today's too-many-newlines fix 2003-04-12 19:52:33 +00:00
Jim Meyering
b62edfd3f9 Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.

(main): Fix those problems and remove literal quote marks
(e.g., "`%s'") from format string; instead use "%s" in each format
string and `quote (optarg)' as the corresponding argument.
Also, diagnose all invalid command line options before failing.
2003-04-12 19:51:36 +00:00
Jim Meyering
d5fdbeda89 (proc_text): Fix a bug introduced on 2001-11-10,
for textutils-2.0.17, that would make nl output extra newlines
in some cases.
2003-04-12 18:44:53 +00:00
Jim Meyering
d730a311aa *** empty log message *** 2003-04-12 13:03:01 +00:00
Jim Meyering
a20d798296 (TESTS): Add readlink. 2003-04-12 13:02:57 +00:00
Jim Meyering
0a94599ed5 *** empty log message *** 2003-04-12 13:02:34 +00:00
Jim Meyering
d769c32623 A few tests of the --canonicalize option. 2003-04-12 13:02:13 +00:00
Jim Meyering
bc076eac2f Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values. 2003-04-11 14:06:02 +00:00
Jim Meyering
df80970dd5 *** empty log message *** 2003-04-11 14:05:51 +00:00
Jim Meyering
a526befb04 *** empty log message *** 2003-04-11 12:55:58 +00:00
Jim Meyering
dd199731fd *** empty log message *** 2003-04-11 12:54:22 +00:00
Jim Meyering
cfaec94084 *** empty log message *** 2003-04-11 12:51:41 +00:00
Jim Meyering
d93d0c0ff4 Remove SPC in SPC-TAB sequence. 2003-04-11 12:46:24 +00:00
Jim Meyering
37bcb6853c Remove SPC in SPC-TAB sequence. 2003-04-11 12:44:41 +00:00
Jim Meyering
3cd987830d Remove SPC in SPC-TAB sequence. 2003-04-11 12:44:23 +00:00
Jim Meyering
0893227b13 Remove SPC in SPC-TAB sequence. 2003-04-11 12:42:39 +00:00
Jim Meyering
31df60a180 Remove SPC in SPC-TAB sequence. 2003-04-11 12:42:15 +00:00
Jim Meyering
930cda9304 Remove SPC in SPC-TAB sequence.
Remove trailing blanks.
filter though cppi
2003-04-11 12:41:44 +00:00
Jim Meyering
e96ac732f5 Remove SPC in SPC-TAB sequence. 2003-04-11 12:39:58 +00:00
Jim Meyering
9f70372581 Remove SPC in SPC-TAB sequence. 2003-04-11 12:38:19 +00:00
Jim Meyering
ab69f41a76 Remove SPC in SPC-TAB sequence. 2003-04-11 12:37:58 +00:00
Jim Meyering
eaae702647 *** empty log message *** 2003-04-11 12:36:43 +00:00
Jim Meyering
3bd3492b1c Include <stdlib.h> unconditionally. 2003-04-11 12:36:31 +00:00
Jim Meyering
1fd5c0ae41 Include <string.h> and <stdlib.h> unconditionally. 2003-04-11 12:21:59 +00:00
Jim Meyering
58b92bbeb2 Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values. 2003-04-11 12:20:35 +00:00
Jim Meyering
9def4be367 Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values. 2003-04-11 12:15:21 +00:00
Jim Meyering
2b64c3929a . 2003-04-11 12:03:38 +00:00
Jim Meyering
aa32168619 (XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts. 2003-04-11 11:59:11 +00:00
Jim Meyering
0bf873ccfb *** empty log message *** 2003-04-11 11:56:44 +00:00
Jim Meyering
6eb5e28e87 Remove use of PARAMS. 2003-04-11 11:56:41 +00:00
Jim Meyering
3bb4efc2af (PARAMS): Remove definitions and uses. 2003-04-11 11:55:33 +00:00
Jim Meyering
31af887efe duh 2003-04-11 11:49:23 +00:00
Jim Meyering
bfcaedcedd (xalloc-check): Rename from header-check. 2003-04-11 11:45:23 +00:00
Jim Meyering
1038acbd8a *** empty log message *** 2003-04-11 11:42:48 +00:00
Jim Meyering
2033d5e885 Include error.h after system.h, not before. 2003-04-11 11:42:39 +00:00
Jim Meyering
d5d5c4fc68 *** empty log message *** 2003-04-11 10:52:04 +00:00
Jim Meyering
6c93bdeeaa Remove anachronistic casts of xmalloc,
xrealloc, and xcalloc return values and of xrealloc's first argument.
2003-04-11 10:51:56 +00:00
Jim Meyering
eaff43d5a8 include xalloc.h 2003-04-11 09:16:32 +00:00
Jim Meyering
912a810f6f do not cast xmalloc return value 2003-04-11 09:16:02 +00:00
Jim Meyering
2ab3a2f245 *** empty log message *** 2003-04-11 09:15:14 +00:00
Jim Meyering
48f3410d03 *** empty log message *** 2003-04-11 09:11:18 +00:00
Jim Meyering
95790ad375 *** empty log message *** 2003-04-10 21:41:08 +00:00
Jim Meyering
179105b117 (wrapf): Declare with format attribute. 2003-04-10 21:41:03 +00:00
Jim Meyering
3d98688378 . 2003-04-10 19:33:03 +00:00
Jim Meyering
45c0089f12 . 2003-04-10 19:32:34 +00:00
Jim Meyering
d85d39bf4c (check-texinfo): Check for uses of non-zero. I prefer to spell it `nonzero'. 2003-04-10 19:32:23 +00:00
Jim Meyering
00e065355d *** empty log message *** 2003-04-10 19:31:16 +00:00
Jim Meyering
7b81263498 *** empty log message *** 2003-04-10 19:29:49 +00:00
Jim Meyering
dd395a2657 *** empty log message *** 2003-04-10 19:27:53 +00:00
Jim Meyering
ec21878690 *** empty log message *** 2003-04-10 19:15:06 +00:00
Jim Meyering
7bf4cb61b4 *** empty log message *** 2003-04-10 19:11:11 +00:00
Jim Meyering
f64c368593 (fs.h): New rule to generate fs.h from stat.c.
(BUILT_SOURCES): Add fs.h, now that it's generated.
(EXTRA_DIST): Add extract-magic.
2003-04-10 19:11:07 +00:00
Jim Meyering
6d73fdb3ef *** empty log message *** 2003-04-10 19:09:43 +00:00
Jim Meyering
bac1785a6e add comment 2003-04-10 19:09:30 +00:00
Jim Meyering
c1b5a21a84 (human_fstype) [__linux__]: Append each hex constant from
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
2003-04-10 19:07:34 +00:00
Jim Meyering
b6ac9a3aa5 now it's automatically generated 2003-04-10 19:06:22 +00:00
Jim Meyering
d45d424ce1 New script to extract fs.h definitions from stat.c. 2003-04-10 19:05:43 +00:00
Jim Meyering
322b0d2280 *** empty log message *** 2003-04-10 18:07:00 +00:00
Jim Meyering
641cba7b3d (human_fstype): Handle Linux's devpts. 2003-04-10 18:06:56 +00:00
Jim Meyering
83aa79e26a (S_MAGIC_DEVPTS): New magic for Linux's devpts. 2003-04-10 18:06:23 +00:00
Jim Meyering
97cab1d39b *** empty log message *** 2003-04-10 17:03:30 +00:00
Jim Meyering
31c3844239 (canonicalize_file_name): NUL-terminate the result. 2003-04-10 17:03:26 +00:00
Jim Meyering
e02387ea57 (canonicalize_file_name): Always free `extra_buf' before returning. 2003-04-10 16:54:19 +00:00
Jim Meyering
ef6c004648 (canonicalize_file_name): Return NULL immediately if resolvepath fails.
Otherwise, `readlink --canonical /no-such-file' would exhaust
virtual memory on some systems (e.g. Solaris).
2003-04-10 16:47:35 +00:00
Jim Meyering
6a5f07163f *** empty log message *** 2003-04-10 16:41:17 +00:00
Jim Meyering
7f3e23a189 (readlink invocation): Tweak description a little. 2003-04-10 16:41:14 +00:00
Jim Meyering
357066c663 *** empty log message *** 2003-04-10 15:57:56 +00:00
Jim Meyering
1b2123bba3 (canonicalize_file_name): Remove stray semicolon
that caused `readlink --canonical RELATIVE_NAME' to fail on e.g.,
Solaris systems.
2003-04-10 15:57:45 +00:00
Jim Meyering
9419ec8854 *** empty log message *** 2003-04-10 15:57:31 +00:00
Jim Meyering
ab828ae6a1 Skip this test (don't fail) if creating a file with nominal length > 4GB fails. 2003-04-10 08:36:41 +00:00
Jim Meyering
d4fa961a32 *** empty log message *** 2003-04-10 07:15:51 +00:00
Jim Meyering
56dada99d4 Add `SEE ALSO' reference to unexpand. 2003-04-10 07:15:38 +00:00
Jim Meyering
33a6eab7e6 Add `SEE ALSO' reference to expand. 2003-04-10 07:15:29 +00:00
Jim Meyering
160c7ab28e Make sure that a huge obsolete option evokes the right failure. 2003-04-09 20:55:17 +00:00
Jim Meyering
25b57f0014 *** empty log message *** 2003-04-09 20:54:56 +00:00
Jim Meyering
435c2829f8 *** empty log message *** 2003-04-09 20:48:54 +00:00
Jim Meyering
f05ad08d19 (line_bytes_split): Arg is of type size_t, since
that's all that is supported for now.
(main): Check for overflow in obsolescent line count option.
2003-04-09 20:48:29 +00:00
Jim Meyering
c3e1712629 Ensure that split --lines=N and --bytes=N work for N=2^32.
Currently (coreutils-5.0.1) split --line-bytes=M fails
with `invalid number of bytes' for M=2^32 or larger.  Test it.
2003-04-09 14:57:32 +00:00
Jim Meyering
934c4134ce *** empty log message *** 2003-04-09 14:45:12 +00:00
Jim Meyering
519a36594e *** empty log message *** 2003-04-09 14:43:33 +00:00
Jim Meyering
c04eed33c4 *** empty log message *** 2003-04-09 14:40:10 +00:00
Jim Meyering
78d8a32a1a (bytes_split): Use size_t temporary (rather than
uintmax_t original) in remaining computations.  From Paul Eggert.
2003-04-09 14:40:05 +00:00
Jim Meyering
a69132e717 Handle command line option arguments larger than 2^31.
This allows e.g., splitting into files of size 2GB and larger,
and running split --lines=N with N=2^31 or more.
But for --line-bytes=N, the restriction that N <= SIZE_MAX
remains (for now), due to the way it is implemented.

Include "inttostr.h".
(bytes_split, lines_split, line_bytes_split, main):
Use uintmax_t, not size_t, for file sizes.
(main): Give a better diagnostic for option arguments == 0.
Use umaxtostr to print file sizes.
2003-04-09 14:37:47 +00:00
Jim Meyering
4bd5187248 tweak white-space to make backslashes line up 2003-04-09 13:38:39 +00:00
Jim Meyering
242dabb942 (lines_split): Rename local, nlines -> n_lines. 2003-04-09 13:25:48 +00:00
Jim Meyering
60334e21a8 also check obsolete option -0 2003-04-09 12:21:13 +00:00
Jim Meyering
40989ab484 *** empty log message *** 2003-04-08 12:53:58 +00:00
Jim Meyering
6c69e2f2cb (usage): Mention that --directory (-d) works only on some systems. 2003-04-08 12:53:53 +00:00
Jim Meyering
587d16d350 *** empty log message *** 2003-04-08 12:53:26 +00:00
Jim Meyering
b5de6ff485 *** empty log message *** 2003-04-08 11:50:23 +00:00
Jim Meyering
ce5034feeb (main): Use STDIN_FILENO, not literal `0'. 2003-04-08 11:49:57 +00:00
Jim Meyering
3ca2ab6ef4 *** empty log message *** 2003-04-08 11:46:05 +00:00
Jim Meyering
2869e1b2ff (TESTS): Add split-fail. 2003-04-08 11:45:58 +00:00
Jim Meyering
08f905aca2 *** empty log message *** 2003-04-08 11:45:44 +00:00
Jim Meyering
c54ba76168 Run $PERL to see if it is available, rather than testing its value. 2003-04-08 10:55:01 +00:00
Jim Meyering
5d425f8eed . 2003-04-08 10:54:09 +00:00
Jim Meyering
3ae1676b87 *** empty log message *** 2003-04-08 10:14:19 +00:00
Jim Meyering
e2f9e5953d *** empty log message *** 2003-04-08 09:51:57 +00:00
Jim Meyering
436b00ec6b *** empty log message *** 2003-04-08 09:51:17 +00:00
Jim Meyering
a7641fc8e8 (main): Rename local variable: s/accum/n_units/. 2003-04-08 09:50:50 +00:00
Jim Meyering
7eb9262da9 also change NCHARS, in comments, to N_BYTES 2003-04-08 09:39:08 +00:00
Jim Meyering
4752938d28 Rename local variables: nchars -> n_bytes. 2003-04-08 09:30:09 +00:00
Jim Meyering
ee3967b289 Remove note about Ultrix compilation failure. 2003-04-08 09:23:09 +00:00
Jim Meyering
808df43193 *** empty log message *** 2003-04-07 18:12:37 +00:00
Jim Meyering
4130480d65 (jm_PREREQ_STAT): Add prerequisites and #includes for Ultrix 4.4. 2003-04-07 18:12:31 +00:00
Jim Meyering
943a698901 *** empty log message *** 2003-04-07 18:11:47 +00:00
Jim Meyering
8fd978c223 Add #include directives for Ultrix 4.4.
Based on a suggested change from Bert Deknuydt.
2003-04-07 18:11:39 +00:00
Jim Meyering
2aed952a5c *** empty log message *** 2003-04-07 18:02:29 +00:00
Jim Meyering
e0ffc9e569 *** empty log message *** 2003-04-06 19:06:37 +00:00
Jim Meyering
e3b9de9e2f (makefile-check): New rule.
(local-check): Add it.
2003-04-06 19:06:26 +00:00
Jim Meyering
0622704dce . 2003-04-05 18:04:06 +00:00
Jim Meyering
4cfe78b8a0 *** empty log message *** 2003-04-05 18:03:47 +00:00
Jim Meyering
25c05ae140 Use $(VAR) rather than @VAR@, now that we can rely on automake to
emit a definition for each substituted variable.
2003-04-05 18:03:39 +00:00
Jim Meyering
6617d20345 *** empty log message *** 2003-04-05 16:53:03 +00:00
Jim Meyering
c573813515 (DEFS): Use += notation rather than `DEFS = ... @DEFS@'.
Use $(VAR) rather than @VAR@, now that we can rely on automake to
emit a definition for each substituted variable.
2003-04-05 16:52:48 +00:00
Jim Meyering
dd72f39b52 *** empty log message *** 2003-04-05 16:21:28 +00:00
Jim Meyering
4795aa1810 Add a comment explaining why this test fails when using Tru64's broken sed. 2003-04-05 16:21:23 +00:00
Jim Meyering
84b0d3667b Add a comment explaining why this test fails when using Tru64's broken sed. 2003-04-05 16:20:41 +00:00
Jim Meyering
c05a53c48b *** empty log message *** 2003-04-05 16:13:55 +00:00
Jim Meyering
a32e0227fe *** empty log message *** 2003-04-05 16:12:33 +00:00
Jim Meyering
b71a48487c *** empty log message *** 2003-04-05 15:51:42 +00:00
Jim Meyering
ba2c242694 Make kill -t' output signal descriptions (not ?') on Tru64.
(sys_siglist): Also check for __sys_siglist.
2003-04-05 15:49:46 +00:00
Jim Meyering
36662095bd *** empty log message *** 2003-04-05 15:46:01 +00:00
Jim Meyering
d1938da255 Also check for declaration of __sys_siglist.
Required for Tru64 4.0D, 4.0F, and 5.1.
2003-04-05 15:45:55 +00:00
Jim Meyering
445828c958 bump to 5.0.1 2003-04-05 15:44:29 +00:00
Jim Meyering
f193c70c6b fixed Ed Avis' mv bug 2003-04-04 21:58:05 +00:00
Jim Meyering
b2c3d60092 *** empty log message *** 2003-04-04 21:55:29 +00:00
Jim Meyering
fed16f65ae (PERL): Remove unnecessary definition. 2003-04-04 21:54:30 +00:00
Jim Meyering
fc6073d633 Because of inappropriate (but POSIX-mandated) behavior of rename,
`mv a b' would not remove `a' in some unusual cases.  Work around
this by unlinking `a' when necessary.

(same_file_ok): Add an output parameter.
Set it in the offending case.
(copy_internal): When necessary, unlink SRC_PATH and inform caller.
2003-04-04 21:53:27 +00:00
Jim Meyering
e46be69e86 *** empty log message *** 2003-04-04 21:47:26 +00:00
Jim Meyering
5e1898fc01 (TESTS): Add hard-4. 2003-04-04 21:45:20 +00:00
Jim Meyering
c8c1fb97a3 *** empty log message *** 2003-04-04 19:35:57 +00:00
Jim Meyering
4d4896eef3 [TEST_DIRNAME]: Update build instructions for test.
Add test-cases for DOS filenames. Declare program_name.
(main): Set up program_name.
2003-04-04 19:35:54 +00:00
Jim Meyering
22ad36e73c Clean up rules for automatically generated sources:
(dircolors.h, wheel-size.h, wheel.h, false.c):
Make each generated file be read-only.
Add each file name to BUILT_SOURCES separately.
(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
2003-04-04 16:03:50 +00:00
Jim Meyering
d8981ba19e *** empty log message *** 2003-04-04 15:50:08 +00:00
Jim Meyering
82e0908b2c Put LOCALEDIR macro definition in new file: localedir.h.
(DEFS): Remove definition.
(localedir.h): New rule.
(BUILT_SOURCES, DISTCLEANFILES): Add localedir.h.
2003-04-04 15:50:05 +00:00
Jim Meyering
c9f8890396 Include "localedir.h". 2003-04-04 15:49:48 +00:00
Jim Meyering
48d174d271 *** empty log message *** 2003-04-04 15:22:28 +00:00
Jim Meyering
bceb83d0a2 (constants.texi): Rename target (thus enabling it),
now that fileutils, textutils, and sh-utils have been merged.
(MAINTAINERCLEANFILES): Define.
2003-04-04 15:22:05 +00:00
Jim Meyering
0a32c8d910 *** empty log message *** 2003-04-03 13:11:05 +00:00
Jim Meyering
d8286cccd9 *** empty log message *** 2003-04-03 13:09:50 +00:00
Jim Meyering
1c2b9c575a . 2003-04-02 21:26:58 +00:00
463 changed files with 43308 additions and 28215 deletions

View File

@@ -1 +1 @@
4.5.12
5.0

817
ChangeLog
View File

@@ -1,3 +1,820 @@
2003-07-15 Jim Meyering <jim@meyering.net>
* Version 5.0.1.
* Makefile.maint (%.asc): Remove target first, so gpg doesn't
prompt us about it.
* announce-gen (print_changelog_deltas): Relax tests for matching
version-number line in NEWS.
Change the .sig suffix to .asc here, too.
2003-07-14 Jim Meyering <jim@meyering.net>
* Makefile.maint (%.asc): Renamed from %.sig.
Generate and use ascii-armored signatures.
Use gpg's -o option.
2003-07-13 Jim Meyering <jim@meyering.net>
* src/nohup.c (NOHUP_FAILURE, NOHUP_FOUND_BUT_CANNOT_INVOKE): Define.
(main): Use them.
* Makefile.maint (syntax-check): Move each individual check into
its own target.
(syntax-check-rules): This is the list of syntax-check targets.
(sc_unmarked_diagnostics, sc_cast_of_argument_to_free):
(sc_cast_of_x_alloc_return_value, sc_space_tab):
(sc_error_exit_success, sc_xalloc_h_in_src): New targets.
2003-07-12 Jim Meyering <jim@meyering.net>
* configure.ac: Remove uses of OPTIONAL_BIN_ZCRIPTS and last
traces of the nohup script.
* src/Makefile.am (bin_SCRIPTS): Remove use of just-removed
$(OPTIONAL_BIN_ZCRIPTS).
* src/Makefile.am (localedir.h): Put the `2>&1' after the redirect
target, not before the `>'.
* src/remove.c (remove_dir): Give a diagnostic upon failed save_cwd,
now that that function no longer calls `error'.
* src/df.c (find_mount_point): Emit a diagnostic for each
failed syscall, rather than relying on caller to do that.
The caller couldn't do a good job, anyhow -- too many different
ways to fail (each with a different referent).
Give a diagnostic upon failed save_cwd, now that that function
no longer calls `error'.
(show_point): Don't diagnose find_mount_point's errors, now that
it handles them itself.
* src/df.c (find_mount_point): Don't let free clobber errno upon
failed chdir.
* src/sys2.h: Remove alloca-related block.
* src/system.h: Include <alloca.h> here, instead.
It appears that the `#pragma alloca' included via "system.h" is
adequate, since join.c uses alloca, yet lacked an in-file #pragma.
* src/copy.c, src/cp.c, src/df.c, src/install.c, src/ln.c:
* src/ls.c, src/mv.c, src/remove.c: Remove `#pragma alloca'.
* src/chown-core.c (change_file_owner): Do not restore any special
permission bits (e.g., set-user-ID, set-group-ID) that are reset
by chown(2) on some systems. Suggestion and insistence :-) from
Michael Stone.
* tests/input-tty: Also check `test -t 1'.
This is necessary on linux-2.4.21. Otherwise, the stty/basic-1
test would block when run in the background.
2003-07-11 Jim Meyering <jim@meyering.net>
* tests/sample-test: Also fail if cat-to-create-expected-output
fails. Otherwise, if both `exp' and `out' were to end up empty
because of e.g., a full disk, they would mistakenly compare equal.
* src/nohup.c: New file. Rewrite of nohup.sh in C.
This solves a portability problem: on at least Solaris systems,
when nohup.sh used the vendor /bin/sh, it would exit with status
of `1' rather than the required 126 or 127 upon failure to exec
the specified program.
* src/Makefile.am (EXTRA_SCRIPTS): Remove definition.
(bin_PROGRAMS): Add nohup.
(EXTRA_DIST): Remove nohup.sh.
(all_programs): Remove use of $(EXTRA_SCRIPTS).
* src/nohup.sh: Remove file.
* man/Makefile.am (nohup.1): Depend on nohup.c, rather than nohup.sh.
* tests/misc/nohup: Tests for the above.
* tests/misc/Makefile.am (TESTS): Add nohup.
* src/head.c (diagnose_copy_fd_failure): New function, renamed from
the macro, COPY_FD_DIAGNOSE.
(diagnose_copy_fd_failure): Enclose diagnostic in _(...).
(head_file): Likewise.
* src/date.c: Include "quote.h".
(batch_convert): Use the quote function rather than using literal `...'
in a diagnostic.
* src/setuidgid.c (main): Enclose diagnostic in _(...).
* src/fmt.c (main): Likewise.
* src/mknod.c (main): Likewise.
* src/tac.c (tac_seekable): Likewise.
* src/yes.c (main): Likewise.
* src/od.c (main): Likewise.
* src/install.c (change_attributes): Likewise.
2003-07-10 Jim Meyering <jim@meyering.net>
* src/head.c (usage): Use 1024*1024 in place of 1048576.
* src/tail.c (usage): Likewise.
* tests/rm/fail-2eperm: Now that we have setuidgid, use it in
place of the kludge in this test. Suggestion from Paul Jarc.
* src/Makefile.am (noinst_PROGRAMS): Define to setuidgid.
* src/setuidgid.c: New program, solely for testing (not installed).
* src/chown-core.c (change_file_owner): Don't leak file descriptors
when dereferencing symlinks.
2003-07-09 Jim Meyering <jim@meyering.net>
* tests/du/slash: New file/test for today's lib/ftw.c fix.
* tests/du/Makefile.am (TESTS): Add slash
* src/tail.c (xlseek): Avoid warning about ``return without value
from function returning non-void''.
2003-07-08 Jim Meyering <jim@meyering.net>
* man/help2man: Update to version 1.29.
* man/help2man: Add END handler to close STDOUT and check for errors.
2003-06-30 Paul Eggert <eggert@twinsun.com>
Add support for a "[" that conforms to the GNU coding standards,
i.e., that does not depend on its name.
* src/lbracket.c: New file.
* README: Add "[".
* man/Makefile.am (programs): Ignore "[", since it doesn't have
a separate man page.
* src/Makefile.am (bin_PROGRAMS): Add "[".
(__SOURCES): New var.
* src/test.c (LBRACKET): Define to 0 if not defined.
(main): Use LBRACKET rather than argv[0].
* src/test.c (one_argument): Do not check for -t if POSIXLY_CORRECT.
Reported by Paul Jarc and Dan Jacobson.
* src/test.c (main): Do not recognize --help or --version if
POSIXLY_CORRECT, when invoked as "test". Handle "[ ]" correctly.
Do not bother testing that margv[margc] is non-null.
2003-07-04 Jim Meyering <jim@meyering.net>
* src/who.c (print_line): Rewrite to use asprintf, in order to be
able to avoid emitting trailing spaces. Reported by Dan Jacobson.
* tests/misc/head-elide-tail: Add tests of head's new --lines=-N
option, and perform the +1600 invocations of head IFF the envvar
RUN_EXPENSIVE_TESTS is set.
2003-07-03 Jim Meyering <jim@meyering.net>
* src/cp.c (do_copy): Give a better diagnostic when failing due
to nonexistent destination directory. Reported by Dmitry Rutsky.
See http://bugs.debian.org/199730 for details.
2003-06-27 Jim Meyering <jim@meyering.net>
split's --verbose option did nothing [broken in 4.5.10 and 5.0]
* src/split.c (longopts): Use `1', not `0' as the value for
for &verbose. Reported by Keith Thompson.
Test for the above fix.
* tests/misc/split-a: Also use --verbose and compare stderr
output with what we'd expect.
2003-06-20 Jim Meyering <jim@meyering.net>
* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
Use `error_t' (rather than int) as type for local `err'.
From Alfred M. Szmidt.
2003-06-19 Marcus Brinkmann <marcus@gnu.org>
* src/copy.c (copy_internal) [HAVE_STRUCT_STAT_ST_AUTHOR]:
Fix author preservation code.
2003-06-19 Jim Meyering <jim@meyering.net>
* src/ln.c (ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
(do_link): Don't warn about hard link to symlink.
2003-06-18 Jim Meyering <jim@meyering.net>
* src/cut.c: Include "getdelim2.h", not "getstr.h".
Reflect renaming: getstr -> getdelim2.
* src/comm.c, src/join.c, src/nl.c, src/uniq.c: Reflect renaming:
readline -> readlinebuffer.
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* src/readlink.c: Include <sys/types.h> before system.h (because
the latter includes <sys/stat.h>). Required on Ultrix 4.3.
2003-06-17 Jim Meyering <jim@meyering.net>
* src/system.h (initialize_main): Define.
Use it in every `main'. Applied via this:
p='initialize_main (&argc, &argv);'
perl -ni -e '/program_name.=.argv.0/ and print " '"$p"'\n"; print' \
$(grep -l program_name.=.argv.0 *.c)
test.c uses margc/margv, so I made the change manually for that file.
Based on a patch from Bernard Giroud.
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fix for build failure on Ultrix 4.3.
* src/stat.c: Include sys/statvfs.h in preference to sys/vfs.h.
Include sys/param.h and sys/mount.h on ultrix.
2003-06-16 Jim Meyering <jim@meyering.net>
* src/touch.c (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Remove
definitions.
* src/system.h (O_NDELAY, O_NONBLOCK, O_NOCTTY, EISDIR): Define
them here instead, but with one change: define EISDIR to -1, not 0.
* src/cat.c (cat): Remove `#ifndef ENOSYS', now that it's
guaranteed to be defined.
* src/system.h (ENOSYS, ENOTSUP): Define to -1 if not defined.
* README: Mention the CVS repository.
Encourage addition of test cases.
2003-06-12 Jim Meyering <jim@meyering.net>
* src/touch.c (touch): Call close only if necessary.
From Bruno Haible.
* src/wc.c (usage): Correct wording: wc prints counts in the order
`newline, word, byte'. Reported by Keith M. Briggs.
* man/wc.x: Fix it here, too. And change `lines' to `newlines'.
2003-06-10 Jim Meyering <jim@meyering.net>
* tests/date/Test.pm: Add a test for the new format, e.g., May-23-2003.
2003-06-07 Jim Meyering <jim@meyering.net>
* Makefile.maint (syntax-check): Add commented-out (over-aggressive)
rule.
2003-06-06 Jim Meyering <jim@meyering.net>
* src/extract-magic (main): Avoid newer 3-arg form of open,
so this script works also with e.g., perl5.005_03.
Patch by John David Anglin.
2003-06-04 Paul Eggert <eggert@twinsun.com>
* src/system.h: Include <stdbool.h> unconditionally.
2003-06-04 Jim Meyering <jim@meyering.net>
* man/Makefile.am (check-programs-vs-x): Rename target
from check-programs-vs-1. Adjust rule to check for the
primary (.x) file, not the generated one (.1).
2003-06-03 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
* man/kill.x: New file.
* man/Makefile.am (dist_man_MANS): Add kill.1.
(kill.1): New rule.
2003-06-04 Jim Meyering <jim@meyering.net>
Ensure that the .x file for a new program is never forgotten again.
* man/Makefile.am (programs): Define.
(check-programs-vs-1): New phony target.
(check-local): Depend on it.
2003-06-03 Jim Meyering <jim@meyering.net>
Avoid unnecessary copying of environment.
* src/env.c (main): Rather than clearing the environment and --
unless told to ignore environment -- copying all settings from
the saved, original environment, clear the environment only when
that is requested. Suggested by Jens Elkner.
2003-06-02 Jim Meyering <jim@meyering.net>
* src/system.h: Always include <string.h>, since we assume C89.
Include <limits.h> without checking for HAVE_LIMITS_H.
* src/test.c [!TEST_STANDALONE]: Remove #if-0'd block.
(STREQ, S_IXUGO): Remove redundant (in system.h) definitions.
2003-06-01 Jim Meyering <jim@meyering.net>
Avoid a race condition in `tail -f' described by Ken Raeburn in
http://mail.gnu.org/archive/html/bug-textutils/2003-05/msg00007.html
* src/tail.c (file_lines): Add new parameter, *read_pos, and set it.
(pipe_lines, pipe_bytes, start_bytes, start_lines): Likewise.
(tail_bytes, tail_lines, tail): Likewise.
(tail_file): Use the new `read_pos' value as the size,
rather than stats.st_size from the fstat call.
2003-05-28 Jim Meyering <jim@meyering.net>
* src/extract-magic: Allow expansion of `$file' in the here-
document corresponding to the comment at the top of fs.h.
2003-05-26 Jim Meyering <jim@meyering.net>
* src/stat.c: Fix portability problem on FreeBSD5.0: don't include
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE.
Use #if/#elif/... cascade so we get only one set of include files.
Reported by Nelson Beebe.
2003-05-24 Jim Meyering <jim@meyering.net>
* src/md5sum.c (split_3): Accept the BSD format only when in MD5 mode.
* tests/sha1sum/basic-1: Make sure `sha1sum --check' doesn't
accept the BSD format.
2003-03-28 Joe Orton <jorton@redhat.com>
* src/md5sum.c (bsd_split_3): New function.
(split_3): Detect checksums from BSD 'md5' command and handle them
using bsd_split_3.
* tests/md5sum/basic-1: New tests for --check exit status, and for
BSD-style checksum files.
2003-05-21 Jim Meyering <jim@meyering.net>
* src/head.c (elide_tail_lines_pipe): Fix a thinko.
This sort of thing is why it'd be *Really Good* to factor
out the common code used here and in tail.c.
2003-05-14 Jim Meyering <jim@meyering.net>
* src/head.c (usage): Document new feature: --bytes=-N and --lines=-N.
* tests/du/slink: Skip this test if `.' is on an XFS file system.
* tests/du/fd-leak: New file. Test for the bug in du that
was fixed by the 2003-05-12 change to lib/ftw.c.
* tests/du/Makefile.am (TESTS): Add fd-leak.
* src/head.c (AUTHORS): Enclose string in N_(...), now that it
includes a translatable word, `and'.
* src/dd.c (usage): Don't use `,' as the thousands separator
in e.g. 1,000,000 and 1,048,576. Instead, do this:
`SIZE may be ..., MB 1000*1000, M 1024*1024 and so on...'
* src/df.c (usage): Likewise.
* src/du.c (usage): Likewise.
* src/ls.c (usage): Likewise.
* Makefile.maint (syntax-check): Add another check.
2003-05-13 Paul Eggert <eggert@twinsun.com>
Fix uniq to conform to POSIX, which requires that "uniq -d -u"
must output nothing. Problem reported by Josh Hyman.
* src/uniq.c (enum output_mode, mode): Remove, replacing with:
(output_unique, output_first_repeated, output_later_repeated):
New vars. All uses of "mode" changed to use these variables,
which are not mutually exclusive as "mode" was.
(writeline): New arg "match", used to control whether to
obey output_first_repeated or output_later_repeated.
All callers changed.
(check_file, main): Adjust to above changes.
* tests/uniq/Test.pm: Test that 'uniq -d -u' outputs nothing.
2003-05-14 Jim Meyering <jim@meyering.net>
* tests/rm/rm3: Use tr's \n notation rather than \012.
This package can afford to do that, since its tests are guaranteed use
GNU tr, which has accepted the more modern notation for 10 years.
* tests/rm/rm5: Likewise.
* tests/cp/same-file: Likewise.
* tests/stty/row-col-1: Likewise.
* tests/stty/basic-1: Likewise.
* tests/rm/deep-1: Likewise.
* tests/mv/part-symlink: Likewise.
* tests/mkdir/perm: Likewise.
* tests/misc/nice: Likewise.
2003-05-13 Jim Meyering <jim@meyering.net>
* src/copy.c (struct F_triple) [name]: Remove const attribute.
(triple_free): Don't apply cast to argument of free.
(seen_file): Add cast here instead.
* src/cp-hash.c (struct Src_to_dest) [name]: Remove const attribute.
(src_to_dest_free): Don't apply cast to argument of free.
* src/sort.c (zaptemp): Don't apply cast to argument of free.
* src/pr.c (init_fps, init_store_cols): Likewise.
* src/join.c (delseq, freeline): Likewise.
* src/expr.c (OLD): Likewise.
* src/sort.c (sort): Likewise.
* src/head.c (elide_tail_lines_pipe): Likewise.
* src/tail.c: Include "quote.h".
Use quote in diagnostics. Change many error format strings
from just `%s' to e.g., `error reading %s'.
(pipe_lines): Change type of parameter, n_lines, to uintmax_t.
Rewrite newline-counting loop to use memchr.
* src/head.c (elide_tail_lines_pipe): Use `if', not assert.
Now that assert is no longer used, don't include <assert.h>.
2003-05-12 Jim Meyering <jim@meyering.net>
* src/head.c: Include <assert.h>.
(AUTHORS): Add my name.
(elide_tail_lines_pipe): New function.
2003-05-10 Jim Meyering <jim@meyering.net>
* Makefile.maint (syntax-check): Check for `error (EXIT_SUCCESS,'.
* src/readlink.c (main): Set program_name before first use.
Remove that (redundant) first use.
Don't exit successfully just because --verbose was specified.
Pass 0, not EXIT_SUCCESS, as first argument to error; when that
parameter is 0, error does not exit.
* src/uname.c (main): When failing due to too many arguments, also say
that, rather than just "Try `uname --help' for more information.".
* src/comm.c (main): Likewise, but for too few arguments.
* src/logname.c: Include error.h.
(main): Say why we're failing.
* src/uniq.c (main): Don't segfault when argc < optind.
* src/who.c (main): Handle argc < optind.
* src/df.c (main): Likewise.
* src/install.c (main): Likewise.
* src/mv.c (main): Likewise.
* src/pwd.c (main): Likewise.
* src/tty.c (main): Likewise.
* src/chroot.c (main): Likewise.
* src/hostname.c: Likewise.
* src/du.c (main): Likewise.
* src/expand.c (main): Likewise.
* src/env.c (main): Likewise.
* src/unexpand.c (main): Likewise.
* src/printenv.c (main): Likewise.
* src/sync.c (main): Handle argc == 0.
* src/expr.c (main): Likewise.
* src/printf.c (main): Likewise.
* src/basename.c (main): Likewise.
* src/ln.c (main): Test for `missing argument' before computing n_files.
* src/tail.c (main): Test for the case of no arguments before
computing n_files.
* src/kill.c (send_signals): Don't check command line arguments here.
(main): Check them here instead. Handle argc < optind.
* src/logname.c (main): Use error, rather than fprintf, for the sake
of consistency.
* src/rm.c (main): Don't overrun array bound if argc is 0.
2003-05-09 Jim Meyering <jim@meyering.net>
* src/sort.c (main): Don't overrun array bound if argc is 0.
That would happen when invoked via: execl ("/usr/bin/sort", NULL);
Reported by Wartan Hachaturow.
2003-05-07 Jim Meyering <jim@meyering.net>
Implement support so that `head --lines=-N' works on seekable files.
* src/head.c (enum Copy_fd_status): Define.
(COPY_FD_DIAGNOSE): New macro.
(elide_tail_lines_seekable): New funtion.
(elide_tail_lines_file): Call it here.
2003-05-06 Jim Meyering <jim@meyering.net>
* src/sys2.h (CHAR_BIT): Remove duplicate definition.
2003-05-04 Jim Meyering <jim@meyering.net>
* tests/head/Test.pm: Remove tests of --bytes=-N; using that framework
caused the addition of thousands of small files to the tar archive.
* tests/misc/head-elide-tail: New file. Add them here instead.
* tests/misc/Makefile.am (TESTS): Add head-elide-tail.
2003-05-04 Paul Eggert <eggert@twinsun.com>
* src/remove.c (HAVE_WORKING_READDIR): Define to 0 if not defined.
(IF_READDIR_NEEDS_REWINDDIR): Remove.
(remove_cwd_entries): Rewrite to avoid IF_READDIR_NEEDS_REWINDDIR,
which was a bit weird because it couldn't be emulated by a function.
2003-05-03 Jim Meyering <jim@meyering.net>
Extend head to accept --lines=-N (--bytes=-N) and to print all
but the N lines (bytes) at the end of the file.
* src/head.c: Include full-write.h, full-read.h, inttostr.h, quote.h.
Use quote() in diagnostics, rather than literal `' marks.
(copy_fd, elide_tail_bytes_pipe, elide_tail_bytes_file):
New functions.
(elide_tail_lines_pipe, elide_tail_lines_file): New functions.
(head_file): Reorganize so as to call head from only one place.
(main): Likewise, for head_file.
Handle new, undocumented option, --presume-input-pipe.
Handle negative line and byte counts.
* tests/head/Test.pm: Add lots of tests to exercise --bytes=-N.
* tests/du/8gb: Skip test if the file system of `.' doesn't support
sparse files -- otherwise it'd create a file of size 8GB.
2003-05-02 Jim Meyering <jim@meyering.net>
* src/fmt.c (usage): Don't mention obsolescent -WIDTH option.
Instead explain about `-' and standard input.
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
Reported by Keith Thompson.
* tests/fmt/basic: Add test for the above fix.
* src/fmt.c: Include "quote.h".
Use quote() in diagnostics, rather than literal `' marks.
(main): Exit nonzero when unable to open an input file.
* tests/fmt/basic: Add test for the above fix.
* src/fmt.c (main): Diagnose invalid suffix on obsolescent width
specifications like `-72x'.
* tests/fmt/basic: Add test for the above fix.
Work around nasty readdir bug on Darwin6.5.
* src/remove.c (IF_READDIR_NEEDS_REWINDDIR): Define.
[! HAVE_WORKING_READDIR] (remove_cwd_entries): If readdir has just
returned NULL and there has been at least one successful unlink or
rmdir call since the opendir or previous rewinddir, then call
rewinddir and reiterate the loop.
Factor out common code.
* src/remove.c (readdir_ignoring_dotdirs): New function.
(is_empty_dir): Use it here.
(remove_cwd_entries): Use it here.
2003-05-01 Jim Meyering <jim@meyering.net>
* tests/rm/r-3: Create 500 rather than just 300 files.
There's a bug in Darwin6.5's readdir that shows up only with
338 or more files.
Fix a bug in this test: `cd $pwd' (not to `..'), now that $tmp
has two components.
* src/tail.c:
Change type of n_units, n_bytes, n_lines to be `uintmax_t'.
(dump_remainder): Move two declarations `down' into the scope
where they are used.
(xlseek): Return the resulting offset.
(file_lines): Rename parameter, file_length, to end_pos.
(pipe_lines): Don't coerce safe_read return value to `int'.
Adapt tests accordingly.
(pipe_bytes) [struct charbuffer] (nbytes): Change type from `int'
to `unsigned int'.
Change type of `total_bytes' from `int' to `size_t',
since the former wouldn't always be wide enough.
Don't coerce safe_read return value to `int',
and adapt tests accordingly.
Now that testing for a read error no longer involves
using `tmp', handle that case *after* freeing `tmp'.
(start_bytes): Clean up.
(tail_bytes): Now that `n_bytes' may be larger than
OFF_T_MAX, test for that condition and, if it's true, don't
use lseek optimizations.
(parse_options): Don't fail just because N_UNITS is larger than
the maximum size of a file -- tail may be applied to an input
stream (e.g., a pipe) with more data than that.
* Makefile.maint (syntax-check): Rename from alloc-check.
Also check for SPACE-TAB sequences.
Also check for malloc/calloc/realloc casts.
2003-05-01 Jim Meyering <jim@meyering.net>
* src/tail.c (start_lines): Rewrite to use memchr. Clean up.
2003-04-28 Jim Meyering <jim@meyering.net>
* tests/misc/tty-eof: Send two tokens, not just one, so we don't
make the now-more-picky tsort fail.
2003-04-24 Jim Meyering <jim@meyering.net>
* src/tsort.c (tsort): Remove unnecessary test of have_read_stdin.
(main): Minor syntactic clean-up.
* src/tsort.c (tsort): Fail if the input contains an odd number of
tokens. Reported by junkio@cox.net.
* tests/tsort/basic-1: Test for the above fix.
2003-04-21 Jim Meyering <jim@meyering.net>
* tests/misc/printf: Add tests for the printf fixes below.
* Makefile.cfg (cvs_files): Add $(srcdir)/config/depcomp to the list.
2003-04-20 Paul Eggert <eggert@twinsun.com>
Fix printf POSIX compatibility bug reported by Ben Harris in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
* doc/coreutils.texi (printf invocation): It's \NNN in the format,
\0NNN in the %b operand.
* src/printf.c (usage): Likewise.
(print_esc): New arg OCTAL0 to specify whether \0NNN or \NNN
is desired. All uses changed. Behave like Bash printf if %b
operand uses \NNN where the initial N is not 0.
2003-04-17 Jim Meyering <jim@meyering.net>
* src/stty.c: Remove uses of PROTOTYPE macro.
2003-04-15 Jim Meyering <jim@meyering.net>
* Makefile.maint: Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
2003-04-13 Jim Meyering <jim@meyering.net>
* src/remove.c (is_empty_dir): Don't closedir (NULL).
2003-04-12 Jim Meyering <jim@meyering.net>
Giving nl an invalid STYLE argument (in --header-numbering=STYLE (-h),
--body-numbering=STYLE (-b), or --footer-numbering=STYLE (-f)) or
FORMAT (--number-format=FORMAT (-n)) would not give a useful diagnostic.
* src/nl.c (main): Fix those problems and remove literal quote marks
(e.g., "`%s'") from format string; instead use "%s" in each format
string and `quote (optarg)' as the corresponding argument.
Also, diagnose all invalid command line options before failing.
* src/nl.c (proc_text): Fix a bug that would make nl output extra
newlines in some cases. Details here: http://bugs.debian.org/177256.
This bug was introduced on 2001-11-10 for textutils-2.0.17.
* tests/misc/nl: Add test for the above-fixed bug.
* tests/misc/readlink: New file. Test the --canonicalize option.
* tests/misc/Makefile.am (TESTS): Add readlink.
2003-04-11 Jim Meyering <jim@meyering.net>
Clean up.
* src/chown.c, src/cp.c, src/dircolors.hin, src/du.c, src/ln.c:
* src/mkfifo.c, src/ptx.c, src/spline.c, src/stty.c, src/tail.c:
* src/test.c, src/unexpand.c: Remove (or replace-with-TAB(s) to
retain alignment) each sequence of spaces before a TAB character.
* src/ls.c: Include <stdlib.h> unconditionally.
* Makefile.maint (xalloc-check): Rename from header-check.
* src/yes.c: Include error.h after system.h, not before.
Clean up.
* src/copy.c, src/cp-hash.c, src/cp.c, src/csplit.c, src/cut.c:
* src/date.c, src/df.c, src/du.c, src/expand.c, src/expr.c, src/id.c:
* src/join.c, src/md5sum.c, src/nl.c, src/od.c, src/paste.c, src/pr.c:
* src/ptx.c, src/sort.c, src/split.c, src/su.c, src/tail.c, src/tee.c:
* src/tr.c: * src/unexpand.c, src/users.c:
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc
return values and of xrealloc's first argument.
Fix the former with this:
perl -pi -e 's/\([^(]*?\*\) *(x(m|c|re)alloc)\b/$1/'
2003-04-10 Jim Meyering <jim@meyering.net>
* src/stty.c (wrapf): Declare with format attribute.
The S_MAGIC_... names shouldn't be maintained in two places (prior
to this change, one would have to keep stat.c and fs.h in sync).
This change makes it so those names and the corresponding
hexadecimal constants all reside in stat.c. fs.h is now generated.
* src/Makefile.am (fs.h): New rule to generate fs.h from stat.c.
(BUILT_SOURCES): Add fs.h, now that it's generated.
(EXTRA_DIST): Add extract-magic.
* src/extract-magic: New script to extract fs.h definitions from stat.c.
* src/stat.c (human_fstype) [__linux__]: Append each hex constant from
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
* tests/tail-2/big-4gb: Skip this test (don't fail) if creating a
file with nominal length > 4GB fails. Reported by Michael Deutschmann.
* man/unexpand.x: Add `SEE ALSO' reference to expand.
* man/expand.x: Add `SEE ALSO' reference to unexpand.
Suggestion from Dan Jacobson.
2003-04-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* src/fs.h (S_MAGIC_DEVPTS): New magic for Linux's devpts.
* src/stat.c (human_fstype): Handle Linux's devpts.
2003-04-09 Paul Eggert <eggert@twinsun.com>
* src/split.c (line_bytes_split): Arg is of type size_t, since
that's all that is supported for now.
(main): Check for overflow in obsolescent line count option.
2003-04-09 Jim Meyering <jim@meyering.net>
* tests/misc/split-fail: Add a new test for the above fix.
* src/split.c (bytes_split): Use size_t temporary (rather than
uintmax_t original) in remaining computations. From Paul Eggert.
Handle command line option arguments larger than 2^31.
This allows e.g., splitting into files of size 2GB and larger,
and running split --lines=N with N=2^31 or more.
But for --line-bytes=N, the restriction that N <= SIZE_MAX
remains (for now), due to the way it is implemented.
* src/split.c: Include "inttostr.h".
(bytes_split, lines_split, line_bytes_split, main):
Use uintmax_t, not size_t, for file sizes.
(main): Give a better diagnostic for option arguments == 0.
Use umaxtostr to print file sizes.
Reported by Luke Hassell.
2003-04-08 Jim Meyering <jim@meyering.net>
* src/rm.c (usage): Mention that --directory (-d) works only
on some systems. Suggestion from Samuel Tardieu.
* tests/basename/basic: Run $PERL to see if it is available,
rather than testing its value.
* tests/sum/sysv, tests/tsort/basic-1, tests/unexpand/basic-1:
* tests/basename/basic, tests/dd/skip-seek, tests/dircolors/simple:
* tests/expr/basic, tests/factor/basic, tests/fmt/basic:
* tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
* tests/misc/sort, tests/misc/tty-eof, tests/mv/i-1:
* tests/rm/empty-name, tests/rm/fail-eperm, tests/rm/unreadable:
* tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
* tests/sum/basic-1, tests/seq/basic: Likewise.
* tests/misc/Makefile.am (TESTS): Add split-fail.
* tests/misc/split-fail: New file.
* src/split.c: Rename local variables: nchars -> n_bytes.
(lines_split): Rename local, nlines -> n_lines.
(main): Rename local variable: s/accum/n_units/.
(main): Use STDIN_FILENO, not literal `0'.
2003-04-07 Jim Meyering <jim@meyering.net>
* src/stat.c: Add #include directives for Ultrix 4.4.
Based on a suggested change from Bert Deknuydt.
2003-04-06 Jim Meyering <jim@meyering.net>
* Makefile.maint (makefile-check): New rule.
(local-check): Add it.
2003-04-05 Jim Meyering <jim@meyering.net>
* Makefile.am (nearly all of them):
Use $(VAR) rather than @VAR@, now that we can rely on automake to
emit a definition for each substituted variable.
* tests/Makefile.am.in: Likewise.
* tests/rm/rm5: Add a comment explaining why this test fails when
using Tru64's broken sed.
* tests/rm/rm3: Likewise.
Make `kill -t' output signal descriptions (not `?') on Tru64.
* src/kill.c (sys_siglist): Also check for __sys_siglist.
Patch by Tony Leneis.
* configure.ac: Also check for declaration of __sys_siglist.
Required for Tru64 4.0D, 4.0F, and 5.1.
Reported by Tony Leneis.
2003-04-04 Jim Meyering <jim@meyering.net>
* src/Makefile.am (PERL): Remove unnecessary definition.
Because of inappropriate (but POSIX-mandated) behavior of rename,
`mv a b' would not remove `a' in some unusual cases. Work around
this by unlinking `a' when necessary.
* src/copy.c (same_file_ok): Add an output parameter.
Set it in the offending case.
(copy_internal): When necessary, unlink SRC_PATH and inform caller.
Reported by Ed Avis.
* tests/mv/hard-4: New test for the above.
* tests/mv/Makefile.am (TESTS): Add hard-4.
Clean up rules for automatically generated sources:
* src/Makefile.am (dircolors.h, wheel-size.h, wheel.h, false.c):
Make each generated file be read-only.
Add each file name to BUILT_SOURCES separately.
(MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES).
Put LOCALEDIR macro definition in new file: localedir.h.
* src/Makefile.am (DEFS): Remove definition.
(localedir.h): New rule.
(BUILT_SOURCES, DISTCLEANFILES): Add localedir.h.
* src/system.h: Include "localedir.h".
2003-04-02 Jim Meyering <jim@meyering.net>
* Version 5.0.

View File

@@ -20,6 +20,7 @@ wget_files = \
cvs_files = \
$(srcdir)/config/elisp-comp \
$(srcdir)/config/depcomp \
$(srcdir)/config/mdate-sh \
$(srcdir)/config/missing \
$(srcdir)/config/install-sh \

View File

@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.3 from Makefile.am.
# Makefile.in generated by automake 1.7.6 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@@ -38,6 +38,7 @@ POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -64,6 +65,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -91,7 +93,6 @@ MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -107,6 +108,7 @@ SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQRT_LIBM = @SQRT_LIBM@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
@@ -213,7 +215,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/alloca.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/canonicalize.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/ftw.m4 m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/human.m4 m4/iconv.m4 m4/intdiv0.m4 m4/intmax_t.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longdouble.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/mktime.m4 m4/nanosleep.m4 m4/onceonly.m4 m4/open-max.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/readdir.m4 m4/regex.m4 m4/rename.m4 m4/restrict.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/signed.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/stdint_h.m4 m4/strftime.m4 m4/timespec.m4 m4/tm_gmtoff.m4 m4/tzset.m4 m4/uintmax_t.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/vasnprintf.m4 m4/vasprintf.m4 m4/wchar_t.m4 m4/wint_t.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@@ -314,9 +316,15 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
else \
include_option=--include; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
test -f $$subdir/TAGS && \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
@@ -472,7 +480,7 @@ distcheck: dist
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
cd $(distuninstallcheck_dir) \
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
@@ -481,11 +489,11 @@ distuninstallcheck:
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
if test '$(srcdir)' = . ; then \
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
@@ -547,7 +555,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf autom4te.cache
-rm -rf $(top_srcdir)/autom4te.cache
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive

View File

@@ -1,5 +1,5 @@
# -*-Makefile-*-
# This Makefile fragment is shared between fileutils, sh-utils, textutils,
# This Makefile fragment is shared between the coreutils,
# CPPI, Bison, and Autoconf.
## Copyright (C) 2001-2003 Free Software Foundation, Inc.
@@ -19,6 +19,8 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
# Do not save the original name or timestamp in the .tar.gz file.
GZIP_ENV = '--no-name --best'
@@ -50,14 +52,74 @@ release_archive_dir ?= ../release
# new ChangeLog entries.
local-check = \
po-check copyright-check writable-files m4-check author_mark_check \
changelog-check strftime-check header-check makefile_path_separator_check
changelog-check strftime-check syntax-check makefile_path_separator_check \
makefile-check
.PHONY: $(local-check)
# Make sure C source files in src/ don't include xalloc.h directly,
# since they all already include it via sys2.h.
# It's not a big deal -- just aesthetics.
header-check:
if test -f $(srcdir)/src/sys2.h; then \
.PHONY: $(syntax-check-rules)
syntax-check-rules = \
sc_unmarked_diagnostics \
sc_cast_of_argument_to_free \
sc_cast_of_x_alloc_return_value \
sc_space_tab \
sc_error_exit_success \
sc_xalloc_h_in_src
syntax-check: $(syntax-check-rules)
# @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \
# $$(find -type f -name '*.[chly]') && \
# { echo '$(ME): found conditional include' 1>&2; \
# exit 1; } || :
# grep -E '^# *include <(string|stdlib)\.h>' \
# $(srcdir)/{lib,src}/*.[chy] && \
# { echo '$(ME): FIXME' 1>&2; \
# exit 1; } || :
# FIXME: don't allow `#include .strings\.h' anywhere
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
@grep --exclude=$(srcdir)/src/shred.c -E \
'\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
| grep -v '_(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
sc_cast_of_argument_to_free:
@grep -E '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || :
sc_cast_of_x_alloc_return_value:
@grep -E --exclude=$(srcdir)/lib/regex.c \
'\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
exit 1; } || :
sc_space_tab:
@grep -E '[ ] ' --exclude=$(srcdir)/lib/regex.c \
$(srcdir)/{lib,src}/*.[chly] \
$(find -name Makefile.am) && \
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
1>&2; \
exit 1; } || :
# Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success:
@grep -F 'error (EXIT_SUCCESS,' \
$$(find -type f -name '*.[chly]') && \
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
exit 1; } || :
# xalloc.h is included via system.h, so should not be included
# directly by any file in src/.
sc_xalloc_h_in_src:
@if test -f $(srcdir)/src/sys2.h; then \
if grep 'xalloc\.h' $(srcdir)/src/*.c; then \
exit 1; \
fi; \
@@ -78,6 +140,13 @@ strftime-check:
rm -f $@-src $@-info; \
fi
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
makefile-check:
grep -E '@[A-Z_]+@' `find . -name Makefile.am` \
&& { echo 'Makefile.maint: use $(...), not @...@' 1>&2; exit 1; } || :
changelog-check:
if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
:; \
@@ -162,10 +231,10 @@ cvs-tag-check:
else :; fi
cvs-diff-check:
if $(CVS) diff >cvs-diffs; then \
rm cvs-diffs; \
else \
echo "Some files are locally modified:" 1>&2; \
if $(CVS) diff >cvs-diffs; then \
rm cvs-diffs; \
else \
echo "Some files are locally modified:" 1>&2; \
cat cvs-diffs; \
exit 1; \
fi
@@ -241,9 +310,10 @@ rel-check:
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
signatures ?= $(distdir).tar.bz2.sig $(distdir).tar.gz.sig
%.sig: %
gpg --detach-sign $<
signatures ?= $(distdir).tar.bz2.asc $(distdir).tar.gz.asc
%.asc: %
rm -f $@
gpg --armor --detach-sign -o $@ $<
rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz $(signatures)
announcement: NEWS ChangeLog $(rel-files) $(signatures)

71
NEWS
View File

@@ -1,5 +1,72 @@
[5.0]
* false --help now exits nonzero
GNU coreutils NEWS -*- outline -*-
* Major changes in release 5.0.1:
** New programs
- new program: `[' (much like `test')
** New features
- head now accepts --lines=-N (--bytes=-N) to print all but the
N lines (bytes) at the end of the file
- md5sum --check now accepts the output of the BSD md5sum program, e.g.,
MD5 (f) = d41d8cd98f00b204e9800998ecf8427e
- date -d DATE can now parse a DATE string like May-23-2003
- chown: `.' is no longer recognized as a separator in the OWNER:GROUP
specifier on POSIX 1003.1-2001 systems. If chown *was not* compiled
on such a system, then it still accepts `.', by default. If chown
was compiled on a POSIX 1003.1-2001 system, then you may enable the
old behavior by setting _POSIX2_VERSION=199209 in your environment.
- chown no longer tries to preserve set-user-ID and set-group-ID bits;
on some systems, the chown syscall resets those bits, and previous
versions of the chown command would call chmod to restore the original,
pre-chown(2) settings, but that behavior is problematic.
1) There was a window whereby a malicious user, M, could subvert a
chown command run by some other user and operating on files in a
directory where M has write access.
2) Before (and even now, on systems with chown(2) that doesn't reset
those bits), an unwary admin. could use chown unwittingly to create e.g.,
a set-user-ID root copy of /bin/sh.
** Bug fixes
- chown --dereference no longer leaks a file descriptor per symlink processed
- `du /' once again prints the `/' on the last line
- split's --verbose option works once again [broken in 4.5.10 and 5.0]
- tail -f is no longer subject to a race condition that could make it
delay displaying the last part of a file that had stopped growing. That
bug could also make tail -f give an unwarranted `file truncated' warning.
- du no longer runs out of file descriptors unnecessarily
- df and `readlink --canonicalize' no longer corrupt the heap on
non-glibc, non-solaris systems
- `env -u UNSET_VARIABLE' no longer dumps core on non-glibc systems
- readlink's --canonicalize option now works on systems like Solaris that
lack the canonicalize_file_name function but do have resolvepath.
- mv now removes `a' in this example on all systems: touch a; ln a b; mv a b
This behavior is contrary to POSIX (which requires that the mv command do
nothing and exit successfully), but I suspect POSIX will change.
- date's %r format directive now honors locale settings
- date's `-' (no-pad) format flag now affects the space-padded-by-default
conversion specifiers, %e, %k, %l
- fmt now diagnoses invalid obsolescent width specifications like `-72x'
- fmt now exits nonzero when unable to open an input file
- tsort now fails when given an odd number of input tokens,
as required by POSIX. Before, it would act as if the final token
appeared one additional time.
** Fewer arbitrary limitations
- tail's byte and line counts are no longer limited to OFF_T_MAX.
Now the limit is UINTMAX_MAX (usually 2^64).
- split can now handle --bytes=N and --lines=N with N=2^31 or more.
** Portability
- `kill -t' now prints signal descriptions (rather than `?') on systems
like Tru64 with __sys_siglist but no strsignal function.
- stat.c now compiles on Ultrix systems
- sleep now works on AIX systems that lack support for clock_gettime
- rm now works around Darwin6.5's broken readdir function
Before `rm -rf DIR' would fail to remove all files in DIR
if there were more than 338.
* Major changes in release 5.0:
- false --help now exits nonzero
[4.5.12]
* printf no longer treats \x specially when POSIXLY_CORRECT is set

17
README
View File

@@ -7,7 +7,7 @@ arbitrary limits.
The programs that can be built with this package are:
basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
[ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
df dir dircolors dirname du echo env expand expr factor false fmt fold
ginstall groups head hostid hostname id join kill link ln logname ls
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
@@ -73,9 +73,6 @@ Here is one possible patch to correct the problem.
-#ifndef __STDC_32_MODE__
+#ifndef __LP64__
I've heard that stat.c doesn't compile on Ultrix 4.3.
Does anyone with access to such a system want to investigate?
On some systems, some of the tests fail when run as root. All failures
I've seen appear to be due to problems in the testing framework, not
in the tools themselves. I'll address that for the next release by
@@ -90,11 +87,17 @@ If you see a problem that you've already reported, feel free to re-report
it -- it won't bother me to get a reminder. Besides, the more messages I
get regarding a particular problem the sooner it'll be fixed -- usually.
If you sent a complete patch and, after a couple weeks you haven't
received any acknowledgement please ping us. A complete patch includes
received any acknowledgement, please ping us. A complete patch includes
a well-written ChangeLog entry, unified (diff -u format) diffs relative
to the most recent test release, an explanation for why the patch is
to the most recent test release (or, better, relative to the latest
sources in the CVS repository), an explanation for why the patch is
necessary or useful, and if at all possible, enough information to
reproduce whatever problem prompted it.
reproduce whatever problem prompted it. Plus, you'll earn lots of
karma if you include a test case to exercise any bug(s) you fix.
Instructions for checking out the latest source via CVS are here:
http://savannah.gnu.org/cvs/?group=coreutils
If your patch adds a new feature, please try to get some sort of consensus
that it is a worthwhile change. One way to do that is to send mail to

22
THANKS
View File

@@ -33,6 +33,7 @@ Andrew Burgess aab@cichlid.com
Andrew Dalke dalke@bioreason.com
Andrew Pham andpha@us.ibm.com
Andrew Tridgell tridge@samba.org
Andrey Borzenkov arvidjaar@mail.ru
Andries Brouwer Andries.Brouwer@cwi.nl
Andy Longton alongton@metamark.com
Antonio Rendas ajrendas@yahoo.com
@@ -47,11 +48,15 @@ Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
Axel Kittenberger Anshil@gmx.net
Bauke Jan Douma bjdouma@xs4all.nl
Ben Elliston bje@air.net.au
Ben Harris bjh21@netbsd.org
Bengt Martensson bengt@mathematik.uni-Bremen.de
Bernard Giroud bernard.giroud@creditlyonnais.ch
Bernd Leibing bernd.leibing@rz.uni-ulm.de
Bernd Melchers melchers@cis.fu-berlin.de
Bernhard Baehr bernhard.baehr@gmx.de
Bernhard Gabler bernhard@uni-koblenz.de
Bernhard Rosenkraenzer bero@redhat.de
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
Bill Peters peters@gaffel.as.arizona.edu
Bjorn Helgaas helgaas@rsn.hp.com
Bob McCracken kerouac@ravenet.com
@@ -60,6 +65,7 @@ Branden Robinson branden@necrotic.deadbeast.net
Brendan O'Dea bod@compusol.com.au
Brian Kimball bfk@footbag.org
Brian Youmans 3diff@gnu.org
Bruce Korb bkorb@veritas.com
Bruno Haible haible@clisp.cons.org
Carl Johnson carlj@cjlinux.home.org
Carl Lowenstein cdl@mpl.UCSD.EDU
@@ -69,6 +75,7 @@ Charles Randall crandall@matchlogic.com
Chip Salzenberg chip@valinux.com
Chris Faylor cgf@cygnus.com
Chris J. Bednar cjb@AdvancedDataSolutions.com
Chris Lesniewski ctl@mit.edu
Chris Sylvain csylvain@umm.edu
Chris Yeo cyeo@biking.org
Christi Alice Scarborough christi@chiark.greenend.org.uk
@@ -91,6 +98,7 @@ Darren Salt ds@youmustbejoking.demon.co.uk
Dave Beckett dajobe@dajobe.org
David Dyck dcd@tc.fluke.COM
David Eisner cradle@umd.edu
David Flynn dav@chess.plus.com
David Godfrey dave@delta.demon.co.uk
David Luyer david_luyer@pacific.net.au
Deepak Goel deego@gnufans.org
@@ -99,6 +107,7 @@ Derek Clegg dclegg@next.com
Dick Streefland dick_streefland@tasking.com
Dirk Lattermann dlatt@t-online.de
Dirk-Jan Faber djfaber@snow.nl
Dmitry Rutsky rutsky@school.ioffe.rssi.ru
Dmitry V. Levin ldv@altlinux.org
Don Parsons dparsons@synapse.kent.edu
Donni Erpel donald@appc11.gsi.de
@@ -175,8 +184,10 @@ Jarkko Hietaniemi jhi@epsilon.hut.fi
Jean Charles Delepine delepine@u-picardie.fr
Jeff Moore jbm@mordor.com
Jeff Sheinberg jeffsh@localnet.com
Jens Elkner elkner@imsgroup.de
Jens Schmidt jms@jsds.hamburg.com
Jerome Abela abela@hsc.fr
Jérôme Zago bug-coreutils-ml@agt-the-walker.net
Jesse Thilo jgt2@eecs.lehigh.edu
Jie Xu xuj@iag.net
Jim Blandy jimb@cyclic.com
@@ -211,8 +222,9 @@ Karl Heuer kwzh@gnu.org
Karl-Michael Schneider schneide@phil.uni-passau.de
Karsten Thygesen karthy@kom.auc.dk
Kaveh R. Ghazi ghazi@caip.rutgers.edu
Keith M. Briggs keith.briggs@bt.com
Keith Owens kaos@audio.apana.org.au
Keith Thompson kst@sdsc.edu
Keith Thompson kst@cts.com
Ken Pizzini kenp@halcyon.com
Kristin E Thomas kristint@us.ibm.com
Kjetil Torgrim Homme kjetilho@ifi.uio.no
@@ -223,6 +235,7 @@ Lehti Rami rammer@cs.tut.fi
Leonard N. Zubkoff lnz@dandelion.com
Leonardo Milano lmilano@udel.edu
Lorne Baker lbaker@nitro.avint.net
Luke Hassell lukehassell@yahoo.com
M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp
Maciej Kwapulinski pikpok@univ.gda.pl
Manas Garg manas@cygsoft.com
@@ -261,6 +274,7 @@ Matthew S. Levine mslevine@theory.lcs.mit.edu
Matthew Smith matts@bluesguitar.org
Matthew Swift swift@alum.mit.edu
Matthias Urlichs smurf@noris.de
Matti Aarnio matti.aarnio@zmailer.org
Mattias Wadenstein maswan@acc.umu.se
Meelis Roos mroos@tartu.cyber.ee
Michael ??? michael@roka.net
@@ -294,6 +308,7 @@ Nick Lawes nlawes@silverplatter.com
Niklas Edmundsson nikke@acc.umu.se
Noah Friedman friedman@splode.com
Noel Cragg noel@red-bean.com
Olatunji Oluwabukunmi Ruwase tjruwase@stanford.edu
Olav Morkrid olav@funcom.com
Ole Laursen olau@hardworking.dk
Oliver Kiddle okiddle@yahoo.co.uk
@@ -335,6 +350,7 @@ Rick Sladkey jrs@world.std.com
Rik Faith faith@cs.unc.edu
Risto Kankkunen kankkune@lingsoft.fi
Robert H. de Vries robert@and.nl
Robert Millan zeratul2@wanadoo.es
Rogier Wolff R.E.Wolff@BitWizard.nl
Roland Huebner ro-huebner@gmx.de
Roland Turner raz@raz.cx
@@ -343,6 +359,7 @@ Ross Alexander r.alexander@auckland.ac.nz
Ross Paterson rap@doc.ic.ac.uk
Ross Ridge rridge@calum.csclub.uwaterloo.ca
Sami Farin sfarin@ratol.fi
Samuel Tardieu sam@rfc1149.net
Samuli Karkkainen Samuli.Karkkainen@hut.fi
Sander van Malssen svm@kozmix.ow.nl
Santiago Vila Doncel sanvila@unex.es
@@ -359,6 +376,7 @@ Stephen Gildea gildea@stop.mail-abuse.org
Stephen Smoogen smooge@mindspring.com
Steve McConnel steve@acadcomp.sil.org
Steven G. Johnson stevenj@alum.mit.edu
Steven Mocking ufo@quicknet.nl
Steven P Watson steven@magelico.net
Stuart Kemp skemp@peter.bmc.com
Tadayoshi Funaba tadf@kt.rim.or.jp
@@ -368,6 +386,7 @@ Thomas Bushnell thomas@gnu.ai.mit.edu
Thomas Goerlich thomas@schnappmatik.de
Thomas Quinot thomas@Cuivre.FR.EU.ORG
Tim J. Robbins tjr@FreeBSD.org
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Tim Smithers mouse@dmouse.com.au
Tim Waugh twaugh@redhat
Todd A. Jacobs tjacobs@codegnome.org
@@ -386,6 +405,7 @@ Uwe H. Steinfeld usteinfeld@gmx.net
Vesselin Atanasov vesselin@bgnet.bg
Vin Shelton acs@alumni.princeton.edu
Volker Borchert bt@teknon.de
Wartan Hachaturow wart@tepkom.ru
Wayne Stewart wstewa@atl.com
Wenjun Zheng zwj@yahoo.com
Werner Almesberger Werner.Almesberger@epfl.ch

55
TODO
View File

@@ -23,10 +23,6 @@ And once that's done, add an exclusion so that `cp --link'
no longer incurs the overhead of saving src. dev/ino and dest. filename
in the hash table.
Apply suggestion from Paul Jarc to use something along the
lines of http://cr.yp.to/daemontools/setuidgid.html to avoid
kludges (as in tests/rm/fail-2eperm) when running tests as root.
See if we can be consistent about where --verbose sends its output:
These all send --verbose output to stdout:
head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln
@@ -37,14 +33,9 @@ See if we can be consistent about where --verbose sends its output:
Write an autoconf test to work around build failure in HPUX's 64-bit mode.
See notes in README -- and remove them once there's a work-around.
after 5.0, change doc strings (like df, ls, etc) not to use `,'
as thousands separator in e.g. 1,000,000. Instead, do this:
SIZE may be (or may be an integer optionally followed by) one of following:
kB 1000, K 1024, MB 1000*1000, M 1024*1024 and so on for G, T, P, E, Z, Y.
Integrate use of sendfile, suggested here:
http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
I don't plan to do that, since a few tests demonstrate no significant benefit.
Should printf '\0123' print "\n3"?
per report from TAKAI Kousuke on Mar 27
@@ -54,8 +45,6 @@ printf: consider adapting builtins/printf.def from bash
df: add `--total' option, suggested here http://bugs.debian.org/186007
Martin Michlmayr's patch to provide ls with `--sort directory' option
seq: give better diagnostics for invalid formats:
e.g. no or too many % directives
seq: consider allowing format string to contain no %-directives
@@ -64,16 +53,36 @@ dd: consider adding an option to suppress `bytes/block read/written'
output to stderr. Suggested here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
nl: fix this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177256
# printf 'a\n\n'|nl|cat -A
1^Ia$
$
$
m4: rename all macros that start with AC_ to start with another prefix
Consider using an autoconf test and rename wrapper to make mv work
properly (by unlinking a) in cases like this:
: > a; ln a b; mv a b
Reported by Ed Avis: http://article.gmane.org/gmane.comp.gnu.fileutils.bugs/686
resolve RH report on cp -a forwarded by Tim Waugh
Martin Michlmayr's patch to provide ls with `--sort directory' option
Remove uses of PROTOTYPES
tail: don't use xlseek; it *exits*.
Instead, maybe use a macro and return nonzero.
add mktemp? Suggested by Nelson Beebe
Now that AC_FUNC_LSTAT and AC_FUNC_STAT are in autoconf,
remove m4/stat.m4 and m4/lstat.m4.
df: alignment problem of `Used' heading with e.g., -mP
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
fix tail -f to work with named pipes; reported by Ian D. Allen
lib/strftime.c: Since %N is the only format that we need but that
glibc's strftime doesn't support, consider using a wrapper that
would expand /%(-_)?\d*N/ to the desired string and then pass the
resulting string to glibc's strftime.
chown-core.c: warn when operating on set-UID or set-GID regular file
sort: Compress temporary files when doing large external sort/merges.
This improves performance when you can compress/uncompress faster than
you can read/write, which is common in these days of fast CPUs.
suggestion from Charles Randall on 2001-08-10

1253
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@ use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
(my $VERSION = '$Revision: 1.13 $ ') =~ tr/[0-9].//cd;
(my $VERSION = '$Revision: 1.16 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
@@ -252,8 +252,8 @@ EOF
print "\nHere are GPG detached signatures:\n";
foreach my $url (@url_dir_list)
{
print " $url/$tgz.sig\n";
print " $url/$tbz.sig\n";
print " $url/$tgz.asc\n";
print " $url/$tbz.asc\n";
}
# FIXME: clean up upon interrupt or die
@@ -303,7 +303,10 @@ EOF
{
if ( ! $in_items)
{
$line =~ /^[^ *].*\Q$curr_version\E/o
# Match lines like this one:
# * Major changes in release 5.0.1:
# but not any other line that starts with a space, *, or -.
$line =~ /^(\* Major changes.*|[^ *-].*)\Q$curr_version\E/o
or next;
$in_items = 1;
print $line;
@@ -313,7 +316,7 @@ EOF
# Be careful that this regexp cannot match version numbers
# in NEWS items -- they might well say `introduced in 4.5.5',
# and we don't want that to match.
$line =~ /^[^ *].*\Q$prev_version\E/o
$line =~ /^(\* Major changes.*|[^ *-].*)\Q$prev_version\E/o
and last;
print $line;
}
@@ -321,7 +324,7 @@ EOF
close NEWS;
$in_items
or die "$ME: $news_file: no matching lines\n";
or die "$ME: $news_file: no matching lines for `$curr_version'\n";
}
$release_type eq 'major'

View File

@@ -323,6 +323,10 @@
don't. */
#undef HAVE_DECL___FPENDING
/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL___SYS_SIGLIST
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -459,9 +463,16 @@
/* Define to 1 if you have the `initgroups' function. */
#undef HAVE_INITGROUPS
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_INTMAX_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define to 1 if you have the `isascii' function. */
#undef HAVE_ISASCII
@@ -513,8 +524,7 @@
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* Define to 1 if long double works and has more range or precision than
double. */
/* Define if you have the 'long double' type. */
#undef HAVE_LONG_DOUBLE
/* Define to 1 if you support file names longer than 14 characters. */
@@ -607,6 +617,12 @@
/* Define to 1 if you have the `next_dev' function. */
#undef HAVE_NEXT_DEV
/* Define to 1 if you have the <nfs/nfs_clnt.h> header file. */
#undef HAVE_NFS_NFS_CLNT_H
/* Define to 1 if you have the <nfs/vfs.h> header file. */
#undef HAVE_NFS_VFS_H
/* Define to 1 if you have the <nlist.h> header file. */
#undef HAVE_NLIST_H
@@ -631,6 +647,9 @@
/* Define to 1 if you have the `pstat_getstatic' function. */
#undef HAVE_PSTAT_GETSTATIC
/* Define to 1 if the system has the type `ptrdiff_t'. */
#undef HAVE_PTRDIFF_T
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
@@ -656,6 +675,9 @@
/* Define to 1 if you have the `rpmatch' function. */
#undef HAVE_RPMATCH
/* Define to 1 if you have run the test for working tzset. */
#undef HAVE_RUN_TZSET_TEST
/* Define to 1 if you have the `sethostname' function. */
#undef HAVE_SETHOSTNAME
@@ -674,6 +696,9 @@
/* Define to 1 if you have the `sig2str' function. */
#undef HAVE_SIG2STR
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the `sqrt' function. */
#undef HAVE_SQRT
@@ -694,6 +719,10 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the <stdio_ext.h> header file. */
#undef HAVE_STDIO_EXT_H
@@ -1019,6 +1048,9 @@
/* Define to 1 if you have the `tzset' function. */
#undef HAVE_TZSET
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_UINTMAX_T
/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME
@@ -1058,12 +1090,21 @@
/* Define to 1 if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define to 1 if you have the `vasnprintf' function. */
#undef HAVE_VASNPRINTF
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Define if you have the 'wchar_t' type. */
#undef HAVE_WCHAR_T
/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
@@ -1073,9 +1114,18 @@
/* Define to 1 if you have the `wcwidth' function. */
#undef HAVE_WCWIDTH
/* Define if you have the 'wint_t' type. */
#undef HAVE_WINT_T
/* Define to 1 if you have the `wmempcpy' function. */
#undef HAVE_WMEMPCPY
/* Define if readdir is found to work properly in some unusual cases. */
#undef HAVE_WORKING_READDIR
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* Define to 1 if you have the external variable, _system_configuration with a
member named physmem. */
#undef HAVE__SYSTEM_CONFIGURATION
@@ -1275,6 +1325,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Define if tzset clobbers localtime's static buffer. */
#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
/* Define to 1 for Encore UMAX. */
#undef UMAX
@@ -1350,6 +1403,9 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to rpl_gmtime if the replacement function should be used. */
#undef gmtime
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
#undef inline
@@ -1357,7 +1413,7 @@
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef ino_t
/* Define to widest signed type if <inttypes.h> doesn't define. */
/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
#undef intmax_t
/* Define to rpl_localtime if the replacement function should be used. */
@@ -1412,16 +1468,23 @@
supported. Do not define if restrict is supported directly. */
#undef restrict
/* Define to empty if the C compiler doesn't support this keyword. */
#undef signed
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
/* Define to rpl_tzset if the wrapper function should be used. */
#undef tzset
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define to widest unsigned type if <inttypes.h> doesn't define. */
/* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */
#undef uintmax_t
/* Define to empty if the keyword `volatile' does not work. Warning: valid

View File

@@ -1,3 +1,8 @@
2003-04-21 Jim Meyering <jim@meyering.net>
* depcomp: New version, now that this file is now on the list
in ../Makefile.cfg.
2003-01-12 Jim Meyering <jim@meyering.net>
Lots of syntactic clean-up, mostly from Karl Berry.

31
config/config.guess vendored
View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-02-22'
timestamp='2003-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -282,6 +283,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -320,6 +324,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -744,7 +751,7 @@ EOF
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -756,7 +763,10 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
# GNU/FreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -767,8 +777,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
x86:Interix*:3*)
echo i586-pc-interix3
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -797,6 +807,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -875,6 +888,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -1033,7 +1049,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1189,6 +1205,9 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

39
config/config.sub vendored
View File

@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2003-02-22'
timestamp='2003-07-04'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -229,7 +229,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| clipper \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
@@ -261,7 +261,7 @@ case $basic_machine in
| sh64 | sh64le \
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic80 | tron \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -373,6 +373,9 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -768,18 +771,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2)
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
@@ -838,6 +847,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
@@ -845,6 +858,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -919,10 +935,6 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic4x | c4x*)
basic_machine=tic4x-unknown
os=-coff
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
@@ -1116,7 +1128,7 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
@@ -1128,7 +1140,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix*)
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1274,6 +1286,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -206,6 +206,44 @@ aix)
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -240,8 +278,8 @@ tru64)
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -265,9 +303,7 @@ dashmstdout)
shift
fi
# Remove `-o $object'. We will use -o /dev/null later,
# however we can't do the remplacement now because
# `-o $object' might simply not be used
# Remove `-o $object'.
IFS=" "
for arg
do
@@ -287,7 +323,11 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -306,6 +346,13 @@ dashXmstdout)
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
@@ -318,7 +365,9 @@ makedepend)
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
-*)
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;

View File

@@ -1,21 +1,38 @@
#!/bin/sh
# install - install a program, script, or datafile
# This originally came from X11R5 (mit/util/scripts/install.sh).
scriptversion=2003-01-17.15
scriptversion=2003-06-13.21
# Copyright 1991 by the Massachusetts Institute of Technology
# (FSF changes in the public domain.)
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -213,8 +230,8 @@ else
test -z "$dstfile" && dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0

View File

@@ -1,20 +1,26 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# Public domain.
scriptversion=2003-06-14.23
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
"
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
echo "$usage"
exit 0
;;
-m) # -m PERM arg
@@ -23,6 +29,10 @@ while test $# -gt 0 ; do
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
@@ -84,17 +94,17 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
@@ -107,5 +117,8 @@ exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
# mkinstalldirs ends here

View File

@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2003-03-22.08}
\def\texinfoversion{2003-05-04.08}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@@ -34,12 +34,12 @@
% ftp://tug.org/tex/texinfo.tex
% (and all CTAN mirrors, see http://www.ctan.org),
% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
%
%
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
%
%
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
%
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
% problem. Patches are, of course, greatly appreciated.
@@ -55,7 +55,7 @@
% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
%
% It is possible to adapt texinfo.tex for other languages, to some
% extent. You can get the existing language-specific files from the
% full Texinfo distribution.
@@ -88,6 +88,7 @@
\let\ptexgtr=>
\let\ptexhat=^
\let\ptexi=\i
\let\ptexindent=\indent
\let\ptexlbrace=\{
\let\ptexless=<
\let\ptexplus=+
@@ -204,7 +205,7 @@
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
%
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
\removelastskip\penalty-50\smallskip\fi\fi}
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
@@ -569,7 +570,7 @@
% explicit \vfill so that the extra space is at the bottom. The
% threshold for doing this is if the group is more than \vfilllimit
% percent of a page (\vfilllimit can be changed inside of @tex).
%
%
\newbox\groupbox
\def\vfilllimit{0.7}
%
@@ -775,10 +776,10 @@ where each line of input produces a line of output.}
% @inmargin{TEXT [, RIGHT-TEXT]}
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
% else use TEXT for both).
%
%
\def\inmargin#1{\parseinmargin #1,,\finish}
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
\setbox0 = \hbox{\ignorespaces #2}%
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\def\lefttext{#1}% have both texts
\def\righttext{#2}%
@@ -847,8 +848,9 @@ where each line of input produces a line of output.}
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
% We cannot implement @paragraphindent asis, though.
%
% NCHARS can also be the word `asis' or `none'.
% We cannot feasibly implement @paragraphindent asis, though.
%
\def\asisword{asis} % no translation, these are keywords
\def\noneword{none}
%
@@ -883,6 +885,53 @@ where each line of input produces a line of output.}
\fi
}
% @firstparagraphindent WORD
% If WORD is `none', then suppress indentation of the first paragraph
% after a section heading. If WORD is `insert', then do indentat such
% paragraphs.
%
% The paragraph indentation is suppressed or not by calling
% \suppressfirstparagraphindent, which the sectioning commands do. We
% switch the definition of this back and forth according to WORD. By
% default, we suppress indentation.
%
\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
\newdimen\currentparindent
%
\def\insertword{insert}
%
\def\firstparagraphindent{\parsearg\dofirstparagraphindent}
\def\dofirstparagraphindent#1{%
\def\temp{#1}%
\ifx\temp\noneword
\let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
\else\ifx\temp\insertword
\let\suppressfirstparagraphindent = \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @firstparagraphindent option `\temp'}%
\fi\fi
}
% Here is how we actually suppress indentation. Redefine \everypar to
% \kern backwards by \parindent, and then reset itself to empty.
%
% We also make \indent itself not actually do anything until the next
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
\gdef\indent{%
\global\let\indent=\ptexindent
\global\everypar = {}%
}%
\global\everypar = {%
\kern-\parindent
\global\let\indent=\ptexindent
\global\everypar = {}%
}%
}%
% @asis just yields its argument. Used with @table, for example.
%
\def\asis#1{#1}
@@ -891,14 +940,14 @@ where each line of input produces a line of output.}
% We don't use $'s directly in the definition of \math because we need
% to set catcodes according to plain TeX first, to allow for subscripts,
% superscripts, special math chars, etc.
%
%
\let\implicitmath = $%$ font-lock fix
%
% One complication: _ usually means subscripts, but it could also mean
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
% _ within @math be active (mathcode "8000), and distinguish by seeing
% if the current family is \slfam, which is what @var uses.
%
%
{\catcode\underChar = \active
\gdef\mathunderscore{%
\catcode\underChar=\active
@@ -909,7 +958,7 @@ where each line of input produces a line of output.}
% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
% this is not advertised and we don't care. Texinfo does not
% otherwise define @\.
%
%
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
@@ -924,7 +973,7 @@ where each line of input produces a line of output.}
% Some active characters (such as <) are spaced differently in math.
% We have to reset their definitions in case the @math was an
% argument to a command which set the catcodes (such as @item or @section).
%
%
{
\catcode`^ = \active
\catcode`< = \active
@@ -1050,8 +1099,8 @@ where each line of input produces a line of output.}
\def\pdfmakeoutlines{{%
\openin 1 \jobname.toc
\ifeof 1\else\begingroup
\closein 1
% Thanh's hack / proper braces in bookmarks
\closein 1
% Thanh's hack / proper braces in bookmarks
\edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
@@ -1080,7 +1129,7 @@ where each line of input produces a line of output.}
\let\unnumbsubsubsecentry = \subsubsecentry
%
% Make special characters normal for writing to the pdf file.
%
%
\indexnofonts
\let\tt=\relax
\turnoffactive
@@ -1095,7 +1144,7 @@ where each line of input produces a line of output.}
\let\nextmakelinks=\makelinks
\ifnum\lnkcount>0,\fi
\picknum{#1}%
\startlink attr{/Border [0 0 0]}
\startlink attr{/Border [0 0 0]}
goto name{\pdfmkpgn{\the\pgn}}%
\linkcolor #1%
\advance\lnkcount by 1%
@@ -1150,7 +1199,7 @@ where each line of input produces a line of output.}
\ifx\first0\adn0
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else
\ifnum0=\countA\else\makelink\fi
\ifx\first.\let\next=\done\else
@@ -1404,12 +1453,12 @@ where each line of input produces a line of output.}
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
% For me, subjectively, the few extra characters that fit aren't worth
% the additional smallness of 8pt. So I'm making the default 9pt.
%
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
%
%
% I wish we used A4 paper on this side of the Atlantic.
%
%
% --karl, 24jan03.
@@ -1435,7 +1484,8 @@ where each line of input produces a line of output.}
% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
% unless the following character is such as not to need one.
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
\ptexslash\fi\fi\fi}
\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
@@ -1458,7 +1508,7 @@ where each line of input produces a line of output.}
% Set sfcode to normal for the chars that usually have another value.
% Can't use plain's \frenchspacing because it uses the `\x notation, and
% sometimes \x has an active definition that messes things up.
%
%
\catcode`@=11
\def\frenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
@@ -1567,7 +1617,7 @@ where each line of input produces a line of output.}
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
\errmessage{Unknown @kbdinputstyle `\arg'}%
\errmessage{Unknown @kbdinputstyle option `\arg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
@@ -1618,7 +1668,7 @@ where each line of input produces a line of output.}
% rms does not like angle brackets --karl, 17may97.
% So now @email is just like @uref, unless we are pdf.
%
%
%\def\email#1{\angleleft{\tt #1}\angleright}
\ifpdf
\def\email#1{\doemail#1,,\finish}
@@ -1667,7 +1717,7 @@ where each line of input produces a line of output.}
% we'd have to redo the font mechanism to change the \scriptstyle and
% \scriptscriptstyle font sizes to make it look right in headings.
% Adapted from the plain.tex definition of \copyright.
%
%
\def\registeredsymbol{%
$^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}%
}$%
@@ -2085,18 +2135,21 @@ where each line of input produces a line of output.}
\itemizey {#1}{\Eitemize}
}
\def\itemizey #1#2{%
\aboveenvbreak %
\itemmax=\itemindent %
\advance \itemmax by -\itemmargin %
\advance \leftskip by \itemindent %
\exdentamount=\itemindent
\parindent = 0pt %
\parskip = \smallskipamount %
\ifdim \parskip=0pt \parskip=2pt \fi%
\def#2{\endgraf\afterenvbreak\endgroup}%
\def\itemcontents{#1}%
\let\item=\itemizeitem}
\def\itemizey#1#2{%
\aboveenvbreak
\itemmax=\itemindent
\advance\itemmax by -\itemmargin
\advance\leftskip by \itemindent
\exdentamount=\itemindent
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
\def#2{\endgraf\afterenvbreak\endgroup}%
\def\itemcontents{#1}%
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
\let\item=\itemizeitem
}
% \splitoff TOKENS\endmark defines \first to be the first token in
% TOKENS, and \rest to be the remainder.
@@ -2507,12 +2560,12 @@ width0pt\relax} \fi
% @deffn ...
% @end deffn
% @end ignore
%
%
% The @end deffn is going to get expanded, because we're trying to allow
% nested conditionals. But we don't want to expand the actual @deffn,
% since it might be syntactically correct and intended to be ignored.
% Since \end checks for \relax, using \empty does not cause an error.
%
%
\def\ignoremorecommands{%
\let\defcodeindex = \relax
\let\defcv = \empty
@@ -2917,10 +2970,10 @@ width0pt\relax} \fi
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
%
%
% @syncodeindex foo bar similar, but put all entries made for index foo
% inside @code.
%
%
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
@@ -2962,13 +3015,13 @@ width0pt\relax} \fi
% Take care of Texinfo commands that can appear in an index entry.
% Since there are some commands we want to expand, and others we don't,
% we have to laboriously prevent expansion for those that we don't.
%
%
\def\indexdummies{%
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
%
@@ -2977,14 +3030,14 @@ width0pt\relax} \fi
% words, not control letters, because the \space would be incorrect
% for control characters, but is needed to separate the control word
% from whatever follows.
%
%
% For control letters, we have \definedummyletter, which omits the
% space.
%
%
% These can be used both for control words that take an argument and
% those that do not. If it is followed by {arg} in the input, then
% that will dutifully get written to the index (or wherever).
%
%
\def\definedummyword##1{%
\expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
}%
@@ -2997,9 +3050,9 @@ width0pt\relax} \fi
}
% For the aux file, @ is the escape character. So we want to redefine
% everything using @ instead of \realbackslash. When everything uses
% everything using @ instead of \realbackslash. When everything uses
% @, this will be simpler.
%
%
\def\atdummies{%
\def\@{@@}%
\def\ {@ }%
@@ -3020,7 +3073,7 @@ width0pt\relax} \fi
% Called from \indexdummies and \atdummies. \definedummyword and
% \definedummyletter must be defined first.
%
%
\def\commondummies{%
%
\normalturnoffactive
@@ -3340,6 +3393,7 @@ width0pt\relax} \fi
%
\smallfonts \rm
\tolerance = 9500
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
\indexbreaks
%
% See if the index file exists and is nonempty.
@@ -3583,7 +3637,7 @@ width0pt\relax} \fi
\wd0=\hsize \wd2=\hsize
\hbox to\pagewidth{\box0\hfil\box2}%
}
%
%
% All done with double columns.
\def\enddoublecolumns{%
\output = {%
@@ -3721,6 +3775,7 @@ width0pt\relax} \fi
\numberedsubsubseczzz{#2}
\fi
\fi
\suppressfirstparagraphindent
}
% like \numhead, but chooses appendix heading levels
@@ -3740,6 +3795,7 @@ width0pt\relax} \fi
\appendixsubsubseczzz{#2}
\fi
\fi
\suppressfirstparagraphindent
}
% like \numhead, but chooses numberless heading levels
@@ -3759,6 +3815,7 @@ width0pt\relax} \fi
\unnumberedsubsubseczzz{#2}
\fi
\fi
\suppressfirstparagraphindent
}
% @chapter, @appendix, @unnumbered.
@@ -4371,7 +4428,7 @@ width0pt\relax} \fi
% @foo ... @end foo.
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
%
%
% Since these characters are used in examples, it should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
%
@@ -4383,7 +4440,7 @@ width0pt\relax} \fi
% The @error{} command.
% Adapted from the TeXbook's \boxit.
%
%
\newbox\errorbox
%
{\tentt \global\dimen0 = 3em}% Width of the box.
@@ -4430,6 +4487,7 @@ width0pt\relax} \fi
\let\equiv=\ptexequiv
\let\!=\ptexexclam
\let\i=\ptexi
\let\indent=\ptexindent
\let\{=\ptexlbrace
\let\+=\tabalign
\let\}=\ptexrbrace
@@ -4683,7 +4741,7 @@ width0pt\relax} \fi
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
% If we want to allow any <char> as delimiter,
% If we want to allow any <char> as delimiter,
% we need the curly braces so that makeinfo sees the @verb command, eg:
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
%
@@ -4761,8 +4819,8 @@ width0pt\relax} \fi
\everypar{\starttabbox}%
}
% Do the @verb magic: verbatim text is quoted by unique
% delimiter characters. Before first delimiter expect a
% Do the @verb magic: verbatim text is quoted by unique
% delimiter characters. Before first delimiter expect a
% right brace, after last delimiter expect closing brace:
%
% \def\doverb'{'<char>#1<char>'}'{#1}
@@ -4781,7 +4839,7 @@ width0pt\relax} \fi
%
% \def\doverbatim#1@end verbatim{#1}
%
% For Texinfo it's a lot easier than for LaTeX,
% For Texinfo it's a lot easier than for LaTeX,
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
% we need not redefine '\', '{' and '}'.
%
@@ -4848,14 +4906,14 @@ width0pt\relax} \fi
% @copying ... @end copying.
% Save the text away for @insertcopying later. Many commands won't be
% allowed in this context, but that's ok.
%
%
% We save the uninterpreted tokens, rather than creating a box.
% Saving the text in a box would be much easier, but then all the
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
% possible is very desirable.
%
%
\def\copying{\begingroup
% Define a command to swallow text until we reach `@end copying'.
% \ is the escape char in this texinfo.tex file, so it is the
@@ -4878,15 +4936,15 @@ width0pt\relax} \fi
% end-of-line to be a \par, as would happen with the normal active
% definition of ^^M. On the third hand, two ^^M's in a row should still
% generate a \par.
%
%
% Our approach is to make ^^M insert a space and a penalty1 normally;
% then it can also check if \lastpenalty=1. If it does, then manually
% do \par.
%
%
% This messes up the normal definitions of @c[omment], so we redefine
% it. Similarly for @ignore. (These commands are used in the gcc
% manual for man page generation.)
%
%
% Seems pretty fragile, most line-oriented commands will presumably
% fail, but for the limited use of getting the copying text (which
% should be quite simple) inserted, we can hope it's ok.
@@ -4927,7 +4985,7 @@ width0pt\relax} \fi
\newcount\parencount
% We want ()&[] to print specially on the defun line.
%
%
\def\activeparens{%
\catcode`\(=\active \catcode`\)=\active
\catcode`\&=\active
@@ -5030,7 +5088,7 @@ width0pt\relax} \fi
% #1 is the \E... control sequence to end the definition (which we define).
% #2 is the \...x control sequence (which our caller defines).
% #3 is the control sequence to process the header, such as \defunheader.
%
%
\def\parsebodycommon#1#2#3{%
\begingroup\inENV
% If there are two @def commands in a row, we'll have a \nobreak,
@@ -5053,7 +5111,7 @@ width0pt\relax} \fi
}
% Common part of the \...x definitions.
%
%
\def\defxbodycommon{%
% As with \parsebodycommon above, allow line break if we have multiple
% x headers in a row. It's not a great place, though.
@@ -5104,7 +5162,7 @@ width0pt\relax} \fi
% to account for this both in the \...x definition and in parsing the
% input at hand. Thus also need a control sequence (passed as #5) for
% the \E... definition to assign the category name to.
%
%
\def\deftypeopparsebody#1#2#3#4#5 #6 {%
\parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 ##3 {\def#4{##1}%
@@ -5209,7 +5267,7 @@ width0pt\relax} \fi
}
% This expands the args and terminates the paragraph they comprise.
%
%
\def\defunargs#1{\functionparens \sl
% Expand, preventing hyphenation at `-' chars.
% Note that groups don't affect changes in \hyphenchar.
@@ -5471,7 +5529,7 @@ width0pt\relax} \fi
% These definitions are used if you use @defunx (etc.)
% anywhere other than immediately after a @defun or @defunx.
%
%
\def\defcvx#1 {\errmessage{@defcvx in invalid context}}
\def\deffnx#1 {\errmessage{@deffnx in invalid context}}
\def\defivarx#1 {\errmessage{@defivarx in invalid context}}
@@ -5643,7 +5701,7 @@ width0pt\relax} \fi
% Called by \do from \dounmacro on each macro. The idea is to omit any
% macro definitions that have been changed to \relax.
%
%
\def\unmacrodo#1{%
\ifx#1\relax
% remove this
@@ -5838,14 +5896,14 @@ width0pt\relax} \fi
% anchor), namely NAME-title (the corresponding @chapter/etc. name),
% NAME-pg (the page number), and NAME-snt (section number and type).
% Called from \foonoderef.
%
%
% We have to set \indexdummies so commands such as @code in a section
% title aren't expanded. It would be nicer not to expand the titles in
% the first place, but there's so many layers that that is hard to do.
%
% Likewise, use \turnoffactive so that punctuation chars such as underscore
% and backslash work in node names.
%
%
\def\setref#1#2{{%
\atdummies
\pdfmkdest{#1}%
@@ -5944,7 +6002,7 @@ width0pt\relax} \fi
% output. It's a separate macro only so it can be changed more easily,
% since not square brackets don't work in some documents. Particularly
% one that Bob is working on :).
%
%
\def\xrefprintnodename#1{[#1]}
% \dosetq is called from \setref to do the actual \write (\iflinks).
@@ -5961,7 +6019,7 @@ width0pt\relax} \fi
\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
% Things to be expanded by \internalsetq.
%
%
\def\Ypagenumber{\folio}
\def\Ytitle{\thissection}
\def\Ynothing{}
@@ -6146,13 +6204,14 @@ width0pt\relax} \fi
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
\let\indent=\ptexindent
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
% In case the footnote comes at the end of a sentence, preserve the
% extra spacing after we do the footnote number.
\let\@sf\empty
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
%
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
@@ -6293,7 +6352,7 @@ width0pt\relax} \fi
\nobreak\bigskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
% above and below.
\nobreak\vskip\parskip
\nobreak
\line\bgroup\hss
@@ -6381,7 +6440,7 @@ should work if nowhere else does.}
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
% physical page width.
%
%
% We also call \setleading{\textleading}, so the caller should define
% \textleading. The caller should also set \parskip.
%
@@ -6449,7 +6508,7 @@ should work if nowhere else does.}
\parskip = 3pt plus 2pt minus 1pt
\textleading = 13.2pt
%
% Double-side printing via postscript on Laserjet 4050
% Double-side printing via postscript on Laserjet 4050
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
% To change the settings for a different printer or situation, adjust
% \normaloffset until the front-side and back-side texts align. Then
@@ -6490,7 +6549,7 @@ should work if nowhere else does.}
\tableindent = 12mm
}}
% A specific text layout, 24x15cm overall, intended for A4 paper.
% A specific text layout, 24x15cm overall, intended for A4 paper.
\def\afourlatex{{\globaldefs = 1
\afourpaper
\internalpagesizes{237mm}{150mm}%
@@ -6666,7 +6725,7 @@ should work if nowhere else does.}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'. (Thus, \ is not expandable when this is in
% effect.)
%
%
@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
% Make _ and + \other characters, temporarily.
@@ -6695,7 +6754,7 @@ should work if nowhere else does.}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
% These look ok in all fonts, so just make them not special.
% These look ok in all fonts, so just make them not special.
@catcode`@& = @other
@catcode`@# = @other
@catcode`@% = @other

2427
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
AC_INIT([GNU coreutils],[5.0],[bug-coreutils@gnu.org])
AC_INIT([GNU coreutils],[5.0.1],[bug-coreutils@gnu.org])
AC_CONFIG_SRCDIR(src/ls.c)
AC_CONFIG_AUX_DIR(config)
@@ -127,8 +127,7 @@ AC_CACHE_VAL(utils_cv_func_setpriority,
AC_MSG_RESULT($utils_cv_func_setpriority)
if test $utils_cv_func_setpriority = yes; then
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice\$(EXEEXT)"
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
MAN="$MAN nice.1 nohup.1"
MAN="$MAN nice.1"
else
AC_MSG_CHECKING(for nice function)
AC_CACHE_VAL(utils_cv_func_nice,
@@ -139,8 +138,7 @@ else
if test $utils_cv_func_nice = yes; then
AC_DEFINE(NICE_PRIORITY, 1, [FIXME])
OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS nice\$(EXEEXT)"
OPTIONAL_BIN_ZCRIPTS="$OPTIONAL_BIN_ZCRIPTS nohup"
MAN="$MAN nice.1 nohup.1"
MAN="$MAN nice.1"
fi
fi
@@ -250,7 +248,7 @@ if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no && \
fi
# For src/kill.c.
AC_CHECK_DECLS([strsignal, strtoimax, sys_siglist, _sys_siglist])
AC_CHECK_DECLS([strsignal, strtoimax, sys_siglist, _sys_siglist, __sys_siglist])
jm_LIB_CHECK

View File

@@ -1,3 +1,82 @@
2003-07-14 Paul Eggert <eggert@twinsun.com>
* doc/coreutils.texi (uname invocation): Explain the POSIX
terminology behind uname -m and uname -s.
2003-07-13 Jim Meyering <jim@meyering.net>
* coreutils.texi (chown invocation): Warn that chown
now clears set-user-ID and set-group-ID bits on some systems.
From Bob Proulx.
(nohup invocation): Tell what happens when stdout is not a terminal.
Based on a suggestion from Steven Mocking.
2003-07-10 Jim Meyering <jim@meyering.net>
* coreutils.texi (Standards conformance): Mention that uses like
`tail -1' and `head -1', like `sort +1', are non conforming.
(chown invocation): Say that using `.' as a separator may not work.
2003-06-25 Jim Meyering <jim@meyering.net>
* coreutils.texi (Time directives) [%s]: Add a cross reference
to the related examples.
(Examples of date): Add an @anchor here, along with a few more examples.
Suggestion from Dan Jacobson.
2003-06-12 Jim Meyering <jim@meyering.net>
* coreutils.texi (wc invocation): Tweak wording: wc prints counts in
the order `newline, word, byte'. Suggestion from Keith M. Briggs.
Also change `lines' to `newlines'.
2003-05-14 Jim Meyering <jim@meyering.net>
* coreutils.texi (head invocation): Document --bytes=-N and --lines=-N.
2003-05-13 Paul Eggert <eggert@twinsun.com>
* coreutils.texi (uniq invocation, squeezing, The uniq command):
Use "repeated" rather than "duplicate" to describe adjacent
duplicates; this simplifies the description and makes it more
consistent with POSIX.
(uniq invocation): Make it clear that -d and -u suppress the
output of lines, rather than cause some lines to be output.
Mention what happens if a line lacks enough fields or characters.
2003-05-13 Jim Meyering <jim@meyering.net>
* coreutils.texi (true invocation): Mention that it is possible to
make true --help or true --version (in non-POSIX mode) exit nonzero.
Suggestion from Paul Eggert.
2003-05-10 Jim Meyering <jim@meyering.net>
* coreutils.texi (Exit status): Remove `uniq' from the list.
It uses standard exit codes.
(More details about version sort): Note that strverscmp, and hence
`ls -v', does not use LC_COLLATE. Reported by From: Andrey Borzenkov.
2003-04-21 Jim Meyering <jim@meyering.net>
Fix printf POSIX compatibility bug reported by Ben Harris in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.
* doc/coreutils.texi (printf invocation): It's \NNN in the format,
\0NNN in the %b operand.
2003-04-10 Jim Meyering <jim@meyering.net>
* Makefile.am (check-texinfo): Check for uses of non-zero.
I prefer to spell it `nonzero'.
* coreutils.texi (readlink invocation): Tweak description a little.
2003-04-04 Jim Meyering <jim@meyering.net>
* Makefile.am (constants.texi): Rename target (thus enabling it),
now that fileutils, textutils, and sh-utils have been merged.
(MAINTAINERCLEANFILES): Define.
2003-04-02 Jim Meyering <jim@meyering.net>
* coreutils.texi (false invocation): Note that false exits

View File

@@ -13,17 +13,13 @@ EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
# old systems.
MAKEINFO = makeinfo --no-split
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
# all been merged into one package.
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c > t-$@
mv t-$@ $@
# Uncomment this when fileutils, textutils, and sh-utils have
# all been merged into one package.
# MAINTAINERCLEANFILES = constants.texi
MAINTAINERCLEANFILES = constants.texi
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
@@ -32,6 +28,7 @@ $(INFO_DEPS): $(EXTRA_DIST)
check-texinfo:
fail=0; \
grep timezone $(srcdir)/*.texi && fail=1; \
grep non-zero $(srcdir)/*.texi && fail=1; \
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \

View File

@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.3 from Makefile.am.
# Makefile.in generated by automake 1.7.6 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@@ -38,6 +38,7 @@ POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -64,6 +65,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -100,7 +102,6 @@ MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -116,6 +117,7 @@ SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQRT_LIBM = @SQRT_LIBM@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
@@ -160,6 +162,8 @@ target_alias = @target_alias@
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
MAINTAINERCLEANFILES = constants.texi
subdir = doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -319,7 +323,6 @@ all-am: Makefile $(INFO_DEPS)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(infodir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -344,6 +347,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am
clean-am: clean-generic mostlyclean-am
@@ -426,18 +430,12 @@ uninstall-am: uninstall-info-am
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
# Remove `DISABLED_' when fileutils, textutils, and sh-utils have
# all been merged into one package.
DISABLED_constants.texi: $(top_srcdir)/src/tail.c
constants.texi: $(top_srcdir)/src/tail.c
LC_ALL=C \
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
$(top_srcdir)/src/tail.c > t-$@
mv t-$@ $@
# Uncomment this when fileutils, textutils, and sh-utils have
# all been merged into one package.
# MAINTAINERCLEANFILES = constants.texi
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
@@ -445,6 +443,7 @@ $(INFO_DEPS): $(EXTRA_DIST)
check-texinfo:
fail=0; \
grep timezone $(srcdir)/*.texi && fail=1; \
grep non-zero $(srcdir)/*.texi && fail=1; \
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \

View File

@@ -112,7 +112,7 @@
* unlink: (coreutils)unlink invocation. Removal via unlink(2).
* users: (coreutils)users invocation. Print current user names.
* vdir: (coreutils)vdir invocation. List directories verbosely.
* wc: (coreutils)wc invocation. Byte, word, and line counts.
* wc: (coreutils)wc invocation. Line, word, and byte counts.
* who: (coreutils)who invocation. Print who is logged in.
* whoami: (coreutils)whoami invocation. Print effective user id.
* yes: (coreutils)yes invocation. Print a string indefinitely.
@@ -225,7 +225,7 @@ Output of parts of files
Summarizing files
* wc invocation:: Print byte, word, and line counts.
* wc invocation:: Print newline, word, and byte counts.
* sum invocation:: Print checksum and block counts.
* cksum invocation:: Print CRC checksum and byte counts.
* md5sum invocation:: Print or check message-digests.
@@ -564,8 +564,7 @@ other exit status values and a few associate different
meanings with the values @samp{0} and @samp{1}.
Here are some of the exceptions:
@command{expr}, @command{false}, @command{nohup}, @command{printenv},
@command{sort}, @command{test}, @command{true}, @command{tty},
@command{uniq}.
@command{sort}, @command{test}, @command{true}, @command{tty}.
@node Backup options
@@ -922,7 +921,8 @@ the year and month the standard was adopted. Two values are currently
supported for @env{_POSIX2_VERSION}: @samp{199209} stands for
@acronym{POSIX} 1003.2-1992, and @samp{200112} stands for @acronym{POSIX}
1003.1-2001. For example, if you are running older software that
assumes an older version of @acronym{POSIX} and uses @samp{sort +1}, you
assumes an older version of @acronym{POSIX} and uses @samp{sort +1},
@samp{head -1}, or @samp{tail +1}, you
can work around the compatibility problems by setting
@samp{_POSIX2_VERSION=199209} in your environment.
@@ -2079,19 +2079,23 @@ The program accepts the following options. Also see @ref{Common options}.
@table @samp
@item -c @var{bytes}
@itemx --bytes=@var{bytes}
@item -c @var{n}
@itemx --bytes=@var{n}
@opindex -c
@opindex --bytes
Print the first @var{bytes} bytes, instead of initial lines. Appending
@samp{b} multiplies @var{bytes} by 512, @samp{k} by 1024, and @samp{m}
Print the first @var{n} bytes, instead of initial lines. Appending
@samp{b} multiplies @var{n} by 512, @samp{k} by 1024, and @samp{m}
by 1048576.
However, if @var{n} starts with a @samp{-},
print all but the last @var{n} bytes of each file.
@itemx -n @var{n}
@itemx --lines=@var{n}
@opindex -n
@opindex --lines
Output the first @var{n} lines.
However, if @var{n} starts with a @samp{-},
print all but the last @var{n} lines of each file.
@item -q
@itemx --quiet
@@ -2503,7 +2507,7 @@ These commands generate just a few numbers representing entire
contents of files.
@menu
* wc invocation:: Print byte, word, and line counts.
* wc invocation:: Print newline, word, and byte counts.
* sum invocation:: Print checksum and block counts.
* cksum invocation:: Print CRC checksum and byte counts.
* md5sum invocation:: Print or check message-digests.
@@ -2511,7 +2515,7 @@ contents of files.
@node wc invocation
@section @command{wc}: Print byte, word, and line counts
@section @command{wc}: Print newline, word, and byte counts
@pindex wc
@cindex byte count
@@ -3272,12 +3276,12 @@ standard input if nothing is given or for an @var{input} name of
uniq [@var{option}]@dots{} [@var{input} [@var{output}]]
@end example
By default, @command{uniq} prints the unique lines in a sorted file, i.e.,
discards all but one of identical successive lines. Optionally, it can
instead show only lines that appear exactly once, or lines that appear
more than once.
By default, @command{uniq} prints its input lines, except that
it discards all but the first of adjacent repeated lines, so that
no output lines are repeated. Optionally, it can instead discard
lines that are not repeated, or all repeated lines.
The input need not be sorted, but duplicate input lines are detected
The input need not be sorted, but repeated input lines are detected
only if they are adjacent. If you want to discard non-adjacent
duplicate lines, perhaps you want to use @code{sort -u}.
@@ -3296,7 +3300,8 @@ The program accepts the following options. Also see @ref{Common options}.
@itemx --skip-fields=@var{n}
@opindex -f
@opindex --skip-fields
Skip @var{n} fields on each line before checking for uniqueness. Fields
Skip @var{n} fields on each line before checking for uniqueness. Use
a null string for comparison if a line has fewer than @var{n} fields. Fields
are sequences of non-space non-tab characters that are separated from
each other by at least one space or tab.
@@ -3308,7 +3313,8 @@ does not allow this; use @option{-f @var{n}} instead.
@itemx --skip-chars=@var{n}
@opindex -s
@opindex --skip-chars
Skip @var{n} characters before checking for uniqueness. If you use both
Skip @var{n} characters before checking for uniqueness. Use a null string
for comparison if a line has fewer than @var{n} characters. If you use both
the field and character skipping options, fields are skipped over first.
On older systems, @command{uniq} supports an obsolete option
@@ -3331,31 +3337,34 @@ Ignore differences in case when comparing lines.
@itemx --repeated
@opindex -d
@opindex --repeated
@cindex duplicate lines, outputting
Print one copy of each duplicate line.
@cindex repeated lines, outputting
Discard lines that are not repeated. When used by itself, this option
causes @command{uniq} to print the first copy of each repeated line,
and nothing else.
@item -D
@itemx --all-repeated[=@var{delimit-method}]
@opindex -D
@opindex --all-repeated
@cindex all duplicate lines, outputting
Print all copies of each duplicate line.
@cindex all repeated lines, outputting
Do not discard the second and subsequent repeated input lines,
but discard lines that are not repeated.
This option is useful mainly in conjunction with other options e.g.,
to ignore case or to compare only selected fields.
The optional @var{delimit-method} tells how to delimit
groups of duplicate lines, and must be one of the following:
groups of repeated lines, and must be one of the following:
@table @samp
@item none
Do not delimit groups of duplicate lines.
Do not delimit groups of repeated lines.
This is equivalent to @option{--all-repeated} (@option{-D}).
@item prepend
Output a newline before each group of duplicate lines.
Output a newline before each group of repeated lines.
@item separate
Separate groups of duplicate lines with a single newline.
Separate groups of repeated lines with a single newline.
This is the same as using @samp{prepend}, except that
there is no newline before the first group, and hence
may be better suited for output direct to users.
@@ -3374,13 +3383,14 @@ This is a @sc{gnu} extension.
@opindex -u
@opindex --unique
@cindex unique lines, outputting
Print non-duplicate lines.
Discard the first repeated line. When used by itself, this option
causes @command{uniq} to print unique lines, and nothing else.
@item -w @var{n}
@itemx --check-chars=@var{n}
@opindex -w
@opindex --check-chars
Compare @var{n} characters on each line (after skipping any specified
Compare at most @var{n} characters on each line (after skipping any specified
fields and characters). By default the entire rest of the lines are
compared.
@@ -4650,13 +4660,13 @@ tr -s '\n'
@item
Find doubled occurrences of words in a document.
For example, people often write ``the the'' with the duplicated words
For example, people often write ``the the'' with the repeated words
separated by a newline. The bourne shell script below works first
by converting each sequence of punctuation and blank characters to a
single newline. That puts each ``word'' on a line by itself.
Next it maps all uppercase characters to lower case, and finally it
runs @command{uniq} with the @option{-d} option to print out only the words
that were adjacent duplicates.
that were repeated.
@example
#!/bin/sh
@@ -4987,6 +4997,8 @@ except @samp{..}, and the third ignores names that start with @samp{#}.
@cindex symbolic links, dereferencing
When showing file information for a symbolic link, show information
for the file the link references rather than the link itself.
However, even with this option, @command{ls} still prints the name
of the link itself, not the name of the file that the link points to.
@item -R
@itemx --recursive
@@ -5293,6 +5305,11 @@ were specified before the @option{-f}).
Reverse whatever the sorting method is---e.g., list files in reverse
alphabetical order, youngest first, smallest first, or whatever.
@itemx --sort=directory
@opindex --sort
@opindex directories@r{, sorting files by}
Show directories first, then other files.
@item -S
@itemx --sort=size
@opindex -S
@@ -5382,6 +5399,12 @@ fractional one:
abc-1.01a.tgz abc-1.012b.tgz
@end example
This functionality is implemented using the @code{strverscmp} function.
@xref{String/Array Comparison, , , libc, The GNU C Library Reference Manual}.
One result of that implementation decision is that @code{ls -v} does not
use the locale category, @env{LC_COLLATE}. As a result, non-numeric prefixes
are sorted as if @env{LC_COLLATE} were set to @code{C}.
@node General output formatting
@subsection General output formatting
@@ -7289,14 +7312,14 @@ of departure. @xref{File permissions}.
@command{readlink} outputs the value of the given symbolic link.
If @command{readlink} is invoked with an argument other than the pathname
of a symbolic link, it exits with a non-zero exit code.
of a symbolic link, it produces no output and exits with a nonzero exit code.
@item Canonicalize mode
@command{readlink} outputs the absolute name of the given file which contains
no `.', `..' components nor any repeated path separators (`/') or symlinks.
In any of the path components is missing or unavailable,
it exits with a non-zero exit code.
In any path component is missing or unavailable,
it produces no output and exits with a nonzero exit code.
@end table
@@ -7492,11 +7515,25 @@ is omitted, only the group of the files is changed; in this case,
@end table
You may use @samp{.} in place of the @samp{:} separator. This is a
@sc{gnu} extension for compatibility with older scripts.
Some older scripts may still use @samp{.} in place of the @samp{:} separator.
@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) does not allow that,
but you may be able to work around the compatibility problems by setting
@samp{_POSIX2_VERSION=199209} in your environment.
New scripts should avoid the use of @samp{.} because @sc{gnu} @command{chown}
may fail if @var{owner} contains @samp{.} characters.
Warning: The @command{chown} command may clear the set-user-ID or
set-group-ID bits on some systems. The @command{chown} command is
dependent upon the policy and functionality of the underlying system
which may make system-dependent file mode modifications outside the
control of the @command{chown} command. On some systems (e.g., Linux)
the @command{chown} command clears the set-UID and set-GID bits because
the underlying, system @code{chown} function clears them. On other
systems (e.g., HP-UX and Solaris) the @command{chown} command does not
affect those bits when operated as the superuser. On systems which allow
non-privileged use of chown those bits are always cleared by the system.
When in doubt, check the underlying system behavior.
The program accepts the following options. Also see @ref{Common options}.
@table @samp
@@ -8470,13 +8507,14 @@ all of the given @var{argument}s.
@command{printf} has one additional directive, @samp{%b}, which prints its
argument string with @samp{\} escapes interpreted in the same way as in
the @var{format} string.
the @var{format} string, except that octal escapes are of the form
@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits.
@kindex \@var{ooo}
@kindex \x@var{hh}
@command{printf} interprets @samp{\@var{ooo}} in @var{format} as an octal number
(if @var{ooo} is 0 to 3 octal digits) specifying a character to print,
(if @var{ooo} is 1 to 3 octal digits) specifying a character to print,
and @samp{\x@var{hh}} as a hexadecimal number (if @var{hh} is 1 to 2 hex
digits) specifying a character to print.
@@ -8622,6 +8660,19 @@ options. However, that is contrary to @acronym{POSIX}, so when the environment
variable @env{POSIXLY_CORRECT} is set, @command{true} ignores @emph{all}
command line arguments, including @option{--help} and @option{--version}.
Note, however, that it is possible to cause @command{true}
to exit with nonzero status: when invoked in non-@acronym{POSIX} mode,
with the @option{--help} or @option{--version} option, and with standard
output already closed or redirected to a file that evokes an I/O error.
For example, using a Bourne-compatible shell:
@example
$ ./true --version >&-
./true: write error: Bad file number
$ ./true --version > /dev/full
./true: write error: No space left on device
@end example
This version of @command{true} is implemented as a C program, and is thus
more secure and faster than a shell script implementation, and may safely
be used as a dummy shell for the purpose of disabling accounts.
@@ -10436,6 +10487,7 @@ GNU extension).
Note that this value is the number of seconds between the epoch
and the current date as defined by the localtime system call.
It isn't changed by the @option{--date} option.
For examples, @xref{%s-examples}.
@item %S
second (00@dots{}60). The range is [00@dots{}60], and not [00@dots{}59],
in order to accommodate the occasional positive leap second.
@@ -10794,6 +10846,7 @@ use @samp{date --rfc}. I just did and saw this:
Mon, 25 Mar 1996 23:34:17 -0600
@end example
@anchor{%s-examples}
@item
To convert a date string to the number of seconds since the epoch
(which is 1970-01-01 00:00:00 UTC), use the @option{--date} option with
@@ -10830,6 +10883,17 @@ date --date='2000-01-01 UTC' +%s
946684800
@end example
An alternative is to use the @option{--utc} (@option{-u}) option.
Then you may omit @samp{UTC} from the date string. Although this
produces the same result for @samp{%s} and many other format sequences,
with a time zone offset different from zero, it would give a different
result for zone-dependent formats like @samp{%z}.
@example
date -u --date=2000-01-01 +%s
946684800
@end example
To convert such an unwieldy number of seconds back to
a more readable form, use a command like this:
@@ -10839,6 +10903,13 @@ date -d '1970-01-01 UTC 946684800 seconds' +"%Y-%m-%d %T %z"
1999-12-31 19:00:00 -0500
@end smallexample
Often it is better to output UTC-relative date and time:
@smallexample
date -u -d '1970-01-01 946684800 seconds' +"%Y-%m-%d %T %z"
2000-01-01 00:00:00 +0000
@end smallexample
@end itemize
@@ -10901,7 +10972,8 @@ Print the hardware platform name
@cindex machine type
@cindex hardware class
@cindex hardware type
Print the machine hardware name (sometimes called the hardware class).
Print the machine hardware name (sometimes called the hardware class
or hardware type).
@item -n
@itemx --nodename
@@ -10942,6 +11014,14 @@ Print the kernel release.
@cindex kernel name
@cindex name of kernel
Print the kernel name.
@acronym{POSIX} 1003.1-2001 (@pxref{Standards conformance}) calls this
``the implementation of the operating system'', because the
@acronym{POSIX} specification itself has no notion of ``kernel''.
The kernel name might be the same as the operating system name printed
by the @option{-o} or @option{--operating-system} option, but it might
differ. Some operating systems (e.g., FreeBSD, HP-UX) have the same
name as their underlying kernels; others (e.g., GNU/Linux, Solaris)
do not.
@item -v
@itemx --kernel-version
@@ -11196,6 +11276,8 @@ If standard output is a terminal, it is redirected so that it is appended
to the file @file{nohup.out}; if that cannot be written to, it is appended
to the file @file{$HOME/nohup.out}. If that cannot be written to, the
command is not run.
If standard output is not a terminal, then the standard output of
@var{command} will be the same as that of @command{nohup}.
If @command{nohup} creates either @file{nohup.out} or
@file{$HOME/nohup.out}, it creates it with no ``group'' or ``other''
@@ -12029,8 +12111,8 @@ Finally (at least for now), we'll look at the @command{uniq} program. When
sorting data, you will often end up with duplicate lines, lines that
are identical. Usually, all you need is one instance of each line.
This is where @command{uniq} comes in. The @command{uniq} program reads its
standard input, which it expects to be sorted. It only prints out one
copy of each duplicated line. It does have several options. Later on,
standard input. It prints only one
copy of each repeated line. It does have several options. Later on,
we'll use the @option{-c} option, which prints each unique line, preceded
by a count of the number of times that line occurred in the input.

View File

@@ -1,12 +1,16 @@
error.h
fnmatch.h
fts.c
fts_.h
getopt.c
getopt.h
getopt1.c
getpagesize.h
md5.h
obstack.h
printf-args.h
printf-parse.h
regex.c
regex.h
fts_.h
fts.c
vasnprintf.h
vasprintf.h

View File

@@ -1,3 +1,369 @@
2003-07-14 Jim Meyering <jim@meyering.net>
* save-cwd.h: Add copyright.
2003-07-13 Jim Meyering <jim@meyering.net>
* xgethostname.c: Include <stdlib.h> for declaration of free.
(xgethostname): Return NULL, rather than exiting, upon any
non-malloc/realloc error.
2003-07-12 Jim Meyering <jim@meyering.net>
* Makefile.am (BUILT_SOURCES): Use `BUILT_SOURCES += $(STDBOOL_H)'
rather than `all-local: $(STDBOOL_H)'. The latter didn't force
creation of stdbool.h before most other targets.
Likewise for $(ALLOCA_H).
Don't emit diagnostics. Let callers do that.
* save-cwd.c: Don't include "error.h".
(save_cwd): Don't call error. Ensure that errno is valid
when returning nonzero.
* obstack.h: Update from gnulib.
* makepath.c (make_path): Enclose diagnostic in _(...).
2003-07-10 Jim Meyering <jim@meyering.net>
* userspec.c: Include "posixver.h".
(parse_user_spec): Accept `.' as a separator only
in pre-POSIX-200112 mode.
* Makefile.am (libfetish_a_SOURCES): Add these:
printf-args.h, printf-parse.h, vasprintf.h, vasnprintf.h.
Now that a program (`who') uses asprintf, we need all of these:
* asnprintf.c, asprintf.c, printf-args.c, printf-args.h, printf-parse.c:
* printf-parse.h, vasnprintf.c, vasnprintf.h, vasprintf.c, vasprintf.h:
New files, from gnulib.
* alloca_.h, getpass.c, memrchr.c, obstack.h, posixver.c,
strftime.c, strnlen.c, strverscmp.c: Switch from LGPL to GPL.
2003-07-09 Jim Meyering <jim@meyering.net>
* mktime.c: Update from gnulib.
FIXME: but still need to adjust m4/mktime.c so that this fixed
version is used when needed.
Fix the bug that would make `du /' omit the `/' on the last line.
E.g., `du --exclude '[^/]*' -x /' would print only "4\t\n" for me.
* ftw.c (ftw_dir): Don't clobber the leading `/'.
Reported by Chris Lesniewski as http://bugs.debian.org/200542.
2003-07-04 Jim Meyering <jim@meyering.net>
Update from gnulib.
* xreadlink.c: Include <sys/types.h> unconditionally, instead of
having it depend on HAVE_SYS_TYPES_H.
2003-06-18 Jim Meyering <jim@meyering.net>
* inttostr.h (PARAMS): Remove. All uses removed.
Merge in change from gnulib.
* makepath.c: Remove block of alloca-related code in favor
of an unconditional `#include <alloca.h>'.
* xalloc.h: Include <stddef.h>.
Remove unnecessary parentheses.
Use `1990-2000' notation in Copyright line until Emacs'
copyright-update function learns how to handle a comma-separated
list of years that spans a line boundary.
* Makefile.am (libfetish_a_SOURCES): Add getdelim2.c and getdelim2.h.
* getline.c (getdelim2): Move this function into its own file.
* getdelim2.c: Extracted from getline.c.
* linebuffer.c, linebuffer.h: Update from gnulib.
* getdelim2.c, getdelim2.h: New files.
* getstr.c, getstr.h: Remove files.
* same.h: Update from gnulib.
* xstrtol.h: Update from gnulib.
2003-06-17 Paul Eggert <eggert@twinsun.com>
Assume C89, so PARAMS isn't needed.
* backupfile.h (PARAMS): Remove. All uses removed.
* closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
xstrtol.h: Likewise.
* filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h, same.h,
* strverscmp.h: Do not include config.h; no longer needed.
Anyway, config.h should always be included before any other file.
2003-06-17 Jim Meyering <jim@meyering.net>
* getline.c: Update from gnulib.
Merge in changes from gnulib.
* hash.c: Include <stdbool.h> unconditionally.
Include <limits.h>.
(CHAR_BIT): Don't define.
2003-06-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* acl.c: Include <sys/types.h> before <sys/stat.h>.
Required on Ultrix 4.3.
2003-05-20 Derek Price <derek@ximbiot.com>
* stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
2003-06-10 Jim Meyering <jim@meyering.net>
* getdate.y: Also accept dates of the form May-23-2003.
Suggestion from Karl Berry.
2003-06-09 Jim Meyering <jim@meyering.net>
* gettimeofday.c: Also undefine gmtime.
(rpl_gmtime): New function. Suggestion from Paul Eggert.
2003-06-08 Jim Meyering <jim@meyering.net>
* getline.h: Update from gnulib.
Clean up, as part of merge with emacs version of strftime.c.
* strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
Remove function, now that we can rely on a working tzset function.
[!_LIBC]: Ensure that the required autoconf test has been run.
* gettimeofday.c: Also undef tzset.
(rpl_tzset): New function, for use by new macro, gl_FUNC_TZSET_CLOBBER.
2003-06-07 Jim Meyering <jim@meyering.net>
* readtokens.h: Add copyright notice.
Include <stdio.h>.
Remove definition and uses of __P.
* readtokens.c: Put `Free Software Foundation, Inc.' in place of
my name in the copyright comment.
(init_tokenbuffer): Remove unnecessary parentheses around malloc.
Update from gnulib.
* getdate.y: Include alloca.h unconditionally.
* xmemcoll.h: Include <stddef.h>.
* Makefile.am (MOSTLYCLEANFILES): Add alloca.h and alloca.ht.
(MOSTLYCLEANFILES): Add stdbool.ht.
* human.c: Include <stdio.h>, once again, for declaration of sprintf.
Update from gnulib.
* tempname.c: Include <stddef.h> unconditionally.
Include <inttypes.h> as an alternative to <stdint.h>.
* strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
* xstrtol.h: Likewise.
* xstrtoimax.c: Likewise.
* xstrtoumax.c: Likewise.
Update from gnulib.
* strcasecmp.c: Include <stddef.h>, not <sys/types.h>.
* savedir.c: Include <stddef.h>.
(NULL): Don't define, since <stddef.h> does that.
2003-06-06 Jim Meyering <jim@meyering.net>
Update from gnulib.
* rpmatch.c: Include <limits.h> without checking for HAVE_LIMITS_H.
Include <stddefs.h> unconditionally.
(NULL): Don't define, since <stddef.h> does that.
* rename.c: #undef rename before defining rpl_rename.
[HAVE_CONFIG_H]: Guard inclusion of config.h.
* putenv.c: Include <stddef.h> rather than <sys/types.h>,
as we merely need size_t.
* realloc.c: Likewise.
* quote.c: Don't include <stddef.h> or <sys/types.h>; not needed.
* modechange.c: Include <stddef.h>.
(NULL): Don't define, since <stddef.h> does that.
* memcoll.h: Include <stddef.h>, to get size_t.
* memcoll.c: Include "memcoll.h", which gets us size_t and checks
our interface, instead of including <sys/types.h>
(memcoll): Fall back on a simple algorithm using
memcmp if strcoll doesn't work.
* memcasecmp.h: Include <stddef.h>.
* memcasecmp.c: Don't include <sys/types.h>.
From gnulib.
* alloca_.h: New file.
* Makefile.am (EXTRA_DIST): Add alloca_.h.
(all-local $(lib_OBJECTS)): Depend on $(ALLOCA_H).
(alloca.h): New rule.
* addext.c: Update from gnulib.
* backupfile.c: Likewise.
* config.charset: Likewise.
* dirname.h: Likewise.
* fsusage.c: Likewise.
* userspec.c: Likewise.
* xreadlink.c: Likewise.
* xstrtol.c: Likewise.
* __fpending.h: Likewise.
* md5.c: Include <string.h> and <stdlib.h> unconditionally.
(memcpy): Remove definition.
* posixtm.c: Include <stdbool.h> unconditionally.
2003-06-05 Jim Meyering <jim@meyering.net>
From gnulib.
* mktime.c: Assume freestanding C89 or better.
(HAVE_LIMITS_H): Remove. Assume it's 1.
(__P): Remove; not used.
(CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
(mktime, not_equal_tm, print_tm, check_result,
main): Use prototypes. Use const * where appropriate.
(main): Fix typo in testing code that uncovered by above changes.
(Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
2003-06-04 Paul Eggert <eggert@twinsun.com>
Merge human.c etc. from gnulib.
* exclude.c, human.c, human.h: Merge from gnulib.
* cycle-check.c, cycle-check.h, src/system.h:
Include <stdbool.h> unconditionally.
2003-06-02 Jim Meyering <jim@meyering.net>
* stdbool.hin: New file. From gnulib.
* Makefile.am (MOSTLYCLEANFILES): Initialize.
(stdbool.h): New rule.
(all-local $(lib_OBJECTS)): Depend on $(STDBOOL_H)
(MOSTLYCLEANFILES): Add stdbool.h.
(EXTRA_DIST): Add stdbool.h.
2003-05-30 Jim Meyering <jim@meyering.net>
* addext.c: Update from gnulib.
* mktime.c: Likewise.
2003-05-29 Jim Meyering <jim@meyering.net>
Make the %r format directive honor any locale setting.
* strftime.c: (my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]:
Use underlying_strftime for %r.
2003-05-15 Jim Meyering <jim@meyering.net>
* getopt.h: Remove a space before a TAB.
2003-05-13 Jim Meyering <jim@meyering.net>
* setenv.c (setenv): Don't apply cast to argument of free.
* putenv.c (rpl_putenv): Likewise.
* alloca.c (alloca): Likewise.
2003-05-12 Jim Meyering <jim@meyering.net>
* ftw.c (ftw_startup): Always call free_cwd after restore_cwd.
Reported by Matti Aarnio as
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90563.
Forwarded by Tim Waugh.
* strftime.c (my_strftime): Let the `-' (no-pad) flag affect
the space-padded-by-default conversion specifiers, %e, %k, %l.
2003-05-07 Paul Eggert <eggert@twinsun.com>
* xnanosleep.c (timespec_subtract): Don't modify the 2nd arg.
Work even if X-Y overflows when subtracting. Make explicit the
assumption that tv_nsec must be in range.
(clock_get_realtime): Remove. All callers changed to invoke gettime,
for simplicity.
(xnanosleep): Check for gettime failure every time.
2003-05-06 Jim Meyering <jim@meyering.net>
* xnanosleep.c (clock_get_realtime): Use gettime.c's gettime function,
rather than an inferior, open-coded version that would fail on
AIX systems due to clock_gettime failing with errno == ENOSYS.
Reported by Jérôme Zago.
2003-05-05 Jim Meyering <jim@meyering.net>
Avoid array overrun.
* ftw.c (nftw_arr): Update to reflect complete list of members.
(ftw_arr): Likewise
Reported by Olatunji Oluwabukunmi Ruwase.
Make it less likely that the above can happen again.
* ftw.c (struct dummy): Ensure that at least the number of
initializers matches the number of members in the corresponding enum.
* ftw_.h (enum Ftw_option): Name this previously-anonymous enum.
(enum Ftw_option) [FTW_N_MEMBERS]: New member.
2003-05-04 Jim Meyering <jim@meyering.net>
* setenv.c (__set_errno, LOCK, UNLOCK): Define.
(unsetenv): Update from GNU libc.
Ifdef-out this function, since the only caller
is putenv.c and that file now has its own copy.
This avoids a core dump on systems without GNU putenv,
when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
* putenv.c (__set_errno, LOCK, UNLOCK): Define.
(unsetenv): New static function, from GNU libc.
(rpl_putenv): Use it.
2003-05-02 Jim Meyering <jim@meyering.net>
* canonicalize.c (canonicalize_file_name) [!HAVE_RESOLVEPATH]:
A memory-allocation error could result in heap corruption. Fix it
by also updating `dest' when rpath may be changed by xrealloc.
2003-04-15 Jim Meyering <jim@meyering.net>
* getloadavg.c: Remove (or replace-with-TAB(s) to retain alignment)
each sequence of spaces before a TAB character.
* md5.c, getopt.c, getopt.h, obstack.h, strftime.c: Likewise.
2003-04-11 Jim Meyering <jim@meyering.net>
* readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
* canonicalize.c, exclude.c, getgroups.c, getusershell.c:
* group-member.c, idcache.c, mountlist.c, readtokens.c, readutmp.c:
* bumpalloc.h: Remove anachronistic casts of xmalloc, xrealloc,
and xcalloc return values.
* xalloc.h (PARAMS): Remove definitions and uses.
(XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts.
* xmalloc.c: Remove use of PARAMS.
2003-04-10 Jim Meyering <jim@meyering.net>
* canonicalize.c (canonicalize_file_name) [HAVE_RESOLVEPATH]: Remove
stray semicolon that caused `readlink --canonical RELATIVE_NAME' to
fail on e.g., Solaris systems. Reported by Bruce Korb.
(canonicalize_file_name): Return NULL immediately if resolvepath fails.
Otherwise, `readlink --canonical /no-such-file' would exhaust
virtual memory on some systems (e.g. Solaris).
(canonicalize_file_name): Always free `extra_buf' before returning.
(canonicalize_file_name): NUL-terminate the result.
2003-04-05 Jim Meyering <jim@meyering.net>
* Makefile.am (DEFS): Use += notation rather than `DEFS = ... @DEFS@'.
Use $(VAR) rather than @VAR@, now that we can rely on automake to
emit a definition for each substituted variable.
2003-03-26 Richard Dawe <rich@phekda.freeserve.co.uk>
* dirname.c [TEST_DIRNAME]: Update build instructions for test.
Add test-cases for DOS filenames. Declare program_name.
(main): Set up program_name.
2003-03-22 Jim Meyering <jim@meyering.net>
* strftime.c (widen): Cast alloca return value to proper type.

View File

@@ -21,7 +21,7 @@
noinst_LIBRARIES = libfetish.a
INCLUDES = -I.. -I$(srcdir)
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
DEFS += -DLIBDIR=\"$(libdir)\"
## Put relatively complex files at the beginning of the list so
## that parallel compiles finish a tiny bit sooner. I don't see
@@ -63,9 +63,9 @@ libfetish_a_SOURCES = \
ftw_.h \
full-read.c full-read.h \
full-write.c full-write.h \
getdelim2.c getdelim2.h \
getline.h \
getpagesize.h \
getstr.c getstr.h \
gettime.c \
gettext.h \
getugroups.c \
@@ -129,12 +129,19 @@ libfetish_a_SOURCES = \
xstrtoumax.c \
yesno.c
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfetish_a_SOURCES += \
printf-args.h \
printf-parse.h \
vasprintf.h \
vasnprintf.h
libfetish_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
BUILT_SOURCES = getdate.c
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANFILES =
EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
fnmatch_loop.c inttostr.c inttostr.h
@@ -180,9 +187,26 @@ charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
BUILT_SOURCES += $(STDBOOL_H)
EXTRA_DIST += stdbool.hin
MOSTLYCLEANFILES += stdbool.h stdbool.ht
# Create stdbool.h on systems that lack a working one.
stdbool.h: stdbool.hin
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool.hin > $@t
mv $@t $@
BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h
MOSTLYCLEANFILES += alloca.h alloca.ht
# Create an <alloca.h> when the system
# doesn't have one that works with the given compiler.
alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@t
mv $@t $@
SUFFIXES = .sed .sin
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
mv t-$@ $@
CLEANFILES = charset.alias ref-add.sed ref-del.sed

View File

@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.7.3 from Makefile.am.
# Makefile.in generated by automake 1.7.6 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
@@ -41,6 +41,7 @@ POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
ALLOCA_H = @ALLOCA_H@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -54,7 +55,7 @@ CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
DEFS = @DEFS@ -DLIBDIR=\"$(libdir)\"
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
ECHO_C = @ECHO_C@
@@ -67,6 +68,7 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -94,7 +96,6 @@ MSGMERGE = @MSGMERGE@
NEED_SETGID = @NEED_SETGID@
OBJEXT = @OBJEXT@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -110,6 +111,7 @@ SEQ_LIBM = @SEQ_LIBM@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQRT_LIBM = @SQRT_LIBM@
STDBOOL_H = @STDBOOL_H@
STRIP = @STRIP@
U = @U@
USE_NLS = @USE_NLS@
@@ -191,9 +193,9 @@ libfetish_a_SOURCES = \
ftw_.h \
full-read.c full-read.h \
full-write.c full-write.h \
getdelim2.c getdelim2.h \
getline.h \
getpagesize.h \
getstr.c getstr.h \
gettime.c \
gettext.h \
getugroups.c \
@@ -255,18 +257,24 @@ libfetish_a_SOURCES = \
xstrtoul.c \
xstrtoimax.c \
xstrtoumax.c \
yesno.c
yesno.c\
\
printf-args.h \
printf-parse.h \
vasprintf.h \
vasnprintf.h
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfetish_a_LIBADD = $(LIBOBJS) $(ALLOCA)
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
BUILT_SOURCES = getdate.c
BUILT_SOURCES = getdate.c $(STDBOOL_H) $(ALLOCA_H)
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
MOSTLYCLEANFILES = stdbool.h stdbool.ht alloca.h alloca.ht
EXTRA_DIST = config.charset ref-add.sin ref-del.sin \
fnmatch_loop.c inttostr.c inttostr.h
fnmatch_loop.c inttostr.c inttostr.h\
stdbool.hin alloca_.h
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
@@ -292,7 +300,7 @@ am_libfetish_a_OBJECTS = acl.$(OBJEXT) getdate.$(OBJEXT) \
dirname.$(OBJEXT) dup-safer.$(OBJEXT) exclude.$(OBJEXT) \
exitfail.$(OBJEXT) filemode.$(OBJEXT) file-type.$(OBJEXT) \
fopen-safer.$(OBJEXT) full-read.$(OBJEXT) full-write.$(OBJEXT) \
getstr.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
getdelim2.$(OBJEXT) gettime.$(OBJEXT) getugroups.$(OBJEXT) \
hard-locale.$(OBJEXT) human.$(OBJEXT) idcache.$(OBJEXT) \
isdir.$(OBJEXT) imaxtostr.$(OBJEXT) linebuffer.$(OBJEXT) \
localcharset.$(OBJEXT) long-options.$(OBJEXT) \
@@ -315,6 +323,7 @@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/__fpending.Po $(DEPDIR)/alloca.Po \
@AMDEP_TRUE@ $(DEPDIR)/asnprintf.Po $(DEPDIR)/asprintf.Po \
@AMDEP_TRUE@ $(DEPDIR)/atexit.Po $(DEPDIR)/canonicalize.Po \
@AMDEP_TRUE@ $(DEPDIR)/chown.Po $(DEPDIR)/dirfd.Po \
@AMDEP_TRUE@ $(DEPDIR)/dup2.Po $(DEPDIR)/error.Po \
@@ -334,7 +343,8 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ $(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po \
@AMDEP_TRUE@ $(DEPDIR)/mkstemp.Po $(DEPDIR)/mktime.Po \
@AMDEP_TRUE@ $(DEPDIR)/mountlist.Po $(DEPDIR)/nanosleep.Po \
@AMDEP_TRUE@ $(DEPDIR)/obstack.Po $(DEPDIR)/putenv.Po \
@AMDEP_TRUE@ $(DEPDIR)/obstack.Po $(DEPDIR)/printf-args.Po \
@AMDEP_TRUE@ $(DEPDIR)/printf-parse.Po $(DEPDIR)/putenv.Po \
@AMDEP_TRUE@ $(DEPDIR)/raise.Po $(DEPDIR)/readlink-stub.Po \
@AMDEP_TRUE@ $(DEPDIR)/readutmp.Po $(DEPDIR)/realloc.Po \
@AMDEP_TRUE@ $(DEPDIR)/regex.Po $(DEPDIR)/rename.Po \
@@ -350,6 +360,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ $(DEPDIR)/strtoull.Po $(DEPDIR)/strtoumax.Po \
@AMDEP_TRUE@ $(DEPDIR)/strverscmp.Po $(DEPDIR)/tempname.Po \
@AMDEP_TRUE@ $(DEPDIR)/tsearch.Po $(DEPDIR)/utime.Po \
@AMDEP_TRUE@ $(DEPDIR)/vasnprintf.Po $(DEPDIR)/vasprintf.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/acl.Po ./$(DEPDIR)/addext.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/argmatch.Po ./$(DEPDIR)/backupfile.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/basename.Po ./$(DEPDIR)/canon-host.Po \
@@ -359,8 +370,8 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/exitfail.Po ./$(DEPDIR)/file-type.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/filemode.Po ./$(DEPDIR)/fopen-safer.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/full-read.Po ./$(DEPDIR)/full-write.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getdate.Po ./$(DEPDIR)/getopt.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/getstr.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getdate.Po ./$(DEPDIR)/getdelim2.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/gettime.Po ./$(DEPDIR)/getugroups.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/hash-pjw.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/human.Po \
@@ -395,19 +406,21 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
DIST_SOURCES = $(libfetish_a_SOURCES)
DIST_COMMON = README ChangeLog Makefile.am Makefile.in TODO \
__fpending.c alloca.c atexit.c canonicalize.c chown.c dirfd.c \
dup2.c error.c error.h euidaccess.c fchdir-stub.c fchown-stub.c \
fileblocks.c fnmatch.c fsusage.c ftruncate.c ftw.c getcwd.c \
getdate.c getgroups.c gethostname.c getline.c getloadavg.c \
getpass.c gettimeofday.c getusershell.c group-member.c lchown.c \
lstat-stub.c lstat.c malloc.c memchr.c memcmp.c memcpy.c \
memmove.c memrchr.c memset.c mkdir.c mkstemp.c mktime.c \
mountlist.c nanosleep.c obstack.c obstack.h putenv.c raise.c \
readlink-stub.c readutmp.c realloc.c regex.c rename.c rmdir.c \
rpmatch.c sig2str.c stat.c stpcpy.c strcasecmp.c strcspn.c \
strdup.c strncasecmp.c strndup.c strnlen.c strpbrk.c strstr.c \
strtod.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \
strtoumax.c strverscmp.c tempname.c tsearch.c utime.c
__fpending.c alloca.c asnprintf.c asprintf.c atexit.c \
canonicalize.c chown.c dirfd.c dup2.c error.c error.h \
euidaccess.c fchdir-stub.c fchown-stub.c fileblocks.c fnmatch.c \
fsusage.c ftruncate.c ftw.c getcwd.c getdate.c getgroups.c \
gethostname.c getline.c getloadavg.c getpass.c gettimeofday.c \
getusershell.c group-member.c lchown.c lstat-stub.c lstat.c \
malloc.c memchr.c memcmp.c memcpy.c memmove.c memrchr.c \
memset.c mkdir.c mkstemp.c mktime.c mountlist.c nanosleep.c \
obstack.c obstack.h printf-args.c printf-parse.c putenv.c \
raise.c readlink-stub.c readutmp.c realloc.c regex.c rename.c \
rmdir.c rpmatch.c sig2str.c stat.c stpcpy.c strcasecmp.c \
strcspn.c strdup.c strncasecmp.c strndup.c strnlen.c strpbrk.c \
strstr.c strtod.c strtoimax.c strtol.c strtoll.c strtoul.c \
strtoull.c strtoumax.c strverscmp.c tempname.c tsearch.c \
utime.c vasnprintf.c vasprintf.c
SOURCES = $(libfetish_a_SOURCES)
all: $(BUILT_SOURCES)
@@ -438,6 +451,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/__fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/asprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/canonicalize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chown.Po@am__quote@
@@ -477,6 +492,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mountlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/nanosleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-args.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/printf-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/raise.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readlink-stub.Po@am__quote@
@@ -508,6 +525,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tempname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tsearch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/utime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vasprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addext.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@
@@ -527,9 +546,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-read.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getstr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getugroups.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@
@@ -589,7 +608,7 @@ distclean-depend:
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -600,7 +619,7 @@ distclean-depend:
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -610,8 +629,6 @@ distclean-depend:
.y.c:
$(YACCCOMPILE) `test -f '$<' || echo '$(srcdir)/'`$<
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@
rm -f y.tab.c
if test -f y.tab.h; then \
to=`echo "$*_H" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
@@ -627,6 +644,8 @@ distclean-depend:
if test -f y.output; then \
mv y.output $*.output; \
fi
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
rm -f y.tab.c
uninstall-info-am:
ETAGS = etags
@@ -720,8 +739,8 @@ check: $(BUILT_SOURCES)
all-am: Makefile $(LIBRARIES) all-local
installdirs:
install: install-am
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -736,6 +755,7 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -845,8 +865,17 @@ uninstall-local: all-local
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
# Create stdbool.h on systems that lack a working one.
stdbool.h: stdbool.hin
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool.hin > $@t
mv $@t $@
# Create an <alloca.h> when the system
# doesn't have one that works with the given compiler.
alloca.h: alloca_.h
cp $(srcdir)/alloca_.h $@t
mv $@t $@
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
mv t-$@ $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@@ -2,14 +2,13 @@
# include <config.h>
#endif
#include <stddef.h>
#include <stdio.h>
#if HAVE_STDIO_EXT_H
# include <stdio_ext.h>
#endif
#include <sys/types.h>
#ifndef HAVE_DECL___FPENDING
"this configure-time declaration test was not run"
#endif

View File

@@ -1,6 +1,6 @@
/* acl.c - access control lists
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifndef S_ISLNK
# define S_ISLNK(Mode) 0

View File

@@ -1,5 +1,7 @@
/* addext.c -- add an extension to a file name
Copyright 1990, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,14 +31,12 @@
# define HAVE_LONG_FILE_NAMES 0
#endif
#if HAVE_LIMITS_H
# include <limits.h>
#endif
#include <limits.h>
#ifndef _POSIX_NAME_MAX
# define _POSIX_NAME_MAX 14
#endif
#include <sys/types.h>
#include <stddef.h>
#if HAVE_STRING_H
# include <string.h>
#else
@@ -83,7 +83,11 @@ addext (char *filename, char const *ext, int e)
*s = c;
}
if (0 <= name_max || errno == 0)
slen_max = name_max == (long) (size_t) name_max ? name_max : -1;
{
long size = slen_max = name_max;
if (name_max != size)
slen_max = -1;
}
}
#endif

View File

@@ -193,7 +193,7 @@ alloca (size)
{
register header *np = hp->h.next;
free ((pointer) hp); /* Collect garbage. */
free (hp); /* Collect garbage. */
hp = np; /* -> next header. */
}

68
lib/alloca_.h Normal file
View File

@@ -0,0 +1,68 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* When this file is included, it may be preceded only by preprocessor
declarations. Thanks to AIX. Therefore we include it right after
"config.h", not later. */
#ifndef _ALLOCA_H
# define _ALLOCA_H
/* alloca(N) returns a pointer (void* or char*) to N bytes of memory
allocated on the stack, and which will last until the function returns.
Use of alloca should be avoided:
- inside arguments of function calls - undefined behaviour,
- in inline functions - the allocation may actually last until the
calling function returns,
- for huge N (say, N >= 65536) - you never know how large (or small)
the stack is, and when the stack cannot fulfill the memory allocation
request, the program just crashes.
*/
# ifdef __GNUC__
# ifndef alloca
# define alloca __builtin_alloca
# endif
# else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
# pragma alloca
# else
# ifdef __hpux /* This section must match that of bison generated files. */
# ifdef __cplusplus
extern "C" void *alloca (unsigned int);
# else /* not __cplusplus */
extern void *alloca ();
# endif /* not __cplusplus */
# else /* not __hpux */
# ifndef alloca
extern char *alloca ();
# endif
# endif /* __hpux */
# endif
# endif
# endif
# endif
#endif /* _ALLOCA_H */

38
lib/asnprintf.c Normal file
View File

@@ -0,0 +1,38 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "vasnprintf.h"
#include <stdarg.h>
char *
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
{
va_list args;
char *result;
va_start (args, format);
result = vasnprintf (resultbuf, lengthp, format, args);
va_end (args);
return result;
}

38
lib/asprintf.c Normal file
View File

@@ -0,0 +1,38 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "vasprintf.h"
#include <stdarg.h>
int
asprintf (char **resultp, const char *format, ...)
{
va_list args;
int result;
va_start (args, format);
result = vasprintf (resultp, format, args);
va_end (args);
return result;
}

View File

@@ -1,6 +1,7 @@
/* backupfile.c -- make Emacs style backup file names
Copyright (C) 1990,91,92,93,94,95,96,97,98,99,2000, 2001, 2002 Free Software
Foundation, Inc.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,8 +25,8 @@
# include <config.h>
#endif
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#if HAVE_STRING_H
# include <string.h>
#else
@@ -80,12 +81,8 @@ char *malloc ();
# define HAVE_DIR 0
#endif
#if HAVE_LIMITS_H
# include <limits.h>
#endif
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
#include <limits.h>
/* Upper bound on the string length of an integer converted to string.
302 / 1000 is ceil (log10 (2.0)). Subtract 1 for the sign bit;
add 1 for integer division truncation; add 1 more for a minus sign. */
@@ -114,8 +111,8 @@ char *malloc ();
to numbered) backup file name. */
const char *simple_backup_suffix = "~";
static int max_backup_version PARAMS ((const char *, const char *));
static int version_number PARAMS ((const char *, const char *, size_t));
static int max_backup_version (const char *, const char *);
static int version_number (const char *, const char *, size_t);
/* Return the name of the new backup file for file FILE,
allocated with malloc. Return 0 if out of memory.

View File

@@ -44,17 +44,9 @@ enum backup_type
extern char const *simple_backup_suffix;
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
char *find_backup_file_name PARAMS ((char const *, enum backup_type));
enum backup_type get_version PARAMS ((char const *context, char const *arg));
enum backup_type xget_version PARAMS ((char const *context, char const *arg));
void addext PARAMS ((char *, char const *, int));
char *find_backup_file_name (char const *, enum backup_type);
enum backup_type get_version (char const *context, char const *arg);
enum backup_type xget_version (char const *context, char const *arg);
void addext (char *, char const *, int);
#endif /* ! BACKUPFILE_H_ */

View File

@@ -1,5 +1,5 @@
/* BUMP_ALLOC macro - increase table allocation by one element.
Copyright (C) 1990, 1991, 1993, 1998, 2000 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1993, 1998, 2000, 2003 Free Software Foundation, Inc.
François Pinard <pinard@iro.umontreal.ca>, 1990.
This program is free software; you can redistribute it and/or modify
@@ -54,9 +54,9 @@
if (((Count) & (~(~0 << (Exponent)))) == 0) \
{ \
if ((Count) == 0) \
(Table) = (Type *) xmalloc ((1 << (Exponent)) * (Size)); \
(Table) = xmalloc ((1 << (Exponent)) * (Size)); \
else \
(Table) = (Type *) \
(Table) = \
xrealloc ((Table), ((Count) + (1 << (Exponent))) * (Size)); \
} \
} \

View File

@@ -130,7 +130,7 @@ canonicalize_file_name (const char *name)
{
char *wd;
if (!(wd = xgetcwd ()));
if (!(wd = xgetcwd ()))
return NULL;
extra_buf = path_concat (wd, name, NULL);
@@ -147,18 +147,22 @@ canonicalize_file_name (const char *name)
resolved_size = 2 * resolved_size + 1;
resolved = xmalloc (resolved_size);
resolved_len = resolvepath (name, resolved, resolved_size);
if (resolved_len < 0)
{
free (resolved);
free (extra_buf);
return NULL;
}
if (resolved_len < resolved_size)
break;
free (resolved);
}
if (resolved_len < 0)
{
free (resolved);
resolved = NULL;
}
free (extra_buf);
/* NUL-terminate the resulting name. */
resolved[resolved_len] = '\0';
return resolved;
#else /* !HAVE_RESOLVEPATH */
@@ -169,9 +173,11 @@ canonicalize_file_name (const char *name)
if (!rpath)
return NULL;
dest = strchr (rpath, '\0');
if (dest < rpath + PATH_MAX)
if (dest - rpath < PATH_MAX)
{
rpath = xrealloc (rpath, PATH_MAX);
char *p = xrealloc (rpath, PATH_MAX);
dest = p + (dest - rpath);
rpath = p;
rpath_limit = rpath + PATH_MAX;
}
else
@@ -223,7 +229,7 @@ canonicalize_file_name (const char *name)
new_size += end - start + 1;
else
new_size += PATH_MAX;
rpath = (char *) xrealloc (rpath, new_size);
rpath = xrealloc (rpath, new_size);
rpath_limit = rpath + new_size;
dest = rpath + dest_offset;

View File

@@ -1,17 +1,27 @@
/* Close standard output.
Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef CLOSEOUT_H
# define CLOSEOUT_H 1
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
void close_stdout_set_status PARAMS ((int status));
void close_stdout_set_file_name PARAMS ((const char *file));
void close_stdout PARAMS ((void));
void close_stdout_status PARAMS ((int status));
void close_stdout_set_status (int status);
void close_stdout_set_file_name (const char *file);
void close_stdout (void);
void close_stdout_status (int status);
#endif

View File

@@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2002 Free Software Foundation, Inc.
# Copyright (C) 2000-2003 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
@@ -71,7 +71,7 @@
# CP1125 dos
# CP1129 aix
# CP1250 woe32
# CP1251 glibc woe32
# CP1251 glibc solaris woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
@@ -231,6 +231,7 @@ case "$os" in
echo "ISO8859-9 ISO-8859-9"
echo "ISO8859-15 ISO-8859-15"
echo "koi8-r KOI8-R"
echo "ansi-1251 CP1251"
echo "BIG5 BIG5"
echo "Big5-HKSCS BIG5-HKSCS"
echo "gb2312 GB2312"

View File

@@ -28,11 +28,7 @@
#include <assert.h>
#include <stdlib.h>
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include <stdbool.h>
#include "cycle-check.h"
#include "xalloc.h"

View File

@@ -10,11 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include <stdbool.h>
so that the proper identifiers are all declared. */

View File

@@ -1,5 +1,5 @@
/* dirname.c -- return all but the last element in a path
Copyright 1990, 1998, 2000, 2001 Free Software Foundation, Inc.
Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,9 +67,13 @@ dir_name (char const *path)
Run the test like this (expect no output):
gcc -DHAVE_CONFIG_H -DTEST_DIRNAME -I.. -O -Wall \
basename.c dirname.c xmalloc.c
basename.c dirname.c xmalloc.c error.c
sed -n '/^BEGIN-DATA$/,/^END-DATA$/p' dirname.c|grep -v DATA|./a.out
If it's been built on a DOS or Windows platforms, run another test like
this (again, expect no output):
sed -n '/^BEGIN-DOS-DATA$/,/^END-DOS-DATA$/p' dirname.c|grep -v DATA|./a.out
BEGIN-DATA
foo//// .
bar/foo//// bar
@@ -79,16 +83,28 @@ foo/ .
a .
END-DATA
BEGIN-DOS-DATA
c:///// c:/
c:/ c:/
c:/. c:/
c:foo c:.
c:foo/bar c:foo
END-DOS-DATA
*/
# define MAX_BUFF_LEN 1024
# include <stdio.h>
char *program_name;
int
main ()
main (int argc, char *argv[])
{
char buff[MAX_BUFF_LEN + 1];
program_name = argv[0];
buff[MAX_BUFF_LEN] = 0;
while (fgets (buff, MAX_BUFF_LEN, stdin) && buff[0])
{

View File

@@ -17,13 +17,7 @@
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
# include <stddef.h>
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
@@ -37,11 +31,11 @@
# define FILESYSTEM_PREFIX_LEN(Filename) 0
# endif
char *base_name PARAMS ((char const *path));
char *dir_name PARAMS ((char const *path));
size_t base_len PARAMS ((char const *path));
size_t dir_len PARAMS ((char const *path));
char *base_name (char const *path);
char *dir_name (char const *path);
size_t base_len (char const *path);
size_t dir_len (char const *path);
int strip_trailing_slashes PARAMS ((char *path));
int strip_trailing_slashes (char *path);
#endif /* not DIRNAME_H_ */

View File

@@ -24,20 +24,14 @@
# include <config.h>
#endif
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include <stdbool.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#include <stddef.h>
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -104,11 +98,10 @@ struct exclude
struct exclude *
new_exclude (void)
{
struct exclude *ex = (struct exclude *) xmalloc (sizeof *ex);
struct exclude *ex = xmalloc (sizeof *ex);
ex->exclude_count = 0;
ex->exclude_alloc = (1 << 6); /* This must be a power of 2. */
ex->exclude = (struct patopts *) xmalloc (ex->exclude_alloc
* sizeof ex->exclude[0]);
ex->exclude = xmalloc (ex->exclude_alloc * sizeof ex->exclude[0]);
return ex;
}
@@ -206,8 +199,7 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
if (! (0 < s && s <= SIZE_MAX / sizeof ex->exclude[0]))
xalloc_die ();
ex->exclude_alloc = s;
ex->exclude = (struct patopts *) xrealloc (ex->exclude,
s * sizeof ex->exclude[0]);
ex->exclude = xrealloc (ex->exclude, s * sizeof ex->exclude[0]);
}
patopts = &ex->exclude[ex->exclude_count++];

View File

@@ -1,19 +1,25 @@
#ifndef FILEMODE_H_
/* Make a string describing file modes.
# if HAVE_CONFIG_H
# include <config.h>
# endif
Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef FILEMODE_H_
# include <sys/types.h>
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
void mode_string PARAMS ((mode_t mode, char *str));
void mode_string (mode_t mode, char *str);
#endif

View File

@@ -1,6 +1,7 @@
/* fsusage.c -- return space usage of mounted filesystems
Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003 Free Software
Foundation, Inc.
Copyright (C) 1991, 1992, 1996, 1998, 1999, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,12 +36,7 @@
#include <sys/stat.h>
#include "fsusage.h"
#if HAVE_LIMITS_H
# include <limits.h>
#endif
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
#include <limits.h>
#if HAVE_SYS_PARAM_H
# include <sys/param.h>

View File

@@ -31,15 +31,6 @@ struct fs_usage
uintmax_t fsu_ffree; /* Free file nodes. */
};
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
int get_fs_usage PARAMS ((const char *path, const char *disk,
struct fs_usage *fsp));
int get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp);
#endif

View File

@@ -1063,7 +1063,7 @@ fts_sort(sp, head, nitems)
sp->fts_nitems = nitems + 40;
if ((a = realloc(sp->fts_array,
(size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
(size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
free(sp->fts_array);
sp->fts_array = NULL;
sp->fts_nitems = 0;

View File

@@ -224,12 +224,25 @@ struct ftw_data
as `ftw', map each flag to the subset of values used by `ftw'. */
static const int nftw_arr[] =
{
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_SL, FTW_DP, FTW_SLN
/* Extract with:
perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h; echo */
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_SL, FTW_DP, FTW_SLN
};
static const int ftw_arr[] =
{
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_F, FTW_D, FTW_NS
/* Generate with:
perl -ne '/^ (FTW_\w+)\b[^=]*$/ and print "$1, "' ftw_.h \
| sed 's/_SL/_F/;s/_DP\>/_D/;s/_SLN/_NS/'; echo */
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_F, FTW_D, FTW_NS
};
/* Ensure that each of the above arrays has the number of
initializers corresponding to enum Ftw_option. */
struct dummy
{
int p1 [sizeof nftw_arr / sizeof nftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
int p2 [sizeof nftw_arr / sizeof ftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
};
@@ -592,8 +605,9 @@ ftw_dir (struct ftw_data *data, struct FTW_STAT *st)
__set_errno (save_err);
}
/* Prepare the return, revert the `struct FTW' information. */
data->dirbuf[data->ftw.base - 1] = '\0';
/* Prepare the return, revert the `struct FTW' information.
If ftw.base is 1, be careful to preserve the `/'. */
data->dirbuf[data->ftw.base == 1 ? 1 : data->ftw.base - 1] = '\0';
--data->ftw.level;
data->ftw.base = previous_base;
@@ -800,6 +814,7 @@ ftw_startup (const char *dir, int is_nftw, NFTW_FUNC_T func, int descriptors,
save_err = errno;
result = -1;
}
free_cwd (&cwd);
__set_errno (save_err);
}

View File

@@ -50,7 +50,7 @@ __BEGIN_DECLS
/* Values for the FLAG argument to the user function passed to `ftw'
and 'nftw'. */
enum
enum Ftw_option
{
FTW_F, /* Regular file. */
# define FTW_F FTW_F
@@ -89,10 +89,13 @@ enum
/* These flags are only passed from the `nftw' function. */
FTW_DP, /* Directory, all subdirs have been visited. */
# define FTW_DP FTW_DP
FTW_SLN /* Symbolic link naming non-existing file. */
FTW_SLN, /* Symbolic link naming non-existing file. */
# define FTW_SLN FTW_SLN
# endif /* extended X/Open */
FTW_N_MEMBERS
# define FTW_N_MEMBERS FTW_N_MEMBERS
};

View File

@@ -1,4 +1,6 @@
/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
/* Parse a string into an internal time stamp.
Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,14 +20,6 @@
# include <config.h>
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifdef vms
# include <types.h>
# include <time.h>
@@ -43,4 +37,4 @@
# endif
#endif /* defined (vms) */
time_t get_date PARAMS ((const char *p, const time_t *now));
time_t get_date (const char *p, const time_t *now);

View File

@@ -1,6 +1,6 @@
%{
/* Parse a string into an internal time stamp.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,11 +27,10 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# endif
#endif
#include <alloca.h>
/* Since the code of getdate.y is not included in the Emacs executable
itself, there is no need to #define static in this file. Even if
the code were included in the Emacs executable, it probably
@@ -322,6 +321,14 @@ date:
PC.year.value = -$3.value;
PC.year.digits = $3.digits;
}
| tMONTH tSNUMBER tSNUMBER
{
/* e.g. JUN-17-1992. */
PC.month = $1;
PC.day = -$2.value;
PC.year.value = -$3.value;
PC.year.digits = $3.digits;
}
| tMONTH tUNUMBER
{
PC.month = $1;

View File

@@ -1,20 +1,20 @@
/* getstr.c -- core function for GNU C library getline replacement function
/* getdelim2.c -- a variant of getdelim
Copyright (C) 1993, 1996-2001 Free Software Foundation, Inc.
Copyright (C) 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
@@ -22,14 +22,9 @@
# include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include "getdelim2.h"
#if STDC_HEADERS
# include <stdlib.h>
#else
char *malloc (), *realloc ();
#endif
#include <stdlib.h>
#include "unlocked-io.h"
@@ -44,8 +39,8 @@ char *malloc (), *realloc ();
read (not including the NUL terminator), or -1 on error or EOF. */
int
getstr (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
size_t offset)
getdelim2 (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
size_t offset)
{
size_t nchars_avail; /* Allocated but unused chars in *LINEPTR. */
char *read_pos; /* Where we're reading into *LINEPTR. */

10
lib/getdelim2.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef GETDELIM2_H_
# define GETDELIM2_H_ 1
# include <stddef.h>
# include <stdio.h>
int getdelim2 (char **lineptr, size_t *n, FILE *stream, int delim1, int delim2,
size_t offset);
#endif

View File

@@ -1,5 +1,5 @@
/* provide consistent interface to getgroups for systems that don't allow N==0
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ getgroups (size_t n, GETGROUPS_T *group)
gbuf = NULL;
while (1)
{
gbuf = (GETGROUPS_T *) xrealloc (gbuf, n * sizeof (GETGROUPS_T));
gbuf = xrealloc (gbuf, n * sizeof (GETGROUPS_T));
n_groups = getgroups (n, gbuf);
if (n_groups < n)
break;

View File

@@ -1,20 +1,21 @@
/* getline.c -- Replacement for GNU C library function getline
Copyright (C) 1993, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */
@@ -22,14 +23,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# include <config.h>
#endif
#include "getline.h"
#include "getdelim2.h"
/* The `getdelim' function is only declared if the following symbol
is defined. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
@@ -41,17 +45,15 @@ getline (char **lineptr, size_t *n, FILE *stream)
#else /* ! have getdelim */
# include "getstr.h"
int
getline (char **lineptr, size_t *n, FILE *stream)
{
return getstr (lineptr, n, stream, '\n', 0, 0);
return getdelim2 (lineptr, n, stream, '\n', 0, 0);
}
int
getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
{
return getstr (lineptr, n, stream, delimiter, 0, 0);
return getdelim2 (lineptr, n, stream, delimiter, 0, 0);
}
#endif

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997, 1999, 2000-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,22 +17,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GETLINE_H_
# define GETLINE_H_ 1
# include <stddef.h>
# include <stdio.h>
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
/* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
# if __GLIBC__ < 2
int
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
int
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
int getline (char **_lineptr, size_t *_n, FILE *_stream);
int getdelim (char **_lineptr, size_t *_n, int _delimiter, FILE *_stream);
# endif
#endif /* not GETLINE_H_ */

View File

@@ -1,6 +1,6 @@
/* Get the system load averages.
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997
Free Software Foundation, Inc.
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@
VMS
WINDOWS32 No-op for Windows95/NT.
__linux__ Linux: assumes /proc filesystem mounted.
Support from Michael K. Johnson.
Support from Michael K. Johnson.
__NetBSD__ NetBSD: assumes /kern filesystem mounted.
In addition, to avoid nesting many #ifdefs, we internally set

View File

@@ -3,7 +3,7 @@
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002
Free Software Foundation, Inc.
Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify

View File

@@ -77,7 +77,7 @@ extern int optopt;
The field `has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but

View File

@@ -1,20 +1,19 @@
/* Copyright (C) 1992,93,94,95,96,97,98,99,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
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is 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.
The GNU C Library is distributed in the hope that it will be useful,
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
Library General Public License for more details.
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 Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#if HAVE_CONFIG_H
# include <config.h>

View File

@@ -1,19 +0,0 @@
#ifndef GETSTR_H_
# define GETSTR_H_ 1
# include <stdio.h>
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
int
getstr PARAMS ((char **lineptr, size_t *n, FILE *stream,
int delim1, int delim2,
size_t offset));
#endif

View File

@@ -1,7 +1,8 @@
/* Work around the bug in some systems whereby gettimeofday clobbers the
static buffer that localtime uses for it's return value. The gettimeofday
function from Mac OS X 10.0.4, i.e. Darwin 1.3.7 has this problem.
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
The tzset replacement is necessary for at least Solaris 2.5, 2.5.1, and 2.6.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,10 +22,12 @@
#include <config.h>
/* Disable the definitions of gettimeofday and localtime (from config.h)
/* Disable the definitions of these functions (from config.h)
so we can use the library versions here. */
#undef gettimeofday
#undef gmtime
#undef localtime
#undef tzset
#include <sys/types.h>
@@ -60,6 +63,18 @@ rpl_localtime (const time_t *timep)
return tm;
}
/* Same as above, since gmtime and localtime use the same buffer. */
struct tm *
rpl_gmtime (const time_t *timep)
{
struct tm *tm = gmtime (timep);
if (! localtime_buffer_addr)
localtime_buffer_addr = tm;
return tm;
}
/* This is a wrapper for gettimeofday. It is used only on systems for which
gettimeofday clobbers the static buffer used for localtime's result.
@@ -84,3 +99,23 @@ rpl_gettimeofday (struct timeval *tv, struct timezone *tz)
return result;
}
/* This is a wrapper for tzset. It is used only on systems for which
tzset may clobber the static buffer used for localtime's result.
Save and restore the contents of the buffer used for localtime's
result around the call to tzset. */
void
rpl_tzset (void)
{
struct tm save;
if (! localtime_buffer_addr)
{
time_t t = 0;
localtime_buffer_addr = localtime (&t);
}
save = *localtime_buffer_addr;
tzset ();
*localtime_buffer_addr = save;
}

View File

@@ -1,5 +1,5 @@
/* getusershell.c -- Return names of valid user shells.
Copyright (C) 1991, 1997, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1991, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -153,7 +153,7 @@ readname (name, size, stream)
if (*name == NULL)
{
*size = 10;
*name = (char *) xmalloc (*size);
*name = xmalloc (*size);
}
/* Skip blank space. */
@@ -166,7 +166,7 @@ readname (name, size, stream)
while (name_index >= *size)
{
*size *= 2;
*name = (char *) xrealloc (*name, *size);
*name = xrealloc (*name, *size);
}
c = getc (stream);
}

View File

@@ -1,5 +1,5 @@
/* group-member.c -- determine whether group id is in calling user's group list
Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1994, 1997, 1998, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,8 +67,7 @@ get_group_info (void)
while (n_groups == n_group_slots)
{
n_group_slots += 64;
group = (GETGROUPS_T *) xrealloc (group,
n_group_slots * sizeof (GETGROUPS_T));
group = xrealloc (group, n_group_slots * sizeof (GETGROUPS_T));
n_groups = getgroups (n_group_slots, group);
}
@@ -79,7 +78,7 @@ get_group_info (void)
return NULL;
}
gi = (struct group_info *) xmalloc (sizeof (*gi));
gi = xmalloc (sizeof (*gi));
gi->n_groups = n_groups;
gi->group = group;

View File

@@ -1,15 +1,6 @@
#ifndef GROUP_MEMBER_H_
# define GROUP_MEMBER_H_ 1
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
int
group_member PARAMS ((gid_t));
int group_member (gid_t);
#endif /* GROUP_MEMBER_H_ */

View File

@@ -1,18 +1,6 @@
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1
# if HAVE_CONFIG_H
# include <config.h>
# endif
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
int hard_locale PARAMS ((int));
int hard_locale (int);
#endif /* HARD_LOCALE_H_ */

View File

@@ -1,5 +1,8 @@
/* hash - hashing table processing.
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
Written by Jim Meyering, 1992.
This program is free software; you can redistribute it and/or modify
@@ -27,11 +30,9 @@
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <assert.h>
@@ -403,9 +404,6 @@ hash_do_for_each (const Hash_table *table, Hash_processor processor,
unsigned
hash_string (const char *string, unsigned n_buckets)
{
# ifndef CHAR_BIT
# define CHAR_BIT 8
# endif
# define ROTATE_LEFT(Value, Shift) \
((Value) << (Shift) | (Value) >> ((sizeof (unsigned) * CHAR_BIT) - (Shift)))
# define HASH_ONE_CHAR(Value, Byte) \

View File

@@ -24,18 +24,10 @@
#ifndef HASH_H_
# define HASH_H_
# ifndef PARAMS
# if PROTOTYPES || __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
typedef unsigned (*Hash_hasher) PARAMS ((const void *, unsigned));
typedef bool (*Hash_comparator) PARAMS ((const void *, const void *));
typedef void (*Hash_data_freer) PARAMS ((void *));
typedef bool (*Hash_processor) PARAMS ((void *, void *));
typedef unsigned (*Hash_hasher) (const void *, unsigned);
typedef bool (*Hash_comparator) (const void *, const void *);
typedef void (*Hash_data_freer) (void *);
typedef bool (*Hash_processor) (void *, void *);
struct hash_entry
{
@@ -62,32 +54,32 @@ struct hash_table;
typedef struct hash_table Hash_table;
/* Information and lookup. */
unsigned hash_get_n_buckets PARAMS ((const Hash_table *));
unsigned hash_get_n_buckets_used PARAMS ((const Hash_table *));
unsigned hash_get_n_entries PARAMS ((const Hash_table *));
unsigned hash_get_max_bucket_length PARAMS ((const Hash_table *));
bool hash_table_ok PARAMS ((const Hash_table *));
void hash_print_statistics PARAMS ((const Hash_table *, FILE *));
void *hash_lookup PARAMS ((const Hash_table *, const void *));
unsigned hash_get_n_buckets (const Hash_table *);
unsigned hash_get_n_buckets_used (const Hash_table *);
unsigned hash_get_n_entries (const Hash_table *);
unsigned hash_get_max_bucket_length (const Hash_table *);
bool hash_table_ok (const Hash_table *);
void hash_print_statistics (const Hash_table *, FILE *);
void *hash_lookup (const Hash_table *, const void *);
/* Walking. */
void *hash_get_first PARAMS ((const Hash_table *));
void *hash_get_next PARAMS ((const Hash_table *, const void *));
unsigned hash_get_entries PARAMS ((const Hash_table *, void **, unsigned));
unsigned hash_do_for_each PARAMS ((const Hash_table *, Hash_processor, void *));
void *hash_get_first (const Hash_table *);
void *hash_get_next (const Hash_table *, const void *);
unsigned hash_get_entries (const Hash_table *, void **, unsigned);
unsigned hash_do_for_each (const Hash_table *, Hash_processor, void *);
/* Allocation and clean-up. */
unsigned hash_string PARAMS ((const char *, unsigned));
void hash_reset_tuning PARAMS ((Hash_tuning *));
Hash_table *hash_initialize PARAMS ((unsigned, const Hash_tuning *,
Hash_hasher, Hash_comparator,
Hash_data_freer));
void hash_clear PARAMS ((Hash_table *));
void hash_free PARAMS ((Hash_table *));
unsigned hash_string (const char *, unsigned);
void hash_reset_tuning (Hash_tuning *);
Hash_table *hash_initialize (unsigned, const Hash_tuning *,
Hash_hasher, Hash_comparator,
Hash_data_freer);
void hash_clear (Hash_table *);
void hash_free (Hash_table *);
/* Insertion and deletion. */
bool hash_rehash PARAMS ((Hash_table *, unsigned));
void *hash_insert PARAMS ((Hash_table *, const void *));
void *hash_delete PARAMS ((Hash_table *, const void *));
bool hash_rehash (Hash_table *, unsigned);
void *hash_insert (Hash_table *, const void *);
void *hash_delete (Hash_table *, const void *);
#endif

View File

@@ -1,6 +1,6 @@
/* human.c -- print human readable file size
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -17,27 +17,14 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Originally contributed by lm@sgi.com;
--si, output block size selection, large file support,
and grouping added by eggert@twinsun.com. */
/* Written by Paul Eggert and Larry McVoy. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include "human.h"
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#ifndef SIZE_MAX
# define SIZE_MAX ((size_t) -1)
#endif
@@ -45,8 +32,6 @@ typedef enum {false = 0, true = 1} bool;
# define UINTMAX_MAX ((uintmax_t) -1)
#endif
#include <limits.h>
#if HAVE_LOCALE_H && HAVE_LOCALECONV
# include <locale.h>
#endif
@@ -70,17 +55,14 @@ char *getenv ();
#endif
#include <stdio.h>
#include <sys/types.h>
#include <gettext.h>
#define _(text) gettext (text)
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include <argmatch.h>
#include <error.h>
#include <xstrtol.h>
#include "human.h"
/* The maximum length of a suffix like "KiB". */
#define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3

View File

@@ -1,29 +1,41 @@
/* human.h -- print human readable file size
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Paul Eggert and Larry McVoy. */
#ifndef HUMAN_H_
# define HUMAN_H_ 1
/* Before including this file, you need something like the following:
# if HAVE_CONFIG_H
# include <config.h>
# endif
#if HAVE_CONFIG_H
# include <config.h>
#endif
# include <limits.h>
# include <stdbool.h>
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#include <limits.h>
so that the proper identifiers are all declared. */
# if HAVE_INTTYPES_H
# include <inttypes.h>
# else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
# endif
/* A conservative bound on the maximum length of a human-readable string.
The output can be the square of the largest uintmax_t, so double

View File

@@ -77,7 +77,7 @@ getuser (uid_t uid)
return tail->name;
pwent = getpwuid (uid);
tail = (struct userid *) xmalloc (sizeof (struct userid));
tail = xmalloc (sizeof (struct userid));
tail->id.u = uid;
tail->name = pwent ? xstrdup (pwent->pw_name) : NULL;
@@ -119,7 +119,7 @@ getuidbyname (const char *user)
}
#endif
tail = (struct userid *) xmalloc (sizeof (struct userid));
tail = xmalloc (sizeof (struct userid));
tail->name = xstrdup (user);
/* Add to the head of the list, so most recently used is first. */
@@ -153,7 +153,7 @@ getgroup (gid_t gid)
return tail->name;
grent = getgrgid (gid);
tail = (struct userid *) xmalloc (sizeof (struct userid));
tail = xmalloc (sizeof (struct userid));
tail->id.g = gid;
tail->name = grent ? xstrdup (grent->gr_name) : NULL;
@@ -195,7 +195,7 @@ getgidbyname (const char *group)
}
#endif
tail = (struct userid *) xmalloc (sizeof (struct userid));
tail = xmalloc (sizeof (struct userid));
tail->name = xstrdup (group);
/* Add to the head of the list, so most recently used is first. */

View File

@@ -1,6 +1,6 @@
/* inttostr.h -- convert integers to printable strings
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,14 +44,6 @@
#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
#ifndef PARAMS
# if defined PROTOTYPES || defined __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
char *offtostr PARAMS ((off_t, char *));
char *imaxtostr PARAMS ((intmax_t, char *));
char *umaxtostr PARAMS ((uintmax_t, char *));
char *offtostr (off_t, char *);
char *imaxtostr (intmax_t, char *);
char *umaxtostr (uintmax_t, char *);

View File

@@ -1,5 +1,7 @@
/* linebuffer.c -- read arbitrarily long lines
Copyright (C) 1986, 1991, 1998, 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1986, 1991, 1998, 1999, 2001, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +49,7 @@ initbuffer (struct linebuffer *linebuffer)
Return NULL upon error, or when STREAM is empty.
Otherwise, return LINEBUFFER. */
struct linebuffer *
readline (struct linebuffer *linebuffer, FILE *stream)
readlinebuffer (struct linebuffer *linebuffer, FILE *stream)
{
int c;
char *buffer = linebuffer->buffer;

View File

@@ -1,5 +1,7 @@
/* linebuffer.h -- declarations for reading arbitrarily long lines
Copyright (C) 1986, 1991, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1986, 1991, 1998, 1999, 2002, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +20,8 @@
#if !defined LINEBUFFER_H
# define LINEBUFFER_H
# include <stdio.h>
/* A `struct linebuffer' holds a line of text. */
struct linebuffer
@@ -27,25 +31,16 @@ struct linebuffer
char *buffer;
};
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
/* Initialize linebuffer LINEBUFFER for use. */
void initbuffer PARAMS ((struct linebuffer *linebuffer));
void initbuffer (struct linebuffer *linebuffer);
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
Keep the newline; append a newline if it's the last line of a file
that ends in a non-newline character. Do not null terminate.
Return LINEBUFFER, except at end of file return 0. */
struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
FILE *stream));
struct linebuffer *readlinebuffer (struct linebuffer *linebuffer, FILE *stream);
/* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
void freebuffer PARAMS ((struct linebuffer *));
void freebuffer (struct linebuffer *);
#endif /* LINEBUFFER_H */

View File

@@ -17,19 +17,10 @@
/* Written by Jim Meyering. */
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
void
parse_long_options PARAMS ((int _argc,
char **_argv,
const char *_command_name,
const char *_package,
const char *_version,
const char *_authors,
void (*_usage) (int)));
void parse_long_options (int _argc,
char **_argv,
const char *_command_name,
const char *_package,
const char *_version,
const char *_authors,
void (*_usage) (int));

View File

@@ -1,6 +1,7 @@
/* makepath.c -- Ensure that a directory path exists.
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,19 +23,7 @@
# include <config.h>
#endif
#if __GNUC__
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
# pragma alloca
# else
char *alloca ();
# endif
# endif
#endif
#include <alloca.h>
#include <stdio.h>
#include <sys/types.h>
@@ -99,7 +88,6 @@ extern int errno;
#define WX_USR (S_IWUSR | S_IXUSR)
/* Include this before libintl.h so we get our definition of PARAMS. */
#include "makepath.h"
#include "gettext.h"
@@ -404,7 +392,7 @@ make_path (const char *argpath,
*(p->dirname_end) = '\0';
if (chmod (dirpath, parent_mode))
{
error (0, errno, "cannot change permissions of %s",
error (0, errno, _("cannot change permissions of %s"),
quote (dirpath));
retval = 1;
}

View File

@@ -1,22 +1,12 @@
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
int make_path (const char *_argpath,
int _mode,
int _parent_mode,
uid_t _owner,
gid_t _group,
int _preserve_existing,
const char *_verbose_fmt_string);
int
make_path PARAMS ((const char *_argpath,
int _mode,
int _parent_mode,
uid_t _owner,
gid_t _group,
int _preserve_existing,
const char *_verbose_fmt_string));
int
make_dir PARAMS ((const char *dir,
const char *dirpath,
mode_t mode,
int *created_dir_p));
int make_dir (const char *dir,
const char *dirpath,
mode_t mode,
int *created_dir_p);

View File

@@ -26,14 +26,8 @@
#include <sys/types.h>
#if STDC_HEADERS || defined _LIBC
# include <stdlib.h>
# include <string.h>
#else
# ifndef HAVE_MEMCPY
# define memcpy(d, s, n) bcopy ((s), (d), (n))
# endif
#endif
#include <stdlib.h>
#include <string.h>
#include "md5.h"
#include "unlocked-io.h"
@@ -396,7 +390,7 @@ md5_process_block (buffer, len, ctx)
argument specifying the function to use. */
#undef OP
#define OP(f, a, b, c, d, k, s, T) \
do \
do \
{ \
a += f (b, c, d) + correct_words[k] + T; \
a = rol (a, s); \

View File

@@ -1,5 +1,5 @@
/* Case-insensitive buffer comparator.
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@
# include <config.h>
#endif
#include <sys/types.h>
#include <ctype.h>
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))

View File

@@ -1,10 +1,3 @@
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#include <stddef.h>
int
memcasecmp PARAMS ((const void *vs1, const void *vs2, size_t n));
int memcasecmp (const void *vs1, const void *vs2, size_t n);

View File

@@ -1,5 +1,5 @@
/* Locale-specific memory comparison.
Copyright 1999, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,26 +21,29 @@
# include <config.h>
#endif
#include "memcoll.h"
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#include <sys/types.h>
#if HAVE_STRING_H
# include <string.h>
#endif
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
adjacent. Temporarily modify the bytes after S1 and S2, but
restore their original contents before returning. Set errno to an
adjacent. Perhaps temporarily modify the bytes after S1 and S2,
but restore their original contents before returning. Set errno to an
error number if there is an error, and to zero otherwise. */
int
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
{
int diff;
#if HAVE_STRCOLL
char n1 = s1[s1len];
char n2 = s2[s2len];
@@ -75,5 +78,13 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
s1[s1len - 1] = n1;
s2[s2len - 1] = n2;
#else
diff = memcmp (s1, s2, s1len < s2len ? s1len : s2len);
if (! diff)
diff = s1len < s2len ? -1 : s1len != s2len;
#endif
return diff;
}

View File

@@ -1,18 +1,8 @@
#ifndef MEMCOLL_H_
# define MEMCOLL_H_ 1
# if HAVE_CONFIG_H
# include <config.h>
# endif
# include <stddef.h>
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
int memcoll PARAMS ((char *, size_t, char *, size_t));
int memcoll (char *, size_t, char *, size_t);
#endif /* MEMCOLL_H_ */

View File

@@ -6,20 +6,19 @@
adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
and implemented by Roland McGrath (roland@ai.mit.edu).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is 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.
The GNU C Library is distributed in the hope that it will be useful,
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
Library General Public License for more details.
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 Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@@ -1,22 +1,21 @@
/* Convert a `struct tm' to a time_t value.
Copyright (C) 1993-1999, 2002 Free Software Foundation, Inc.
Copyright (C) 1993-1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert (eggert@twinsun.com).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
The GNU C Library is distributed in the hope that it will be useful,
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
Lesser General Public License for more details.
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 Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Define this to have a standalone program to test this implementation of
mktime. */
@@ -27,7 +26,6 @@
#endif
#ifdef _LIBC
# define HAVE_LIMITS_H 1
# define STDC_HEADERS 1
#endif
@@ -41,9 +39,7 @@
#include <sys/types.h> /* Some systems define `time_t' here. */
#include <time.h>
#if HAVE_LIMITS_H
# include <limits.h>
#endif
#include <limits.h>
#if DEBUG
# include <stdio.h>
@@ -55,18 +51,6 @@
# define mktime my_mktime
#endif /* DEBUG */
#ifndef __P
# if defined __GNUC__ || (defined __STDC__ && __STDC__)
# define __P(args) args
# else
# define __P(args) ()
# endif /* GCC. */
#endif /* Not __P. */
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
/* The extra casts work around common compiler bugs. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
@@ -75,29 +59,39 @@
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
#define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
#ifndef INT_MIN
# define INT_MIN TYPE_MINIMUM (int)
#endif
#ifndef INT_MAX
# define INT_MAX TYPE_MAXIMUM (int)
#endif
#ifndef TIME_T_MIN
# define TIME_T_MIN TYPE_MINIMUM (time_t)
#endif
#ifndef TIME_T_MAX
# define TIME_T_MAX TYPE_MAXIMUM (time_t)
#endif
#define TIME_T_MIDPOINT (((TIME_T_MIN + TIME_T_MAX) >> 1) + 1)
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
verify (time_t_is_integer, (time_t) 0.5 == 0);
verify (twos_complement_arithmetic, -1 == ~1 + 1);
verify (right_shift_propagates_sign, -1 >> 1 == -1);
/* The code also assumes that signed integer overflow silently wraps
around, but this assumption can't be stated without causing a
diagnostic on some hosts. */
#define TM_YEAR_BASE 1900
#define EPOCH_YEAR 1970
#define TM_YEAR_BASE 1900
verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0);
#ifndef __isleap
/* Nonzero if YEAR is a leap year (every 4 years,
except every 100th isn't, and every 400th is). */
# define __isleap(year) \
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
#endif
/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */
static inline int
leapyear (int year)
{
/* Don't add YEAR to TM_YEAR_BASE, as that might overflow.
Also, work even if YEAR is negative. */
return
((year & 3) == 0
&& (year % 100 != 0
|| ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3)));
}
/* How many days come before each month (0-12). */
#ifndef _LIBC
@@ -129,40 +123,74 @@ my_mktime_localtime_r (const time_t *t, struct tm *tp)
}
#endif /* ! _LIBC */
/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
(YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
were not adjusted between the time stamps.
/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP),
measured in seconds, ignoring leap seconds.
YEAR uses the same numbering as TM->tm_year.
All values are in range, except possibly YEAR.
If TP is null, return a nonzero value.
If overflow occurs, yield the low order bits of the correct answer. */
static time_t
ydhms_tm_diff (int year, int yday, int hour, int min, int sec,
const struct tm *tp)
The YEAR values uses the same numbering as TP->tm_year. Values
need not be in the usual range. However, YEAR1 must not be less
than 2 * INT_MIN or greater than 2 * INT_MAX.
The result may overflow. It is the caller's responsibility to
detect overflow. */
static inline time_t
ydhms_diff (long int year1, long int yday1, int hour1, int min1, int sec1,
int year0, int yday0, int hour0, int min0, int sec0)
{
if (!tp)
return 1;
else
verify (C99_integer_division, -1 / 2 == 0);
verify (long_int_year_and_yday_are_wide_enough,
INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid integer overflow here. */
int a4 = (year1 >> 2) + (TM_YEAR_BASE >> 2) - ! (year1 & 3);
int b4 = (year0 >> 2) + (TM_YEAR_BASE >> 2) - ! (year0 & 3);
int a100 = a4 / 25 - (a4 % 25 < 0);
int b100 = b4 / 25 - (b4 % 25 < 0);
int a400 = a100 >> 2;
int b400 = b100 >> 2;
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
/* Compute the desired time in time_t precision. Overflow might
occur here. */
time_t tyear1 = year1;
time_t years = tyear1 - year0;
time_t days = 365 * years + yday1 - yday0 + intervening_leap_days;
time_t hours = 24 * days + hour1 - hour0;
time_t minutes = 60 * hours + min1 - min0;
time_t seconds = 60 * minutes + sec1 - sec0;
return seconds;
}
/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC),
assuming that *T corresponds to *TP and that no clock adjustments
occurred between *TP and the desired time.
If TP is null, return a value not equal to *T; this avoids false matches.
If overflow occurs, yield the minimal or maximal value, except do not
yield a value equal to *T. */
static time_t
guess_time_tm (long int year, long int yday, int hour, int min, int sec,
const time_t *t, const struct tm *tp)
{
if (tp)
{
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid int overflow. time_t overflow is OK, since
only the low order bits of the correct time_t answer are needed.
Don't convert to time_t until after all divisions are done, since
time_t might be unsigned. */
int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3);
int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3);
int a100 = a4 / 25 - (a4 % 25 < 0);
int b100 = b4 / 25 - (b4 % 25 < 0);
int a400 = a100 >> 2;
int b400 = b100 >> 2;
int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
time_t years = year - (time_t) tp->tm_year;
time_t days = (365 * years + intervening_leap_days
+ (yday - tp->tm_yday));
return (60 * (60 * (24 * days + (hour - tp->tm_hour))
+ (min - tp->tm_min))
+ (sec - tp->tm_sec));
time_t d = ydhms_diff (year, yday, hour, min, sec,
tp->tm_year, tp->tm_yday,
tp->tm_hour, tp->tm_min, tp->tm_sec);
time_t t1 = *t + d;
if ((t1 < *t) == (TYPE_SIGNED (time_t) ? d < 0 : TIME_T_MAX / 2 < d))
return t1;
}
/* Overflow occurred one way or another. Return the nearest result
that is actually in range, except don't report a zero difference
if the actual difference is nonzero, as that would cause a false
match. */
return (*t < TIME_T_MIDPOINT
? TIME_T_MIN + (*t == TIME_T_MIN)
: TIME_T_MAX - (*t == TIME_T_MAX));
}
/* Use CONVERT to convert *T to a broken down time in *TP.
@@ -224,7 +252,7 @@ __mktime_internal (struct tm *tp,
struct tm *(*convert) (const time_t *, struct tm *),
time_t *offset)
{
time_t t, dt, t0, t1, t2;
time_t t, gt, t0, t1, t2;
struct tm tm;
/* The maximum number of probes (calls to CONVERT) should be enough
@@ -250,7 +278,8 @@ __mktime_internal (struct tm *tp,
int mon_remainder = mon % 12;
int negative_mon_remainder = mon_remainder < 0;
int mon_years = mon / 12 - negative_mon_remainder;
int year = year_requested + mon_years;
long int lyear_requested = year_requested;
long int year = lyear_requested + mon_years;
/* The other values need not be in range:
the remaining code handles minor overflows correctly,
@@ -259,38 +288,95 @@ __mktime_internal (struct tm *tp,
/* Calculate day of year from year, month, and day of month.
The result need not be in range. */
int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)]
[mon_remainder + 12 * negative_mon_remainder])
+ mday - 1);
int mon_yday = ((__mon_yday[leapyear (year)]
[mon_remainder + 12 * negative_mon_remainder])
- 1);
long int lmday = mday;
long int yday = mon_yday + lmday;
time_t guessed_offset = *offset;
int sec_requested = sec;
/* Only years after 1970 are defined.
If year is 69, it might still be representable due to
timezone differences. */
if (year < 69)
return -1;
if (LEAP_SECONDS_POSSIBLE)
{
/* Handle out-of-range seconds specially,
since ydhms_tm_diff assumes every minute has 60 seconds. */
if (sec < 0)
sec = 0;
if (59 < sec)
sec = 59;
}
#if LEAP_SECONDS_POSSIBLE
/* Handle out-of-range seconds specially,
since ydhms_tm_diff assumes every minute has 60 seconds. */
if (sec < 0)
sec = 0;
if (59 < sec)
sec = 59;
#endif
/* Invert CONVERT by probing. First assume the same offset as last
time. */
/* Invert CONVERT by probing. First assume the same offset as last time.
Then repeatedly use the error to improve the guess. */
t0 = ydhms_diff (year, yday, hour, min, sec,
EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset);
tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE;
tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm);
if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
{
/* time_t isn't large enough to rule out overflows, so check
for major overflows. A gross check suffices, since if t0
has overflowed, it is off by a multiple of TIME_T_MAX -
TIME_T_MIN + 1. So ignore any component of the difference
that is bounded by a small value. */
for (t = t1 = t2 = t0 + *offset, dst2 = 0;
(dt = ydhms_tm_diff (year, yday, hour, min, sec,
ranged_convert (convert, &t, &tm)));
t1 = t2, t2 = t, t += dt, dst2 = tm.tm_isdst != 0)
/* Approximate log base 2 of the number of time units per
biennium. A biennium is 2 years; use this unit instead of
years to avoid integer overflow. For example, 2 average
Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds,
which is 63113904 seconds, and rint (log2 (63113904)) is
26. */
int ALOG2_SECONDS_PER_BIENNIUM = 26;
int ALOG2_MINUTES_PER_BIENNIUM = 20;
int ALOG2_HOURS_PER_BIENNIUM = 14;
int ALOG2_DAYS_PER_BIENNIUM = 10;
int LOG2_YEARS_PER_BIENNIUM = 1;
int approx_requested_biennia =
((year_requested >> LOG2_YEARS_PER_BIENNIUM)
- ((EPOCH_YEAR - TM_YEAR_BASE) >> LOG2_YEARS_PER_BIENNIUM)
+ (mday >> ALOG2_DAYS_PER_BIENNIUM)
+ (hour >> ALOG2_HOURS_PER_BIENNIUM)
+ (min >> ALOG2_MINUTES_PER_BIENNIUM)
+ (LEAP_SECONDS_POSSIBLE ? 0 : sec >> ALOG2_SECONDS_PER_BIENNIUM));
int approx_biennia = t0 >> ALOG2_SECONDS_PER_BIENNIUM;
int diff = approx_biennia - approx_requested_biennia;
int abs_diff = diff < 0 ? - diff : diff;
/* IRIX 4.0.5 cc miscaculates TIME_T_MIN / 3: it erroneously
gives a positive value of 715827882. Setting a variable
first then doing math on it seems to work.
(ghazi@caip.rutgers.edu) */
time_t time_t_max = TIME_T_MAX;
time_t time_t_min = TIME_T_MIN;
time_t overflow_threshold =
(time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM;
if (overflow_threshold < abs_diff)
{
/* Overflow occurred. Try repairing it; this might work if
the time zone offset is enough to undo the overflow. */
time_t repaired_t0 = -1 - t0;
approx_biennia = repaired_t0 >> ALOG2_SECONDS_PER_BIENNIUM;
diff = approx_biennia - approx_requested_biennia;
abs_diff = diff < 0 ? - diff : diff;
if (overflow_threshold < abs_diff)
return -1;
guessed_offset += repaired_t0 - t0;
t0 = repaired_t0;
}
}
/* Repeatedly use the error to improve the guess. */
for (t = t1 = t2 = t0, dst2 = 0;
(gt = guess_time_tm (year, yday, hour, min, sec, &t,
ranged_convert (convert, &t, &tm)),
t != gt);
t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0)
if (t == t1 && t != t2
&& (tm.tm_isdst < 0
|| (isdst < 0
@@ -298,91 +384,83 @@ __mktime_internal (struct tm *tp,
: (isdst != 0) != (tm.tm_isdst != 0))))
/* We can't possibly find a match, as we are oscillating
between two values. The requested time probably falls
within a spring-forward gap of size DT. Follow the common
practice in this case, which is to return a time that is DT
within a spring-forward gap of size GT - T. Follow the common
practice in this case, which is to return a time that is GT - T
away from the requested time, preferring a time whose
tm_isdst differs from the requested value. (If no tm_isdst
was requested and only one of the two values has a nonzero
tm_isdst, prefer that value.) In practice, this is more
useful than returning -1. */
break;
goto offset_found;
else if (--remaining_probes == 0)
return -1;
/* If we have a match, check whether tm.tm_isdst has the requested
/* We have a match. Check whether tm.tm_isdst has the requested
value, if any. */
if (dt == 0 && isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst)
if (isdst != tm.tm_isdst && 0 <= isdst && 0 <= tm.tm_isdst)
{
/* tm.tm_isdst has the wrong value. Look for a neighboring
time with the right value, and use its UTC offset.
Heuristic: probe the previous three calendar quarters (approximately),
looking for the desired isdst. This isn't perfect,
but it's good enough in practice. */
int quarter = 7889238; /* seconds per average 1/4 Gregorian year */
int i;
/* If we're too close to the time_t limit, look in future quarters. */
if (t < TIME_T_MIN + 3 * quarter)
quarter = -quarter;
Heuristic: probe the adjacent timestamps in both directions,
looking for the desired isdst. This should work for all real
time zone histories in the tz database. */
for (i = 1; i <= 3; i++)
{
time_t ot = t - i * quarter;
struct tm otm;
ranged_convert (convert, &ot, &otm);
if (otm.tm_isdst == isdst)
{
/* We found the desired tm_isdst.
Extrapolate back to the desired time. */
t = ot + ydhms_tm_diff (year, yday, hour, min, sec, &otm);
ranged_convert (convert, &t, &tm);
break;
}
}
/* Distance between probes when looking for a DST boundary. In
tzdata2003a, the shortest period of DST is 601200 seconds
(e.g., America/Recife starting 2000-10-08 01:00), and the
shortest period of non-DST surrounded by DST is 694800
seconds (Africa/Tunis starting 1943-04-17 01:00). Use the
minimum of these two values, so we don't miss these short
periods when probing. */
int stride = 601200;
/* The longest period of DST in tzdata2003a is 536454000 seconds
(e.g., America/Jujuy starting 1946-10-01 01:00). The longest
period of non-DST is much longer, but it makes no real sense
to search for more than a year of non-DST, so use the DST
max. */
int duration_max = 536454000;
/* Search in both directions, so the maximum distance is half
the duration; add the stride to avoid off-by-1 problems. */
int delta_bound = duration_max / 2 + stride;
int delta, direction;
for (delta = stride; delta < delta_bound; delta += stride)
for (direction = -1; direction <= 1; direction += 2)
{
time_t ot = t + delta * direction;
if ((ot < t) == (direction < 0))
{
struct tm otm;
ranged_convert (convert, &ot, &otm);
if (otm.tm_isdst == isdst)
{
/* We found the desired tm_isdst.
Extrapolate back to the desired time. */
t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm);
ranged_convert (convert, &t, &tm);
goto offset_found;
}
}
}
}
*offset = t - t0;
offset_found:
*offset = guessed_offset + t - t0;
#if LEAP_SECONDS_POSSIBLE
if (sec_requested != tm.tm_sec)
if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec)
{
/* Adjust time to reflect the tm_sec requested, not the normalized value.
Also, repair any damage from a false match due to a leap second. */
t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60);
if (! (*convert) (&t, &tm))
return -1;
}
#endif
if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
{
/* time_t isn't large enough to rule out overflows in ydhms_tm_diff,
so check for major overflows. A gross check suffices,
since if t has overflowed, it is off by a multiple of
TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of
the difference that is bounded by a small value. */
double dyear = (double) year_requested + mon_years - tm.tm_year;
double dday = 366 * dyear + mday;
double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested;
/* On Irix4.0.5 cc, dividing TIME_T_MIN by 3 does not produce
correct results, ie., it erroneously gives a positive value
of 715827882. Setting a variable first then doing math on it
seems to work. (ghazi@caip.rutgers.edu) */
const time_t time_t_max = TIME_T_MAX;
const time_t time_t_min = TIME_T_MIN;
if (time_t_max / 3 - time_t_min / 3 < (dsec < 0 ? - dsec : dsec))
return -1;
}
if (year == 69)
{
/* If year was 69, need to check whether the time was representable
or not. */
if (t < 0 || t > 2 * 24 * 60 * 60)
int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec;
t1 = t + sec_requested;
t2 = t1 + sec_adjustment;
if (((t1 < t) != (sec_requested < 0))
| ((t2 < t1) != (sec_adjustment < 0))
| ! (*convert) (&t, &tm))
return -1;
}
@@ -391,12 +469,15 @@ __mktime_internal (struct tm *tp,
}
/* FIXME: This should use a signed type wide enough to hold any UTC
offset in seconds. 'int' should be good enough for GNU code. We
can't fix this unilaterally though, as other modules invoke
__mktime_internal. */
static time_t localtime_offset;
/* Convert *TP to a time_t value. */
time_t
mktime (tp)
struct tm *tp;
mktime (struct tm *tp)
{
#ifdef _LIBC
/* POSIX.1 8.1.1 requires that whenever mktime() is called, the
@@ -420,9 +501,7 @@ libc_hidden_weak (timelocal)
#if DEBUG
static int
not_equal_tm (a, b)
struct tm *a;
struct tm *b;
not_equal_tm (const struct tm *a, const struct tm *b)
{
return ((a->tm_sec ^ b->tm_sec)
| (a->tm_min ^ b->tm_min)
@@ -436,8 +515,7 @@ not_equal_tm (a, b)
}
static void
print_tm (tp)
struct tm *tp;
print_tm (const struct tm *tp)
{
if (tp)
printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
@@ -449,19 +527,15 @@ print_tm (tp)
}
static int
check_result (tk, tmk, tl, lt)
time_t tk;
struct tm tmk;
time_t tl;
struct tm *lt;
check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt)
{
if (tk != tl || !lt || not_equal_tm (&tmk, lt))
{
printf ("mktime (");
print_tm (&tmk);
printf (")\nyields (");
print_tm (lt);
printf (") == %ld, should be %ld\n", (long) tl, (long) tk);
printf (")\nyields (");
print_tm (&tmk);
printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl);
return 1;
}
@@ -469,14 +543,12 @@ check_result (tk, tmk, tl, lt)
}
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
int status = 0;
struct tm tm, tmk, tml;
struct tm *lt;
time_t tk, tl;
time_t tk, tl, tl1;
char trailer;
if ((argc == 3 || argc == 4)
@@ -498,7 +570,7 @@ main (argc, argv)
tml = *lt;
lt = &tml;
}
printf ("mktime returns %ld == ", (long) tl);
printf ("mktime returns %ld == ", (long int) tl);
print_tm (&tmk);
printf ("\n");
status = check_result (tl, tmk, tl, lt);
@@ -510,23 +582,26 @@ main (argc, argv)
time_t to = atol (argv[3]);
if (argc == 4)
for (tl = from; tl <= to; tl += by)
for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
{
lt = localtime (&tl);
if (lt)
{
tmk = tml = *lt;
tk = mktime (&tmk);
status |= check_result (tk, tmk, tl, tml);
status |= check_result (tk, tmk, tl, &tml);
}
else
{
printf ("localtime (%ld) yields 0\n", (long) tl);
printf ("localtime (%ld) yields 0\n", (long int) tl);
status = 1;
}
tl1 = tl + by;
if ((tl1 < tl) != (by < 0))
break;
}
else
for (tl = from; tl <= to; tl += by)
for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1)
{
/* Null benchmark. */
lt = localtime (&tl);
@@ -534,13 +609,16 @@ main (argc, argv)
{
tmk = tml = *lt;
tk = tl;
status |= check_result (tk, tmk, tl, tml);
status |= check_result (tk, tmk, tl, &tml);
}
else
{
printf ("localtime (%ld) yields 0\n", (long) tl);
printf ("localtime (%ld) yields 0\n", (long int) tl);
status = 1;
}
tl1 = tl + by;
if ((tl1 < tl) != (by < 0))
break;
}
}
else
@@ -557,6 +635,6 @@ main (argc, argv)
/*
Local Variables:
compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
compile-command: "gcc -DDEBUG -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
End:
*/

View File

@@ -1,5 +1,7 @@
/* modechange.c -- file mode manipulation
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001, 2003 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,6 +33,7 @@
#include "modechange.h"
#include <sys/stat.h>
#include "xstrtol.h"
#include <stddef.h>
#if STDC_HEADERS
# include <stdlib.h>
@@ -38,10 +41,6 @@
char *malloc ();
#endif
#ifndef NULL
# define NULL 0
#endif
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif

View File

@@ -20,10 +20,6 @@
#if ! defined MODECHANGE_H_
# define MODECHANGE_H_
# if HAVE_CONFIG_H
# include <config.h>
# endif
# include <sys/types.h>
/* Affect the execute bits only if at least one execute bit is set already,
@@ -55,17 +51,9 @@ struct mode_change
# define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
# define MODE_BAD_REFERENCE (struct mode_change *) 2
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
struct mode_change *mode_compile PARAMS ((const char *, unsigned));
struct mode_change *mode_create_from_ref PARAMS ((const char *));
mode_t mode_adjust PARAMS ((mode_t, const struct mode_change *));
void mode_free PARAMS ((struct mode_change *));
struct mode_change *mode_compile (const char *, unsigned);
struct mode_change *mode_create_from_ref (const char *);
mode_t mode_adjust (mode_t, const struct mode_change *);
void mode_free (struct mode_change *);
#endif

View File

@@ -322,21 +322,21 @@ read_filesystem_list (int need_fs_type)
remove. Specifically, automount create normal NFS mounts.
*/
if(listmntent(&mntlist, KMTAB, NULL, NULL) < 0)
if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0)
return NULL;
for (p = mntlist; p; p = p->next) {
mnt = p->ment;
me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry));
me->me_devname = xstrdup(mnt->mnt_fsname);
me->me_mountdir = xstrdup(mnt->mnt_dir);
me->me_type = xstrdup(mnt->mnt_type);
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt->mnt_fsname);
me->me_mountdir = xstrdup (mnt->mnt_dir);
me->me_type = xstrdup (mnt->mnt_type);
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
me->me_dev = -1;
*mtail = me;
mtail = &me->me_next;
}
freemntlist(mntlist);
freemntlist (mntlist);
}
#endif
@@ -353,7 +353,7 @@ read_filesystem_list (int need_fs_type)
while ((mnt = getmntent (fp)))
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt->mnt_fsname);
me->me_mountdir = xstrdup (mnt->mnt_dir);
me->me_type = xstrdup (mnt->mnt_type);
@@ -392,7 +392,7 @@ read_filesystem_list (int need_fs_type)
{
char *fs_type = fsp_to_string (fsp);
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsp->f_mntfromname);
me->me_mountdir = xstrdup (fsp->f_mntonname);
me->me_type = fs_type;
@@ -417,7 +417,7 @@ read_filesystem_list (int need_fs_type)
0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
(char *) 0)))
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fsd.fd_req.devname);
me->me_mountdir = xstrdup (fsd.fd_req.path);
me->me_type = gt_names[fsd.fd_req.fstype];
@@ -489,7 +489,7 @@ read_filesystem_list (int need_fs_type)
{
struct rootdir_entry *re;
re = (struct rootdir_entry *) xmalloc (sizeof (struct rootdir_entry));
re = xmalloc (sizeof (struct rootdir_entry));
re->name = name;
re->dev = statbuf.st_dev;
re->ino = statbuf.st_ino;
@@ -515,7 +515,7 @@ read_filesystem_list (int need_fs_type)
if (re->dev == fi.dev && re->ino == fi.root)
break;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name);
me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name);
me->me_type = xstrdup (fi.fsh_name);
@@ -549,7 +549,7 @@ read_filesystem_list (int need_fs_type)
return (NULL);
bufsize = (1 + numsys) * sizeof (struct statfs);
stats = (struct statfs *)xmalloc (bufsize);
stats = xmalloc (bufsize);
numsys = getfsstat (stats, bufsize, MNT_WAIT);
if (numsys < 0)
@@ -560,7 +560,7 @@ read_filesystem_list (int need_fs_type)
for (counter = 0; counter < numsys; counter++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (stats[counter].f_mntfromname);
me->me_mountdir = xstrdup (stats[counter].f_mntonname);
me->me_type = xstrdup (FS_TYPE (stats[counter]));
@@ -589,7 +589,7 @@ read_filesystem_list (int need_fs_type)
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
# ifdef GETFSTYP /* SVR3. */
me->me_devname = xstrdup (mnt.mt_dev);
# else
@@ -634,12 +634,12 @@ read_filesystem_list (int need_fs_type)
#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes it's own way */
{
struct mntent **mnttbl=getmnttbl(),**ent;
struct mntent **mnttbl = getmnttbl (), **ent;
for (ent=mnttbl;*ent;ent++)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup ( (*ent)->mt_resource);
me->me_mountdir = xstrdup( (*ent)->mt_directory);
me->me_mountdir = xstrdup ( (*ent)->mt_directory);
me->me_type = xstrdup ((*ent)->mt_fstype);
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
@@ -649,7 +649,7 @@ read_filesystem_list (int need_fs_type)
*mtail = me;
mtail = &me->me_next;
}
endmnttbl();
endmnttbl ();
}
#endif
@@ -698,7 +698,7 @@ read_filesystem_list (int need_fs_type)
{
while ((ret = getmntent (fp, &mnt)) == 0)
{
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
me->me_devname = xstrdup (mnt.mnt_special);
me->me_mountdir = xstrdup (mnt.mnt_mountp);
me->me_type = xstrdup (mnt.mnt_fstype);
@@ -755,7 +755,7 @@ read_filesystem_list (int need_fs_type)
char *options, *ignore;
vmp = (struct vmount *) thisent;
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
me = xmalloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
{
char *host, *path;

View File

@@ -27,15 +27,7 @@ struct mount_entry
struct mount_entry *me_next;
};
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
struct mount_entry *read_filesystem_list PARAMS ((int need_fs_type));
struct mount_entry *read_filesystem_list (int need_fs_type);
#ifndef ME_DUMMY
# define ME_DUMMY(Fs_name, Fs_type) \

View File

@@ -7,20 +7,19 @@
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
This program is 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
Library General Public License for more details.
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 Library 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. */
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. */
/* Summary:
@@ -123,12 +122,8 @@ extern "C" {
#endif
#ifndef __INT_TO_PTR
#if defined __STDC__ && __STDC__
# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
#else
# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
#endif
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
@@ -297,17 +292,17 @@ extern int obstack_exit_failure;
# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, \
(void *(*) (long)) obstack_chunk_alloc, \
(void (*) (void *)) obstack_chunk_free)
# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) (long)) obstack_chunk_alloc, \
(void *(*) (long)) obstack_chunk_alloc, \
(void (*) (void *)) obstack_chunk_free)
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), \
(void *(*) (long)) (chunkfun), \
(void (*) (void *)) (freefun))
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
@@ -325,7 +320,7 @@ extern int obstack_exit_failure;
# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) ()) obstack_chunk_alloc, \
(void *(*) ()) obstack_chunk_alloc, \
(void (*) ()) obstack_chunk_free)
# define obstack_begin(h, size) \
@@ -335,12 +330,12 @@ extern int obstack_exit_failure;
# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), \
(void *(*) ()) (chunkfun), \
(void (*) ()) (freefun))
# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), \
(void *(*) ()) (chunkfun), \
(void (*) ()) (freefun), (arg))
# define obstack_chunkfun(h, newchunkfun) \
@@ -477,7 +472,7 @@ __extension__ \
/* The local variable is named __o1 to avoid a name conflict
when obstack_blank is called. */
# define obstack_finish(OBSTACK) \
# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *value; \
@@ -574,7 +569,7 @@ __extension__ \
# define obstack_copy0(h,where,length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
# define obstack_finish(h) \
# define obstack_finish(h) \
( ((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
@@ -586,7 +581,7 @@ __extension__ \
> (h)->chunk_limit - (char *) (h)->chunk) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
__INT_TO_PTR ((h)->temp))
(void *) __INT_TO_PTR ((h)->temp))
# if defined __STDC__ && __STDC__
# define obstack_free(h,obj) \

View File

@@ -1,15 +1,6 @@
#if ! defined PATH_CONCAT_H_
# define PATH_CONCAT_H_
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
char *
path_concat PARAMS ((const char *dir, const char *base, char **base_in_result));
char *path_concat (const char *dir, const char *base, char **base_in_result);
#endif

View File

@@ -1,19 +1,7 @@
#ifndef PHYSMEM_H_
# define PHYSMEM_H_ 1
# if HAVE_CONFIG_H
# include <config.h>
# endif
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
double physmem_total PARAMS ((void));
double physmem_available PARAMS ((void));
double physmem_total (void);
double physmem_available (void);
#endif /* PHYSMEM_H_ */

View File

@@ -1,5 +1,5 @@
/* Parse dates for touch and date.
Copyright (C) 1989, 1990, 1991, 1998, 2000-2002 Free Software Foundation Inc.
Copyright (C) 1989, 1990, 1991, 1998, 2000-2003 Free Software Foundation Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,11 +22,7 @@
# include <config.h>
#endif
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
typedef enum {false = 0, true = 1} bool;
#endif
#include <stdbool.h>
#include <stdio.h>
#if HAVE_STDLIB_H

View File

@@ -7,15 +7,6 @@
# define PDS_CENTURY 4
# define PDS_SECONDS 8
# ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
# endif
bool
posixtime PARAMS ((time_t *p, const char *s, unsigned int syntax_bits));
bool posixtime (time_t *p, const char *s, unsigned int syntax_bits);
#endif

View File

@@ -2,20 +2,19 @@
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
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
Library General Public License for more details.
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 Library 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. */
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 Paul Eggert. */

119
lib/printf-args.c Normal file
View File

@@ -0,0 +1,119 @@
/* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* Specification. */
#include "printf-args.h"
#ifdef STATIC
STATIC
#endif
int
printf_fetchargs (va_list args, arguments *a)
{
unsigned int i;
argument *ap;
for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
switch (ap->type)
{
case TYPE_SCHAR:
ap->a.a_schar = va_arg (args, /*signed char*/ int);
break;
case TYPE_UCHAR:
ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
break;
case TYPE_SHORT:
ap->a.a_short = va_arg (args, /*short*/ int);
break;
case TYPE_USHORT:
ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
break;
case TYPE_INT:
ap->a.a_int = va_arg (args, int);
break;
case TYPE_UINT:
ap->a.a_uint = va_arg (args, unsigned int);
break;
case TYPE_LONGINT:
ap->a.a_longint = va_arg (args, long int);
break;
case TYPE_ULONGINT:
ap->a.a_ulongint = va_arg (args, unsigned long int);
break;
#ifdef HAVE_LONG_LONG
case TYPE_LONGLONGINT:
ap->a.a_longlongint = va_arg (args, long long int);
break;
case TYPE_ULONGLONGINT:
ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
break;
#endif
case TYPE_DOUBLE:
ap->a.a_double = va_arg (args, double);
break;
#ifdef HAVE_LONG_DOUBLE
case TYPE_LONGDOUBLE:
ap->a.a_longdouble = va_arg (args, long double);
break;
#endif
case TYPE_CHAR:
ap->a.a_char = va_arg (args, int);
break;
#ifdef HAVE_WINT_T
case TYPE_WIDE_CHAR:
ap->a.a_wide_char = va_arg (args, wint_t);
break;
#endif
case TYPE_STRING:
ap->a.a_string = va_arg (args, const char *);
break;
#ifdef HAVE_WCHAR_T
case TYPE_WIDE_STRING:
ap->a.a_wide_string = va_arg (args, const wchar_t *);
break;
#endif
case TYPE_POINTER:
ap->a.a_pointer = va_arg (args, void *);
break;
case TYPE_COUNT_SCHAR_POINTER:
ap->a.a_count_schar_pointer = va_arg (args, signed char *);
break;
case TYPE_COUNT_SHORT_POINTER:
ap->a.a_count_short_pointer = va_arg (args, short *);
break;
case TYPE_COUNT_INT_POINTER:
ap->a.a_count_int_pointer = va_arg (args, int *);
break;
case TYPE_COUNT_LONGINT_POINTER:
ap->a.a_count_longint_pointer = va_arg (args, long int *);
break;
#ifdef HAVE_LONG_LONG
case TYPE_COUNT_LONGLONGINT_POINTER:
ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
break;
#endif
default:
/* Unknown type. */
return -1;
}
return 0;
}

134
lib/printf-args.h Normal file
View File

@@ -0,0 +1,134 @@
/* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library 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. */
#ifndef _PRINTF_ARGS_H
#define _PRINTF_ARGS_H
/* Get wchar_t. */
#ifdef HAVE_WCHAR_T
# include <stddef.h>
#endif
/* Get wint_t. */
#ifdef HAVE_WINT_T
# include <wchar.h>
#endif
/* Get va_list. */
#include <stdarg.h>
/* Argument types */
typedef enum
{
TYPE_NONE,
TYPE_SCHAR,
TYPE_UCHAR,
TYPE_SHORT,
TYPE_USHORT,
TYPE_INT,
TYPE_UINT,
TYPE_LONGINT,
TYPE_ULONGINT,
#ifdef HAVE_LONG_LONG
TYPE_LONGLONGINT,
TYPE_ULONGLONGINT,
#endif
TYPE_DOUBLE,
#ifdef HAVE_LONG_DOUBLE
TYPE_LONGDOUBLE,
#endif
TYPE_CHAR,
#ifdef HAVE_WINT_T
TYPE_WIDE_CHAR,
#endif
TYPE_STRING,
#ifdef HAVE_WCHAR_T
TYPE_WIDE_STRING,
#endif
TYPE_POINTER,
TYPE_COUNT_SCHAR_POINTER,
TYPE_COUNT_SHORT_POINTER,
TYPE_COUNT_INT_POINTER,
TYPE_COUNT_LONGINT_POINTER
#ifdef HAVE_LONG_LONG
, TYPE_COUNT_LONGLONGINT_POINTER
#endif
} arg_type;
/* Polymorphic argument */
typedef struct
{
arg_type type;
union
{
signed char a_schar;
unsigned char a_uchar;
short a_short;
unsigned short a_ushort;
int a_int;
unsigned int a_uint;
long int a_longint;
unsigned long int a_ulongint;
#ifdef HAVE_LONG_LONG
long long int a_longlongint;
unsigned long long int a_ulonglongint;
#endif
float a_float;
double a_double;
#ifdef HAVE_LONG_DOUBLE
long double a_longdouble;
#endif
int a_char;
#ifdef HAVE_WINT_T
wint_t a_wide_char;
#endif
const char* a_string;
#ifdef HAVE_WCHAR_T
const wchar_t* a_wide_string;
#endif
void* a_pointer;
signed char * a_count_schar_pointer;
short * a_count_short_pointer;
int * a_count_int_pointer;
long int * a_count_longint_pointer;
#ifdef HAVE_LONG_LONG
long long int * a_count_longlongint_pointer;
#endif
}
a;
}
argument;
typedef struct
{
unsigned int count;
argument *arg;
}
arguments;
/* Fetch the arguments, putting them into a. */
#ifdef STATIC
STATIC
#else
extern
#endif
int printf_fetchargs (va_list args, arguments *a);
#endif /* _PRINTF_ARGS_H */

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