Compare commits

...

914 Commits

Author SHA1 Message Date
Jim Meyering
c453666c3a use double parens on AC_CHECK_MEMBERS 2000-01-30 21:19:00 +00:00
Jim Meyering
cbe550de62 (writable-files): Check $(xd-delta), too. 2000-01-30 21:10:24 +00:00
Jim Meyering
333d061276 *** empty log message *** 2000-01-30 20:56:57 +00:00
Jim Meyering
b0be1bfab9 do it right 2000-01-30 18:33:17 +00:00
Jim Meyering
c58c8f5fcf (writable-files): New target.
(my-distcheck): Depend on it.
(alpha): Likewise.
2000-01-30 18:27:51 +00:00
Jim Meyering
9733e004ef *** empty log message *** 2000-01-30 16:48:25 +00:00
Jim Meyering
fd3817b9dc Clean up some kludgy old shadow password tests. 2000-01-30 16:48:19 +00:00
Jim Meyering
744efcce69 (utmp_includes): Define.
Check for ut_user and ut_name members in both struct utmpx
and struct utmp.
2000-01-30 16:47:31 +00:00
Jim Meyering
3d64706c7e redo it on per-header basis 2000-01-30 16:45:17 +00:00
Jim Meyering
774786b0cd *** empty log message *** 2000-01-30 16:41:30 +00:00
Jim Meyering
22cb099f3c (extract_trimmed_name): Use UT_USER instead of hard-coding
uses of ->ut_name.  The latter doesn't work with new Linux header files
where only utmpx.ut_user is declared.
2000-01-30 16:41:25 +00:00
Jim Meyering
b737ed325a (UT_USER): Define. Accessor macro for the member named ut_user or ut_name. 2000-01-30 16:39:08 +00:00
Jim Meyering
fedbe363a9 *** empty log message *** 2000-01-30 15:02:56 +00:00
Jim Meyering
5df431d118 *** empty log message *** 2000-01-30 15:01:02 +00:00
Jim Meyering
b43184c5e5 (my-distcheck): Depend on po-check, so I'll be warned
about any required changes at `make distcheck' time rather than at
`make alpha' time.
2000-01-30 15:00:57 +00:00
Jim Meyering
ab365a8297 *** empty log message *** 2000-01-30 12:21:37 +00:00
Jim Meyering
f573721b82 *** empty log message *** 2000-01-30 12:17:37 +00:00
Jim Meyering
1c1efebc1d *** empty log message *** 2000-01-30 12:17:07 +00:00
Jim Meyering
be27aed1ec . 2000-01-30 12:13:26 +00:00
Jim Meyering
cf16d34a4d . 2000-01-30 12:12:36 +00:00
Jim Meyering
8d6ec015de *** empty log message *** 2000-01-30 12:12:00 +00:00
Jim Meyering
5c4b305870 *** empty log message *** 2000-01-30 12:09:42 +00:00
Jim Meyering
62ec3fd688 (ST_NBLOCKS): Use st_size only for regular files and
for directories.  From H. J. Lu.
2000-01-30 12:09:30 +00:00
Jim Meyering
eda468af14 *** empty log message *** 2000-01-30 12:08:36 +00:00
Jim Meyering
8775803a9d (main): Exit with nonzero status if ftruncate fails. 2000-01-30 12:01:39 +00:00
Jim Meyering
8c6fe7ba06 *** empty log message *** 2000-01-30 12:00:14 +00:00
Jim Meyering
2e962bb26f *** empty log message *** 2000-01-30 11:59:50 +00:00
Jim Meyering
3f8032ddc9 *** empty log message *** 2000-01-30 11:57:08 +00:00
Jim Meyering
7a4fca9d77 whoops: s/jm_MACROS/jm_LIB_CHECK/ 2000-01-29 17:05:03 +00:00
Jim Meyering
c1aaa6492f *** empty log message *** 2000-01-29 17:00:03 +00:00
Jim Meyering
f8f48d0023 . 2000-01-29 16:59:09 +00:00
Jim Meyering
e446ebf6c3 New file containing library-related checks from
fileutils and sh-utils (textutils had none).
2000-01-29 14:11:35 +00:00
Jim Meyering
273d5d4925 *** empty log message *** 2000-01-29 14:10:51 +00:00
Jim Meyering
bd8333c63d *** empty log message *** 2000-01-29 11:07:24 +00:00
Jim Meyering
d176b68faa add lots of seq examples 2000-01-29 11:06:42 +00:00
Jim Meyering
f6b673d543 patch from Bruno demonstrating how to use seq to produce integer
output or output in non-decimal
2000-01-29 10:09:40 +00:00
Jim Meyering
bb84498a89 back out bruno's %d, %u, etc. changes 2000-01-29 10:06:12 +00:00
Jim Meyering
90eddc5478 *** empty log message *** 2000-01-29 10:05:42 +00:00
Jim Meyering
e3fa0cb53b Back out most of the 2000-01-21 and 01-22 changes.
[Instead, merely give examples showing how to accomplish the same
task with fewer limitations using existing tools. ]
Suggestion from Bruno Haible.
(valid_format): Rename from check_format.
2000-01-29 10:05:35 +00:00
Jim Meyering
62205d8c7e Back out the 2000-01-21 change.
Remove associated tests and add two equal-width ones.
2000-01-29 09:57:31 +00:00
Jim Meyering
6cac32ec7f *** empty log message *** 2000-01-29 09:56:32 +00:00
Jim Meyering
4db6224838 Set COLUMNS envvar, just to be safe. 2000-01-29 09:50:49 +00:00
Jim Meyering
ba088349be (screen_columns): Change #if-0 (test code, mistakenly committed in last delta)
back to #ifdef TIOCGWINSZ.
2000-01-29 09:50:14 +00:00
Jim Meyering
bbcd510bc5 *** empty log message *** 2000-01-28 22:04:47 +00:00
Jim Meyering
489f1925be Change format of warning message to look more like that
from the missing script.  Suggestion from Franois Pinard.
2000-01-28 22:04:41 +00:00
Jim Meyering
d813adbf1f *** empty log message *** 2000-01-28 08:32:14 +00:00
Jim Meyering
13707ac76a (wrapf): Emit a newline only if 0 < current_col.
(screen_columns): Use xstrtol, not atoi.
If get_win_size fails and $COLUMNS == 0, then return 80, not `0'.
2000-01-28 08:32:01 +00:00
Jim Meyering
b631b5c3ac (detect_loop): Update incomplete comment.
From Mark Kettenis.
2000-01-26 21:47:06 +00:00
Jim Meyering
06b0be15bb *** empty log message *** 2000-01-25 12:07:14 +00:00
Jim Meyering
1f18465289 Change expected output for cycle-1 and cycle-2 tests. 2000-01-25 12:07:02 +00:00
Jim Meyering
a8b0898ba5 tsort now works more like the traditional UNIX tsort. Before it would
exit when it found a loop.  Now it continues and outputs all items.

(exit_status): New variable.
(loop): New varibale.
(count_items, scan_zeroes): Change return type to int.
(detect_loop): Complete rewrite to correctly implement detection
of loops.  Also change return type to int.
(recurse_tree): Stop if ACTION returns non-zero.  This involves
changing the return type of this function and ACTION to int.
(walk_tree): Change return type of ACTION to int.
(tsort): Continue sort after a loop has been detected (and
broken).  Set exit_status to 1 if a loop was detected.
(main): Use exit_status to determine exit code.
2000-01-25 12:03:15 +00:00
Jim Meyering
9a2ff5e31c *** empty log message *** 2000-01-25 12:02:16 +00:00
Jim Meyering
03caa431a0 *** empty log message *** 2000-01-25 07:26:20 +00:00
Jim Meyering
231f8fc887 Require AC_HEADER_TIME, and include sys/time.h as well
as time.h in the compile check.
2000-01-25 07:26:14 +00:00
Jim Meyering
15ee939c3c bump serial 2000-01-25 07:25:49 +00:00
Jim Meyering
893fdf84e8 Fix typo in cross-compiling case: s/yes/no/. 2000-01-25 07:25:38 +00:00
Jim Meyering
f57f26e36a Require AC_HEADER_TIME rather than simply using it. 2000-01-25 07:21:57 +00:00
Jim Meyering
7d31261496 . 2000-01-25 07:20:58 +00:00
Jim Meyering
b67de020d9 *** empty log message *** 2000-01-24 13:58:45 +00:00
Jim Meyering
06eee4e253 (usage): Describe behavior when LINK_NAME is omitted.
From Michael Stone.
2000-01-24 13:58:38 +00:00
Jim Meyering
efa9563f3d (main): Don't expect array index `n_files - 1' to evaluate
to `-1' for unsigned int n_files == 0.  Doing so lead to a segfault on
alpha.  From Michael Stone.
2000-01-24 13:48:12 +00:00
Jim Meyering
ae5c430364 *** empty log message *** 2000-01-23 16:25:35 +00:00
Jim Meyering
fe3a834b9f Move df-related tests here from fileutils/configure.in 2000-01-23 16:23:50 +00:00
Jim Meyering
d32cf4d872 . 2000-01-23 16:20:48 +00:00
Jim Meyering
9e30aaca79 *** empty log message *** 2000-01-23 16:20:34 +00:00
Jim Meyering
26c96331b2 s/list_mounted_fs/ac_list_mounted_fs/
(jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
2000-01-23 16:20:21 +00:00
Jim Meyering
81df043fdd (jm_FILE_SYSTEM_USAGE): Take two parameters. 2000-01-23 14:49:09 +00:00
Jim Meyering
d495aaf3e7 s/space/ac_fsusage_space/. 2000-01-23 14:12:45 +00:00
Jim Meyering
3705d57846 Extracted from fileutils/configure.in. 2000-01-23 14:08:35 +00:00
Jim Meyering
d5eb5821c6 . 2000-01-23 14:01:32 +00:00
Jim Meyering
48efd1644d (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT. 2000-01-23 10:55:10 +00:00
Jim Meyering
a9d4aadb5e *** empty log message *** 2000-01-23 10:55:00 +00:00
Jim Meyering
ce0262560b *** empty log message *** 2000-01-23 10:35:49 +00:00
Jim Meyering
505805856e (jm_FUNC_FTRUNCATE): AC_REQUIRE it. 2000-01-23 10:34:42 +00:00
Jim Meyering
aef5ff97f7 *** empty log message *** 2000-01-23 10:34:04 +00:00
Jim Meyering
7d7c104722 *** empty log message *** 2000-01-23 10:23:26 +00:00
Jim Meyering
d0a520d367 (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in. 2000-01-23 10:23:23 +00:00
Jim Meyering
4d5960cf1f *** empty log message *** 2000-01-23 10:19:30 +00:00
Jim Meyering
5adc8fd591 (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
(AC_SUBST(POW_LIBM)): Likewise.
2000-01-23 10:19:26 +00:00
Jim Meyering
47b4e7f1aa *** empty log message *** 2000-01-23 10:18:15 +00:00
Jim Meyering
46980c56e0 (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils. 2000-01-23 10:13:25 +00:00
Jim Meyering
86f00ce878 *** empty log message *** 2000-01-23 10:09:22 +00:00
Jim Meyering
2c702c93fe *** empty log message *** 2000-01-23 09:53:53 +00:00
Jim Meyering
c91b47d64f (libfetish_a_SOURCES): Remove explicit mention of obstack.c. 2000-01-23 09:53:48 +00:00
Jim Meyering
9e4428a605 (AM_FUNC_OBSTACK): Add (from fileutils/configure.in). 2000-01-23 09:52:35 +00:00
Jim Meyering
b76b69c8a2 *** empty log message *** 2000-01-23 09:52:02 +00:00
Jim Meyering
4f0cb8adcb *** empty log message *** 2000-01-23 09:31:09 +00:00
Jim Meyering
cbe1109277 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
AC_SUBST these here, rather than just in sh-util/configure.in, so
that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
all the same.
2000-01-23 09:31:06 +00:00
Jim Meyering
08e09e9ab4 version-control: never 2000-01-23 09:19:33 +00:00
Jim Meyering
f3f4a60164 . 2000-01-23 09:08:39 +00:00
Jim Meyering
dce8ba11dd . 2000-01-22 22:55:11 +00:00
Jim Meyering
45d534215a (keycompare): Use global, hard_LC_COLLATE in place of
local that is sometimes undeclared.
2000-01-22 22:54:51 +00:00
Jim Meyering
1a50efcd03 *** empty log message *** 2000-01-22 22:43:37 +00:00
Jim Meyering
86a839108c [! HAVE_DECL_STRTOUL]: Declare strtoul.
[! HAVE_DECL_STRTOULL]: Declare strtoull.
Required for some AIX systems.  Reported by Christian Krackowizer.
[TESTING] (main): New function.
2000-01-22 22:43:31 +00:00
Jim Meyering
aebba9cd1d [! HAVE_DECL_STRTOUL]: Declare strtoul.
[! HAVE_DECL_STRTOULL]: Declare strtoull.
Required for some AIX systems.  Reported by Christian Krackowizer.
2000-01-22 22:41:02 +00:00
Jim Meyering
42e962a284 *** empty log message *** 2000-01-22 22:26:17 +00:00
Jim Meyering
0de00b9e6a Call AC_PROG_CC_STDC just before AC_C_CONST. 2000-01-22 22:25:25 +00:00
Jim Meyering
f23d5119d8 *** empty log message *** 2000-01-22 22:21:32 +00:00
Jim Meyering
0d9735fbb4 *** empty log message *** 2000-01-22 22:20:08 +00:00
Jim Meyering
0b7e06d203 [HAVE_WCTYPE_H]: Include <wctype.h>. 2000-01-22 22:19:48 +00:00
Jim Meyering
968d5b2bbf (jm_PREREQ_QUOTEARG): Add wctype.h. 2000-01-22 22:19:12 +00:00
Jim Meyering
abab15deb9 *** empty log message *** 2000-01-22 22:08:50 +00:00
Jim Meyering
570080ef25 Merge the three lists of headers. 2000-01-22 22:08:08 +00:00
Jim Meyering
595bfc8a83 *** empty log message *** 2000-01-22 22:05:13 +00:00
Jim Meyering
dfb0540bb1 (AC_CHECK_HEADERS): Add checks from textutils' configure.in 2000-01-22 22:04:33 +00:00
Jim Meyering
c099a14fac *** empty log message *** 2000-01-22 22:03:12 +00:00
Jim Meyering
c219eb2daf (AC_CHECK_HEADERS): Add checks from sh-utils' configure.in 2000-01-22 22:03:01 +00:00
Jim Meyering
c9c2cdda8b *** empty log message *** 2000-01-22 22:00:31 +00:00
Jim Meyering
58da7aa5b3 (AC_CHECK_HEADERS): Add checks from fileutils' configure.in 2000-01-22 22:00:17 +00:00
Jim Meyering
7bce838dab *** empty log message *** 2000-01-22 21:52:02 +00:00
Jim Meyering
24c45a756e (jm_PREREQ_ADDEXT): New macro. Parts moved here from fileutils' configure.in. 2000-01-22 21:51:57 +00:00
Jim Meyering
d4db66a0fb *** empty log message *** 2000-01-22 21:29:10 +00:00
Jim Meyering
09f1b5f940 (dir_name): Support for DOS-style file names with drive letters. 2000-01-22 21:29:02 +00:00
Jim Meyering
a2e435c395 tack on the one from fileutils/lib 2000-01-22 18:03:21 +00:00
Jim Meyering
e1cc8122af . 2000-01-22 14:27:13 +00:00
Jim Meyering
8ce9f19835 Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)' code.
Moved tests into their own function (_jm_DECL_HEADERS) in check-decl.m4.
2000-01-22 14:24:50 +00:00
Jim Meyering
f5ff12fcbc (_jm_DECL_HEADERS): Define new function.
(jm_CHECK_DECLARATIONS): Require it.
2000-01-22 14:22:42 +00:00
Jim Meyering
c7bd32731e Revert to using #if HAVE_STDLIB_H
to guard inclusion of <stdlib.h>.
2000-01-22 14:07:23 +00:00
Jim Meyering
0f9105c7be Guard inclusion of <stdlib.h> with `#if STDC_HEADERS',
not `#if HAVE_STDLIB_H'.  The former wasn't defined.
Use #if rather than #ifdef.

Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
(jm_CHECK_DECLARATIONS): Add strtoul strtoull.
2000-01-22 13:53:10 +00:00
Jim Meyering
c4a0e46616 *** empty log message *** 2000-01-22 13:15:39 +00:00
Jim Meyering
a33ca24833 *** empty log message *** 2000-01-22 13:14:17 +00:00
Jim Meyering
465e3422e8 (seq --format): Mention that integer formats are accepted, too. 2000-01-22 13:13:45 +00:00
Jim Meyering
1a8bedfeb7 *** empty log message *** 2000-01-22 13:07:25 +00:00
Jim Meyering
88e049caf5 *** empty log message *** 2000-01-22 13:06:59 +00:00
Jim Meyering
8ecfdb48a9 *** empty log message *** 2000-01-22 12:37:01 +00:00
Jim Meyering
c88a1e4466 Topologically sort the functions and remove fwd declarations. 2000-01-22 12:36:35 +00:00
Jim Meyering
4186d5762f (enum Format_type): Declare.
(format_type): New global to take place of intconv.
(DO_printf): New macro.
(main): Use it.
2000-01-22 11:14:22 +00:00
Jim Meyering
c951e3f2c9 Add new tests for the new functionality. 2000-01-22 11:10:40 +00:00
Jim Meyering
e48c320244 Add support for octal and hexadecimal output.
(intconv): New variable.
(usage): Update.
(main): Call scan_arg instead of scan_double_arg. Call check_format
before scan_arg.
(scan_int_arg, scan_arg): New functions.
(check_format): Add intconv argument. Accept %d, %u, %o, %x, %X.
(print_numbers): If intconv is true, pass an int argument to printf.
2000-01-22 10:09:29 +00:00
Jim Meyering
625a560403 . 2000-01-22 09:44:23 +00:00
Jim Meyering
f3a2399998 *** empty log message *** 2000-01-22 09:43:37 +00:00
Jim Meyering
fc32116042 (ISDIGIT): Define.
(strverscmp): Use ISDIGIT, not isdigit.
2000-01-22 09:43:23 +00:00
Jim Meyering
1a779705e8 . 2000-01-22 09:42:33 +00:00
Jim Meyering
6df5aa20d7 (o-rep-1, o-rep-2): New tests. 2000-01-22 09:42:14 +00:00
Jim Meyering
d29115d80f ("xstrtol.h"): Include.
(Filter): Rename from PFL.
(non_neg_strtol): Remove function.
(find_bracketed_repeat): Use xstrtoul instead of non_neg_strtol.
(squeeze_filter, set_initialize, main): Use size_t and ssize_t in
place of long and int in several decls.
(read_and_delete, read_and_xlate): Likewise, and remove assertion.
2000-01-22 09:31:19 +00:00
Jim Meyering
89d8c4e859 *** empty log message *** 2000-01-21 15:08:14 +00:00
Jim Meyering
4ba6864c31 Correct copying notice to use GPL, per author's request.
(AUTHORS): Add djm.
2000-01-21 15:08:08 +00:00
Jim Meyering
dc6a5317bc Correct copying notice to use GPL, per author's request. 2000-01-21 15:07:53 +00:00
Jim Meyering
98379bfc4f *** empty log message *** 2000-01-21 14:39:07 +00:00
Jim Meyering
cfa079e41d *** empty log message *** 2000-01-21 07:33:33 +00:00
Jim Meyering
553fe00983 (PFI): Return long', not int'.
(PFL): Rename from PFI now that it returns long.
(squeeze_filter): Declare as `long': i, nr, out_len.
2000-01-21 07:33:25 +00:00
Jim Meyering
c4acbcc996 Tweak sort performance.
(hard_LC_CTYPE): Remove.
(keylist): Renamed from keyhead.  Now a pointer, not a
mostly-unused struct.  All uses changed.
(findlines, keycompare, CMP_WITH_IGNORE, compare, checkfp, mergefps,
sort): Tune and use a more consistent style for reallocation.
(keycompare, main): Don't worry about LC_CTYPE;
it's buggy with multibyte chars anyway.
(compare): Invoke alloca (0) after each call to keycompare,
not just the ones that return nonzero.  This avoids a memory
leak on architectures without builtin alloca that occurs
sometimes when a file contains all duplicate lines.
2000-01-19 22:43:33 +00:00
Jim Meyering
e8611c5714 *** empty log message *** 2000-01-19 20:41:06 +00:00
Jim Meyering
9393315a06 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
defines `struct timespec' in <sys/time.h>
2000-01-19 20:40:51 +00:00
Jim Meyering
7990f92f15 *** empty log message *** 2000-01-19 14:01:03 +00:00
Jim Meyering
2435963a1f *** empty log message *** 2000-01-19 13:57:51 +00:00
Jim Meyering
469d21a9d3 Remove uses of changequote altogether. 2000-01-19 13:57:42 +00:00
Jim Meyering
ddcb373abc . 2000-01-19 08:17:47 +00:00
Jim Meyering
e0a66a6600 . 2000-01-19 08:17:16 +00:00
Jim Meyering
d448da43d6 . 2000-01-19 07:56:52 +00:00
Jim Meyering
870858ccad (interrupt_handler, main):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
2000-01-18 07:37:57 +00:00
Jim Meyering
fa25e451f9 *** empty log message *** 2000-01-18 07:37:17 +00:00
Jim Meyering
3e115cf2b5 (sighandler, main):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
2000-01-18 07:36:53 +00:00
Jim Meyering
41a7e7c193 *** empty log message *** 2000-01-18 07:28:59 +00:00
Jim Meyering
8024f33e45 (interrupt_handler):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
(install_handler): Use SA_NOCLDSTOP, not _POSIX_VERSION,
to decide whether to call sigaction; this fixes an old typo.
2000-01-18 07:28:47 +00:00
Jim Meyering
1fe0bff2f4 *** empty log message *** 2000-01-18 07:26:07 +00:00
Jim Meyering
c829e00d78 (nanosleep):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
2000-01-18 07:25:53 +00:00
Jim Meyering
95b4ba5e0d *** empty log message *** 2000-01-17 22:37:32 +00:00
Jim Meyering
f106184dd2 . 2000-01-17 22:36:01 +00:00
Jim Meyering
93a834533b *** empty log message *** 2000-01-17 10:00:37 +00:00
Jim Meyering
2c3cad16b2 fix typo 2000-01-17 10:00:30 +00:00
Jim Meyering
7f54d0b6b7 Revert this change (they're not the same):
Use new AC_C_PROTOTYPES instead of AM_C_PROTOTYPES.
2000-01-17 10:00:19 +00:00
Jim Meyering
751d1a1888 *** empty log message *** 2000-01-17 08:03:25 +00:00
Jim Meyering
47be9d6b2f revert last change, now that quotearg.c is fixed 2000-01-17 08:03:12 +00:00
Jim Meyering
4d034357da (quotearg_buffer_restyled): Do not quote
alert, backslash, formfeed, and vertical tab unnecessarily in
shell quoting style.
2000-01-17 08:01:40 +00:00
Jim Meyering
ea51a6cbaa *** empty log message *** 2000-01-17 08:01:30 +00:00
Jim Meyering
065c2a2cda *** empty log message *** 2000-01-16 22:15:50 +00:00
Jim Meyering
e9296ad49f Sync with sh-utils/lib/Makefile.am. 2000-01-16 22:15:32 +00:00
Jim Meyering
588bb7b9e2 *** empty log message *** 2000-01-16 20:42:46 +00:00
Jim Meyering
53000596a9 (usage): Correct error in %V description.
From Wolfram Kleff.
2000-01-16 20:41:29 +00:00
Jim Meyering
ccd763bee2 alphabetize a little 2000-01-16 20:15:58 +00:00
Jim Meyering
0c4d4d0081 *** empty log message *** 2000-01-16 17:01:26 +00:00
Jim Meyering
ac9b999873 . 2000-01-16 17:00:22 +00:00
Jim Meyering
7a8e14b287 Remove these for now (they're with related code in sh-utils' configure.in)
AM_SYS_POSIX_TERMIOS
  jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
2000-01-16 16:48:57 +00:00
Jim Meyering
38b49a265f Require AM_FUNC_GETLOADAVG, jm_SYS_PROC_UPTIME, AM_SYS_POSIX_TERMIOS, and
jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL.
2000-01-16 16:42:24 +00:00
Jim Meyering
fb6ad846b4 Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, and AC_FUNC_ALLOCA.
2000-01-16 16:39:20 +00:00
Jim Meyering
67cf2e1e2e *** empty log message *** 2000-01-16 16:36:58 +00:00
Jim Meyering
2b47bcaca6 . 2000-01-16 13:09:25 +00:00
Jim Meyering
11d24c8713 . 2000-01-16 13:08:07 +00:00
Jim Meyering
7c99efe376 *** empty log message *** 2000-01-16 12:59:09 +00:00
Jim Meyering
6bcc673201 Use changequote(<<,>>)', rather than changequote(, )'
because the latter didn't work.
2000-01-16 12:59:00 +00:00
Jim Meyering
337515e1ed *** empty log message *** 2000-01-16 12:47:42 +00:00
Jim Meyering
fda148fb1b Adapt to work with recently updated quotearg.c. 2000-01-16 12:47:34 +00:00
Jim Meyering
e7d71e0725 . 2000-01-16 12:40:26 +00:00
Jim Meyering
110b79479d Use new AC_C_PROTOTYPES instead of AM_C_PROTOTYPES. 2000-01-16 12:39:31 +00:00
Jim Meyering
e64e8130b1 *** empty log message *** 2000-01-16 12:36:53 +00:00
Jim Meyering
5fae922bab Sync with the version from emacs-20.5.
(<string.h>): Include if HAVE_STRING_H.
(<stdlib.h>): Include if HAVE_STDLIB_H.
(alloca): Abort if malloc fails.
2000-01-16 12:35:49 +00:00
Jim Meyering
840aee01de . 2000-01-15 16:09:56 +00:00
Jim Meyering
dfc6a234b0 . 2000-01-15 15:58:54 +00:00
Jim Meyering
b07aaa6cd0 sheesh: fix it right this time: gethostname getusershell 2000-01-15 13:57:04 +00:00
Jim Meyering
9e8497dd61 Fix typo
s/stpbrk/strpbrk
2000-01-15 12:13:13 +00:00
Jim Meyering
6a483c24a8 (AC_REPLACE_FUNCS):
Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
2000-01-15 12:07:53 +00:00
Jim Meyering
590f2decc5 *** empty log message *** 2000-01-15 12:06:03 +00:00
Jim Meyering
489dafa7bc (AC_REPLACE_FUNCS): Add strpbrk. 2000-01-15 12:02:58 +00:00
Jim Meyering
8ee46f4bf8 *** empty log message *** 2000-01-15 12:00:16 +00:00
Jim Meyering
b6040be40a (AC_REPLACE_FUNCS):
Add these, too: stime strcspn stpcpy strstr strtol strtoul.
2000-01-15 11:59:15 +00:00
Jim Meyering
116bfa584d *** empty log message *** 2000-01-15 11:57:46 +00:00
Jim Meyering
c3f357adf5 Quote multibyte characters correctly.
(ISGRAPH): Remove.
(ISPRINT): New macro.
(<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H.
(isprint, mbrtowc, mbsinit, mbstate_t): New macros,
defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
(quotearg_buffer_restyled): New function, with most of the old
quotearg_buffer's contents.
Major rewrite to support multibyte characters.
(quotearg_buffer): Now just calls quotearg_buffer_restyled.
2000-01-15 11:57:11 +00:00
Jim Meyering
78992ab94f fix typo in last change 2000-01-15 11:48:10 +00:00
Jim Meyering
48bbfe2e71 (AC_REPLACE_FUNCS): Add memcpy and memset. 2000-01-15 11:47:12 +00:00
Jim Meyering
f02fa3aa3e *** empty log message *** 2000-01-15 11:45:52 +00:00
Jim Meyering
616361c4f6 *** empty log message *** 2000-01-15 11:44:11 +00:00
Jim Meyering
48e3ed52ee (AC_REPLACE_FUNCS): Add gethostname and getusershell 2000-01-15 11:41:08 +00:00
Jim Meyering
46d6db5426 *** empty log message *** 2000-01-15 11:14:42 +00:00
Jim Meyering
4841119c1a (TAB_STOP_SENTINEL): Define.
(unexpand): Use it instead of INT_MAX.
Declare column and pending to be `unsigned'.
Increment pending and column counters only if column is smaller
than TAB_STOP_SENTINEL.
2000-01-15 11:13:44 +00:00
Jim Meyering
8c0c6b0468 *** empty log message *** 2000-01-15 10:24:53 +00:00
Jim Meyering
5159046f88 *** empty log message *** 2000-01-15 10:24:10 +00:00
Jim Meyering
0d5f220029 *** empty log message *** 2000-01-15 09:51:23 +00:00
Jim Meyering
afd24c5869 *** empty log message *** 2000-01-15 09:08:07 +00:00
Jim Meyering
9bb0428a59 tweak comment 2000-01-15 07:07:41 +00:00
Jim Meyering
cf0a18b69d *** empty log message *** 2000-01-14 10:32:13 +00:00
Jim Meyering
6c7d8fd5b5 *** empty log message *** 2000-01-14 10:31:48 +00:00
Jim Meyering
3eb8c1fea4 *** empty log message *** 2000-01-14 07:05:58 +00:00
Jim Meyering
3ee8530a1e *** empty log message *** 2000-01-13 23:04:41 +00:00
Jim Meyering
66cbf09569 remove md5sum residue 2000-01-13 23:03:08 +00:00
Jim Meyering
3152cf6f82 *** empty log message *** 2000-01-13 23:02:32 +00:00
Jim Meyering
0567a5d9c8 *** empty log message *** 2000-01-13 23:01:14 +00:00
Jim Meyering
a69a2d6856 (fillbuf): Avoid quadratic behavior with long lines.
Also, stop worrying about ancient memchr bug (misbehavior when
size is zero), since other code doesn't worry either.
2000-01-13 07:34:44 +00:00
Jim Meyering
35ed98cc06 *** empty log message *** 2000-01-12 14:00:50 +00:00
Jim Meyering
ff626bd3c0 Make the warning that this shred test may not
be run as root more prominent.  Suggestion from Volker Borchert.
2000-01-12 14:00:22 +00:00
Jim Meyering
b52f383a7f *** empty log message *** 2000-01-12 08:17:41 +00:00
Jim Meyering
b14089f76b (jm_PREREQ_READUTMP): New macro.
(jm_PREREQ): Use it.
2000-01-12 08:17:30 +00:00
Jim Meyering
3df9479ab4 *** empty log message *** 2000-01-12 08:07:29 +00:00
Jim Meyering
bbe32e1637 (jm_PREREQ_CANON_HOST): Move code from su/configure.in. 2000-01-12 08:06:27 +00:00
Jim Meyering
79732f800d (jm_PREREQ_CANON_HOST): New macro.
(jm_PREREQ): Use it.
2000-01-12 07:58:22 +00:00
Jim Meyering
c186123316 *** empty log message *** 2000-01-12 07:27:34 +00:00
Jim Meyering
e50dab4ad9 *** empty log message *** 2000-01-12 06:58:30 +00:00
Jim Meyering
5d0f90dff7 *** empty log message *** 2000-01-12 06:56:54 +00:00
Jim Meyering
f3b0ab5eba (jm_PREREQ_QUOTEARG): New macro.
(jm_PREREQ): Use it.
2000-01-12 06:53:32 +00:00
Jim Meyering
551ab8474b (mode_compile): Use uintmax_t, not unsigned
long, to parse numeric modes.  Check for any unknown bits, not
just unknown bits left of the leftmost known bit.
2000-01-12 06:49:59 +00:00
Jim Meyering
12d6e4b1cd Update copyright notice. 2000-01-12 06:46:46 +00:00
Jim Meyering
a5ab3d9aac Sync with latest FSF version (fixing a minor Y2k problem). 2000-01-12 06:41:36 +00:00
Jim Meyering
fbe7dca27f Port to autoconf 2.13. 2000-01-12 06:40:10 +00:00
Jim Meyering
0d47b4be52 Sync to the slightly more general version of GNU tar. 2000-01-12 06:37:30 +00:00
Jim Meyering
59457bee16 (count_entry): Adjust to new calling convention for excluded_filename.
(main): Likewise, for add_exclude_file.
2000-01-12 06:36:56 +00:00
Jim Meyering
a3b2c5389c *** empty log message *** 2000-01-11 14:06:07 +00:00
Jim Meyering
1c4c285999 (memcpy): Protoize. 2000-01-11 14:05:28 +00:00
Jim Meyering
1b84791bc8 s/fu/fetish/ 2000-01-11 08:43:16 +00:00
Jim Meyering
126e14b161 (hash_initialize): Fix typo in comment. 2000-01-11 07:48:23 +00:00
Jim Meyering
80fd95a91d . 2000-01-11 07:28:22 +00:00
Jim Meyering
ca974b3755 *** empty log message *** 2000-01-10 12:52:18 +00:00
Jim Meyering
9f5307f1d3 *** empty log message *** 2000-01-10 11:53:22 +00:00
Jim Meyering
97085c8df7 *** empty log message *** 2000-01-10 11:53:16 +00:00
Jim Meyering
de1cb33196 *** empty log message *** 2000-01-10 11:36:05 +00:00
Jim Meyering
741c7303a5 (alpha): Use scp, not ncftp. 2000-01-10 11:35:44 +00:00
Jim Meyering
f23b3eb47a *** empty log message *** 2000-01-10 09:37:50 +00:00
Jim Meyering
f488edddf7 . 2000-01-10 09:21:14 +00:00
Jim Meyering
60dabf5cd1 . 2000-01-10 09:20:49 +00:00
Jim Meyering
44381ed288 *** empty log message *** 2000-01-10 08:11:56 +00:00
Jim Meyering
4717bb93f2 (announcement): Include URLs for xdelta files. 2000-01-10 08:11:41 +00:00
Jim Meyering
9442b6050b *** empty log message *** 2000-01-10 07:31:52 +00:00
Jim Meyering
6adb0e4d56 *** empty log message *** 2000-01-10 07:31:31 +00:00
Jim Meyering
6f06aad852 (noinst_HEADERS): Add nanosleep.h. 2000-01-10 07:31:14 +00:00
Jim Meyering
baf8720297 *** empty log message *** 2000-01-10 07:27:52 +00:00
Jim Meyering
94966b9515 *** empty log message *** 2000-01-09 16:21:39 +00:00
Jim Meyering
55d80ad41a *** empty log message *** 2000-01-09 16:20:44 +00:00
Jim Meyering
7b9c964fde *** empty log message *** 2000-01-09 16:17:52 +00:00
Jim Meyering
c4b800d7b6 *** empty log message *** 2000-01-09 16:17:26 +00:00
Jim Meyering
913e134b2d *** empty log message *** 2000-01-09 08:26:42 +00:00
Jim Meyering
5f2d0e3d6c *** empty log message *** 2000-01-09 08:26:15 +00:00
Jim Meyering
58cba22668 (do_link): Produce the same sort of one-line output for
`--backup --verbose' as cp, mv, install.  Before this, the backup
file name wasn't printed at all.
2000-01-09 08:23:51 +00:00
Jim Meyering
efe3229edb This affects cp, install, and mv.
(copy_internal): When making backup files in verbose
mode, print the backup file name on the same line as the rest of the
information, e.g., `a -> b (backup: b.~13~)' rather than on a line
by itself.
2000-01-09 08:20:45 +00:00
Jim Meyering
1279be6f8a *** empty log message *** 2000-01-08 18:03:08 +00:00
Jim Meyering
c852bc40d3 *** empty log message *** 2000-01-08 18:02:47 +00:00
Jim Meyering
e02fd60260 (PAGES_OPTION, COLUMNS_OPTION): Define these and use them instead of
`CHAR_MAX + n'.
2000-01-08 18:02:42 +00:00
Jim Meyering
299882b8a4 (OUTPUT_DELIMITER_OPTION): Define this and use it instead of `CHAR_MAX + n'. 2000-01-08 18:02:09 +00:00
Jim Meyering
fee7991cbc remove stray define before _LIBC 2000-01-08 17:53:35 +00:00
Jim Meyering
d486a2e744 *** empty log message *** 2000-01-08 17:53:21 +00:00
Jim Meyering
6752f5570a *** empty log message *** 2000-01-08 17:23:22 +00:00
Jim Meyering
00c9ad3937 . 2000-01-08 16:48:29 +00:00
Jim Meyering
9a0a8e29b0 *** empty log message *** 2000-01-08 16:46:20 +00:00
Jim Meyering
e5f283604b (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-08 16:46:11 +00:00
Jim Meyering
1650a9459a *** empty log message *** 2000-01-08 16:44:27 +00:00
Jim Meyering
58edea6508 (error): Use __strerror_r's return value only if HAVE_WORKING_STRERROR_R.
(error_at_line): Likewise.
2000-01-08 16:44:19 +00:00
Jim Meyering
d15ab2c1be (null_AM_MAKEFLAGS): Define.
(my-distcheck): Use it to avoid distributing out of date files
whose derivation would require a maintainer tool.
2000-01-08 16:38:13 +00:00
Jim Meyering
cabbdf7bbf . 2000-01-08 16:35:26 +00:00
Jim Meyering
92999d559c . 2000-01-08 16:34:24 +00:00
Jim Meyering
625ce6a036 . 2000-01-08 16:32:02 +00:00
Jim Meyering
dfbeb59dc0 *** empty log message *** 2000-01-08 16:31:29 +00:00
Jim Meyering
b8342a9a20 (jm_FUNC_STRERROR_R): New file/macro. 2000-01-08 16:30:49 +00:00
Jim Meyering
2170503967 (jm_FUNC_STRERROR_R): Require it. 2000-01-08 16:25:57 +00:00
Jim Meyering
5693e5c586 Sync with the GNU C library. 2000-01-07 14:29:26 +00:00
Jim Meyering
b830d441bb . 2000-01-07 12:27:31 +00:00
Jim Meyering
923a32a0a8 tweak comment 2000-01-07 09:18:15 +00:00
Jim Meyering
a86b522044 *** empty log message *** 2000-01-07 08:56:48 +00:00
Jim Meyering
11eebed20f (TESTS_ENVIRONMENT): Add pwd/ prefix to exported PATH value (though not strictly necessary, here). 2000-01-07 08:56:38 +00:00
Jim Meyering
9bcff27f18 *** empty log message *** 2000-01-07 08:26:13 +00:00
Jim Meyering
858254d559 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:25:47 +00:00
Jim Meyering
f90f8cea87 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:25:26 +00:00
Jim Meyering
30a1c917c7 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:24:38 +00:00
Jim Meyering
36a3a59284 (TESTS_ENVIRONMENT): Add pwd/ prefix
to exported PATH value (though not strictly necessary, here).
2000-01-07 08:24:16 +00:00
Jim Meyering
aac32d403c add copyright/no-warranty comment 2000-01-07 07:33:19 +00:00
Jim Meyering
8606b093e4 *** empty log message *** 2000-01-07 07:31:03 +00:00
Jim Meyering
4e4c0e24d5 tweak copyright line 2000-01-07 07:03:01 +00:00
Jim Meyering
76bc7db5e2 (strpbrk): Ansideclify.
Use `#if' instead of `#ifdef' for `HAVE_CONFIG_H'.
2000-01-07 07:01:45 +00:00
Jim Meyering
fd3e041f5b Use #if' instead of #ifdef' for `HAVE_CONFIG_H'.
Capitalize all macro parameters.
(memcasecmp): Ansideclify.
Don't cast away `const'ness of parameters.
Suggestions from Franois Pinard.
2000-01-07 06:59:36 +00:00
Jim Meyering
ce2bd26821 . 2000-01-06 23:13:49 +00:00
Jim Meyering
1b470586fd . 2000-01-06 23:11:55 +00:00
Jim Meyering
198bd22923 . 2000-01-06 23:10:51 +00:00
Jim Meyering
8c5a80b069 . 2000-01-06 23:10:22 +00:00
Jim Meyering
a2e08f3047 *** empty log message *** 2000-01-06 22:58:02 +00:00
Jim Meyering
eff6393e39 Import version 1.020. 2000-01-06 22:49:01 +00:00
Jim Meyering
bbe0894eb2 . 2000-01-06 22:40:59 +00:00
Jim Meyering
c2d329d6c8 *** empty log message *** 2000-01-06 21:39:58 +00:00
Jim Meyering
136a8efd10 Use jm_CHECK_TYPE_STRUCT_UTIMBUF, renamed from jm_STRUCT_UTIMBUF. 2000-01-06 21:39:28 +00:00
Jim Meyering
567dae8b9c *** empty log message *** 2000-01-06 21:32:03 +00:00
Jim Meyering
f8c6ea241d Sync with the GNU C Library. 2000-01-06 21:31:48 +00:00
Jim Meyering
6784d83a62 Add #pragma STDC FENV_ACCESS ON if C99. 2000-01-06 21:01:06 +00:00
Jim Meyering
2f8c0d5542 Sync tm_diff with the GNU C Library.
(TM_YEAR_BASE): Renamed from TM_YEAR_ORIGIN.  All uses changed.
(tm_diff): Renamed from difftm.  All uses changed.
Replace body with that taken from GNU C Library 2.1.3pre1.
(get_date): Prefer tm_gmtoff to tm_diff if available.
2000-01-06 18:25:03 +00:00
Jim Meyering
1150e89832 *** empty log message *** 2000-01-06 18:24:51 +00:00
Jim Meyering
dd282c588b . 2000-01-06 17:13:39 +00:00
Jim Meyering
8301c1310b *** empty log message *** 2000-01-06 16:01:57 +00:00
Jim Meyering
8c0752d9be Tell the user just before sleeping for 7 seconds. 2000-01-06 16:01:43 +00:00
Jim Meyering
d9b2187a8c *** empty log message *** 2000-01-06 15:59:06 +00:00
Jim Meyering
d50599ae1a *** empty log message *** 2000-01-06 15:58:55 +00:00
Jim Meyering
6cb491d9df (TESTS): Remove fflush. It didn't
test the losing behavior, and left a stray tail process to boot.
2000-01-06 15:58:47 +00:00
Jim Meyering
21b43e0fe9 add blank line 2000-01-06 08:35:45 +00:00
Jim Meyering
2315cbdeaa (apply_suffix): Comment. 2000-01-06 08:35:21 +00:00
Jim Meyering
eee26242bb fix typo in comment 2000-01-06 08:29:10 +00:00
Jim Meyering
757861331e Minor code cleanup.
(clock_get_realtime): Return argument, for convenience.
(main): Use this to simplify main sleep loop.
2000-01-06 08:28:39 +00:00
Jim Meyering
e1cc2ace3c *** empty log message *** 2000-01-05 14:08:05 +00:00
Jim Meyering
f8d2a3f723 *** empty log message *** 2000-01-05 12:19:48 +00:00
Jim Meyering
3a673ed728 . 2000-01-05 12:19:04 +00:00
Jim Meyering
fd0797a4e4 Include nanosleep.h.
(AUTHORS): Add Paul Eggert.
2000-01-05 12:17:59 +00:00
Jim Meyering
3b979cf095 Add #pragma STDC FENV_ACCESS ON if C99.
(<fenv.h>): Include if available.
(main): Always round floating-point interval calculations upwards,
as we must sleep for at least the specified time.
Do the right thing with NaNs.
2000-01-05 12:17:19 +00:00
Jim Meyering
7f1c659ce3 whoops. fix typos 2000-01-05 12:06:39 +00:00
Jim Meyering
ec266f43d5 Include nanosleep.h.
Don't include time.h or sys/time.h here.
2000-01-05 12:03:53 +00:00
Jim Meyering
1885aeaaa4 *** empty log message *** 2000-01-05 12:03:06 +00:00
Jim Meyering
a2bee2bc6f (savedir): Don't store past the end of an array if
name_size is zero and the directory is empty.
2000-01-04 22:54:54 +00:00
Jim Meyering
1e01103713 *** empty log message *** 2000-01-04 17:18:15 +00:00
Jim Meyering
ce17dc2e94 Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings. 2000-01-04 17:18:05 +00:00
Jim Meyering
6ed0893953 bump serial # 2000-01-04 17:16:48 +00:00
Jim Meyering
483ed4cbfd *** empty log message *** 2000-01-04 17:16:34 +00:00
Jim Meyering
b75698cf72 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from jm_STRUCT_DIRENT_D_TYPE. 2000-01-04 17:16:26 +00:00
Jim Meyering
c26299c3d2 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from jm_STRUCT_DIRENT_D_INO. 2000-01-04 17:15:32 +00:00
Jim Meyering
82ca413ae4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from jm_STRUCT_UTIMBUF. 2000-01-04 17:13:58 +00:00
Jim Meyering
0d30a49178 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it. 2000-01-04 17:12:45 +00:00
Jim Meyering
cdff473cd3 *** empty log message *** 2000-01-04 17:12:12 +00:00
Jim Meyering
9a74f64d12 . 2000-01-04 15:11:03 +00:00
Jim Meyering
8714cce36a (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0.
(alpha): Create xdelta diffs.
2000-01-04 13:20:15 +00:00
Jim Meyering
1a7010a87f (PREV_VERSION): Tweak so it handles e.g., 2.0a -> 2.0. 2000-01-04 12:24:49 +00:00
Jim Meyering
556a7ac657 *** empty log message *** 2000-01-03 19:59:04 +00:00
Jim Meyering
eed8a2f5e1 tweak comment 2000-01-03 19:58:56 +00:00
Jim Meyering
2ff3485a8d (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
(for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
2000-01-03 19:58:09 +00:00
Jim Meyering
3206a63225 *** empty log message *** 2000-01-02 16:00:44 +00:00
Jim Meyering
ef4c445a55 . 2000-01-02 15:59:32 +00:00
Jim Meyering
20ca1d8601 *** empty log message *** 2000-01-02 15:57:02 +00:00
Jim Meyering
60ff88e110 *** empty log message *** 2000-01-02 09:59:01 +00:00
Jim Meyering
6e5a32d58f Escape `$' in $3 of dnl comment. I no longer remember if this is necessary. 2000-01-02 09:58:53 +00:00
Jim Meyering
5f55b410a6 *** empty log message *** 2000-01-02 09:53:03 +00:00
Jim Meyering
27f7343bf6 *** empty log message *** 2000-01-02 09:52:32 +00:00
Jim Meyering
141036e2ea sleep accepts arbitrary floating point numbers. 2000-01-02 09:50:15 +00:00
Jim Meyering
34c324d786 update usage 2000-01-02 09:31:15 +00:00
Jim Meyering
9df5f7720b *** empty log message *** 2000-01-02 09:13:17 +00:00
Jim Meyering
f2de5d5212 *** empty log message *** 2000-01-02 09:12:55 +00:00
Jim Meyering
c5ed5e05ea . 2000-01-02 09:11:55 +00:00
Jim Meyering
7092835d3b *** empty log message *** 2000-01-02 08:57:49 +00:00
Jim Meyering
af6d4ad6ca Remove non-POSIX warning about trailing-slashed symlink-to-directory. 2000-01-02 08:53:30 +00:00
Jim Meyering
70cc369588 New option: --strip-trailing-slashes. 2000-01-02 08:51:39 +00:00
Jim Meyering
b3faf79a75 *** empty log message *** 2000-01-02 08:45:43 +00:00
Jim Meyering
50de4d0751 *** empty log message *** 2000-01-02 07:41:02 +00:00
Jim Meyering
60f3f576c7 (#pragma alloca): Add if _AIX is defined.
(path-concat.h): Include.
(show_point): If HAVE_REALPATH or HAVE_RESOLVEPATH is defined,
find the real absolute path for PATH, and use that to find the
mount point.

(show_point): Prefer non-dummy entries in shortcuts, too.
Disable bogus mount dirs instead of restatting them each time.
2000-01-02 07:40:24 +00:00
Jim Meyering
05fcf7df27 (my_strftime): Some old compilers object to
'\a', so don't bother optimizing for it.
2000-01-02 07:09:54 +00:00
Jim Meyering
d5d6d965ed *** empty log message *** 2000-01-01 20:00:28 +00:00
Jim Meyering
d9fd3ba617 . 2000-01-01 19:56:56 +00:00
Jim Meyering
8c3df2e678 *** empty log message *** 2000-01-01 09:43:40 +00:00
Jim Meyering
847d050688 *** empty log message *** 1999-12-30 09:09:38 +00:00
Jim Meyering
18f381afea *** empty log message *** 1999-12-30 09:09:03 +00:00
Jim Meyering
1128d1dffb *** empty log message *** 1999-12-30 09:07:31 +00:00
Jim Meyering
1d54f66fd0 (remove_parents, main): Don't pass errno to error
when printing "removing directory" message.  Failure of rmdir is
handled elsewhere.
1999-12-30 09:07:13 +00:00
Jim Meyering
84226463b1 . 1999-12-27 16:31:56 +00:00
Jim Meyering
b32cecce88 . 1999-12-27 16:30:45 +00:00
Jim Meyering
99c51ad97e minor var. renamings 1999-12-27 16:30:20 +00:00
Jim Meyering
4c746d7a4c tweak --help 1999-12-27 15:57:26 +00:00
Jim Meyering
dc33452012 *** empty log message *** 1999-12-27 14:17:39 +00:00
Jim Meyering
f71e656070 *** empty log message *** 1999-12-26 10:19:40 +00:00
Jim Meyering
34c6851c4a *** empty log message *** 1999-12-26 10:16:18 +00:00
Jim Meyering
b1dee02eb1 *** empty log message *** 1999-12-26 10:03:46 +00:00
Jim Meyering
0335111c76 (jm_FUNC_NANOSLEEP): New file/macro. 1999-12-26 10:02:31 +00:00
Jim Meyering
2dc33d421e *** empty log message *** 1999-12-26 09:40:16 +00:00
Jim Meyering
0ac76a646b *** empty log message *** 1999-12-25 22:15:23 +00:00
Jim Meyering
64003d937b Use < rather than >.
(main): Normalize ts_stop.
1999-12-25 20:00:21 +00:00
Jim Meyering
936a26728a . 1999-12-23 15:28:02 +00:00
Jim Meyering
5f22e8234b *** empty log message *** 1999-12-23 15:09:17 +00:00
Jim Meyering
0ecbb73025 (USE_CLOCK_GETTIME): Define.
[USE_CLOCK_GETTIME]: Include sys/time.h.
(timespec_subtract): New function.
(clock_get_realtime): New function.
(sighandler): Remove function.
(main): Reimplement again, using nanosleep and clock_gettime.
1999-12-23 14:34:38 +00:00
Jim Meyering
fc7ceba21b *** empty log message *** 1999-12-23 14:25:17 +00:00
Jim Meyering
c5494ca49a *** empty log message *** 1999-12-23 11:56:32 +00:00
Jim Meyering
c94e214238 Check for clock_gettime (moved from fileutils/configure.in)
Check for gettimeofday.
1999-12-23 11:55:58 +00:00
Jim Meyering
5db04594ae *** empty log message *** 1999-12-23 11:54:36 +00:00
Jim Meyering
eb19369c84 *** empty log message *** 1999-12-23 09:56:01 +00:00
Jim Meyering
1c49904e91 *** empty log message *** 1999-12-23 09:51:50 +00:00
Jim Meyering
d134d00bb4 . 1999-12-23 09:50:31 +00:00
Jim Meyering
9cd6962a4a . 1999-12-23 09:49:59 +00:00
Jim Meyering
21039f0b39 *** empty log message *** 1999-12-23 09:34:57 +00:00
Jim Meyering
ff9eed5ff5 (usage): Correct typos.
List new --target-directory=... usage.
Reported by Gran Uddeborg
1999-12-23 09:34:48 +00:00
Jim Meyering
176efa5092 (usage): List new --target-directory=... usage. 1999-12-23 09:34:25 +00:00
Jim Meyering
1206a834dd rewrite expression (equivalently) at request of Paul Eggert 1999-12-22 20:49:19 +00:00
Jim Meyering
bda1bae801 *** empty log message *** 1999-12-22 16:51:48 +00:00
Jim Meyering
67e3d46292 *** empty log message *** 1999-12-22 16:32:24 +00:00
Jim Meyering
3551f63a62 (ceil_percent): Remove.
(show_dev): Avoid overflow problems when calculating percent.
Do not display negative percents.
1999-12-22 16:32:07 +00:00
Jim Meyering
38d48aa7e9 *** empty log message *** 1999-12-22 14:30:45 +00:00
Jim Meyering
94aebe4774 Use $file, not $tmp/file. Exit 77 if run as root. 1999-12-22 14:30:23 +00:00
Jim Meyering
759da836f6 *** empty log message *** 1999-12-22 11:18:06 +00:00
Jim Meyering
222389a6d0 *** empty log message *** 1999-12-22 11:15:26 +00:00
Jim Meyering
621a5a5d61 (regress-1): New test for the above. 1999-12-22 11:15:15 +00:00
Jim Meyering
1796cbe0c6 *** empty log message *** 1999-12-22 11:14:30 +00:00
Jim Meyering
aa07786952 (get_date): Fix typo in time_t overflow test.
From Michael Stone.
1999-12-22 11:14:05 +00:00
Jim Meyering
771ec09cd4 . 1999-12-20 10:42:32 +00:00
Jim Meyering
f9dd65cfc8 Remove kludge, now that I'm using the fixed autoconf-2.14a-1999-12-20. 1999-12-20 10:37:27 +00:00
Jim Meyering
372ce8d3ce *** empty log message *** 1999-12-20 10:11:28 +00:00
Jim Meyering
7769c416ef tweak comment 1999-12-19 15:51:32 +00:00
Jim Meyering
c077ecf83c tweak comment 1999-12-19 15:21:19 +00:00
Jim Meyering
50075bf532 *** empty log message *** 1999-12-19 10:49:15 +00:00
Jim Meyering
b04f00f3d4 (lstat.c): Adapt rule to handle new parts of xstat.in.
(lstat.c): Likewise.
1999-12-19 10:46:19 +00:00
Jim Meyering
036b3bdae7 (slash_aware_lstat): New function.
(rpl_@xstat@): Use it.
1999-12-19 10:45:50 +00:00
Jim Meyering
f802f28675 *** empty log message *** 1999-12-19 10:43:18 +00:00
Jim Meyering
4a1f449cbe *** empty log message *** 1999-12-19 10:42:51 +00:00
Jim Meyering
0d9e008da2 . 1999-12-19 10:25:06 +00:00
Jim Meyering
7902c47089 *** empty log message *** 1999-12-19 10:23:58 +00:00
Jim Meyering
566fb840b3 *** empty log message *** 1999-12-19 10:23:47 +00:00
Jim Meyering
3d58863d57 [! LSTAT_FOLLOWS_SLASHED_SYMLINK]: Use lstat wrapper.
[Notice the new test in m4/lstat-slash.m4. ]
(main): Back out change from 1999-02-19 that made ls remove
trailing slashes from command line arguments to accommodate early
versions of Linux.  Now, `ls symlink-to-dir/' acts like
`ls symlink-to-dir/.' thus following the symbolic link, as POSIX says
it should.  Suggestion from Bruno Haible and Andreas Schwab.
1999-12-19 10:23:26 +00:00
Jim Meyering
a595998975 . 1999-12-19 10:22:47 +00:00
Jim Meyering
c8707dcc2f . 1999-12-19 10:21:51 +00:00
Jim Meyering
4d8a95eff3 (TESTS): Add symlink-slash. 1999-12-19 10:21:34 +00:00
Jim Meyering
fa468393ae remove unused test= stmt 1999-12-19 09:41:08 +00:00
Jim Meyering
dd1a7723a6 *** empty log message *** 1999-12-19 09:37:22 +00:00
Jim Meyering
0c578407e0 bump serial number 1999-12-19 09:37:06 +00:00
Jim Meyering
bce84b024a Use the new macro: jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. 1999-12-19 09:36:55 +00:00
Jim Meyering
a260bc04c8 *** empty log message *** 1999-12-19 09:34:29 +00:00
Jim Meyering
68a35b96ce *** empty log message *** 1999-12-19 09:33:18 +00:00
Jim Meyering
a9afc5a7d0 *** empty log message *** 1999-12-18 23:00:58 +00:00
Jim Meyering
96c183f34f *** empty log message *** 1999-12-18 22:41:36 +00:00
Jim Meyering
b9aa56bec4 *** empty log message *** 1999-12-18 16:04:47 +00:00
Jim Meyering
04aa739146 (wipename): When repeatedly renaming a file, making the name shorter
and shorter, skip to the next shorter length length if a rename fails (e.g. due to
permission denied).  Otherwise, this loop would iterate for so long that shred would
appear to be stuck in an infinite loop for any but the shortest file names.
1999-12-18 16:00:49 +00:00
Jim Meyering
ac31ad442b *** empty log message *** 1999-12-18 11:48:43 +00:00
Jim Meyering
a47deedda7 (print_entry): Correct do_lookup test so that who
prints whatever host information it has, even without --lookup.
1999-12-18 11:48:37 +00:00
Jim Meyering
a9c3d9197f *** empty log message *** 1999-12-15 10:15:36 +00:00
Jim Meyering
4d90b0efc9 (decode_switches): If -c or -u is specified and not -l (or any other
option that implies -l), and no sort-type was specified,
then sort by the ctime (-c) or atime (-u).  Part of this change reverts
the 1998-01-10 delta.
(usage): Update to reflect this change.
Reported by Paul Slootman via Michael Stone.
1999-12-15 08:38:54 +00:00
Jim Meyering
c8ad493e6b . 1999-12-14 09:00:08 +00:00
Jim Meyering
99aa95f945 *** empty log message *** 1999-12-13 22:37:15 +00:00
Jim Meyering
927b1d42fb *** empty log message *** 1999-12-13 15:08:21 +00:00
Jim Meyering
b5123778b7 *** empty log message *** 1999-12-13 15:04:27 +00:00
Jim Meyering
5c2322aacc *** empty log message *** 1999-12-13 15:03:51 +00:00
Jim Meyering
0c7c8c2992 *** empty log message *** 1999-12-13 07:33:13 +00:00
Jim Meyering
c8d452098b (make_path): Consistently use error to output
the verbose, `created directory ...' messages.
Reported by Bernhard Rosenkraenzer.
1999-12-13 07:30:57 +00:00
Jim Meyering
3182653495 *** empty log message *** 1999-12-13 07:29:13 +00:00
Jim Meyering
7efcffd2e6 *** empty log message *** 1999-12-13 06:45:13 +00:00
Jim Meyering
63324e5e7e Move 120+ lines of stat.h-related macros from system.h (not shared)
to sys2.h, which is shared between fileutils, sh-utils, textutils.
* src/system.h: Move them from here...
* src/sys2.h: ... to here.
1999-12-12 21:49:25 +00:00
Jim Meyering
488028199d (S_IRUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Define
if not defined.  This was necessary on a NeXT Turbostation running
Mach 3.3.  Reported by Nelson H. F. Beebe.
1999-12-12 21:45:34 +00:00
Jim Meyering
c71815ac7b *** empty log message *** 1999-12-12 20:26:48 +00:00
Jim Meyering
6ff905699a . 1999-12-10 16:30:28 +00:00
Jim Meyering
d3d701080b . 1999-12-10 16:29:54 +00:00
Jim Meyering
c6025b9d1e . 1999-12-10 15:22:55 +00:00
Jim Meyering
b026aa85d0 (_jm_STRFTIME_PREREQS): Use 3-arg form of AC_DEFINE for HAVE_TM_GMTOFF. 1999-12-10 14:35:38 +00:00
Jim Meyering
4c0b11a8e7 *** empty log message *** 1999-12-09 16:53:41 +00:00
Jim Meyering
5ac2b8e39b . 1999-12-09 16:42:00 +00:00
Jim Meyering
5214179c29 . 1999-12-09 16:38:32 +00:00
Jim Meyering
e8ff25dd70 *** empty log message *** 1999-12-09 15:55:11 +00:00
Jim Meyering
fc8e7363d2 Require that File::Compare be available, too.
Too many systems seem to lack it.
1999-12-09 15:54:59 +00:00
Jim Meyering
022194de49 Add checks for most of the cpp macros tested in GNU's strftime.c.
Prompted by a patch from Paul Eggert.
1999-12-09 15:54:20 +00:00
Jim Meyering
eb06f705a1 Use 1>&2 rather than `1<&-'.
Suggestion from Volker Borchert.
1999-12-09 15:52:49 +00:00
Jim Meyering
aeabe74421 (IGNORE_FAIL_ON_NON_EMPTY_OPTION): Likewise. 1999-12-09 15:52:09 +00:00
Jim Meyering
46b6c26e4f (BLOCK_SIZE_OPTION, EXCLUDE_OPTION, MAX_DEPTH_OPTION):
Define these and use them instead of `CHAR_MAX + n'.
1999-12-09 15:46:39 +00:00
Jim Meyering
919f2ce3da (BLOCK_SIZE_OPTION, SYNC_OPTION, NO_SYNC_OPTION): Define
these and use them instead of `CHAR_MAX + n'.
1999-12-09 15:43:41 +00:00
Jim Meyering
6cbabe63d4 (anonymous enum): Define TIME_OPTION, and ...
(longopts): ...use it here instead of `CHAR_MAX + 1'.
(main): Likewise.
1999-12-09 15:39:38 +00:00
Jim Meyering
1aa50fd72e (enum): Remove useless CHAR_MAX + 2 1999-12-09 15:35:41 +00:00
Jim Meyering
6845fc7c96 Test more of the framework (touch's -a and -m
options) before running the actual ls test.
1999-12-08 17:05:59 +00:00
Jim Meyering
84339c827f s/test_failure/framework_failure/g 1999-12-08 16:50:22 +00:00
Jim Meyering
be3748ddad (TESTS): Add fflush. 1999-12-05 23:31:34 +00:00
Jim Meyering
392a965229 Remove ftp.enst.fr. 1999-12-05 22:59:30 +00:00
Jim Meyering
5cb18377bc *** empty log message *** 1999-12-05 22:36:11 +00:00
Jim Meyering
93c2c18a80 (main): Flush stdout before switching to unbuffered mode
and calling tail_forever.  Required only on Solaris2.7 -- on other
systems, using setvbuf to switch to unbufferd mode does the flush.
1999-12-05 22:36:02 +00:00
Jim Meyering
dd002c22fd *** empty log message *** 1999-12-05 16:45:27 +00:00
Jim Meyering
f447e97462 . 1999-12-05 16:39:39 +00:00
Jim Meyering
3abc240e82 *** empty log message *** 1999-12-05 15:14:18 +00:00
Jim Meyering
ff8f4dde22 *** empty log message *** 1999-12-05 15:13:40 +00:00
Jim Meyering
f880990daf Revert the previous change.
(copy_internal): In move mode, if the rename attempt
fails, then unlink any existing destination file.  This makes a
cross-device `mv' more consistent with the intra-device behavior.
This change is required by POSIX to make a cross-device move act with
semantics similar to those of the rename syscall.  For example now
`mv' can move a file onto a symlink to itself when that symlink
is on a separate partition.  With fileutils-4.0j, it would fail with
a diagnostic saying they were the same file.
Reported by Bruno Haible.
1999-12-05 15:13:21 +00:00
Jim Meyering
7306126ef0 *** empty log message *** 1999-12-04 17:46:39 +00:00
Jim Meyering
305e2306be . 1999-12-04 17:46:06 +00:00
Jim Meyering
2b10e67d59 (TESTS): Add to-symlink. 1999-12-04 17:45:45 +00:00
Jim Meyering
dc74b3a1e7 Make sure that the copying code used in an inter-partition
move unlinks a destination symlink before opening it.
1999-12-04 17:44:59 +00:00
Jim Meyering
2f21a269fe *** empty log message *** 1999-12-04 17:34:39 +00:00
Jim Meyering
69408d229e *** empty log message *** 1999-12-04 17:34:05 +00:00
Jim Meyering
f05badd230 (trap): Be careful to close $actual before
removing the containing directory.  Otherwise, on some systems rmdir
fails to remove the containing directory.
1999-12-04 17:33:49 +00:00
Jim Meyering
6763fa97d2 *** empty log message *** 1999-12-04 17:31:29 +00:00
Jim Meyering
b1b10e1e40 List --full-time dates upon failure. 1999-12-04 17:31:23 +00:00
Jim Meyering
5810f4bee5 . 1999-12-04 17:30:24 +00:00
Jim Meyering
91b5e686d5 Adapt to reflect this change in behavior.
Make sure the VERSION_CONTROL envvar is not set.
Run diff if comparison fails.
1999-12-04 17:30:16 +00:00
Jim Meyering
8c096b86ef Use mv, ls, rm, not $MV, $LS, $RM. 1999-12-04 17:24:19 +00:00
Jim Meyering
698fd02798 (copy_internal): Be consistent with intra-device behavior
and *do* allow `mv' to move a file onto a symlink to itself when that
symlink is on a separate partition.  With fileutils-4.0j, it would
fail with a diagnostic saying they were the same file.
Reported by Bruno Haible.
1999-12-04 17:21:47 +00:00
Jim Meyering
28bac510d9 *** empty log message *** 1999-12-04 17:21:06 +00:00
Jim Meyering
2413369d22 *** empty log message *** 1999-12-04 17:05:27 +00:00
Jim Meyering
091109470c Give the right diagnostic when failing to create a file in an
unwritable directory.

(touch): Record errno upon failed errno and use that
saved value if a subsequent fstat, stat or utime call fails.
Reported by Wichert Akkerman via Michael Stone.
1999-12-04 17:03:43 +00:00
Jim Meyering
9481a7bd36 *** empty log message *** 1999-12-04 16:56:07 +00:00
Jim Meyering
2be3dc067a (check_symlink_color): New variable.
(main): Set it if we need to check for dangling symlinks when
displaying colors.
(gobble_file): Check check_symlink_color instead of print_with_color.
1999-12-04 16:55:27 +00:00
Jim Meyering
c4542a7e8c (usage): Shorten help for --show-control-chars. 1999-11-30 21:09:35 +00:00
Jim Meyering
6c9e0d702a *** empty log message *** 1999-11-30 16:09:58 +00:00
Jim Meyering
062906c83a Don't include math.h or float.h.
Don't use DBL_MAX.
Use TIME_T_MAX instead.
1999-11-28 19:59:18 +00:00
Jim Meyering
2c3fa56cef *** empty log message *** 1999-11-28 19:57:54 +00:00
Jim Meyering
346edb7361 *** empty log message *** 1999-11-28 19:56:38 +00:00
Jim Meyering
b9c91d0570 don't include assert.h 1999-11-28 14:04:12 +00:00
Jim Meyering
e20a9b89d2 Round more carefully so we never call nanosleep with more than 999,999,999
nanoseconds.
Comment out assertion because it uses on EINTR.
1999-11-28 14:03:43 +00:00
Jim Meyering
0baa523154 Rewrite to use nanosleep (hence, timer stops when sleep is suspended)
and to remove gettimeofday/signal cruft.
Improve overflow checking.
1999-11-28 13:35:00 +00:00
Jim Meyering
d5f7b2a2db *** empty log message *** 1999-11-28 08:08:51 +00:00
Jim Meyering
4c05896b20 better error checking
add FIXME comments for non-portable constructs
1999-11-28 08:00:58 +00:00
Jim Meyering
ec974f5c39 remove another printf stmt 1999-11-27 20:03:05 +00:00
Jim Meyering
15d2e7a86b remove printf stmts 1999-11-27 20:02:38 +00:00
Jim Meyering
069610a0f0 fix typos 1999-11-27 20:01:22 +00:00
Jim Meyering
5617251659 Rewrite to allow fractional seconds and to handle SIGCONT.
(main): Rewrite.
(sighandler): New function.
(apply_suffix): New function.
(timeval_subtract): New function.
1999-11-27 20:00:54 +00:00
Jim Meyering
398516f242 (usage): Add elipses to show that sleep allows more than one argument. 1999-11-27 17:10:15 +00:00
Jim Meyering
8e1452ffea remove brackets around required sleep argument 1999-11-27 17:04:29 +00:00
Jim Meyering
6b36a017db (argdecode): Move definition to precede use.
Remove prototype.
1999-11-27 15:02:27 +00:00
Jim Meyering
30d2b031ab *** empty log message *** 1999-11-27 10:15:46 +00:00
Jim Meyering
f72f631fa0 Don't set/use MV, etc. 1999-11-27 10:14:53 +00:00
Jim Meyering
d10b18f2b9 *** empty log message *** 1999-11-27 10:14:24 +00:00
Jim Meyering
511cd5b6ae Don't set/use MV, etc. 1999-11-27 10:14:04 +00:00
Jim Meyering
09282a24f6 Don't set/use RM and MV. 1999-11-27 10:11:25 +00:00
Jim Meyering
f36a801a9a Don't set/use LS MV MKDIR MKNOD RM TOUCH 1999-11-27 10:10:02 +00:00
Jim Meyering
1e219d6b71 Don't set/use DF or MKDIR. 1999-11-27 10:08:55 +00:00
Jim Meyering
2e0f5a2bac *** empty log message *** 1999-11-27 10:05:25 +00:00
Jim Meyering
9234f12d32 (TESTS): Add partition-perm. 1999-11-27 10:05:11 +00:00
Jim Meyering
bd2102efa4 *** empty log message *** 1999-11-27 09:01:22 +00:00
Jim Meyering
6550d040a5 *** empty log message *** 1999-11-27 09:01:05 +00:00
Jim Meyering
afdd1c5ca2 *** empty log message *** 1999-11-26 16:50:33 +00:00
Jim Meyering
7af339b126 (df_readable): Now returns char const *, not char *.
New arg NEGATIVE.
(ceil_percent): Now returns double, not int.
Be more careful about adding 1 to a wild value.
(show_dev): Don't filter out wild sizes from the underlying operating
system; instead, show them to the user as faithfully as possible.
1999-11-26 16:50:24 +00:00
Jim Meyering
0d6c850979 . 1999-11-26 07:31:42 +00:00
Jim Meyering
a6db3e776e *** empty log message *** 1999-11-23 12:57:38 +00:00
Jim Meyering
f5c9c07779 (Calendar date item): Correction regarding 0..68/
69-99 split for 1900 vs 2000.  From Peter Moulder.
1999-11-23 12:57:10 +00:00
Jim Meyering
05de2104b9 *** empty log message *** 1999-11-23 12:56:30 +00:00
Jim Meyering
22c0d963f1 . 1999-11-22 15:05:52 +00:00
Jim Meyering
6cfbe9468a . 1999-11-22 14:10:07 +00:00
Jim Meyering
630d0d3f8d (DISTCLEANFILES): Add lstat.c and stat.c. 1999-11-22 14:09:58 +00:00
Jim Meyering
d3af459dac *** empty log message *** 1999-11-22 13:21:48 +00:00
Jim Meyering
b9cbaa7073 . 1999-11-22 13:14:19 +00:00
Jim Meyering
6c95094270 *** empty log message *** 1999-11-22 11:35:12 +00:00
Jim Meyering
65c46d231a *** empty log message *** 1999-11-22 11:23:35 +00:00
Jim Meyering
c401c7f12c *** empty log message *** 1999-11-22 11:23:08 +00:00
Jim Meyering
5a7847d20f . 1999-11-22 09:16:27 +00:00
Jim Meyering
94129d72a5 *** empty log message *** 1999-11-22 09:15:42 +00:00
Jim Meyering
e0e3f4ba72 . 1999-11-22 09:13:32 +00:00
Jim Meyering
61511d8bcb *** empty log message *** 1999-11-22 09:13:15 +00:00
Jim Meyering
7eba3be340 (recheck): Handle a race condition (including <dev,inode>
reuse) that would lead to a failed assertion.
Reported by Ken Pizzini.
(tail_forever): Record errno before using it in call to `error'
which might change it.
(tail_file): Likewise.
1999-11-22 09:07:58 +00:00
Jim Meyering
971da27132 comment out echo stmts 1999-11-22 09:03:57 +00:00
Jim Meyering
eff0f7cd2e (TESTS): remove infloop-1 1999-11-22 09:03:12 +00:00
Jim Meyering
b609a36366 *** empty log message *** 1999-11-22 08:56:52 +00:00
Jim Meyering
e4dbcfc604 *** empty log message *** 1999-11-22 08:56:39 +00:00
Jim Meyering
8a34174fb2 *** empty log message *** 1999-11-22 08:55:00 +00:00
Jim Meyering
f22a30f1e5 *** empty log message *** 1999-11-22 08:54:09 +00:00
Jim Meyering
4917680b1a (TESTS): Add `assert'. 1999-11-22 08:40:50 +00:00
Jim Meyering
3bd2800a3c *** empty log message *** 1999-11-20 12:16:11 +00:00
Jim Meyering
783c48e864 (errno_rmdir_non_empty): New function to encapsulate errno comparison.
(remove_parents): Use it.
(main): Use it.
1999-11-20 12:15:46 +00:00
Jim Meyering
07632c3ed9 *** empty log message *** 1999-11-20 11:18:54 +00:00
Jim Meyering
808aa68e9c *** empty log message *** 1999-11-20 10:46:39 +00:00
Jim Meyering
8c4882550e Run `diff -u' if the test fails. 1999-11-20 10:46:06 +00:00
Jim Meyering
4a602cec80 *** empty log message *** 1999-11-20 10:39:29 +00:00
Jim Meyering
6fdf590d36 Use ls' and touch', not $LS and $TOUCH. 1999-11-20 10:39:19 +00:00
Jim Meyering
5cbce55a86 (TESTS_ENVIRONMENT): Specify PATH, etc. 1999-11-20 10:38:38 +00:00
Jim Meyering
9eda37263f *** empty log message *** 1999-11-20 09:51:31 +00:00
Jim Meyering
57bb960867 Declare lstat; needed on e.g. SunOS4.
Reported by Tom Tromey.
1999-11-20 09:50:58 +00:00
Jim Meyering
320be1758d *** empty log message *** 1999-11-19 17:02:38 +00:00
Jim Meyering
115758e03b *** empty log message *** 1999-11-19 17:02:31 +00:00
Jim Meyering
24e8e8409d (strstr): Include config.h.
Add a `;' between shloop label and `}'.
1999-11-19 17:02:01 +00:00
Jim Meyering
102caacbef *** empty log message *** 1999-11-19 11:49:53 +00:00
Jim Meyering
cfe7b86608 (AC_SYS_LARGEFILE_FLAGS): Work around a
problem with the QNX 4.25 shell, which doesn't propagate exit
status of failed commands inside shell assignments.
1999-11-19 11:49:44 +00:00
Jim Meyering
7ec33cd342 *** empty log message *** 1999-11-19 11:12:07 +00:00
Jim Meyering
2e05e2b7fa *** empty log message *** 1999-11-17 22:05:01 +00:00
Jim Meyering
cc9b514f5d *** empty log message *** 1999-11-17 14:04:44 +00:00
Jim Meyering
c49e7f4f22 Use new AC_CONFIG_LINKS in place of AC_LINK_FILES. 1999-11-17 14:04:32 +00:00
Jim Meyering
f98d307bbb *** empty log message *** 1999-11-17 08:22:49 +00:00
Jim Meyering
06c06bd6f7 (S_IRWXUGO): Define if necessary.
(main): Use chmod to set the permissions if bits other than those
of S_IRWXUGO were requested.  Reported by Sami Farin.
1999-11-17 08:18:38 +00:00
Jim Meyering
8c63b56030 *** empty log message *** 1999-11-17 08:18:22 +00:00
Jim Meyering
29e829a66a *** empty log message *** 1999-11-15 22:26:57 +00:00
Jim Meyering
2f50c6930d (touch): Simplify code a tad, using fd == -1 instead
of separate valid_fd variable.
1999-11-14 20:44:56 +00:00
Jim Meyering
a3fc960f32 . 1999-11-13 23:21:01 +00:00
Jim Meyering
91ac2fec34 # Also test the combination of --no-create and -a. 1999-11-13 23:20:14 +00:00
Jim Meyering
55fa0c6a12 . 1999-11-13 23:19:08 +00:00
Jim Meyering
6bffd08ba5 *** empty log message *** 1999-11-13 14:55:01 +00:00
Jim Meyering
0e09235c9f (touch): Don't fail just because we couldn't open
an existing file.  This makes it so that touching a read-only
file now works.  Also clean up and simplify.
Based on a patch from Chip Salzenberg.
1999-11-13 14:47:21 +00:00
Jim Meyering
6b85baa502 *** empty log message *** 1999-11-13 14:46:21 +00:00
Jim Meyering
d46a35bbff *** empty log message *** 1999-11-13 13:28:39 +00:00
Jim Meyering
97523193b7 (TESTS): Add no-rights. 1999-11-13 13:27:25 +00:00
Jim Meyering
4f06def5c0 new test for touch -c fix 1999-11-13 13:24:54 +00:00
Jim Meyering
0ce2109a88 import latest 1999-11-13 10:13:16 +00:00
Jim Meyering
557af8f47e *** empty log message *** 1999-11-12 10:56:23 +00:00
Jim Meyering
987955f7c5 *** empty log message *** 1999-11-12 10:54:21 +00:00
Jim Meyering
c5187c959c (print_nth_dir): Write one fewer byte so we don't print a trailing slash.
(rm): Fix bugs in (and test, this time) the very-rarely-used code
to warn about directory cycles.
1999-11-12 10:50:01 +00:00
Jim Meyering
7872d7c932 Adjust comments to reflect that lots of code has moved to remove.c. 1999-11-12 10:42:13 +00:00
Jim Meyering
f1c24743b8 *** empty log message *** 1999-11-12 08:10:02 +00:00
Jim Meyering
7cff7275f8 *** empty log message *** 1999-11-12 08:05:20 +00:00
Jim Meyering
286e9d9766 *** empty log message *** 1999-11-11 15:08:34 +00:00
Jim Meyering
acf8442f02 *** empty log message *** 1999-11-11 13:46:40 +00:00
Jim Meyering
b6a764d8c6 Add a test for this fix. 1999-11-11 13:46:19 +00:00
Jim Meyering
07d20c7e44 . 1999-11-11 13:20:24 +00:00
Jim Meyering
1b6c640f46 (copy_internal): Treat src and dest as the `same' in
`mv src symlink-to-src' when src and dest are on different partitions.
Otherwise, that `mv' command would silently remove `src'.
Reported by Michael Stone.
1999-11-11 13:19:36 +00:00
Jim Meyering
101ae141c6 *** empty log message *** 1999-11-11 12:12:23 +00:00
Jim Meyering
375c13c679 re-comment debugging diff stmt 1999-11-11 11:41:18 +00:00
Jim Meyering
cbdf71ab00 (make_path): Fix long-latent bug (note others
just like it were fixed in 1998-01-02).
A user (FIXME, who?) reported that using `install -d -g foo 1/2`
only sets the group on the intermediate directory, not the final
component.  From Michael Stone.
1999-11-11 11:00:50 +00:00
Jim Meyering
05e6e5583e remove unnecessary trailing semicolons 1999-11-11 07:50:59 +00:00
Jim Meyering
c4d7026cf9 import 1.019 1999-11-10 06:14:12 +00:00
Jim Meyering
baee6fd135 *** empty log message *** 1999-11-09 20:41:33 +00:00
Jim Meyering
59339ab7e5 (NEW): Undefine to avoid warning about redefinition.
(NEW): Redefine in terms of XMALLOC.
1999-11-09 20:41:18 +00:00
Jim Meyering
f5225442f8 (XMALLOC): Correct misnamed macro parameter name: s/N_bytes/N_items/.
(XCALLOC): Likewise.
(XREALLOC): Likewise.
1999-11-09 20:34:17 +00:00
Jim Meyering
1b5e676e38 add `' around link(2) 1999-11-08 09:25:08 +00:00
Jim Meyering
cf6ad5dcca Fix harmless-for-now typo: s/,/dnl/.
From Akim.
1999-11-08 09:23:43 +00:00
Jim Meyering
bb928b7ac4 effectively require AC_CHECK_HEADERS(unistd.h) 1999-11-08 09:18:27 +00:00
Jim Meyering
8851d83616 *** empty log message *** 1999-11-07 21:06:17 +00:00
Jim Meyering
41c5f76c2f (default_block_size): New function.
(humblock): Use it if no block size is specified.
(human_block_size): If the specified block size is zero, report an
error if report_errors is nonzero; otherwise use the default.
1999-11-07 21:06:02 +00:00
Jim Meyering
0b23ffc1bf *** empty log message *** 1999-11-07 20:34:11 +00:00
Jim Meyering
e2e5b7324e Add several more TERM types.
Add .bz2 suffix.
Add .png for real this time.
Change the image types colors to be visible in a black-on-white xterm.
1999-11-07 20:34:03 +00:00
Jim Meyering
f706863aa6 *** empty log message *** 1999-11-07 20:25:21 +00:00
Jim Meyering
c1e927ff6d *** empty log message *** 1999-11-07 20:23:48 +00:00
Jim Meyering
717d76cf4b (xstat): New global.
(main): Define it.
(change_file_group): Use it.  Before this change, when running chgrp
on a symlink without --dereference (-h) and when the requested group
is the same as the group for the *symlink*, chgrp would do nothing.
Now it changes the group of the file referenced through the symlink.
Reported by Martin Mitchell.
1999-11-07 20:18:11 +00:00
Jim Meyering
8bc2ecda80 *** empty log message *** 1999-11-07 20:17:18 +00:00
Jim Meyering
5907ad7277 Define and use REFERENCE_FILE_OPTION and
DEREFERENCE_OPTION in place of bare `CHAR_MAX + N'.
1999-11-07 20:02:19 +00:00
Jim Meyering
1645ace5e7 Use REFERENCE_FILE_OPTION instead of bare `CHAR_MAX + 1'. 1999-11-07 20:00:54 +00:00
Jim Meyering
0af22e4bb2 *** empty log message *** 1999-11-07 15:41:37 +00:00
Jim Meyering
7b165ea504 Add `, 1, [FIXME]' to each use of AC_DEFINE. 1999-11-07 15:40:29 +00:00
Jim Meyering
a21ac71b0a . 1999-11-07 11:52:07 +00:00
Jim Meyering
66964546be *** empty log message *** 1999-11-07 11:46:24 +00:00
Jim Meyering
51ca1e585c Fix a typo: s/||/&&/. 1999-11-07 11:46:20 +00:00
Jim Meyering
bf43e9b11e Add hard-link-to-symlink test. 1999-11-07 11:44:22 +00:00
Jim Meyering
b2e1221012 variable name change
move framework_failure to bottom
1999-11-07 11:13:04 +00:00
Jim Meyering
224fff6a3a (do_link): Warn that making a hard link to a symbolic link is not portable. 1999-11-07 11:07:53 +00:00
Jim Meyering
7876eafaa1 Remove entire #if LINK_FOLLOWS_SYMLINKS block. 1999-11-07 11:04:00 +00:00
Jim Meyering
8040d4c680 Add comment prior to removing #if LINK_FOLLOWS_SYMLINKS block 1999-11-07 11:03:20 +00:00
Jim Meyering
6e8ec1114f Allow hard links to symlinks on systems that support it.
(STAT_LIKE_LINK): Define.
(do_link): Use STAT_LIKE_LINK, rather than bare `stat', and perform
the extra lstat only on systems where LINK_FOLLOWS_SYMLINKS.
1999-11-07 10:50:11 +00:00
Jim Meyering
6cdbe93585 *** empty log message *** 1999-11-07 10:49:07 +00:00
Jim Meyering
36daa470f4 Use --b=simple, not the now-deprecated `-V simple'. 1999-11-07 10:47:52 +00:00
Jim Meyering
5f9feb9aae define LINK_FOLLOWS_SYMLINKS 1999-11-07 10:35:53 +00:00
Jim Meyering
6702048c64 . 1999-11-07 10:33:47 +00:00
Jim Meyering
9f5b324ec5 . 1999-11-07 10:33:22 +00:00
Jim Meyering
c13a28cc35 *** empty log message *** 1999-11-07 10:33:11 +00:00
Jim Meyering
de9a877716 add missing \n\ 1999-11-07 09:23:06 +00:00
Jim Meyering
1df7091e3b *** empty log message *** 1999-11-07 09:22:18 +00:00
Jim Meyering
30fc70c376 *** empty log message *** 1999-11-07 09:20:04 +00:00
Jim Meyering
65851e8c38 *** empty log message *** 1999-11-07 08:46:34 +00:00
Jim Meyering
3db1aef04e (remove_parents): Use the correct test
(same as in main) in handling --ignore-fail-on-non-empty.
From Michael Stone.
1999-11-07 08:38:50 +00:00
Jim Meyering
691513e7f3 . 1999-11-07 08:15:37 +00:00
Jim Meyering
a8871677d1 whoops, add quotes in last change 1999-11-06 21:58:42 +00:00
Jim Meyering
44dbec6a60 remove backticks from comments 1999-11-06 21:58:19 +00:00
Jim Meyering
0d3ddaa85c *** empty log message *** 1999-11-06 21:31:09 +00:00
Jim Meyering
637aa0759b (jm_MACROS): Use jm_AC_FUNC_LINK_FOLLOWS_SYMLINK here. 1999-11-06 21:30:47 +00:00
Jim Meyering
e2c0a043f7 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro. 1999-11-06 21:30:16 +00:00
Jim Meyering
81718d1a58 (do_link): Fix typo (in which the function name `symlink'
was tested instead of the variable `symbolic_link') that could make
ln perform an unneeded `stat' call.
1999-11-06 16:21:18 +00:00
Jim Meyering
9dc239aca7 *** empty log message *** 1999-11-06 09:55:32 +00:00
Jim Meyering
ea525f532f (long_options): Correct typo (s/'F'/'p'/) so that `-p'
works as the short form of --file-type, per the documentation.
From Michael Stone.
1999-11-06 09:55:13 +00:00
Jim Meyering
476de46ee5 *** empty log message *** 1999-11-06 09:54:46 +00:00
Jim Meyering
571d42e74b . 1999-11-06 09:04:58 +00:00
Jim Meyering
68e5120531 . 1999-11-06 09:04:22 +00:00
Jim Meyering
6b32b53027 Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated HAVE_ST_BLOCKS. 1999-11-05 09:55:24 +00:00
Jim Meyering
8a25562446 Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
AC_STRUCT_ST_BLKSIZE.
1999-11-05 09:48:53 +00:00
Jim Meyering
764e739e01 remove stray `x's 1999-11-05 09:34:41 +00:00
Jim Meyering
a5bfc49347 *** empty log message *** 1999-11-05 09:27:20 +00:00
Jim Meyering
386d762885 (jm_CHECK_ALL_TYPES): Move some tests from configure.in
of textutils, fileutils, and sh-utils into this one (shared between
those packages) file.
1999-11-05 09:27:14 +00:00
Jim Meyering
9df0229009 *** empty log message *** 1999-11-05 07:59:48 +00:00
Jim Meyering
2d81adfab6 (SORTALLOC): New macro.
(sortalloc, mergealloc, LINEALLOC): Use it.
(sortalloc, mergealloc, linelength): Now const.
(sortalloc): Increase from 0.5 to 8 MB.
(mergealloc): Increase from 16 to 256 kB.
(LINEALLOC): Increase from 0.25 to 4 MB.
1999-11-05 07:59:40 +00:00
Jim Meyering
ac0c37fd78 . 1999-11-04 23:14:45 +00:00
Jim Meyering
65b35a9e36 Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'.  POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.
1999-11-04 23:13:40 +00:00
Jim Meyering
67ec190a99 (memcoll): The two arguments cannot be
adjacent any more, so remove the alloca/copy workaround for
that case.
1999-11-04 23:13:12 +00:00
Jim Meyering
4b47f20e6a (readline): Do not leave room for an extra
byte after the newline; it's no longer needed.
1999-11-04 23:12:42 +00:00
Jim Meyering
53d2086432 Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'.  POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.

Update tests `use-nl' and `11d' to reflect this change.
1999-11-04 23:12:13 +00:00
Jim Meyering
cec217ed93 (begfield, limfield, findlines, keycompare, compare):
Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'.  POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.
1999-11-04 23:11:34 +00:00
Jim Meyering
0b7aeab254 (compare_files):
Do not consider newline to be part of a line when comparing lines
in `sort' and `comm'.  POSIX.2 requires that we consider newline,
but this is a bug in the spec and the bug will likely be fixed.
1999-11-04 23:11:03 +00:00
Jim Meyering
b4e46d54f9 *** empty log message *** 1999-11-03 17:24:39 +00:00
Jim Meyering
62dac2622f Remove file. No longer needed since the new version of
AC_CHECK_TYPE checks includes unistd.h.
1999-11-03 17:24:33 +00:00
Jim Meyering
76f864a015 Use straight `AC_CHECK_TYPE(ssize_t, int)'.
Suggestion from Akim Demaille.
1999-11-03 17:24:03 +00:00
Jim Meyering
dcc7e653c9 *** empty log message *** 1999-11-03 13:07:04 +00:00
Jim Meyering
1c04247f53 Fix so that `tail -fn 2 file' works again.
(anonymous enum) [LONG_FOLLOW_OPTION]: Define.
(long_options): Use LONG_FOLLOW_OPTION here, instead of 'f'.
(main): Remove the `::' after the `f' in getopt_long string.
Add `case LONG_FOLLOW_OPTION' after `case 'f':'.
Based on a patch from Tim Waugh.
1999-11-03 13:06:50 +00:00
Jim Meyering
fcbef3a982 *** empty log message *** 1999-11-03 13:05:43 +00:00
Jim Meyering
23d439f22b (anonymous enum) [RETRY_OPTION]: Define.
[MAX_UNCHANGED_STATS_OPTION]: Likewise.
[MAX_CONSECUTIVE_SIZE_CHANGES_OPTION]: Likewise.
[PID_OPTION]: Likewise.
(long_options): Use *_OPTION instead of CHAR_MAX + N.
(main): Likewise.
1999-11-03 12:26:24 +00:00
Jim Meyering
ff220fd012 add comma 1999-11-03 12:20:11 +00:00
Jim Meyering
670f9b2f8a (recheck): Don't refuse to tail a non-regular, non-pipe.
(tail_file): Likewise.
1999-11-03 12:13:39 +00:00
Jim Meyering
789f74708c include summary in [NAME] section 1999-11-02 14:07:36 +00:00
Jim Meyering
da60713a1d include summary in [NAME] section 1999-11-02 13:58:56 +00:00
Jim Meyering
57808ffdb5 include summary in [NAME] section 1999-11-02 13:51:42 +00:00
Jim Meyering
8c3db8987e remove copyright 1999-11-02 13:49:10 +00:00
Jim Meyering
373ced3924 version 1.018 1999-11-02 13:08:05 +00:00
Jim Meyering
f726258818 *** empty log message *** 1999-11-02 07:20:28 +00:00
Jim Meyering
84e957d300 (usage): Warn about mixing use of `-r' with FIFOs and
other special files like /dev/zero.
1999-11-01 16:00:40 +00:00
Jim Meyering
80871da192 (MAINTAINERCLEANFILES): Set to $(BUILT_SOURCES). 1999-11-01 09:53:41 +00:00
Jim Meyering
dd1e7763d3 *** empty log message *** 1999-11-01 09:53:13 +00:00
Jim Meyering
dab2c2f26f update a comment from alpha.gnu.org:/home/gd/gnu/lib/getdate.y 1999-10-31 15:49:05 +00:00
Jim Meyering
4aa83de94e . 1999-10-31 11:43:22 +00:00
Jim Meyering
67a257993d (my-distcheck): Remove $(DEPDIR) to work around automake bug. 1999-10-31 11:43:05 +00:00
Jim Meyering
d45f587081 . 1999-10-31 11:40:06 +00:00
Jim Meyering
8d3deedb8d . 1999-10-31 11:38:40 +00:00
Jim Meyering
85f411e680 *** empty log message *** 1999-10-31 10:42:31 +00:00
Jim Meyering
362c45be17 Convert --backup to take an optional argument.
Deprecate --version-control (-V) in comments.
(usage): Remove mention of --version-control.
(main): Make -V warn then fall through into --backup case.
[--backup case]: Handle optional arg.
1999-10-31 10:42:12 +00:00
Jim Meyering
60b24ab5af tweak usage 1999-10-31 10:36:54 +00:00
Jim Meyering
95c67325f7 . 1999-10-31 10:35:47 +00:00
Jim Meyering
e16e6e2362 *** empty log message *** 1999-10-31 07:43:07 +00:00
Jim Meyering
7179f4a0af *** empty log message *** 1999-10-31 07:32:05 +00:00
Jim Meyering
7570ff1a15 *** empty log message *** 1999-10-30 16:27:10 +00:00
Jim Meyering
ca1b49d35f Remove file, since the fix made it into the experimental version of autoconf. 1999-10-30 16:27:04 +00:00
Jim Meyering
61ef65be66 indent more prettily 1999-10-30 16:20:29 +00:00
Jim Meyering
5398f98139 remove stray comma 1999-10-30 16:20:05 +00:00
Jim Meyering
143c0051a7 *** empty log message *** 1999-10-30 11:28:41 +00:00
Jim Meyering
c81b144d58 . 1999-10-30 11:24:34 +00:00
Jim Meyering
b9912b209f . 1999-10-30 11:24:14 +00:00
Jim Meyering
5f234e2759 *** empty log message *** 1999-10-30 08:11:41 +00:00
Jim Meyering
70dbbd4077 Require 2.14a. Remove backslash before backtick in m4-quoted string. 1999-10-30 08:11:32 +00:00
Jim Meyering
cd2e512366 *** empty log message *** 1999-10-30 08:10:40 +00:00
Jim Meyering
b8dc0dccca Require 2.14a. Remove backslash before backtick in m4-quoted string. 1999-10-30 08:09:10 +00:00
Jim Meyering
979fe5dc9a Use new AC_TYPE_SSIZE_T instead of my hacked AC_CHECK_TYPE.
Require 2.14a.  Remove backslash before backtick in m4-quoted string.
1999-10-30 08:08:57 +00:00
Jim Meyering
ec5d352d55 Remove file, since the fix made it into the experimental
version of autoconf.
1999-10-30 07:58:08 +00:00
Jim Meyering
d34f5765a8 New file, requires experimental version of autoconf. 1999-10-30 07:53:04 +00:00
Jim Meyering
3c4c9446a6 Remove file, now that latest version of AC_CHECK_TYPE
takes a third arg to specify additional #includes.
1999-10-30 07:52:40 +00:00
Jim Meyering
063d10ae6c (usage): Tweak --backup description 1999-10-30 07:04:01 +00:00
Jim Meyering
ac1e8485b3 . 1999-10-30 07:03:18 +00:00
Jim Meyering
f62bbb9cb9 *** empty log message *** 1999-10-30 06:32:42 +00:00
Jim Meyering
d437084b93 Convert --backup to take an optional argument.
Deprecate --version-control (-V) in comments.
(usage): Remove mention of --version-control.
(main): Make -V warn then fall through into --backup case.
[--backup case]: Handle optional arg.
1999-10-30 06:30:56 +00:00
Jim Meyering
9ddb95e93c (do_copy): Constify `dest', and cast-away the new
const in assignment to new_dest.
1999-10-24 21:28:37 +00:00
Jim Meyering
e3bd3c1c39 add missing program_name arg to match new usage %s 1999-10-24 21:26:51 +00:00
Jim Meyering
ff4e97cf78 . 1999-10-24 17:00:35 +00:00
Jim Meyering
6d1aa48746 label use of -V/--versin-control as a warning 1999-10-23 15:32:01 +00:00
Jim Meyering
02ba1920dd . 1999-10-23 13:31:09 +00:00
Jim Meyering
fb829c2cd1 import version 1.015 1999-10-23 13:30:28 +00:00
Jim Meyering
0a4ef2236d *** empty log message *** 1999-10-23 13:25:05 +00:00
Jim Meyering
40c66374f4 *** empty log message *** 1999-10-23 13:18:34 +00:00
Jim Meyering
0ec36fda44 *** empty log message *** 1999-10-23 13:18:10 +00:00
Jim Meyering
84142eaa26 (TESTS): Add dangling-symlink. 1999-10-23 13:16:50 +00:00
Jim Meyering
9d8529baea *** empty log message *** 1999-10-23 11:46:48 +00:00
Jim Meyering
a579a9f85b (full_write): Remove unused decl.
(open_maybe_create): Remove.
(touch): Don't record whether the file was created; this isn't
possible to do reliably and portably without race conditions.
If the file was created and if amtime_now is nonzero, this
change means we'll have to do another utime system call, but
that's no more harmful than the previous version of this code.
1999-10-23 11:46:03 +00:00
Jim Meyering
767a68f512 *** empty log message *** 1999-10-17 21:33:49 +00:00
Jim Meyering
f8c3b33277 Remove use of mv's now-deprecated
-V option.  Use --b=simple instead of -b -V simple.
1999-10-17 21:33:38 +00:00
Jim Meyering
77def80003 Convert --backup to take an optional argument.
Deprecate --version-control (-V) in comments.
(usage): Remove mention of --version-control.
(main): Make -V warn then fall through into --backup case.
[--backup case]: Handle optional arg.
1999-10-17 21:31:45 +00:00
Jim Meyering
96018007df *** empty log message *** 1999-10-17 21:31:04 +00:00
Jim Meyering
23d74f24e4 use x, y, not a, b. 1999-10-17 21:29:15 +00:00
Jim Meyering
23d5af772e adapt to work for mv, too 1999-10-17 21:24:26 +00:00
Jim Meyering
8bbc2e2937 change a message and add usage(1) to another. 1999-10-17 16:26:30 +00:00
Jim Meyering
5d694e4cc3 *** empty log message *** 1999-10-17 10:04:10 +00:00
Jim Meyering
f893b3807d Accept new option: --target-directory=DIR
(TARGET_DIRECTORY_OPTION): Define.
(SPARSE_OPTION): Define.
(usage): Describe it.
(do_copy): Change meanings/names of first two parameters: use `n_files'
in place of `argc - optind', and `file' instead of `argv + optind'.
Add parameter, target_directory.
(main): Pass new arg, target_directory.
1999-10-17 10:01:30 +00:00
Jim Meyering
a374a307c5 don't compute isdir() of -- or an option string 1999-10-17 07:39:20 +00:00
Jim Meyering
b221905959 remove last `,' in enum 1999-10-17 07:25:34 +00:00
Jim Meyering
ff2333c835 (TESTS): Add cp-mv-backup. 1999-10-16 14:52:40 +00:00
Jim Meyering
bd4945f89c *** empty log message *** 1999-10-16 14:51:45 +00:00
Jim Meyering
bda7fb978e Remove use of cp's now-deprecated --version-control option. 1999-10-16 14:50:26 +00:00
Jim Meyering
535a5f905f *** empty log message *** 1999-10-16 14:48:25 +00:00
Jim Meyering
34306581ac Convert --backup to take an optional argument.
Deprecate --version-control (-V) in comments.
(usage): Remove mention of --version-control.
(main): Make -V warn then fall through into --backup case.
[--backup case]: Handle optional arg.
1999-10-16 14:48:16 +00:00
Jim Meyering
d25861b4da Remove use of cp's now-deprecated -V option.
Use --b=simple instead of -b -V simple.
1999-10-16 14:44:17 +00:00
Jim Meyering
c9e90c55fa *** empty log message *** 1999-10-16 13:49:28 +00:00
Jim Meyering
07feb846a6 *** empty log message *** 1999-10-16 13:39:50 +00:00
Jim Meyering
0470b5dce9 *** empty log message *** 1999-10-16 13:13:39 +00:00
Jim Meyering
449c9c39cc *** empty log message *** 1999-10-11 14:04:32 +00:00
Jim Meyering
17c213ed3f update from GNU lib C 1999-10-11 12:39:14 +00:00
Jim Meyering
42da57def9 *** empty log message *** 1999-10-11 12:39:09 +00:00
Jim Meyering
eef13be7f9 *** empty log message *** 1999-10-11 12:38:55 +00:00
Jim Meyering
3bea9c2f51 *** empty log message *** 1999-10-09 13:22:57 +00:00
Jim Meyering
2de1a014ef Accept new option: --target-directory=DIR
(TARGET_DIRECTORY_OPTION): Define.
(usage): Describe it.
(main): Implement it.
Make code clearer:  use new variable `n_files' in place of
`argc - optind'.  Use `file' instead of `argv + optind'.
1999-10-09 13:22:08 +00:00
Jim Meyering
764768f318 *** empty log message *** 1999-10-07 12:46:15 +00:00
Jim Meyering
290848dd2b Don't require autoconf-2.14.1. 1999-10-04 07:51:44 +00:00
Jim Meyering
1ac0c21d89 *** empty log message *** 1999-10-04 07:51:26 +00:00
Jim Meyering
17754acc90 (__attribute__): Wrap with #ifndef __attribute__. 1999-10-04 06:04:19 +00:00
Jim Meyering
0226382b34 (__attribute__): Define to empty if GCC claims to
be before 2.8; this is needed for OPENStep 4.2 cc.  Also,
define to empty if strict ANSI.
1999-10-04 06:02:41 +00:00
Jim Meyering
1ca4f162fa (__attribute__): Define to empty if GCC claims to
be before 2.8; this is needed for OPENStep 4.2 cc.  Also,
define to empty if strict ANSI.
1999-10-04 05:59:37 +00:00
Jim Meyering
84928ec02d (TARGET_DIRECTORY_OPTION): Define.
(usage): Describe it.
(main): Implement it.
Remove unused variable, stdin_tty.
Make code clearer:  use new variable `n_files' in place of
`argc - optind'.  Use `file' instead of `argv + optind'.
1999-10-03 16:59:07 +00:00
Jim Meyering
46f2e4efeb another example for tr -- illustrating problems with `-' in ranges.. 1999-10-02 11:46:53 +00:00
Jim Meyering
6c4caf0dbf *** empty log message *** 1999-10-02 11:42:26 +00:00
Jim Meyering
1003235282 . 1999-10-02 11:12:34 +00:00
Jim Meyering
fb4889bcd9 . 1999-10-02 11:12:06 +00:00
Jim Meyering
155695ed60 *** empty log message *** 1999-09-29 14:44:36 +00:00
Jim Meyering
d5c47e9163 (AC_SYS_LARGEFILE_FLAGS): Work around GCC 2.95.1 bug with HP-UX 10.20. 1999-09-29 14:44:31 +00:00
Jim Meyering
ea0df9b67d Do s/#ifdef HAVE_/#if HAVE_/ -- solely for aesthetics.
Do the same for other config.h macros like CLOSEDIR_VOID and MAJOR_*.
1999-09-28 16:22:54 +00:00
Jim Meyering
98ba27811d Do s/#ifdef HAVE_/#if HAVE_/ -- solely for aesthetics. 1999-09-28 16:22:38 +00:00
Jim Meyering
a66e71a1d2 *** empty log message *** 1999-09-28 15:27:13 +00:00
Jim Meyering
4a03ccc044 (__attribute__): Protect against redefinition. 1999-09-28 15:26:45 +00:00
Jim Meyering
57d52e5170 *** empty log message *** 1999-09-28 14:48:53 +00:00
Jim Meyering
a7047bf647 (error_at_line): Use strerror portably here, too,
just as was done in error.
1999-09-28 14:48:43 +00:00
Jim Meyering
6f3516dc97 . 1999-09-26 22:36:11 +00:00
Jim Meyering
057f710a76 (xalloc_die): Rename from xalloc_fail and update callers.
Use explicit exit to help avoid warnings.
1999-09-26 19:05:39 +00:00
Jim Meyering
168676d418 small correction from Akim 1999-09-26 19:01:12 +00:00
Jim Meyering
825a182517 *** empty log message *** 1999-09-26 18:53:01 +00:00
Jim Meyering
34cc9acdd9 (DIRECTORY_SEPARATOR): Define.
(ISSLASH): Define.
(path_concat): Allow parameter DIR to be NULL.
(xpath_concat): New function.
From Akim Demaille.
1999-09-26 18:52:51 +00:00
Jim Meyering
0f97cac340 (__attribute__): Define.
(ATTRIBUTE_NORETURN): Define.
(xalloc_fail_func): Add noreturn attribute.
(xalloc_die): Declare.
(NEW): Define as yet unused macro.
(XFREE): Likewise
(CCLONE): Likewise.
(CLONE): Likewise.
From Akim Demaille.
1999-09-26 18:42:56 +00:00
Jim Meyering
6710abd4ae (base_name): Add prototype. From Akim Demaille. 1999-09-26 18:37:02 +00:00
Jim Meyering
566b0c41e3 . 1999-09-24 07:42:42 +00:00
Jim Meyering
72a5a4b5af . 1999-09-24 07:35:42 +00:00
Jim Meyering
e105d08552 *** empty log message *** 1999-09-19 16:48:43 +00:00
Jim Meyering
2e5a37a44e *** empty log message *** 1999-09-19 16:47:58 +00:00
Jim Meyering
8e0c33f8ea [STAT_MACROS_BROKEN] (S_ISLNK): Undefine.
(S_ISLNK): Define if necessary.
This is necessary on a NEC SX-4 with SUPER-UX 9.1.
1999-09-19 16:46:50 +00:00
Jim Meyering
16155b0807 *** empty log message *** 1999-09-19 16:45:24 +00:00
Jim Meyering
1648386aa0 (siginfo_handler): Mark parameter with ATTRIBUTE_UNUSED.
Change lots of count and index variables to be of unsigned type.
(dd_copy): Add new unsigned variable, n_bytes_read, in place of
many uses of `nread'.
1999-09-19 16:23:17 +00:00
Jim Meyering
7447e09e2a *** empty log message *** 1999-09-19 16:22:23 +00:00
Jim Meyering
96949ef7f5 (__attribute__): Define.
(ATTRIBUTE_NORETURN): Remove #else clause.
(ATTRIBUTE_UNUSED): Define.
1999-09-19 16:21:26 +00:00
Jim Meyering
44b1bde148 Remove useless parens in #if directive 1999-09-19 08:09:50 +00:00
Jim Meyering
1e5c8f23ce . 1999-09-18 21:18:37 +00:00
Jim Meyering
f1029324fe . 1999-09-18 21:17:29 +00:00
Jim Meyering
c1eb26af14 *** empty log message *** 1999-09-17 21:45:53 +00:00
Jim Meyering
93eaa3c661 (AC_REPLACE_FUNCS): Add strdup.
Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
due to missing strdup (against sh-utils-2.0).
1999-09-17 21:45:48 +00:00
Jim Meyering
67aaf0afa6 (usage): Remove misleading sentence in --help output.
From Karl Heuer.
1999-09-09 19:56:10 +00:00
Jim Meyering
fc02691130 Remove declaration of xstrdup. 1999-09-08 08:39:49 +00:00
Jim Meyering
29f710b0e5 *** empty log message *** 1999-09-05 06:56:59 +00:00
Jim Meyering
6c26ef5e0d (ENOSYS): Don't use ENOMSG; it's not in NeXTStep3.3.
Use EINVAL instead.
1999-09-05 06:56:50 +00:00
Jim Meyering
a8d1ef1616 tweak comment 1999-09-04 20:27:03 +00:00
Jim Meyering
8bde83a334 *** empty log message *** 1999-09-02 21:34:33 +00:00
Jim Meyering
85e0053136 Remove xstrdup declaration. 1999-09-02 21:34:04 +00:00
Jim Meyering
b10b8369dd Remove xstrdup declaration. 1999-09-02 21:33:23 +00:00
Jim Meyering
1aab3474a1 Remove xstrdup declaration. 1999-09-02 21:33:00 +00:00
Jim Meyering
42a837c531 *** empty log message *** 1999-09-02 21:31:37 +00:00
Jim Meyering
d1b4719534 Remove xstrdup declaration. 1999-09-02 21:31:19 +00:00
Jim Meyering
81fde1922f (xalloc_fail_func): Use `PARAMS'.
(xstrdup): Add protoype.
1999-09-02 21:23:01 +00:00
Jim Meyering
7d2b2cc3f9 import version 1.013 1999-09-02 10:40:44 +00:00
Jim Meyering
967bd9f5f0 Remove declaration of xstrdup. 1999-09-01 13:28:21 +00:00
Jim Meyering
f2a32f6e5b (version_etc_copyright): Declare it. 1999-09-01 13:16:46 +00:00
Jim Meyering
8e064c4377 (version_etc_copyright): Default copyright string.
(version_etc): Use it.
1999-09-01 13:15:11 +00:00
Jim Meyering
5790705b19 (xalloc_fail_func): Use `PARAMS'. 1999-09-01 13:09:19 +00:00
Jim Meyering
fa36ee7ea2 *** empty log message *** 1999-08-31 20:46:40 +00:00
Jim Meyering
8a29209450 Add .rpm, .png, and .fli.
From Andres Soolo.
1999-08-31 20:46:18 +00:00
Jim Meyering
82669abc1a *** empty log message *** 1999-08-30 15:05:34 +00:00
Jim Meyering
794af09007 . 1999-08-30 14:59:37 +00:00
Jim Meyering
128307fa88 . 1999-08-30 14:59:08 +00:00
Jim Meyering
84f4450da4 *** empty log message *** 1999-08-30 14:44:10 +00:00
Jim Meyering
038e5f009e (longopts): Restore accidentally-removed entry for `--portability' long option. 1999-08-30 14:43:52 +00:00
Jim Meyering
4ab0a2a4c6 (usage): Correct --help message. 1999-08-30 14:41:05 +00:00
Jim Meyering
4b20f454fe split a long line. 1999-08-30 14:39:05 +00:00
Jim Meyering
33bebae5ae (usage): Correct --help message. 1999-08-30 14:38:00 +00:00
Jim Meyering
ccff4ede2b (usage): Correct --help message. 1999-08-30 14:37:40 +00:00
Jim Meyering
6f48cb1924 (usage): Correct --help message. 1999-08-30 14:36:26 +00:00
Jim Meyering
98ecd5b300 (usage): Correct --help message. 1999-08-30 14:36:06 +00:00
Jim Meyering
57e5f5a5b5 (usage): Correct --help message. 1999-08-30 14:35:45 +00:00
Jim Meyering
2a0b67dc3b (usage): Correct --help message. 1999-08-30 14:35:20 +00:00
Jim Meyering
805034d054 . 1999-08-30 14:34:09 +00:00
Jim Meyering
c180c51c79 . 1999-08-30 14:33:39 +00:00
Jim Meyering
e044763e67 . 1999-08-30 14:31:16 +00:00
Jim Meyering
b8da6c90b6 . 1999-08-30 14:30:28 +00:00
Jim Meyering
269630005b . 1999-08-29 21:13:46 +00:00
Jim Meyering
902d5e299d *** empty log message *** 1999-08-29 21:10:22 +00:00
Jim Meyering
75789c4643 (main): Call exit explicitly to avoid warning from gcc.
Include "xstrtol.h".
(isinteger): Remove function and prototype.
(main): Use xstrtol in place of atoi.  Remove associated FIXME comments.
1999-08-29 21:09:34 +00:00
Jim Meyering
678cbc835e (isinteger): Move definition to precede use. Remove prototype. 1999-08-29 20:49:07 +00:00
Jim Meyering
de8d09d22d (main): Call exit explicitly to avoid warning from gcc. 1999-08-29 20:47:17 +00:00
Jim Meyering
b266f1a207 (main): Call exit explicitly to avoid warning from gcc. 1999-08-29 20:45:50 +00:00
Jim Meyering
a61888be78 *** empty log message *** 1999-08-29 20:42:42 +00:00
Jim Meyering
a3bafb3263 *** empty log message *** 1999-08-29 20:40:15 +00:00
Jim Meyering
937c7d8bab Require jm_BISON. 1999-08-29 20:40:00 +00:00
Jim Meyering
b7af6cd62a *** empty log message *** 1999-08-29 20:37:25 +00:00
Jim Meyering
09b7fb4252 *** empty log message *** 1999-08-29 20:35:16 +00:00
Jim Meyering
f9ab8e8b03 *** empty log message *** 1999-08-29 20:05:07 +00:00
Jim Meyering
fb9a0d3dff *** empty log message *** 1999-08-29 19:54:09 +00:00
Jim Meyering
d45400c9a9 (relative_time_table): Change type' of THIS' from
tMINUTE_UNIT to tUNUMBER.  From Urs Thuermann.
1999-08-29 14:55:24 +00:00
Jim Meyering
81eda26beb *** empty log message *** 1999-08-29 14:49:06 +00:00
Jim Meyering
1a9b70d7a8 *** empty log message *** 1999-08-29 14:46:35 +00:00
Jim Meyering
70c01e7963 (test_vector): Add a test for the Risks-reported problem with `Nov 11 1996'. 1999-08-29 14:46:25 +00:00
Jim Meyering
bd4a3f044d *** empty log message *** 1999-08-29 14:37:40 +00:00
Jim Meyering
13bc9dcc35 (test_vector): Add tests for use of `this'. 1999-08-29 14:36:48 +00:00
Jim Meyering
6b840273e0 (get_date): Rename latter local `tm' to probe_tm. 1999-08-29 12:55:35 +00:00
Jim Meyering
9f92dfbf90 (get_date): Rename outermost local probe' to quarter'. 1999-08-29 12:28:56 +00:00
Jim Meyering
26656272e8 Add copyright notice.
(number): Handle `Nov 11 1996' example; see Risks Digest 20.55
http://catless.ncl.ac.uk/Risks/20.55.html#subj18
(1999-08-27)

(<stdio.h>): Include only if testing.
(ISUPPER): Remove.
(ISLOWER, PC): New macros.
(<string.h>): Include if HAVE_STRING_H, not USG.
(bcopy): Remove.
(yymaxdepth, ..., yycheck): Don't bother to redefine, since we assume
bison.
(EPOCH_YEAR): Renamed from EPOCH.
(table): Renamed from TABLE.
(meridian): Now an anonymous enum.
(struct parser_control): New type.
(YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
(yyInput, ..., yyRelYear): Migrated into struct parser_control.
(%pure_parser): Added, so that the parser is pure.
(%union): Removed; the type is now just plain int.
All %type directives removed.
(tLOCAL_ZONE): New %token.
(month_day_table): Renamed from MonthDayTable.
(gmtime, localtime, mktime, time): Declare only if not defined.
(meridian_table): New table.
(dst_table): New table.
(units_table): renamed from UnitsTable.
(relative_time_table): Renamed from OtherTable.
(time_zone_table): Renamed from TimezoneTable.  Modernized data.
(military_table): Renamed from MilitaryTable.
(to_hour): Renamed from ToHour.
(to_year): Renamed from ToYear.
(lookup_zone): New function.
(LookupWord): Renamed from lookup_word.
Use lookup_zone for time zones.
(yylex): Now reentrant.  All callers changed.
(get_date): Add support for local time zone abbreviations.
Make it reentrant.
1999-08-29 07:29:51 +00:00
Jim Meyering
948cf23537 *** empty log message *** 1999-08-25 15:41:52 +00:00
Jim Meyering
2395e90973 *** empty log message *** 1999-08-22 16:28:45 +00:00
Jim Meyering
bb6f5c5913 *** empty log message *** 1999-08-22 16:28:26 +00:00
Jim Meyering
d1b7514e91 *** empty log message *** 1999-08-22 16:23:28 +00:00
Jim Meyering
53e173cca6 (detect_loop): There's no loop if k->top is NULL. 1999-08-22 16:10:24 +00:00
Jim Meyering
5157fd957e Add a few more tests. 1999-08-22 16:09:29 +00:00
Jim Meyering
d39e2c5127 *** empty log message *** 1999-08-22 15:58:28 +00:00
Jim Meyering
80e8a30f39 *** empty log message *** 1999-08-22 15:58:06 +00:00
Jim Meyering
83d003e558 Rewrite to use Fetish.pm-based framework. 1999-08-22 15:55:41 +00:00
Jim Meyering
9715e45a87 *** empty log message *** 1999-08-22 15:54:35 +00:00
Jim Meyering
5d3b030798 . 1999-08-22 15:53:59 +00:00
Jim Meyering
19a165cc9c tweak comment 1999-08-22 11:34:56 +00:00
Jim Meyering
7a7ef5ff5b (check_file): Explain why we have separate if' and else'
blocks when the code in the else block could handle both cases.
1999-08-22 11:31:08 +00:00
Jim Meyering
2638bf642c *** empty log message *** 1999-08-22 11:17:47 +00:00
Jim Meyering
9503681d86 (check_file): Generate each line of output earlier,
when possible.  It is possible when using none of these options:
--count, -repeated, --all-repeated, --unique.
Based on a patch from Ian Turner.

(check_file): Move declarations of local variables into the scopes where used.
(min): Remove macro definition.
(different): Use MIN, not min.
(SWAP_LINES): New macro.
(check_file): Use it here.
1999-08-22 11:17:42 +00:00
Jim Meyering
7d8102bec2 . 1999-08-22 11:04:23 +00:00
Jim Meyering
b980775bb6 *** empty log message *** 1999-08-22 11:03:57 +00:00
Jim Meyering
b96c6c60eb *** empty log message *** 1999-08-22 11:03:32 +00:00
Jim Meyering
7de78927ed Escape backslashes so tr's manual comes out right.
Reported by Andreas Schwab.
1999-08-22 11:02:39 +00:00
Jim Meyering
7a44e716a4 *** empty log message *** 1999-08-22 10:58:31 +00:00
Jim Meyering
95b8288176 (ATTRIBUTE_NORETURN): Define. 1999-08-22 10:57:51 +00:00
Jim Meyering
5a2d528081 Use ATTRIBUTE_NORETURN instead of NO_RETURN_ATTRIBUTE. 1999-08-22 10:57:40 +00:00
Jim Meyering
8ab42dc273 *** empty log message *** 1999-08-22 10:53:37 +00:00
Jim Meyering
705cf20084 (run_shell): Declare with noreturn attribute.
Use an explicit exit(1) rather than doing that through error.
1999-08-22 10:53:13 +00:00
Jim Meyering
fc08f1058a *** empty log message *** 1999-08-22 10:22:06 +00:00
Jim Meyering
a343e68e00 (main): Rename locals i and j.
Use IF_LINT macro instead of #ifdef lint...
1999-08-22 10:21:36 +00:00
Jim Meyering
e8e722d58e *** empty log message *** 1999-08-22 10:19:56 +00:00
Jim Meyering
8313e867b2 (validate_path): Use IF_LINT macro instead of #ifdef lint. 1999-08-22 10:19:35 +00:00
Jim Meyering
4dac9be014 (batch_convert): Use IF_LINT macro instead of #ifdef lint. 1999-08-22 10:19:15 +00:00
Jim Meyering
46554e300b (dump): Use IF_LINT macro instead of #ifdef lint...
(main): Likewise.
1999-08-22 09:51:20 +00:00
Jim Meyering
8b5ed0399d (paste_parallel): Use IF_LINT macro instead of #ifdef lint... 1999-08-22 09:50:56 +00:00
Jim Meyering
e11d70c362 (read_line): Use IF_LINT macro instead of #ifdef lint... 1999-08-22 09:50:31 +00:00
Jim Meyering
005c36b178 (checkfp): Use IF_LINT macro instead of #ifdef lint...
(mergefps): Likewise.
1999-08-22 09:50:05 +00:00
Jim Meyering
0e3b9af25b (usage): Correct bug-reporting email address.
(tsort): Remove trailing `\n' in error format.
1999-08-22 09:45:52 +00:00
Jim Meyering
1ec1017a23 (IF_LINT): Define new macro. 1999-08-22 09:43:48 +00:00
Jim Meyering
bab0581788 (md5_check): Remove trailing `\n' in error format. 1999-08-22 09:43:25 +00:00
Jim Meyering
e23b334713 (SWAP_LINES): New macro.
(check_file): Use it here.

[really remove min macro, this time]
1999-08-22 08:57:37 +00:00
Jim Meyering
475a58337a (writeline): Constify a char*. 1999-08-22 08:48:45 +00:00
Jim Meyering
1195909f5d (cksum): Constify a char*. 1999-08-22 08:48:06 +00:00
Jim Meyering
0c44307f3b *** empty log message *** 1999-08-22 08:47:00 +00:00
Jim Meyering
138cf56fdb (parse_integer): Add `const' to char* parameter and
add a separate `suffix' variable.
1999-08-22 08:46:33 +00:00
Jim Meyering
a711e8e132 (check_file): Move declarations of local variables
into the scopes where they're used.
(min): Remove macro definition.
(different): Use MIN, not min.
1999-08-22 08:16:34 +00:00
Jim Meyering
e32013660e *** empty log message *** 1999-08-21 20:26:25 +00:00
Jim Meyering
b4e8324ac2 (usage): Remove the ` [-v]' from the Usage: line. 1999-08-21 20:26:18 +00:00
Jim Meyering
03455da71a import latest 1999-08-20 10:05:46 +00:00
Jim Meyering
c82037714e *** empty log message *** 1999-08-20 09:02:39 +00:00
Jim Meyering
6faeb61968 *** empty log message *** 1999-08-20 08:58:40 +00:00
Jim Meyering
82288821f0 (usage): Tweak --help output to make it more consistent with that of chgrp. 1999-08-20 08:58:34 +00:00
Jim Meyering
28c95e39c1 (usage): Tweak --help output to make it more consistent with that of chown. 1999-08-20 08:58:21 +00:00
Jim Meyering
47ac7c933a paste --delimiters: add missing `=' 1999-08-18 16:21:16 +00:00
Jim Meyering
4ba5bee1a0 stty --file: add missing `=' 1999-08-18 16:20:03 +00:00
Jim Meyering
f063d2f7a2 *** empty log message *** 1999-08-18 07:41:39 +00:00
Jim Meyering
ee81e2f472 (AC_SYS_LARGEFILE): Fix typo: missing comma
in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
1999-08-18 07:41:27 +00:00
Jim Meyering
c1e29b69ba *** empty log message *** 1999-08-17 10:17:42 +00:00
Jim Meyering
13955cb7c1 source input-tty instead of open-coding it 1999-08-17 10:15:50 +00:00
Jim Meyering
e95aecb85e (EXTRA_DIST): Add input-tty. 1999-08-17 10:14:23 +00:00
Jim Meyering
b66c78c236 *** empty log message *** 1999-08-17 10:13:27 +00:00
Jim Meyering
b1d6d67405 *** empty log message *** 1999-08-17 08:03:49 +00:00
Jim Meyering
086c4578e3 . 1999-08-17 08:00:19 +00:00
Jim Meyering
99d5294ab1 *** empty log message *** 1999-08-17 07:59:12 +00:00
Jim Meyering
f99e33733b . 1999-08-17 07:46:10 +00:00
Jim Meyering
4d22e13282 This change is nearly identical to the chown.c change of 1998-05-24
Accept new option, --dereference.
--no-dereference is now the default. Include lchown.h.
(enum Change_status) [CH_NOT_APPLIED]: New member.
(change_symlinks): Enable this by default, now.
(describe_change): Handle new case.
(change_file_group): Add new parameter: cmdline_arg.  Update callers.
Reorganize to reflect changed semantics.
(LCHOWN): Remove definitions.
From Bruno Haible.
1999-08-16 21:21:39 +00:00
Jim Meyering
18607df151 (groupname): Declare to be `const'.
(change_dir_owner): Declare statp parameter to be `const'.
(usage): Make the output be more consistent with that from chgrp.
1999-08-16 21:20:44 +00:00
Jim Meyering
1b4fc0d733 factor examples 1999-08-15 18:43:54 +00:00
Jim Meyering
1cea2b41a4 *** empty log message *** 1999-08-15 12:57:21 +00:00
Jim Meyering
a2267a42f8 --pid vs djgpp 1999-08-15 12:56:33 +00:00
Jim Meyering
7228350401 (ENOSYS): Define to a bogus value if not already defined.
(parse_options): Warn if --pid=PID is used and kill()
returns ENOSYS (e.g. when compiled with DJGPP).
1999-08-15 12:56:00 +00:00
325 changed files with 11288 additions and 15539 deletions

View File

@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Copyright (C) <year> <name of author>
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
@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View File

@@ -38,16 +38,30 @@ cvs-dist: maintainer-check
cvs tag -c $(this-cvs-tag)
$(MAKE) dist
# Use this to make sure we don't run these programs when building
# from a virgin tgz file, below.
null_AM_MAKEFLAGS = \
ACLOCAL=false \
AUTOCONF=false \
AUTOMAKE=false \
AUTOHEADER=false \
MAKEINFO=false
t=./=test
my-distcheck:
my-distcheck: writable-files po-check
-rm -rf $(t)
mkdir $(t)
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
# Removing $(DEPDIR) like this is a gross kludge to work around a bug
# in automake. Remove that line once it's fixed.
cd $(t)/$(distdir) \
&& ./configure --disable-nls \
&& $(MAKE) CFLAGS='-Wformat -Werror' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
&& $(MAKE) check \
&& rm -rf $(DEPDIR) \
&& $(MAKE) distclean
cd $(t) && mv $(distdir) $(distdir).old \
&& $(AMTAR) -zxf ../$(distdir).tar.gz
@@ -59,24 +73,20 @@ my-distcheck:
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
# FIXME: this works only for Gnits-style test releases.
PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
PREV_VERSION := $(shell echo $(VERSION)|tr b-z a-y|sed 's/a$$//')
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
v = Version
a_host=alpha.gnu.org
b_host=tug.org
c_host=ftp.enst.fr
a_url_dir=gnu/fetish
b_url_dir=gnu/fetish
c_url_dir=pub/gnu/gnits/fetish
a_real_dir=/fs/share/ftp/gnu/fetish
b_real_dir=/home/ftp/pub/gnu/fetish
c_real_dir=/pub/gnu/gnits/fetish
url_dir_list = $(foreach x,a b c,ftp://$($(x)_host)/$($(x)_url_dir))
real_dir_list = $(foreach x,a b c,ftp://$($(x)_host)$($(x)_real_dir))
url_dir_list = $(foreach x,a b,ftp://$($(x)_host)/$($(x)_url_dir))
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
@@ -89,6 +99,10 @@ rel-check:
echo "$(md5) -" > $$md5_tmp; \
md5sum -c $$md5_tmp < $$tarz
release-archive-dir = ../release
prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz
xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta
announcement: NEWS ChangeLog $(distdir).tar.gz
@( \
echo Subject: $(distdir) released; \
@@ -99,6 +113,12 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
echo " $$url/$(distdir).tar.gz"; \
done; \
echo; \
echo And here are xdelta-style diffs; \
echo; \
for url in $(url_dir_list); do \
echo " $$url/$(xd-delta)"; \
done; \
echo; \
echo "$(md5) $(distdir).tar.gz"; \
echo; \
echo NEWS:; \
@@ -113,16 +133,28 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
-e 'print "\n"."*"x70 ."\n"; s///; print; print "*"x70 ."\n"'; \
)
alpha:
$(MAKE) po-check
writable-files:
for file in $(distdir).tar.gz $(xd-delta) \
../release/$(distdir).tar.gz ../release/$(xd-delta); do \
test -e $$file || continue; \
test -w $$file \
|| { echo ERROR: $$file is not writable; fail=1; }; \
done; \
test "$$fail" && exit 1 || :
alpha: writable-files po-check
$(MAKE) cvs-dist
$(MAKE) -s announcement > /tmp/announce-$(distdir)
ln $(distdir).tar.gz ../release
chmod a-w $(distdir).tar.gz
cd $(release-archive-dir) \
&& xdelta delta -9 $(prev-tgz) $(distdir).tar.gz $(xd-delta) || :
ln $(release-archive-dir)/$(xd-delta) .
chmod a-w $(release-archive-dir)/$(xd-delta)
@echo =====================================
@for url in $(real_dir_list); do \
echo "ncftp -u $$url/"; \
done
@echo '# put $(distdir).tar.gz'
@echo =====================================
@echo 'scp $(xd-delta) $(distdir).tar.gz \'
@echo ' $(b_host):$(b_real_dir)'
@echo '# send the /tmp/announcement e-mail'
@echo =====================================
@echo =====================================

21
THANKS
View File

@@ -8,7 +8,8 @@ Akim Demaille: demaille@inf.enst.fr
Alain Magloire: alain@qnx.com
Alexey Solovyov: alekso@math.uu.se
Andreas Jaeger: jaeger@gnu.org
Andreas Schwab: schwab@issan.informatik.uni-dortmund.de
Andreas Schwab: schwab@suse.de
Andres Soolo: andres@soolo.matti.ee
Andrew Dalke: dalke@bioreason.com
Andrew Tridgell: tridge@samba.org
Andries Brouwer: Andries.Brouwer@cwi.nl
@@ -16,11 +17,13 @@ Arne Henrik Juul: arnej@imf.unit.no
Bauke Jan Douma: bjdouma@xs4all.nl
Bengt Martensson: bengt@mathematik.uni-Bremen.de
Bernd Leibing: bernd.leibing@rz.uni-ulm.de
Bernhard Rosenkraenzer: bero@redhat.de
Bjorn Helgaas: helgaas@rsn.hp.com
Bob McCracken: kerouac@ravenet.com
Bob Proulx: rwp@fc.hp.com
Brendan O'Dea: bod@compusol.com.au
Charles Karney: karney@pppl.gov
Chip Salzenberg: chip@valinux.com
Chris Yeo: cyeo@biking.org
Christian von Roques: roques@pond.sub.org
Colin Plumb: colin@nyx.net
@@ -35,20 +38,26 @@ Galen Hazelwood: galenh@micron.net
Germano Leichsenring: germano@jedi.cs.kobe-u.ac.jp
Göran Uddeborg: goeran@uddeborg.pp.se
Greg McGary: gkm@eng.ascend.com
Gabor Z. Papp: gzp@gzp.org.hu
H. J. Lu: hjl@valinux.com
Holger Berger: hberger@ess.nec.de
Hugh Daniel: hugh@xanadu.com
James: james@albion.glarp.com
James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
James Sneeringer: jvs@ocslink.com
James Tanis: jtt@soscorp.com
Jamie Lokier: jamie@imbolc.ucc.ie
Janos Farkas: chexum@shadow.banki.hu
Jesse Thilo: jgt2@eecs.lehigh.edu
Joakim Rosqvist: dvljrt@cs.umu.se
Joe Orton: joe@orton.demon.co.uk
Johan Danielsson: joda@pdc.kth.se
John Bley: jbb6@acpub.duke.edu
John Gatewood Ham: zappaman@alphabox.compsci.buu.ac.th
John Gotts: jgotts@umich.edu
Jürgen Fluk: louis@dachau.marco.de
jvogel: jvogel@linkny.com
Kalle Olavi Niemitalo: tosi@stekt.oulu.fi
Karl Heuer: kwzh@gnu.org
Kjetil Torgrim Homme: kjetilho@ifi.uio.no
Larry McVoy: lm@sgi.com
@@ -58,32 +67,42 @@ Marcus Daniels: marcus@sysc.pdx.edu
Mark A. Thomas: thommark@access.digex.net
Mark Harris: mark@monitor.designacc.com
Mark Kettenis: kettenis@phys.uva.nl
Martin Mitchell: martin@debian.org
Marty Leisner: leisner@sdsp.mc.xerox.com
Masami Takikawa: takikawm@CS.ORST.EDU
Matthew S. Levine: mslevine@theory.lcs.mit.edu
Matthew Swift: swift@alum.mit.edu
Matthias Urlichs: smurf@noris.de
Michiel Bacchiani: bacchian@raven.bu.edu
Michael ???:michael@roka.net
Michael Veksler: mveksler@techunix.technion.ac.il
Michael Stone: mstone@debian.org
Miles Bader: miles@gnu.ai.mit.edu
Nelson H. F. Beebe: beebe@math.utah.edu
Noel Cragg: noel@red-bean.com
Olav Morkrid: olav@funcom.com
Per Kristian Hove: perhov@math.ntnu.no
Peter Eriksson: peter@ifm.liu.se
Peter Moulder: reiter@netspace.net.au
Peter Samuelson: psamuels@sampo.creighton.edu
Paul Eggert: eggert@twinsun.com
Paul Slootman: paul@debian.org
Philippe De Muyter: phdm@macqel.be
Rainer Orth: ro@TechFak.Uni-Bielefeld.DE
Richard Braakman: dark@xs4all.nl
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
Sami Farin: sfarin@ratol.fi
Santiago Vila Doncel: sanvila@unex.es
Scott Lurndal: slurn@griffin.engr.sgi.com
Stuart Kemp: skemp@peter.bmc.com
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
Ton Hospel: thospel@mail.dma.be
Torbjorn Lindgren: tl@funcom.no
Torsten Landschoff: torsten@pclab.ifg.uni-kiel.de
Tony Leneis: tony@plaza.ds.adp.com
Ulrich Drepper: drepper@cygnus.com
Vin Shelton: acs@alumni.princeton.edu
Volker Borchert: bt@teknon.de
Wayne Stewart: wstewa@atl.com
Wichert Akkerman: wichert@cistron.nl
William Bader: william@nscs.fast.net

View File

@@ -59,16 +59,21 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
@@ -79,20 +84,26 @@ INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBOBJS = @LIBOBJS@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MVDIR_PROG = @MVDIR_PROG@
NEED_SETGID = @NEED_SETGID@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
install_sh = @install_sh@
l = @l@
@@ -215,7 +226,7 @@ install-info-am: $(INFO_DEPS)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
d=$(srcdir); \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
@@ -236,9 +247,8 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
d=$(srcdir); \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file; \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@@ -254,7 +264,7 @@ dist-info: $(INFO_DEPS)
list='$(INFO_DEPS)'; \
for base in $$list; do \
d=$(srcdir); \
for file in `cd $$d && eval echo $$base*`; do \
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
@@ -267,7 +277,7 @@ mostlyclean-aminfo:
fileutils.kys fileutils.ps fileutils.log fileutils.pg \
fileutils.toc fileutils.tp fileutils.tps fileutils.vr \
fileutils.vrs fileutils.op fileutils.tr fileutils.cv \
fileutils.cn
fileutils.cn fileutils.cm fileutils.ov
clean-aminfo:
@@ -287,22 +297,16 @@ TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits doc/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
cp -pR $$d/$$file $(distdir); \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info-am: $(INFO_DEPS)
info: info-am
@@ -340,6 +344,7 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
mostlyclean: mostlyclean-am

View File

@@ -114,7 +114,7 @@ numerically or literally. All these strings specify the same calendar date:
@example
1970-09-17 # ISO 8601.
70-9-17 # This century assumed by default.
70-9-17 # Assume 19xx for 69 through 99, 20xx for 00 through 68.
70-09-17 # Leading zeros are ignored.
9/17/72 # Common U.S. writing.
24 September 1972
@@ -141,8 +141,9 @@ For numeric months, the ISO 8601 format
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
any positive number, @var{month} is a number between 01 and 12, and
@var{day} is a number between 01 and 31. A leading zero must be present
if a number is less than ten. If @var{year} is less than 100, then 1900
is added to it to force a date in this century. The construct
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
is added to it; otherwise, if @var{year} is less than 100,
then 1900 is added to it. The construct
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.

View File

@@ -1176,7 +1176,7 @@ Print all current settings in human-readable form. This option may not
be used in combination with any line settings.
@item -F @var{device}
@itemx --file @var{device}
@itemx --file=@var{device}
@opindex -F
@opindex --file
Set the line opened by the filename specified in @var{device} instead of
@@ -3041,7 +3041,7 @@ the values of the command line arguments.
Synopsis:
@example
sleep [@var{number}[smhd]]@dots{}
sleep @var{number}[smhd]@dots{}
@end example
@cindex time units
@@ -3059,6 +3059,10 @@ hours
days
@end table
Historical implementations of @code{sleep} have required that
@var{number} be an integer. However, GNU @code{sleep} accepts
arbitrary floating point numbers.
The only options are @samp{--help} and @samp{--version}. @xref{Common
options}.
@@ -3094,6 +3098,23 @@ numbers from standard input, delimited by newlines, tabs, or spaces.
The only options are @samp{--help} and @samp{--version}. @xref{Common
options}.
The algorithm it uses is not very sophisticated, so for some inputs
@code{factor} runs for a long time. The hardest numbers to factor are
the products of large primes. Factoring the square of the largest 32-bit
prime number takes over 10 minutes of CPU time on a 400MHz Pentium II.
@example
$ factor `echo '4294967291^2'|bc`
18446744030759878681: 4294967291 4294967291
@end example
In contrast, @code{factor} factors the largest 64-bit number in just
over a tenth of a second:
@example
$ factor `echo '2^64-1'|bc`
18446744073709551615: 3 5 17 257 641 65537 6700417
@end example
@node seq invocation
@section @code{seq}: Print numeric sequences
@@ -3122,8 +3143,8 @@ The program accepts the following options. Also see @ref{Common options}.
@opindex --format=@var{format}
@cindex formatting of numbers in @code{seq}
Print all numbers using @var{format}; default @samp{%g}.
@var{format} must contain exactly one of the standarding float output
formats @samp{%e}, @samp{%f}, or @samp{%g}.
@var{format} must contain exactly one of the standarding floating point
output formats @samp{%e}, @samp{%f}, or @samp{%g}.
@item -s @var{string}
@itemx --separator=@var{string}
@@ -3138,6 +3159,66 @@ Print all numbers with the same width, by padding with leading zeroes.
@end table
If you want to use @code{seq} to print sequences of large integer values,
don't use the default @samp{%g} format since it can result in
loss of precision:
@example
$ seq 1000000 1000001
1e+06
1e+06
@end example
Instead, you can use the format, @samp{%1.f},
to print large decimal numbers with no exponent and no decimal point.
@example
$ seq --format=%1.f 1000000 1000001
1000000
1000001
@end example
If you want hexadecimal output, you can use @code{printf}
to perform the conversion:
@example
$ printf %x'\n' `seq -f %1.f 1048575 1024 1050623`
fffff
1003ff
1007ff
@end example
For very long lists of numbers, use xargs to avoid
system limitations on the length of an argument list:
@example
$ seq -f %1.f 1000000 | xargs printf %x'\n' |tail -3
f423e
f423f
f4240
@end example
To generate octal output, use the printf @code{%o} format instead
of @code{%x}. Note however that using printf works only for numbers
smaller than @code{2^32}:
@example
$ printf "%x\n" `seq -f %1.f 4294967295 4294967296`
ffffffff
bash: printf: 4294967296: Numerical result out of range
@end example
On most systems, seq can produce whole-number output for values up to
@code{2^53}, so here's a more general approach to base conversion that
also happens to be more robust for such large numbers. It works by
using @code{bc} and setting its output radix variable, @var{obase},
to @samp{16} in this case to produce hexadecimal output.
@example
$ (echo obase=16; seq -f %1.f 4294967295 4294967296)|bc
FFFFFFFF
100000000
@end example
@node Index
@unnumbered Index

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{1999-07-22.19} % updated for pdfTeX
\def\texinfoversion{1999-09-25.10}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
% Free Software Foundation, Inc.
@@ -29,15 +29,15 @@
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
% ftp://ftp.gnu.org/gnu/texinfo.tex
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
% ftp://tug.org/tex/texinfo.tex
% ftp://ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger ctan@ctan.org for a list).
% ftp://texinfo.org/tex/texinfo.tex
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
% There is a small home page for Texinfo at http://texinfo.org/.
% Texinfo has a small home page at http://texinfo.org/.
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
@@ -599,36 +599,42 @@ where each line of input produces a line of output.}
%}}
\def\needx#1{%
% Go into vertical mode, so we don't make a big box in the middle of a
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
\par
%
% Don't add any leading before our big empty box, but allow a page
% break, since the best break might be right here.
\allowbreak
\nointerlineskip
\vtop to #1\mil{\vfil}%
%
% TeX does not even consider page breaks if a penalty added to the
% main vertical list is 10000 or more. But in order to see if the
% empty box we just added fits on the page, we must make it consider
% page breaks. On the other hand, we don't want to actually break the
% page after the empty box. So we use a penalty of 9999.
%
% There is an extremely small chance that TeX will actually break the
% page at this \penalty, if there are no other feasible breakpoints in
% sight. (If the user is using lots of big @group commands, which
% almost-but-not-quite fill up a page, TeX will have a hard time doing
% good page breaking, for example.) However, I could not construct an
% example where a page broke at this \penalty; if it happens in a real
% document, then we can reconsider our strategy.
\penalty9999
%
% Back up by the size of the box, whether we did a page break or not.
\kern -#1\mil
%
% Do not allow a page break right after this kern.
\nobreak
% If the @need value is less than one line space, it's useless.
\dimen0 = #1\mil
\dimen2 = \ht\strutbox
\advance\dimen2 by \dp\strutbox
\ifdim\dimen0 > \dimen2
%
% Do a \strut just to make the height of this box be normal, so the
% normal leading is inserted relative to the preceding line.
% And a page break here is fine.
\vtop to #1\mil{\strut\vfil}%
%
% TeX does not even consider page breaks if a penalty added to the
% main vertical list is 10000 or more. But in order to see if the
% empty box we just added fits on the page, we must make it consider
% page breaks. On the other hand, we don't want to actually break the
% page after the empty box. So we use a penalty of 9999.
%
% There is an extremely small chance that TeX will actually break the
% page at this \penalty, if there are no other feasible breakpoints in
% sight. (If the user is using lots of big @group commands, which
% almost-but-not-quite fill up a page, TeX will have a hard time doing
% good page breaking, for example.) However, I could not construct an
% example where a page broke at this \penalty; if it happens in a real
% document, then we can reconsider our strategy.
\penalty9999
%
% Back up by the size of the box, whether we did a page break or not.
\kern -#1\mil
%
% Do not allow a page break right after this kern.
\nobreak
\fi
}
% @br forces paragraph break
@@ -855,7 +861,6 @@ where each line of input produces a line of output.}
\newtoks\toksD
\newbox\boxA
\newcount\countA
\newcount\charcode
\newif\ifpdf
\newif\ifpdfmakepagedest
@@ -870,9 +875,9 @@ where each line of input produces a line of output.}
\pdftrue
\pdfoutput = 1
\input pdfcolor
\def\dopdfimage#1#2#3#4{
\def\imagewidth{#2}
\def\imageheight{#3}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
\ifnum\pdftexversion < 14
\pdfimage
\else
@@ -880,9 +885,9 @@ where each line of input produces a line of output.}
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
{#1.pdf}
{#1.pdf}%
\ifnum\pdftexversion < 14 \else
\pdfrefxform \pdflastxform
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
\def\pdfmkpgn#1{#1@}
@@ -1084,23 +1089,17 @@ where each line of input produces a line of output.}
\setfont\deftt\ttshape{10}{\magstep1}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
% Fonts for indices and small examples (9pt).
% We actually use the slanted font rather than the italic,
% because texinfo normally uses the slanted fonts for that.
% Do not make many font distinctions in general in the index, since they
% aren't very useful.
\setfont\ninett\ttshape{9}{1000}
\setfont\ninettsl\ttslshape{10}{900}
\setfont\indrm\rmshape{9}{1000}
\setfont\indit\itshape{9}{1000}
\setfont\indsl\slshape{9}{1000}
\let\indtt=\ninett
\let\indttsl=\ninettsl
\let\indsf=\indrm
\let\indbf=\indrm
\setfont\indsc\scshape{10}{900}
\font\indi=cmmi9
\font\indsy=cmsy9
% Fonts for indices, footnotes, small examples (9pt).
\setfont\smallrm\rmshape{9}{1000}
\setfont\smalltt\ttshape{9}{1000}
\setfont\smallbf\bfshape{10}{900}
\setfont\smallit\itshape{9}{1000}
\setfont\smallsl\slshape{9}{1000}
\setfont\smallsf\sfshape{9}{1000}
\setfont\smallsc\scshape{10}{900}
\setfont\smallttsl\ttslshape{10}{900}
\font\smalli=cmmi9
\font\smallsy=cmsy9
% Fonts for title page:
\setfont\titlerm\rmbshape{12}{\magstep3}
@@ -1214,11 +1213,12 @@ where each line of input produces a line of output.}
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
\def\indexfonts{%
\let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
\let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
\let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
\resetmathfonts \setleading{12pt}}
\def\smallfonts{%
\let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
\resetmathfonts \setleading{11pt}}
% Set up the default fonts, so we can use them for creating boxes.
%
@@ -1267,9 +1267,9 @@ where each line of input produces a line of output.}
}
\let\ttfont=\t
\def\samp#1{`\tclose{#1}'\null}
\setfont\smallrm\rmshape{8}{1000}
\font\smallsy=cmsy9
\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
\setfont\keyrm\rmshape{8}{1000}
\font\keysy=cmsy9
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
\raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
\vbox{\hrule\kern-0.4pt
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
@@ -1380,7 +1380,8 @@ where each line of input produces a line of output.}
% a hypertex \special here.
%
\def\uref#1{\douref #1,,,\finish}
\def\douref#1,#2,#3,#4\finish{%
\def\douref#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
@@ -1398,7 +1399,7 @@ where each line of input produces a line of output.}
\fi
\fi
\endlink
}
\endgroup}
% rms does not like angle brackets --karl, 17may97.
% So now @email is just like @uref, unless we are pdf.
@@ -1406,12 +1407,13 @@ where each line of input produces a line of output.}
%\def\email#1{\angleleft{\tt #1}\angleright}
\ifpdf
\def\email#1{\doemail#1,,\finish}
\def\doemail#1,#2,#3\finish{%
\def\doemail#1,#2,#3\finish{\begingroup
\unsepspaces
\pdfurl{mailto:#1}%
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
\endlink
}
\endgroup}
\else
\let\email=\uref
\fi
@@ -1539,7 +1541,6 @@ where each line of input produces a line of output.}
}
\def\finishtitlepage{%
\message{FINISH TITLE}
\vskip4pt \hrule height 2pt width \hsize
\vskip\titlepagebottomglue
\finishedtitlepagetrue
@@ -2186,15 +2187,18 @@ where each line of input produces a line of output.}
% If so, do nothing. If not, give it an appropriate dimension based on
% current baselineskip.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
%% strut to put in table in case some entry doesn't have descenders,
%% to keep lines equally spaced
\let\multistrut = \strut
\else
%% FIXME: what is \box0 supposed to be?
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
width0pt\relax} \fi
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
\else
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
width0pt\relax} \fi
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
@@ -2401,14 +2405,13 @@ width0pt\relax} \fi
% stuff compared to the main input.
%
\nullfont
\let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
\let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
\let\tensf = \nullfont
% Similarly for index fonts (mostly for their use in
% smallexample)
\let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
\let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
\let\indsf = \nullfont
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
\let\tensf=\nullfont
% Similarly for index fonts (mostly for their use in smallexample).
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
\let\smallsf=\nullfont
%
% Don't complain when characters are missing from the fonts.
\tracinglostchars = 0
@@ -2672,7 +2675,7 @@ width0pt\relax} \fi
\def\@{@}% will be @@ when we switch to @ as escape char.
% 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
\def\_{{\realbackslash _}}%
@@ -2717,8 +2720,6 @@ width0pt\relax} \fi
\def\dfn##1{\realbackslash dfn {##1}}%
\def\emph##1{\realbackslash emph {##1}}%
\def\acronym##1{\realbackslash acronym {##1}}%
\def\{{\realbackslash mylbrace}%
\def\}{\realbackslash myrbrace}%
%
% Handle some cases of @value -- where the variable name does not
% contain - or _, and the value does not contain any
@@ -2787,6 +2788,7 @@ width0pt\relax} \fi
\let\url=\indexdummyfont
\let\uref=\indexdummyfont
\let\env=\indexdummyfont
\let\acronym=\indexdummyfont
\let\command=\indexdummyfont
\let\option=\indexdummyfont
\let\file=\indexdummyfont
@@ -2940,7 +2942,7 @@ width0pt\relax} \fi
\def\doprintindex#1{\begingroup
\dobreak \chapheadingskip{10000}%
%
\indexfonts \rm
\smallfonts \rm
\tolerance = 9500
\indexbreaks
%
@@ -3240,7 +3242,8 @@ width0pt\relax} \fi
% This counter is funny since it counts through charcodes of letters A, B, ...
\newcount\appendixno \appendixno = `\@
% \def\appendixletter{\char\the\appendixno}
% Now we do the following for the sake of pdftex.
% We do the following for the sake of pdftex, which needs the actual
% letter in the expansion, not just typeset.
\def\appendixletter{%
\ifnum\appendixno=`A A%
\else\ifnum\appendixno=`B B%
@@ -3867,10 +3870,14 @@ width0pt\relax} \fi
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
\setbox0 = \hbox{\shortcontrm \putwordAppendix }
\newdimen\shortappendixwidth \shortappendixwidth = \wd0
%
\newdimen\shortappendixwidth
%
\def\shortchaplabel#1{%
% Compute width of word "Appendix", may change with language.
\setbox0 = \hbox{\shortcontrm \putwordAppendix}%
\shortappendixwidth = \wd0
%
% We typeset #1 in a box of constant width, regardless of the text of
% #1, so the chapter titles will come out aligned.
\setbox0 = \hbox{#1}%
@@ -4207,7 +4214,7 @@ width0pt\relax} \fi
\def\smalllispx{\begingroup
\def\Esmalllisp{\nonfillfinish\endgroup}%
\def\Esmallexample{\nonfillfinish\endgroup}%
\indexfonts
\smallfonts
\lisp
}
@@ -4223,7 +4230,7 @@ width0pt\relax} \fi
%
\def\smalldisplayx{\begingroup
\def\Esmalldisplay{\nonfillfinish\endgroup}%
\indexfonts \rm
\smallfonts \rm
\display
}
@@ -4240,7 +4247,7 @@ width0pt\relax} \fi
%
\def\smallformatx{\begingroup
\def\Esmallformat{\nonfillfinish\endgroup}%
\indexfonts \rm
\smallfonts \rm
\format
}
@@ -5117,7 +5124,14 @@ width0pt\relax} \fi
% @alias.
\def\alias#1=#2{\gdef#1{#2}}
% We need some trickery to remove the optional spaces around the equal
% sign. Just make them active and then expand them all to nothing.
\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{\ignoreactivespaces
\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=%
\expandafter\noexpand\csname#2\endcsname}%
\expandafter\endgroup\next}
\message{cross references,}
@@ -5165,20 +5179,10 @@ width0pt\relax} \fi
% @anchor{NAME} -- define xref target at arbitrary point.
%
{ \catcode`\@ = 11
% From latex.ltx, to make @anchor truely invisible.
\newdimen\@savsk
\newcount\@savsf
\gdef\@bsphack{\relax
\ifhmode \@savsk\lastskip \@savsf\spacefactor \fi
}
\gdef\@esphack{\relax
\ifhmode \spacefactor\@savsf
\ifdim\@savsk>\z@ \ignorespaces \fi
\fi
}
\gdef\anchor#1{\@bsphack \setref{#1}{Ynothing}\@esphack}
}
\newcount\savesfregister
\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
@@ -5188,7 +5192,7 @@ width0pt\relax} \fi
%
\def\setref#1#2{{%
\indexdummies
\pdfmkdest{#1}
\pdfmkdest{#1}%
\dosetq{#1-title}{Ytitle}%
\dosetq{#1-pg}{Ypagenumber}%
\dosetq{#1-snt}{#2}%
@@ -5203,6 +5207,7 @@ width0pt\relax} \fi
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
\def\printedmanual{\ignorespaces #5}%
\def\printednodename{\ignorespaces #3}%
\setbox1=\hbox{\printedmanual}%
@@ -5505,6 +5510,8 @@ width0pt\relax} \fi
\xspaceskip\z@skip
\parindent\defaultparindent
%
\smallfonts \rm
%
% Hang the footnote text off the number.
\hang
\textindent{\thisfootno}%
@@ -5519,7 +5526,7 @@ width0pt\relax} \fi
\else\let\next\f@t\fi \next}
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
\def\f@t#1{#1\@foot}
\def\@foot{\strut\egroup}
\def\@foot{\strut\par\egroup}
}%end \catcode `\@=11

View File

@@ -1543,6 +1543,8 @@ If you specify a @var{pid} that is not in use or that does not correspond
to the process that is writing to the tailed files, then @code{tail}
may terminate long before any @var{file}s stop growing or it may not
terminate until long after the real writer has terminated.
Note that @samp{--pid} cannot be supported on some systems; @code{tail}
will print a warning if this is the case.
@itemx --max-consecutive-size-changes=@var{n}
@opindex --max-consecutive-size-changes
@@ -1560,7 +1562,7 @@ When tailing a file by name, if there have been this many consecutive
iterations for which the size has remained the same, then
@code{open}/@code{fstat} the file to determine if that file name is
still associated with the same device/inode-number pair as before.
When following a log file that is rotated this is approximately the
When following a log file that is rotated, this is approximately the
number of seconds between when tail prints the last pre-rotation lines
and when it prints the lines that have accumulated in the new log file.
See the output of @code{tail --help} for the default value.
@@ -2127,10 +2129,12 @@ or global options are specified, @samp{-s} has no effect.
GNU @code{sort} (as specified for all GNU utilities) has no limits on
input line length or restrictions on bytes allowed within lines. In
addition, if the final byte of an input file is not a newline, GNU
@code{sort} silently supplies one. A line's trailing newline is part of
the line for comparison purposes; for example, with no options in an
@sc{ascii} locale, a line starting with a tab sorts before an empty line
because tab precedes newline in the @sc{ascii} collating sequence.
@code{sort} silently supplies one. A line's trailing newline is not
part of the line for comparison purposes.@footnote{@sc{posix}.2-1992
requires that the trailing newline be part of the comparison, and some
@code{sort} implementations obey this requirement, but it is widely
considered to be a bug in the standard and the next version of
@sc{posix}.2 will likely remove this requirement.}
Upon any error, @code{sort} exits with a status of @samp{2}.
@@ -2347,17 +2351,6 @@ Sort in descending (reverse) numeric order.
sort -nr
@end example
@item
Ignore trailing newlines when comparing lines,
so that empty lines always sort first.
@example
# "$newline" is a single newline character.
newline='
'
sort -t "$newline" -k 1,1
@end example
@item
Sort alphabetically, omitting the first and second fields.
This uses a single key composed of the characters beginning
@@ -3209,7 +3202,7 @@ Paste the lines of one file at a time rather than one line from each
file.
@item -d @var{delim-list}
@itemx --delimiters @var{delim-list}
@itemx --delimiters=@var{delim-list}
@opindex -d
@opindex --delimiters
Consecutively use the characters in @var{delim-list} instead of
@@ -3630,6 +3623,39 @@ cat "$@@" \
| uniq -d
@end example
@item
Deleting a small set of characters is usually straightforward. For example,
to remove all @samp{a}s, @samp{x}s, and @samp{M}s you would do this:
@example
tr -d axM
@end example
However, when @samp{-} is one of those characters, it can be tricky because
@samp{-} has special meanings. Performing the same task as above but also
removing all @samp{-} characters, we might try @code{tr -d -axM}, but
that would fail because @code{tr} would try to interpret @samp{-a} as
a command-line option. Alternatively, we could try putting the hyphen
inside the string, @code{tr -d a-xM}, but that wouldn't work either because
it would make @code{tr} interpret @code{a-x} as the range of characters
@samp{a}@dots{}@samp{x} rather than the three.
One way to solve the problem is to put the hyphen at the end of the list
of characters:
@example
tr -d axM-
@end example
More generally, use the character class notation @code{[=c=]}
with @samp{-} (or any other character) in place of the @samp{c}:
@example
tr -d '[=-=]axM'
@end example
Note how single quotes are used in the above example to protect the
square brackets from interpretation by a shell.
@end itemize

View File

@@ -1,6 +1,9 @@
error.h
fnmatch.h
getopt.h
getopt.c
getopt1.c
md5.h
obstack.h
regex.h
getpagesize.h

View File

@@ -19,3 +19,168 @@ n
p (he->h_addrtype)
n
q
r a:b
b main
r a:b
n
s
n
p separator
n
l 128
c
q
r meyering:store
p *username
p *username[separator - name]
p separator - name
p username[separator - name]
r ''
l
q
r ''
l
q
r meyering
b main
r meyering
n
r
n
s
n
p u
n
n
q
r ''
r meyering
up
l
q
b main
b a.out 1
r a.out 1
n
s
fin
s
n
p uid
p gid
p euid
p egid
n
p mode
p path
fin
r -v -c 10 -n 20 -x 80 < in-2
up
up
p &dummy
p *ovp
p *(int*)*ovp
p ((struct item*)*ovp)->key
p old_vec@10
r -v -c 10 -n 20 -x 80 < in-3
p *(int*)*ovp
up
dow
p *(int*)*ovp
up
p *(int*)*ovp
i loca
dow
p key
p dummy
p &dummy
up
p old_vec
p *ovp
p ovp
p ovp - old_vec
p *old_vec@10
p *old_vec@13
b hash_insert_item
r
b hash_insert_item_at
r
n
p fail
p *(ht->vec)@13
p *(ht->ht_vec)@13
p ((struct item*)(ht->ht_vec)[10])->key
b hash_delete_item
b hash_delete_item_at
c
n
p slot
p item
n
n
p *(ht->ht_vec)@13
p &dummy
p dummy
n
s
n
n
p *(ht->ht_vec)@13
n
p new_size
n
p *old_vec@13
p old_vec@13
n
p *old_vec@13
n
p *old_vec@13
n
l
n
p ovp - old_vec
n
p ovp - old_vec
n
p ovp - old_vec
p *old_vec@13
p &dummy
q
r 444444444444 44444444444
b human_readable
r
n
q
b main
r 444444444444 44444444444
n
p a
p b
r 34343434 3434343434
c
r
n
n
p a
p b
r 343434343 343434343
c
q
b posixtime
r
n
s
n
p len
n
p pair
p len
n
b year
y
c
c
p n
up
p len
q

50
lib/ChangeLog Normal file
View File

@@ -0,0 +1,50 @@
2000-01-30 Jim Meyering <meyering@lucent.com>
* readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
uses of ->ut_name. The latter doesn't work with new Linux header files
where only utmpx.ut_user is declared.
* readutmp.h (UT_USER): Define.
2000-01-23 Jim Meyering <meyering@lucent.com>
* Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
obstack.c.
2000-01-22 Jim Meyering <meyering@lucent.com>
* strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
[! HAVE_DECL_STRTOULL]: Declare strtoull.
Required for some AIX systems. Reported by Christian Krackowizer.
[TESTING] (main): New function.
1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
* dirname.c (dir_name): Support for DOS-style file names with drive
letters.
* quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
* strverscmp.c (ISDIGIT): Define.
(strverscmp): Use ISDIGIT, not isdigit.
2000-01-17 Paul Eggert <eggert@twinsun.com>
* nanosleep.c (nanosleep):
Don't use SA_INTERRUPT to decide whether to call sigaction, as
POSIX.1 doesn't require SA_INTERRUPT and some systems
(e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
it's been part of POSIX.1 since day 1 (in 1988).
2000-01-17 Jim Meyering <meyering@lucent.com>
* interlock: Remove unused file. Reported by François Pinard.
2000-01-16 Paul Eggert <eggert@twinsun.com>
* lib/quotearg.c (quotearg_buffer_restyled): Do not quote
alert, backslash, formfeed, and vertical tab unnecessarily in
shell quoting style.
Local Variables:
version-control: never
End:

View File

@@ -2,38 +2,52 @@
AUTOMAKE_OPTIONS = ../src/ansi2knr
noinst_LIBRARIES = libfu.a
noinst_LIBRARIES = libfetish.a
INCLUDES = -I.. -I$(srcdir) -I../intl
libfu_a_SOURCES = getdate.y posixtm.c getopt.c getopt1.c \
addext.c argmatch.c backupfile.c basename.c \
closeout.c dirname.c exclude.c filemode.c \
full-write.c human.c idcache.c \
isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c \
quotearg.c safe-read.c same.c save-cwd.c savedir.c stripslash.c userspec.c \
version-etc.c xgetcwd.c xmalloc.c xstrdup.c \
xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
libfetish_a_SOURCES = \
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
getdate.h getline.h getopt.h getpagesize.h \
group-member.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
posixtm.h quotearg.h regex.h safe-read.h same.h save-cwd.h \
savedir.h strverscmp.h \
version-etc.h xalloc.h xstrtol.h
noinst_HEADERS = \
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
exclude.h filemode.h fnmatch.h fsusage.h getdate.h getline.h getopt.h \
getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
linebuffer.h long-options.h md5.h memcasecmp.h memcoll.h \
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
BUILT_SOURCES = getdate.c lstat.c stat.c
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = lstat.c stat.c
EXTRA_DIST = xstat.in
lstat.c: xstat.in
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
sed \
-e '/@IGNORE@/d' \
-e 's/@xstat@/lstat/g' \
-e '/_LSTAT_ONLY@/d' \
-e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
$(srcdir)/xstat.in > $@-t
mv $@-t $@
stat.c: xstat.in
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
sed \
-e '/@IGNORE@/d' \
-e 's/@xstat@/stat/g' \
-e '/_STAT_ONLY@/d' \
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
$(srcdir)/xstat.in > $@-t
mv $@-t $@

View File

@@ -59,16 +59,21 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNU_PACKAGE = @GNU_PACKAGE@
@@ -79,54 +84,64 @@ INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBOBJS = @LIBOBJS@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MVDIR_PROG = @MVDIR_PROG@
NEED_SETGID = @NEED_SETGID@
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
PACKAGE = @PACKAGE@
PERL = @PERL@
POFILES = @POFILES@
POSUB = @POSUB@
POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
install_sh = @install_sh@
l = @l@
AUTOMAKE_OPTIONS = ../src/ansi2knr
noinst_LIBRARIES = libfu.a
noinst_LIBRARIES = libfetish.a
INCLUDES = -I.. -I$(srcdir) -I../intl
libfu_a_SOURCES = getdate.y posixtm.c getopt.c getopt1.c \
addext.c argmatch.c backupfile.c basename.c \
closeout.c dirname.c exclude.c filemode.c \
full-write.c human.c idcache.c \
isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c \
quotearg.c safe-read.c same.c save-cwd.c savedir.c stripslash.c userspec.c \
version-etc.c xgetcwd.c xmalloc.c xstrdup.c \
xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
libfetish_a_SOURCES = \
getdate.y posixtm.c addext.c argmatch.c backupfile.c basename.c \
canon-host.c closeout.c dirname.c exclude.c filemode.c diacrit.c \
full-write.c getopt.c getopt1.c getugroups.c hard-locale.c hash.c \
human.c idcache.c isdir.c linebuffer.c long-options.c makepath.c \
md5.c memcasecmp.c memcoll.c modechange.c path-concat.c \
quotearg.c readtokens.c readutmp.c safe-read.c same.c save-cwd.c \
savedir.c stripslash.c userspec.c version-etc.c xgetcwd.c xgethostname.c \
xmalloc.c xstrdup.c xstrtod.c xstrtol.c xstrtoul.c xstrtoumax.c yesno.c
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
libfetish_a_LIBADD = @LIBOBJS@ @ALLOCA@
libfetish_a_DEPENDENCIES = $(libfetish_a_LIBADD)
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
getdate.h getline.h getopt.h getpagesize.h \
group-member.h human.h lchown.h long-options.h \
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
posixtm.h quotearg.h regex.h safe-read.h same.h save-cwd.h \
savedir.h strverscmp.h \
version-etc.h xalloc.h xstrtol.h
noinst_HEADERS = \
argmatch.h backupfile.h bumpalloc.h closeout.h diacrit.h dirname.h error.h \
exclude.h filemode.h fnmatch.h fsusage.h getdate.h getline.h getopt.h \
getpagesize.h group-member.h hard-locale.h hash.h human.h lchown.h \
linebuffer.h long-options.h md5.h memcasecmp.h memcoll.h \
makepath.h modechange.h mountlist.h nanosleep.h obstack.h \
path-concat.h pathmax.h posixtm.h quotearg.h readtokens.h \
readutmp.h regex.h safe-read.h same.h save-cwd.h savedir.h \
strverscmp.h version-etc.h xalloc.h xstrtod.h xstrtol.h
BUILT_SOURCES = getdate.c lstat.c stat.c
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = lstat.c stat.c
EXTRA_DIST = xstat.in
subdir = lib
@@ -141,59 +156,78 @@ CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
ANSI2KNR = ../src/ansi2knr
libfu_a_AR = $(AR) cru
am_libfu_a_OBJECTS = getdate$U.o posixtm$U.o getopt$U.o getopt1$U.o \
addext$U.o argmatch$U.o backupfile$U.o basename$U.o closeout$U.o \
dirname$U.o exclude$U.o filemode$U.o full-write$U.o human$U.o \
idcache$U.o isdir$U.o long-options$U.o makepath$U.o modechange$U.o \
hash$U.o path-concat$U.o quotearg$U.o safe-read$U.o same$U.o \
save-cwd$U.o savedir$U.o stripslash$U.o userspec$U.o version-etc$U.o \
xgetcwd$U.o xmalloc$U.o xstrdup$U.o xstrtol$U.o xstrtoul$U.o \
xstrtoumax$U.o yesno$U.o
libfu_a_OBJECTS = $(am_libfu_a_OBJECTS)
libfetish_a_AR = $(AR) cru
am_libfetish_a_OBJECTS = getdate$U.o posixtm$U.o addext$U.o \
argmatch$U.o backupfile$U.o basename$U.o canon-host$U.o closeout$U.o \
dirname$U.o exclude$U.o filemode$U.o diacrit$U.o full-write$U.o \
getopt$U.o getopt1$U.o getugroups$U.o hard-locale$U.o hash$U.o \
human$U.o idcache$U.o isdir$U.o linebuffer$U.o long-options$U.o \
makepath$U.o md5$U.o memcasecmp$U.o memcoll$U.o modechange$U.o \
path-concat$U.o quotearg$U.o readtokens$U.o readutmp$U.o safe-read$U.o \
same$U.o save-cwd$U.o savedir$U.o stripslash$U.o userspec$U.o \
version-etc$U.o xgetcwd$U.o xgethostname$U.o xmalloc$U.o xstrdup$U.o \
xstrtod$U.o xstrtol$U.o xstrtoul$U.o xstrtoumax$U.o yesno$U.o
libfetish_a_OBJECTS = $(am_libfetish_a_OBJECTS)
AR = ar
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libfu_a_SOURCES)
DIST_SOURCES = $(libfetish_a_SOURCES)
HEADERS = $(noinst_HEADERS)
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in TODO alloca.c \
chown.c dup2.c error.c error.h euidaccess.c fileblocks.c fnmatch.c \
fsusage.c ftruncate.c getdate.c getgroups.c getline.c group-member.c \
lchown.c malloc.c memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c \
mktime.c mountlist.c obstack.c obstack.h realloc.c regex.c rename.c \
rmdir.c rpmatch.c stpcpy.c strcasecmp.c strdup.c strftime.c \
strncasecmp.c strndup.c strstr.c strtol.c strtoul.c strtoull.c \
strtoumax.c strverscmp.c utime.c
DIST_COMMON = $(noinst_HEADERS) ChangeLog Makefile.am Makefile.in TODO \
alloca.c chown.c dup2.c error.c error.h euidaccess.c fileblocks.c \
fnmatch.c fsusage.c ftruncate.c getdate.c getgroups.c gethostname.c \
getline.c getloadavg.c getusershell.c group-member.c lchown.c malloc.c \
memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c mktime.c \
mountlist.c nanosleep.c obstack.c obstack.h putenv.c realloc.c regex.c \
rmdir.c rpmatch.c stime.c stpcpy.c strcasecmp.c strcspn.c strdup.c \
strftime.c strncasecmp.c strndup.c strpbrk.c strstr.c strtod.c strtol.c \
strtoul.c strtoull.c strtoumax.c strverscmp.c utime.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
GZIP_ENV = --best
DEP_FILES = .deps/addext.P .deps/alloca.P .deps/argmatch.P \
.deps/backupfile.P .deps/basename.P .deps/chown.P .deps/closeout.P \
.deps/dirname.P .deps/dup2.P .deps/error.P .deps/euidaccess.P \
.deps/exclude.P .deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P \
.deps/fsusage.P .deps/ftruncate.P .deps/full-write.P .deps/getdate.P \
.deps/getgroups.P .deps/getline.P .deps/getopt.P .deps/getopt1.P \
.deps/group-member.P .deps/hash.P .deps/human.P .deps/idcache.P \
.deps/isdir.P .deps/lchown.P .deps/long-options.P .deps/lstat.P \
.deps/makepath.P .deps/malloc.P .deps/memchr.P .deps/memcmp.P \
.deps/memcpy.P .deps/memmove.P .deps/memset.P .deps/mkdir.P \
.deps/mktime.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
.deps/path-concat.P .deps/posixtm.P .deps/quotearg.P .deps/realloc.P \
.deps/regex.P .deps/rename.P .deps/rmdir.P .deps/rpmatch.P \
.deps/safe-read.P .deps/same.P .deps/save-cwd.P .deps/savedir.P \
.deps/stat.P .deps/stpcpy.P .deps/strcasecmp.P .deps/strdup.P \
.deps/strftime.P .deps/stripslash.P .deps/strncasecmp.P .deps/strndup.P \
.deps/strstr.P .deps/strtol.P .deps/strtoul.P .deps/strtoull.P \
.deps/strtoumax.P .deps/strverscmp.P .deps/userspec.P .deps/utime.P \
.deps/version-etc.P .deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P \
.deps/xstrtol.P .deps/xstrtoul.P .deps/xstrtoumax.P .deps/yesno.P
SOURCES = $(libfu_a_SOURCES)
OBJECTS = $(am_libfu_a_OBJECTS)
depcomp = $(SHELL) $(top_srcdir)/depcomp
DEP_FILES = @AMDEP@ $(DEPDIR)/addext$U.Po $(DEPDIR)/alloca.Po \
$(DEPDIR)/argmatch$U.Po $(DEPDIR)/backupfile$U.Po \
$(DEPDIR)/basename$U.Po $(DEPDIR)/canon-host$U.Po $(DEPDIR)/chown.Po \
$(DEPDIR)/closeout$U.Po $(DEPDIR)/diacrit$U.Po $(DEPDIR)/dirname$U.Po \
$(DEPDIR)/dup2.Po $(DEPDIR)/error.Po $(DEPDIR)/euidaccess.Po \
$(DEPDIR)/exclude$U.Po $(DEPDIR)/fileblocks.Po $(DEPDIR)/filemode$U.Po \
$(DEPDIR)/fnmatch.Po $(DEPDIR)/fsusage.Po $(DEPDIR)/ftruncate.Po \
$(DEPDIR)/full-write$U.Po $(DEPDIR)/getdate$U.Po $(DEPDIR)/getgroups.Po \
$(DEPDIR)/gethostname.Po $(DEPDIR)/getline.Po $(DEPDIR)/getloadavg.Po \
$(DEPDIR)/getopt$U.Po $(DEPDIR)/getopt1$U.Po $(DEPDIR)/getugroups$U.Po \
$(DEPDIR)/getusershell.Po $(DEPDIR)/group-member.Po \
$(DEPDIR)/hard-locale$U.Po $(DEPDIR)/hash$U.Po $(DEPDIR)/human$U.Po \
$(DEPDIR)/idcache$U.Po $(DEPDIR)/isdir$U.Po $(DEPDIR)/lchown.Po \
$(DEPDIR)/linebuffer$U.Po $(DEPDIR)/long-options$U.Po \
$(DEPDIR)/lstat.Po $(DEPDIR)/makepath$U.Po $(DEPDIR)/malloc.Po \
$(DEPDIR)/md5$U.Po $(DEPDIR)/memcasecmp$U.Po $(DEPDIR)/memchr.Po \
$(DEPDIR)/memcmp.Po $(DEPDIR)/memcoll$U.Po $(DEPDIR)/memcpy.Po \
$(DEPDIR)/memmove.Po $(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po \
$(DEPDIR)/mktime.Po $(DEPDIR)/modechange$U.Po $(DEPDIR)/mountlist.Po \
$(DEPDIR)/nanosleep.Po $(DEPDIR)/obstack.Po $(DEPDIR)/path-concat$U.Po \
$(DEPDIR)/posixtm$U.Po $(DEPDIR)/putenv.Po $(DEPDIR)/quotearg$U.Po \
$(DEPDIR)/readtokens$U.Po $(DEPDIR)/readutmp$U.Po $(DEPDIR)/realloc.Po \
$(DEPDIR)/regex.Po $(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po \
$(DEPDIR)/safe-read$U.Po $(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po \
$(DEPDIR)/savedir$U.Po $(DEPDIR)/stat.Po $(DEPDIR)/stime.Po \
$(DEPDIR)/stpcpy.Po $(DEPDIR)/strcasecmp.Po $(DEPDIR)/strcspn.Po \
$(DEPDIR)/strdup.Po $(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
$(DEPDIR)/strncasecmp.Po $(DEPDIR)/strndup.Po $(DEPDIR)/strpbrk.Po \
$(DEPDIR)/strstr.Po $(DEPDIR)/strtod.Po $(DEPDIR)/strtol.Po \
$(DEPDIR)/strtoul.Po $(DEPDIR)/strtoull.Po $(DEPDIR)/strtoumax.Po \
$(DEPDIR)/strverscmp.Po $(DEPDIR)/userspec$U.Po $(DEPDIR)/utime.Po \
$(DEPDIR)/version-etc$U.Po $(DEPDIR)/xgetcwd$U.Po \
$(DEPDIR)/xgethostname$U.Po $(DEPDIR)/xmalloc$U.Po \
$(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrtod$U.Po $(DEPDIR)/xstrtol$U.Po \
$(DEPDIR)/xstrtoul$U.Po $(DEPDIR)/xstrtoumax$U.Po $(DEPDIR)/yesno$U.Po
SOURCES = $(libfetish_a_SOURCES)
OBJECTS = $(am_libfetish_a_OBJECTS)
all: all-redirect
.SUFFIXES:
@@ -240,12 +274,10 @@ distclean-kr:
maintainer-clean-kr:
libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
-rm -f libfu.a
$(libfu_a_AR) libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
$(RANLIB) libfu.a
.c.o:
$(COMPILE) -c $<
libfetish.a: $(libfetish_a_OBJECTS) $(libfetish_a_DEPENDENCIES)
-rm -f libfetish.a
$(libfetish_a_AR) libfetish.a $(libfetish_a_OBJECTS) $(libfetish_a_LIBADD)
$(RANLIB) libfetish.a
addext_.c: addext.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > addext_.c
alloca_.c: alloca.c $(ANSI2KNR)
@@ -256,10 +288,14 @@ backupfile_.c: backupfile.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > backupfile_.c
basename_.c: basename.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > basename_.c
canon-host_.c: canon-host.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/canon-host.c; then echo $(srcdir)/canon-host.c; else echo canon-host.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > canon-host_.c
chown_.c: chown.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chown.c; then echo $(srcdir)/chown.c; else echo chown.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > chown_.c
closeout_.c: closeout.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closeout.c; then echo $(srcdir)/closeout.c; else echo closeout.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closeout_.c
diacrit_.c: diacrit.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/diacrit.c; then echo $(srcdir)/diacrit.c; else echo diacrit.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > diacrit_.c
dirname_.c: dirname.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dirname_.c
dup2_.c: dup2.c $(ANSI2KNR)
@@ -286,14 +322,24 @@ getdate_.c: getdate.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getdate.c; then echo $(srcdir)/getdate.c; else echo getdate.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getdate_.c
getgroups_.c: getgroups.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getgroups.c; then echo $(srcdir)/getgroups.c; else echo getgroups.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getgroups_.c
gethostname_.c: gethostname.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gethostname.c; then echo $(srcdir)/gethostname.c; else echo gethostname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gethostname_.c
getline_.c: getline.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getline.c; then echo $(srcdir)/getline.c; else echo getline.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getline_.c
getloadavg_.c: getloadavg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getloadavg.c; then echo $(srcdir)/getloadavg.c; else echo getloadavg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getloadavg_.c
getopt_.c: getopt.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c
getopt1_.c: getopt1.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c
getugroups_.c: getugroups.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getugroups.c; then echo $(srcdir)/getugroups.c; else echo getugroups.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getugroups_.c
getusershell_.c: getusershell.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getusershell.c; then echo $(srcdir)/getusershell.c; else echo getusershell.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getusershell_.c
group-member_.c: group-member.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/group-member.c; then echo $(srcdir)/group-member.c; else echo group-member.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > group-member_.c
hard-locale_.c: hard-locale.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hard-locale.c; then echo $(srcdir)/hard-locale.c; else echo hard-locale.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hard-locale_.c
hash_.c: hash.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hash_.c
human_.c: human.c $(ANSI2KNR)
@@ -304,6 +350,8 @@ isdir_.c: isdir.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isdir.c; then echo $(srcdir)/isdir.c; else echo isdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isdir_.c
lchown_.c: lchown.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lchown.c; then echo $(srcdir)/lchown.c; else echo lchown.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lchown_.c
linebuffer_.c: linebuffer.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/linebuffer.c; then echo $(srcdir)/linebuffer.c; else echo linebuffer.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > linebuffer_.c
long-options_.c: long-options.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > long-options_.c
lstat_.c: lstat.c $(ANSI2KNR)
@@ -312,10 +360,16 @@ makepath_.c: makepath.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > makepath_.c
malloc_.c: malloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > malloc_.c
md5_.c: md5.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/md5.c; then echo $(srcdir)/md5.c; else echo md5.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > md5_.c
memcasecmp_.c: memcasecmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcasecmp.c; then echo $(srcdir)/memcasecmp.c; else echo memcasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcasecmp_.c
memchr_.c: memchr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c
memcmp_.c: memcmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcmp.c; then echo $(srcdir)/memcmp.c; else echo memcmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcmp_.c
memcoll_.c: memcoll.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcoll.c; then echo $(srcdir)/memcoll.c; else echo memcoll.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcoll_.c
memcpy_.c: memcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcpy_.c
memmove_.c: memmove.c $(ANSI2KNR)
@@ -330,20 +384,26 @@ modechange_.c: modechange.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/modechange.c; then echo $(srcdir)/modechange.c; else echo modechange.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > modechange_.c
mountlist_.c: mountlist.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mountlist.c; then echo $(srcdir)/mountlist.c; else echo mountlist.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mountlist_.c
nanosleep_.c: nanosleep.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nanosleep.c; then echo $(srcdir)/nanosleep.c; else echo nanosleep.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nanosleep_.c
obstack_.c: obstack.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > obstack_.c
path-concat_.c: path-concat.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/path-concat.c; then echo $(srcdir)/path-concat.c; else echo path-concat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > path-concat_.c
posixtm_.c: posixtm.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/posixtm.c; then echo $(srcdir)/posixtm.c; else echo posixtm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > posixtm_.c
putenv_.c: putenv.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/putenv.c; then echo $(srcdir)/putenv.c; else echo putenv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > putenv_.c
quotearg_.c: quotearg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > quotearg_.c
readtokens_.c: readtokens.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/readtokens.c; then echo $(srcdir)/readtokens.c; else echo readtokens.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > readtokens_.c
readutmp_.c: readutmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/readutmp.c; then echo $(srcdir)/readutmp.c; else echo readutmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > readutmp_.c
realloc_.c: realloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c
regex_.c: regex.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > regex_.c
rename_.c: rename.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rename_.c
rmdir_.c: rmdir.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rmdir_.c
rpmatch_.c: rpmatch.c $(ANSI2KNR)
@@ -358,10 +418,14 @@ savedir_.c: savedir.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > savedir_.c
stat_.c: stat.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stat_.c
stime_.c: stime.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stime.c; then echo $(srcdir)/stime.c; else echo stime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stime_.c
stpcpy_.c: stpcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c
strcasecmp_.c: strcasecmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strcasecmp.c; then echo $(srcdir)/strcasecmp.c; else echo strcasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strcasecmp_.c
strcspn_.c: strcspn.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strcspn.c; then echo $(srcdir)/strcspn.c; else echo strcspn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strcspn_.c
strdup_.c: strdup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strdup_.c
strftime_.c: strftime.c $(ANSI2KNR)
@@ -372,8 +436,12 @@ strncasecmp_.c: strncasecmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strncasecmp.c; then echo $(srcdir)/strncasecmp.c; else echo strncasecmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strncasecmp_.c
strndup_.c: strndup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
strpbrk_.c: strpbrk.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strpbrk.c; then echo $(srcdir)/strpbrk.c; else echo strpbrk.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strpbrk_.c
strstr_.c: strstr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strstr_.c
strtod_.c: strtod.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtod.c; then echo $(srcdir)/strtod.c; else echo strtod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtod_.c
strtol_.c: strtol.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtol.c; then echo $(srcdir)/strtol.c; else echo strtol.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strtol_.c
strtoul_.c: strtoul.c $(ANSI2KNR)
@@ -392,10 +460,14 @@ version-etc_.c: version-etc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/version-etc.c; then echo $(srcdir)/version-etc.c; else echo version-etc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > version-etc_.c
xgetcwd_.c: xgetcwd.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgetcwd_.c
xgethostname_.c: xgethostname.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgethostname.c; then echo $(srcdir)/xgethostname.c; else echo xgethostname.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgethostname_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
xstrdup_.c: xstrdup.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrdup_.c
xstrtod_.c: xstrtod.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtod.c; then echo $(srcdir)/xstrtod.c; else echo xstrtod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtod_.c
xstrtol_.c: xstrtol.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtol.c; then echo $(srcdir)/xstrtol.c; else echo xstrtol.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtol_.c
xstrtoul_.c: xstrtoul.c $(ANSI2KNR)
@@ -404,20 +476,24 @@ xstrtoumax_.c: xstrtoumax.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoumax.c; then echo $(srcdir)/xstrtoumax.c; else echo xstrtoumax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xstrtoumax_.c
yesno_.c: yesno.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > yesno_.c
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o chown_.o \
closeout_.o dirname_.o dup2_.o error_.o euidaccess_.o exclude_.o \
fileblocks_.o filemode_.o fnmatch_.o fsusage_.o ftruncate_.o \
full-write_.o getdate_.o getgroups_.o getline_.o getopt_.o getopt1_.o \
group-member_.o hash_.o human_.o idcache_.o isdir_.o lchown_.o \
long-options_.o lstat_.o makepath_.o malloc_.o memchr_.o memcmp_.o \
memcpy_.o memmove_.o memset_.o mkdir_.o mktime_.o modechange_.o \
mountlist_.o obstack_.o path-concat_.o posixtm_.o quotearg_.o \
realloc_.o regex_.o rename_.o rmdir_.o rpmatch_.o safe-read_.o same_.o \
save-cwd_.o savedir_.o stat_.o stpcpy_.o strcasecmp_.o strdup_.o \
strftime_.o stripslash_.o strncasecmp_.o strndup_.o strstr_.o strtol_.o \
strtoul_.o strtoull_.o strtoumax_.o strverscmp_.o userspec_.o utime_.o \
version-etc_.o xgetcwd_.o xmalloc_.o xstrdup_.o xstrtol_.o xstrtoul_.o \
xstrtoumax_.o yesno_.o : $(ANSI2KNR)
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o canon-host_.o \
chown_.o closeout_.o diacrit_.o dirname_.o dup2_.o error_.o \
euidaccess_.o exclude_.o fileblocks_.o filemode_.o fnmatch_.o \
fsusage_.o ftruncate_.o full-write_.o getdate_.o getgroups_.o \
gethostname_.o getline_.o getloadavg_.o getopt_.o getopt1_.o \
getugroups_.o getusershell_.o group-member_.o hard-locale_.o hash_.o \
human_.o idcache_.o isdir_.o lchown_.o linebuffer_.o long-options_.o \
lstat_.o makepath_.o malloc_.o md5_.o memcasecmp_.o memchr_.o memcmp_.o \
memcoll_.o memcpy_.o memmove_.o memset_.o mkdir_.o mktime_.o \
modechange_.o mountlist_.o nanosleep_.o obstack_.o path-concat_.o \
posixtm_.o putenv_.o quotearg_.o readtokens_.o readutmp_.o realloc_.o \
regex_.o rmdir_.o rpmatch_.o safe-read_.o same_.o save-cwd_.o \
savedir_.o stat_.o stime_.o stpcpy_.o strcasecmp_.o strcspn_.o \
strdup_.o strftime_.o stripslash_.o strncasecmp_.o strndup_.o \
strpbrk_.o strstr_.o strtod_.o strtol_.o strtoul_.o strtoull_.o \
strtoumax_.o strverscmp_.o userspec_.o utime_.o version-etc_.o \
xgetcwd_.o xgethostname_.o xmalloc_.o xstrdup_.o xstrtod_.o xstrtol_.o \
xstrtoul_.o xstrtoumax_.o yesno_.o : $(ANSI2KNR)
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
@@ -427,23 +503,27 @@ xstrtoumax_.o yesno_.o : $(ANSI2KNR)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
@@ -457,15 +537,10 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits lib/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
cp -pR $$d/$$file $(distdir); \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@@ -473,38 +548,123 @@ distdir: $(DISTFILES)
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
@AMDEP@include $(DEPDIR)/addext$U.Po
@AMDEP@include $(DEPDIR)/alloca.Po
@AMDEP@include $(DEPDIR)/argmatch$U.Po
@AMDEP@include $(DEPDIR)/backupfile$U.Po
@AMDEP@include $(DEPDIR)/basename$U.Po
@AMDEP@include $(DEPDIR)/canon-host$U.Po
@AMDEP@include $(DEPDIR)/chown.Po
@AMDEP@include $(DEPDIR)/closeout$U.Po
@AMDEP@include $(DEPDIR)/diacrit$U.Po
@AMDEP@include $(DEPDIR)/dirname$U.Po
@AMDEP@include $(DEPDIR)/dup2.Po
@AMDEP@include $(DEPDIR)/error.Po
@AMDEP@include $(DEPDIR)/euidaccess.Po
@AMDEP@include $(DEPDIR)/exclude$U.Po
@AMDEP@include $(DEPDIR)/fileblocks.Po
@AMDEP@include $(DEPDIR)/filemode$U.Po
@AMDEP@include $(DEPDIR)/fnmatch.Po
@AMDEP@include $(DEPDIR)/fsusage.Po
@AMDEP@include $(DEPDIR)/ftruncate.Po
@AMDEP@include $(DEPDIR)/full-write$U.Po
@AMDEP@include $(DEPDIR)/getdate$U.Po
@AMDEP@include $(DEPDIR)/getgroups.Po
@AMDEP@include $(DEPDIR)/gethostname.Po
@AMDEP@include $(DEPDIR)/getline.Po
@AMDEP@include $(DEPDIR)/getloadavg.Po
@AMDEP@include $(DEPDIR)/getopt$U.Po
@AMDEP@include $(DEPDIR)/getopt1$U.Po
@AMDEP@include $(DEPDIR)/getugroups$U.Po
@AMDEP@include $(DEPDIR)/getusershell.Po
@AMDEP@include $(DEPDIR)/group-member.Po
@AMDEP@include $(DEPDIR)/hard-locale$U.Po
@AMDEP@include $(DEPDIR)/hash$U.Po
@AMDEP@include $(DEPDIR)/human$U.Po
@AMDEP@include $(DEPDIR)/idcache$U.Po
@AMDEP@include $(DEPDIR)/isdir$U.Po
@AMDEP@include $(DEPDIR)/lchown.Po
@AMDEP@include $(DEPDIR)/linebuffer$U.Po
@AMDEP@include $(DEPDIR)/long-options$U.Po
@AMDEP@include $(DEPDIR)/lstat.Po
@AMDEP@include $(DEPDIR)/makepath$U.Po
@AMDEP@include $(DEPDIR)/malloc.Po
@AMDEP@include $(DEPDIR)/md5$U.Po
@AMDEP@include $(DEPDIR)/memcasecmp$U.Po
@AMDEP@include $(DEPDIR)/memchr.Po
@AMDEP@include $(DEPDIR)/memcmp.Po
@AMDEP@include $(DEPDIR)/memcoll$U.Po
@AMDEP@include $(DEPDIR)/memcpy.Po
@AMDEP@include $(DEPDIR)/memmove.Po
@AMDEP@include $(DEPDIR)/memset.Po
@AMDEP@include $(DEPDIR)/mkdir.Po
@AMDEP@include $(DEPDIR)/mktime.Po
@AMDEP@include $(DEPDIR)/modechange$U.Po
@AMDEP@include $(DEPDIR)/mountlist.Po
@AMDEP@include $(DEPDIR)/nanosleep.Po
@AMDEP@include $(DEPDIR)/obstack.Po
@AMDEP@include $(DEPDIR)/path-concat$U.Po
@AMDEP@include $(DEPDIR)/posixtm$U.Po
@AMDEP@include $(DEPDIR)/putenv.Po
@AMDEP@include $(DEPDIR)/quotearg$U.Po
@AMDEP@include $(DEPDIR)/readtokens$U.Po
@AMDEP@include $(DEPDIR)/readutmp$U.Po
@AMDEP@include $(DEPDIR)/realloc.Po
@AMDEP@include $(DEPDIR)/regex.Po
@AMDEP@include $(DEPDIR)/rmdir.Po
@AMDEP@include $(DEPDIR)/rpmatch.Po
@AMDEP@include $(DEPDIR)/safe-read$U.Po
@AMDEP@include $(DEPDIR)/same$U.Po
@AMDEP@include $(DEPDIR)/save-cwd$U.Po
@AMDEP@include $(DEPDIR)/savedir$U.Po
@AMDEP@include $(DEPDIR)/stat.Po
@AMDEP@include $(DEPDIR)/stime.Po
@AMDEP@include $(DEPDIR)/stpcpy.Po
@AMDEP@include $(DEPDIR)/strcasecmp.Po
@AMDEP@include $(DEPDIR)/strcspn.Po
@AMDEP@include $(DEPDIR)/strdup.Po
@AMDEP@include $(DEPDIR)/strftime.Po
@AMDEP@include $(DEPDIR)/stripslash$U.Po
@AMDEP@include $(DEPDIR)/strncasecmp.Po
@AMDEP@include $(DEPDIR)/strndup.Po
@AMDEP@include $(DEPDIR)/strpbrk.Po
@AMDEP@include $(DEPDIR)/strstr.Po
@AMDEP@include $(DEPDIR)/strtod.Po
@AMDEP@include $(DEPDIR)/strtol.Po
@AMDEP@include $(DEPDIR)/strtoul.Po
@AMDEP@include $(DEPDIR)/strtoull.Po
@AMDEP@include $(DEPDIR)/strtoumax.Po
@AMDEP@include $(DEPDIR)/strverscmp.Po
@AMDEP@include $(DEPDIR)/userspec$U.Po
@AMDEP@include $(DEPDIR)/utime.Po
@AMDEP@include $(DEPDIR)/version-etc$U.Po
@AMDEP@include $(DEPDIR)/xgetcwd$U.Po
@AMDEP@include $(DEPDIR)/xgethostname$U.Po
@AMDEP@include $(DEPDIR)/xmalloc$U.Po
@AMDEP@include $(DEPDIR)/xstrdup$U.Po
@AMDEP@include $(DEPDIR)/xstrtod$U.Po
@AMDEP@include $(DEPDIR)/xstrtol$U.Po
@AMDEP@include $(DEPDIR)/xstrtoul$U.Po
@AMDEP@include $(DEPDIR)/xstrtoumax$U.Po
@AMDEP@include $(DEPDIR)/yesno$U.Po
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
-rm -rf $(DEPDIR)
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c -o $@ $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm .deps/$(*D)/$(*F).pp
@AMDEP@CCDEPMODE = @CCDEPMODE@
.c.o:
@AMDEP@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(COMPILE) -c -o $@ $<
%.lo: %.c
@echo '$(LTCOMPILE) -c -o $@ $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm -f .deps/$(*D)/$(*F).pp
info-am:
info: info-am
dvi-am:
@@ -538,9 +698,11 @@ clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
-test -z "getdate.c$(BUILT_SOURCES)" || rm -f getdate.c $(BUILT_SOURCES)
-rm -f Makefile.in
-test -z "getdate.c$(BUILT_SOURCES)$(MAINTAINERCLEANFILES)" || rm -f getdate.c $(BUILT_SOURCES) $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-kr mostlyclean-tags mostlyclean-depend \
mostlyclean-generic
@@ -581,11 +743,21 @@ distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
lstat.c: xstat.in
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
sed \
-e '/@IGNORE@/d' \
-e 's/@xstat@/lstat/g' \
-e '/_LSTAT_ONLY@/d' \
-e '/@BEGIN_STAT_ONLY@/,/@END_STAT_ONLY@/d' \
$(srcdir)/xstat.in > $@-t
mv $@-t $@
stat.c: xstat.in
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
sed \
-e '/@IGNORE@/d' \
-e 's/@xstat@/stat/g' \
-e '/_STAT_ONLY@/d' \
-e '/@BEGIN_LSTAT_ONLY@/,/@END_LSTAT_ONLY@/d' \
$(srcdir)/xstat.in > $@-t
mv $@-t $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View File

@@ -25,6 +25,13 @@
# include <config.h>
#endif
#if HAVE_STRING_H
# include <string.h>
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef emacs
# include "blockinput.h"
#endif
@@ -210,6 +217,9 @@ alloca (unsigned size)
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
if (new == 0)
abort();
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;

View File

@@ -23,10 +23,20 @@
# define FILESYSTEM_PREFIX_LEN(Filename) 0
#endif
#ifndef PARAMS
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == '/')
#endif
char *base_name PARAMS ((char const *name));
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
In some environments the builtin `basename' modifies its argument.

View File

@@ -57,8 +57,17 @@ dir_name (const char *path)
else
{
/* Remove any trailing slashes from the result. */
#ifdef MSDOS
char *lim = (path[0] >= 'A' && path[0] <= 'z' && path[1] == ':')
? path + 2 : path;
/* If canonicalized "d:/path", leave alone the root case "d:/". */
while (slash > lim && *slash == '/')
--slash;
#else
while (slash > path && *slash == '/')
--slash;
#endif
length = slash - path + 1;
}

View File

@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
Copyright (C) 1990-2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
@@ -150,12 +150,16 @@ error (status, errnum, message, va_alist)
++error_message_count;
if (errnum)
{
#if defined HAVE_STRERROR_R || defined _LIBC
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
# if HAVE_WORKING_STRERROR_R || _LIBC
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
# else
/* Don't use __strerror_r's return value because on some systems
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
__strerror_r (errnum, errbuf, sizeof errbuf);
fprintf (stderr, ": %s", errbuf);
# endif
#else
fprintf (stderr, ": %s", strerror (errnum));
#endif
@@ -228,9 +232,16 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
++error_message_count;
if (errnum)
{
#if defined HAVE_STRERROR_R || defined _LIBC
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
# if HAVE_WORKING_STRERROR_R || _LIBC
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
# else
/* Don't use __strerror_r's return value because on some systems
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
__strerror_r (errnum, errbuf, sizeof errbuf);
fprintf (stderr, ": %s", errbuf);
# endif
#else
fprintf (stderr, ": %s", strerror (errnum));
#endif

View File

@@ -1,5 +1,5 @@
/* euidaccess -- check if effective user id can access file
Copyright (C) 1990, 1991, 1995, 1998 Free Software Foundation, Inc.
Copyright (C) 1990, 1991, 1995, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -66,6 +66,9 @@ gid_t getegid ();
#ifndef errno
extern int errno;
#endif
#ifndef __set_errno
# define __set_errno(val) errno = (val)
#endif
#if defined(EACCES) && !defined(EACCESS)
# define EACCESS EACCES
@@ -93,6 +96,7 @@ extern int errno;
#ifdef _LIBC
# define group_member __group_member
# define euidaccess __euidaccess
#else
@@ -102,15 +106,6 @@ static uid_t uid;
/* The user's real group id. */
static gid_t gid;
/* The user's effective user id. */
static uid_t euid;
/* The user's effective group id. */
static gid_t egid;
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
static int have_ids = 0;
# if HAVE_GETGROUPS
int group_member ();
# else
@@ -119,6 +114,15 @@ int group_member ();
#endif
/* The user's effective user id. */
static uid_t euid;
/* The user's effective group id. */
static gid_t egid;
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
static int have_ids;
/* Return 0 if the user has permission of type MODE on file PATH;
otherwise, return -1 and set `errno' to EACCESS.
@@ -133,8 +137,9 @@ euidaccess (const char *path, int mode)
int granted;
#ifdef _LIBC
uid_t uid = getuid (), euid = geteuid ();
gid_t gid = getgid (), egid = getegid ();
if (! __libc_enable_secure)
/* If we are not set-uid or set-gid, access does the same. */
return __access (path, mode);
#else
if (have_ids == 0)
{
@@ -144,11 +149,11 @@ euidaccess (const char *path, int mode)
euid = geteuid ();
egid = getegid ();
}
#endif
if (uid == euid && gid == egid)
/* If we are not set-uid or set-gid, access does the same. */
return access (path, mode);
#endif
if (stat (path, &stats))
return -1;
@@ -161,6 +166,16 @@ euidaccess (const char *path, int mode)
if (mode == F_OK)
return 0; /* The file exists. */
#ifdef _LIBC
/* Now we need the IDs. */
if (have_ids == 0)
{
have_ids = 1;
euid = __geteuid ();
egid = __getegid ();
}
#endif
/* The super-user can read and write any file, and execute any file
that anyone can execute. */
if (euid == 0 && ((mode & X_OK) == 0
@@ -175,6 +190,40 @@ euidaccess (const char *path, int mode)
granted = (stats.st_mode & mode);
if (granted == mode)
return 0;
errno = EACCESS;
__set_errno (EACCESS);
return -1;
}
#undef euidaccess
#ifdef weak_alias
weak_alias (__euidaccess, euidaccess)
#endif
#ifdef TEST
# include <stdio.h>
# include <errno.h>
# include "error.h"
char *program_name;
int
main (argc, argv)
int argc;
char **argv;
{
char *file;
int mode;
int err;
program_name = argv[0];
if (argc < 3)
abort ();
file = argv[1];
mode = atoi (argv[2]);
err = euidaccess (file, mode);
printf ("%d\n", err);
if (err != 0)
error (0, errno, "%s", file);
exit (0);
}
#endif

View File

@@ -1,5 +1,5 @@
/* exclude.c -- exclude file names
Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright 1992, 1993, 1994, 1997, 1999, 2000 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
@@ -54,14 +54,14 @@ new_exclude (void)
}
int
excluded_filename (struct exclude const *ex, char const *f)
excluded_filename (struct exclude const *ex, char const *f, int options)
{
char const * const *exclude = ex->exclude;
int exclude_count = ex->exclude_count;
int i;
for (i = 0; i < exclude_count; i++)
if (fnmatch (exclude[i], f, 0) == 0)
if (fnmatch (exclude[i], f, options) == 0)
return 1;
return 0;
@@ -79,7 +79,8 @@ add_exclude (struct exclude *ex, char const *pattern)
}
int
add_exclude_file (struct exclude *ex, char const *filename, char line_end)
add_exclude_file (void (*add_func) PARAMS ((struct exclude *, char const *)),
struct exclude *ex, char const *filename, char line_end)
{
int use_stdin = filename[0] == '-' && !filename[1];
FILE *in;
@@ -118,7 +119,7 @@ add_exclude_file (struct exclude *ex, char const *filename, char line_end)
if (p < lim ? *p == line_end : buf < p && p[-1])
{
*p = '\0';
add_exclude (ex, pattern);
(*add_func) (ex, pattern);
pattern = p + 1;
}

View File

@@ -1,5 +1,5 @@
/* exclude.h -- declarations for excluding file names
Copyright 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright 1992, 1993, 1994, 1997, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,5 +30,6 @@ struct exclude;
struct exclude *new_exclude PARAMS ((void));
void add_exclude PARAMS ((struct exclude *, char const *));
int add_exclude_file PARAMS ((struct exclude *, char const *, char));
int excluded_filename PARAMS ((struct exclude const *, char const *));
int add_exclude_file PARAMS ((void (*) (struct exclude *, char const *),
struct exclude *, char const *, char));
int excluded_filename PARAMS ((struct exclude const *, char const *, int));

View File

@@ -1,5 +1,5 @@
/* Convert file size to number of blocks on System V-like machines.
Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999 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,7 +27,7 @@
# include <sys/param.h>
#endif
#if !HAVE_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
# if HAVE_UNISTD_H
# include <unistd.h>

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,23 @@
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
NOTE: The canonical source of this file is maintained with the GNU
C Library. Bugs can be reported to bug-glibc@gnu.org.
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Free Software Foundation, Inc.
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. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
@@ -29,13 +27,13 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if !defined __STDC__ || !__STDC__
#else
# if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
# ifndef const
# define const
# ifndef const
# define const
# endif
# endif
#endif
@@ -109,7 +107,7 @@
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg = NULL;
char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
@@ -130,7 +128,7 @@ int optind = 1;
causes problems with re-calling getopt as programs generally don't
know that. */
int __getopt_initialized = 0;
int __getopt_initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.

View File

@@ -1,21 +1,21 @@
/* Declarations for getopt.
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
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.
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.
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. */
#ifndef _GETOPT_H

View File

@@ -1,29 +1,26 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
Free Software Foundation, Inc.
This file is part of the GNU C Library.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
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>
#endif
#include "getopt.h"
#else
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
@@ -31,6 +28,9 @@
#define const
#endif
#endif
#endif
#include "getopt.h"
#include <stdio.h>

View File

@@ -445,8 +445,8 @@ hash_reset_tuning (Hash_tuning *tuning)
/* For the given hash TABLE, check the user supplied tuning structure for
reasonable values, and return true if there is no gross error with it.
Otherwise, definitvely reset the TUNING field to some acceptable default in
the hash table (that is, the user loses the right of further modifying
Otherwise, definitively reset the TUNING field to some acceptable default
in the hash table (that is, the user loses the right of further modifying
tuning arguments), and return false. */
static bool
@@ -468,15 +468,14 @@ check_tuning (Hash_table *table)
return false;
}
/* Allocate and return a new hash table, or NULL upon failure. The
initial number of buckets is automatically selected so as to _guarantee_ that
you may insert at least CANDIDATE different user entries before any growth
of the hash table size occurs. So, if have a reasonably tight a-priori
upper bound on the
number of entries you intend to insert in the hash table, you may save some
table memory and insertion time, by specifying it here. If the
IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE argument
has its meaning changed to the wanted number of buckets.
/* Allocate and return a new hash table, or NULL upon failure. The initial
number of buckets is automatically selected so as to _guarantee_ that you
may insert at least CANDIDATE different user entries before any growth of
the hash table size occurs. So, if have a reasonably tight a-priori upper
bound on the number of entries you intend to insert in the hash table, you
may save some table memory and insertion time, by specifying it here. If
the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
argument has its meaning changed to the wanted number of buckets.
TUNING points to a structure of user-supplied values, in case some fine
tuning is wanted over the default behavior of the hasher. If TUNING is
@@ -769,8 +768,8 @@ hash_find_entry (Hash_table *table, const void *entry,
/* For an already existing hash table, change the number of buckets through
specifying CANDIDATE. The contents of the hash table are preserved. The
new number of buckets is automatically selected so as to _guarantee_ that the
table may receive at least CANDIDATE different user entries, including
new number of buckets is automatically selected so as to _guarantee_ that
the table may receive at least CANDIDATE different user entries, including
those already in the table, before any other growth of the hash table size
occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
exact number of buckets desired. */

View File

@@ -276,13 +276,19 @@ human_readable_inexact (uintmax_t n, char *buf,
static char const *const block_size_args[] = { "human-readable", "si", 0 };
static int const block_size_types[] = { -1024, -1000 };
static int
default_block_size (void)
{
return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
}
static strtol_error
humblock (char const *spec, int *block_size)
{
int i;
if (! spec && ! (spec = getenv ("BLOCK_SIZE")))
*block_size = getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
*block_size = default_block_size ();
else if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_types)))
*block_size = block_size_types[i];
else
@@ -306,6 +312,11 @@ void
human_block_size (char const *spec, int report_errors, int *block_size)
{
strtol_error e = humblock (spec, block_size);
if (*block_size == 0)
{
*block_size = default_block_size ();
e = LONGINT_INVALID;
}
if (e != LONGINT_OK && report_errors)
STRTOL_FATAL_ERROR (spec, _("block size"), e);
}

View File

@@ -1,46 +0,0 @@
#! /bin/sh
# interlock - wrap program invocation in lock to allow
# parallel builds to work.
# Written by Tom Tromey <tromey@cygnus.com>, Aug 10 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Usage:
# interlock lock-dir-name program args-to-program...
dirname="$1"
program="$2"
shift
shift
while (mkdir $dirname > /dev/null 2>&1 && exit 1 || exit 0); do
# Wait a bit.
sleep 1
done
# Race condition here: if interrupted after the loop but before this
# trap, the lock can be left around.
trap "rmdir $dirname > /dev/null 2>&1" 1 2 3 15
# We have the lock, so run the program.
$program ${1+"$@"}
ret=$?
# Release the lock.
rmdir $dirname > /dev/null 2>&1
exit $ret

View File

@@ -27,6 +27,13 @@ extern int errno;
#endif
#include "lchown.h"
#ifdef STAT_MACROS_BROKEN
# undef S_ISLNK
#endif
#if !defined(S_ISLNK) && defined(S_IFLNK)
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
/* Declare chown to avoid a warning. Don't include unistd.h,
because it may have a conflicting prototype for lchown. */
int chown ();

View File

@@ -4,6 +4,6 @@
# define ENOSYS ENOTSUP
# else
/* Some systems don't have ENOTSUP either. */
# define ENOSYS ENOMSG
# define ENOSYS EINVAL
# endif
#endif

View File

@@ -41,8 +41,7 @@ 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,
but leave room for an extra byte after the newline.
that ends in a non-newline character. Do not null terminate.
Return LINEBUFFER, except at end of file return 0. */
struct linebuffer *
@@ -51,7 +50,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
int c;
char *buffer = linebuffer->buffer;
char *p = linebuffer->buffer;
char *end = buffer + linebuffer->size - 1; /* Sentinel. */
char *end = buffer + linebuffer->size; /* Sentinel. */
if (feof (stream) || ferror (stream))
return 0;
@@ -73,7 +72,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
buffer = (char *) xrealloc (buffer, linebuffer->size);
p = p - linebuffer->buffer + buffer;
linebuffer->buffer = buffer;
end = buffer + linebuffer->size - 1;
end = buffer + linebuffer->size;
}
*p++ = c;
}

View File

@@ -308,7 +308,7 @@ make_path (const char *argpath,
if (newly_created_dir)
{
if (verbose_fmt_string)
fprintf (stderr, verbose_fmt_string, dirpath);
error (0, 0, verbose_fmt_string, dirpath);
if ((owner != (uid_t) -1 || group != (gid_t) -1)
&& chown (basename_dir, owner, group)
@@ -369,7 +369,7 @@ make_path (const char *argpath,
if (verbose_fmt_string != NULL)
error (0, 0, verbose_fmt_string, dirpath);
if (owner != (uid_t) -1 && group != (gid_t) -1)
if (owner != (uid_t) -1 || group != (gid_t) -1)
{
if (chown (basename_dir, owner, group)
#ifdef AFS

View File

@@ -1,6 +1,6 @@
/* md5.h - Declaration of functions and data types used for MD5 sum
computing library functions.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -118,7 +118,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
endian byte order, so that a byte-wise output yields to the wanted
ASCII representation of the message digest.
IMPORTANT: On some systems it is required that RESBUF is correctly
IMPORTANT: On some systems it is required that RESBUF be correctly
aligned for a 32 bits value. */
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));

View File

@@ -1,5 +1,5 @@
/* Case-insensitive buffer comparator.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,9 +15,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Jim Meyering (meyering@na-net.ornl.gov) */
/* Written by Jim Meyering. */
#ifdef HAVE_CONFIG_H
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -25,16 +25,16 @@
#include <ctype.h>
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
# define IN_CTYPE_DOMAIN(c) 1
# define IN_CTYPE_DOMAIN(Char) 1
#else
# define IN_CTYPE_DOMAIN(c) isascii(c)
# define IN_CTYPE_DOMAIN(Char) isascii(Char)
#endif
#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
#define ISLOWER(Char) (IN_CTYPE_DOMAIN (Char) && islower (Char))
#if _LIBC || STDC_HEADERS
# define TOUPPER(c) toupper (c)
# define TOUPPER(Char) toupper (Char)
#else
# define TOUPPER(c) (ISLOWER (c) ? toupper (c) : (c))
# define TOUPPER(Char) (ISLOWER (Char) ? toupper (Char) : (Char))
#endif
#include "memcasecmp.h"
@@ -44,14 +44,11 @@
join -i works with sort -f. */
int
memcasecmp (vs1, vs2, n)
const void *vs1;
const void *vs2;
size_t n;
memcasecmp (const void *vs1, const void *vs2, size_t n)
{
unsigned int i;
unsigned char *s1 = (unsigned char *) vs1;
unsigned char *s2 = (unsigned char *) vs2;
unsigned char const *s1 = (unsigned char const *) vs1;
unsigned char const *s2 = (unsigned char const *) vs2;
for (i = 0; i < n; i++)
{
unsigned char u1 = *s1++;

View File

@@ -21,60 +21,23 @@
# include <config.h>
#endif
#ifndef __GNUC__
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
# pragma alloca
# else
# ifdef _WIN32
# include <malloc.h>
# include <io.h>
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
# endif
#endif
#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, but may be
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. */
int
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
{
int diff;
char n1;
char n2;
char n1 = s1[s1len];
char n2 = s2[s2len];
/* We will temporarily set the bytes after S1 and S2 to zero, so if
S1 and S2 are adjacent, compare to a temporary copy of the
earlier, to avoid temporarily stomping on the later. */
if (s1 + s1len == s2)
{
char *s2copy = alloca (s2len + 1);
memcpy (s2copy, s2, s2len);
s2 = s2copy;
}
if (s2 + s2len == s1)
{
char *s1copy = alloca (s1len + 1);
memcpy (s1copy, s1, s1len);
s1 = s1copy;
}
n1 = s1[s1len]; s1[s1len++] = '\0';
n2 = s2[s2len]; s2[s2len++] = '\0';
s1[s1len++] = '\0';
s2[s2len++] = '\0';
while (! (diff = strcoll (s1, s2)))
{

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1997, 2000 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
@@ -25,10 +25,7 @@
Return DESTADDR. */
char *
memcpy (destaddr, srcaddr, len)
char *destaddr;
const char *srcaddr;
int len;
memcpy (char *destaddr, const char *srcaddr, int len)
{
char *dest = destaddr;

View File

@@ -1,5 +1,5 @@
/* modechange.c -- file mode manipulation
Copyright (C) 1989, 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1989, 1990, 1997-2000 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
@@ -157,7 +157,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
{
struct mode_change *head; /* First element of the linked list. */
struct mode_change *tail; /* An element of the linked list. */
unsigned long mode_value; /* The mode value, if octal. */
uintmax_t mode_value; /* The mode value, if octal. */
char *string_end; /* Pointer to end of parsed value. */
mode_t umask_value; /* The umask value (surprise). */
@@ -166,10 +166,10 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
tail = NULL;
#endif
if (xstrtoul (mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
if (xstrtoumax (mode_string, &string_end, 8, &mode_value, "") == LONGINT_OK)
{
struct mode_change *p;
if (mode_value > CHMOD_MODE_BITS)
if (mode_value != (mode_value & CHMOD_MODE_BITS))
return MODE_INVALID;
p = make_node_op_equals ((mode_t) mode_value);
if (p == NULL)

102
lib/nanosleep.c Normal file
View File

@@ -0,0 +1,102 @@
/* Provide a replacement for the POSIX nanosleep function.
Copyright (C) 1999, 2000 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 Jim Meyering */
#include <config.h>
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "nanosleep.h"
static int suspended;
int first_call = 1;
/* Handle SIGCONT. */
static void
sighandler (int sig)
{
suspended = 1;
}
/* FIXME: comment */
static void
my_usleep (const struct timespec *ts_delay)
{
struct timeval tv_delay;
tv_delay.tv_sec = ts_delay->tv_sec;
tv_delay.tv_usec = ts_delay->tv_nsec / 1000;
select (0, (void *) 0, (void *) 0, (void *) 0, &tv_delay);
}
/* FIXME: comment */
int
nanosleep (const struct timespec *requested_delay,
struct timespec *remaining_delay)
{
#ifdef SA_NOCLDSTOP
struct sigaction oldact, newact;
#endif
suspended = 0;
/* set up sig handler */
if (first_call)
{
#ifdef SA_NOCLDSTOP
newact.sa_handler = sighandler;
sigemptyset (&newact.sa_mask);
newact.sa_flags = 0;
sigaction (SIGCONT, NULL, &oldact);
if (oldact.sa_handler != SIG_IGN)
sigaction (SIGCONT, &newact, NULL);
#else
if (signal (SIGCONT, SIG_IGN) != SIG_IGN)
signal (SIGCONT, sighandler);
#endif
first_call = 0;
}
my_usleep (requested_delay);
if (suspended)
{
/* Calculate time remaining. */
/* FIXME: the code in sleep doesn't use this, so there's no
rush to implement it. */
errno = EINTR;
}
/* FIXME: Restore sig handler? */
return suspended;
}

57
lib/nanosleep.h Normal file
View File

@@ -0,0 +1,57 @@
/* Copyright (C) 2000 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. */
#if ! defined NANOSLEEP_H
# define NANOSLEEP_H
# 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
# include <sys/types.h>
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
# if ! HAVE_STRUCT_TIMESPEC
/* Some systems don't define this struct, e.g., AIX 4.1, Ultrix 4.3. */
struct timespec
{
time_t tv_sec;
long tv_nsec;
};
# endif
int
nanosleep PARAMS ((const struct timespec *requested_delay,
struct timespec *remaining_delay));
#endif

View File

@@ -1,5 +1,5 @@
/* path-concat.c -- concatenate two arbitrary pathnames
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,21 +33,49 @@
char *malloc ();
/* Concatenate two pathname components, DIR and BASE, in newly-allocated
storage and return the result. Return 0 if out of memory. Add a slash
between DIR and BASE in the result if neither would contribute one.
If each would contribute at least one, elide one from the end of DIR.
Otherwise, simply concatenate DIR and BASE. In any case, if
BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of
BASE in the returned concatenation. */
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
#endif
#ifndef ISSLASH
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
#endif
#include "xalloc.h"
#include "path-concat.h"
/* Concatenate two pathname components, DIR and BASE, in
newly-allocated storage and return the result. Return 0 if out of
memory. Add a slash between DIR and BASE in the result if neither
would contribute one. If each would contribute at least one, elide
one from the end of DIR. Otherwise, simply concatenate DIR and
BASE. In any case, if BASE_IN_RESULT is non-NULL, set
*BASE_IN_RESULT to point to the copy of BASE in the returned
concatenation.
DIR may be NULL, BASE must not be.
Return NULL if memory is exhausted. */
char *
path_concat (const char *dir, const char *base, char **base_in_result)
{
char *p;
char *p_concat;
size_t base_len = strlen (base);
size_t dir_len = strlen (dir);
size_t base_len;
size_t dir_len;
if (!dir)
{
p_concat = strdup (base);
if (base_in_result)
*base_in_result = p_concat;
return p_concat;
}
/* DIR is not empty. */
base_len = strlen (base);
dir_len = strlen (dir);
p_concat = malloc (dir_len + base_len + 2);
if (!p_concat)
@@ -55,10 +83,10 @@ path_concat (const char *dir, const char *base, char **base_in_result)
p = mempcpy (p_concat, dir, dir_len);
if (*(p - 1) == '/' && *base == '/')
if (ISSLASH (*(p - 1)) && ISSLASH(*base))
--p;
else if (*(p - 1) != '/' && *base != '/')
*p++ = '/';
else if (!ISSLASH (*(p - 1)) && !ISSLASH(*base))
*p++ = DIRECTORY_SEPARATOR;
if (base_in_result)
*base_in_result = p;
@@ -67,3 +95,14 @@ path_concat (const char *dir, const char *base, char **base_in_result)
return p_concat;
}
/* Same, but die when memory is exhausted. */
char *
xpath_concat (const char *dir, const char *base, char **base_in_result)
{
char *res = path_concat (dir, base, base_in_result);
if (res)
return res;
xalloc_die ();
}

View File

@@ -1,5 +1,5 @@
/* quotearg.c - quote arguments for output
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000 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,8 +17,6 @@
/* Written by Paul Eggert <eggert@twinsun.com> */
/* FIXME: Multibyte characters are not supported yet. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -33,11 +31,7 @@
#else
# define ISASCII(c) isascii (c)
#endif
#ifdef isgraph
# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
#else
# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
#endif
#define ISPRINT(c) (ISASCII (c) && isprint (c))
#if ENABLE_NLS
# include <libintl.h>
@@ -64,6 +58,19 @@
# include <string.h>
#endif
#if HAVE_WCTYPE_H
# include <wctype.h>
#endif
#if HAVE_MBRTOWC && HAVE_WCHAR_H
# include <wchar.h>
#else
# define iswprint(wc) 1
# define mbrtowc(pwc, s, n, ps) 1
# define mbsinit(ps) 1
# define mbstate_t int
#endif
#define INT_BITS (sizeof (int) * CHAR_BIT)
struct quoting_options
@@ -71,7 +78,7 @@ struct quoting_options
/* Basic quoting style. */
enum quoting_style style;
/* Quote the chararacters indicated by this bit vector even if the
/* Quote the characters indicated by this bit vector even if the
quoting style would not normally require them to be quoted. */
int quote_these_too[((UCHAR_MAX + 1) / INT_BITS
+ ((UCHAR_MAX + 1) % INT_BITS != 0))];
@@ -89,7 +96,7 @@ char const *const quoting_style_args[] =
0
};
/* Correspondances to quoting style names. */
/* Correspondences to quoting style names. */
enum quoting_style const quoting_style_vals[] =
{
literal_quoting_style,
@@ -146,6 +153,293 @@ set_char_quoting (struct quoting_options *o, char c, int i)
return r;
}
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
argument ARG (of size ARGSIZE), using QUOTING_STYLE and the
non-quoting-style part of O to control quoting.
Terminate the output with a null character, and return the written
size of the output, not counting the terminating null.
If BUFFERSIZE is too small to store the output string, return the
value that would have been returned had BUFFERSIZE been large enough.
If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
ARGSIZE, O), except it uses QUOTING_STYLE instead of the quoting
style specified by O, and O may not be null. */
static size_t
quotearg_buffer_restyled (char *buffer, size_t buffersize,
char const *arg, size_t argsize,
enum quoting_style quoting_style,
struct quoting_options const *o)
{
size_t i;
size_t len = 0;
char const *quote_string = 0;
size_t quote_string_len = 0;
int backslash_escapes = 0;
#define STORE(c) \
do \
{ \
if (len < buffersize) \
buffer[len] = (c); \
len++; \
} \
while (0)
switch (quoting_style)
{
case c_quoting_style:
STORE ('"');
backslash_escapes = 1;
quote_string = "\"";
quote_string_len = 1;
break;
case escape_quoting_style:
backslash_escapes = 1;
break;
case locale_quoting_style:
for (quote_string = _("`"); *quote_string; quote_string++)
STORE (*quote_string);
backslash_escapes = 1;
quote_string = _("'");
quote_string_len = strlen (quote_string);
break;
case shell_always_quoting_style:
STORE ('\'');
quote_string = "'";
quote_string_len = 1;
break;
default:
break;
}
for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
{
unsigned char c;
unsigned char esc;
if (backslash_escapes
&& quote_string_len
&& i + quote_string_len <= argsize
&& memcmp (arg + i, quote_string, quote_string_len) == 0)
STORE ('\\');
c = arg[i];
switch (c)
{
case '?':
switch (quoting_style)
{
case shell_quoting_style:
goto use_shell_always_quoting_style;
case c_quoting_style:
if (i + 2 < argsize && arg[i + 1] == '?')
switch (arg[i + 2])
{
case '!': case '\'':
case '(': case ')': case '-': case '/':
case '<': case '=': case '>':
/* Escape the second '?' in what would otherwise be
a trigraph. */
i += 2;
c = arg[i + 2];
STORE ('?');
STORE ('\\');
STORE ('?');
break;
}
break;
default:
break;
}
break;
#if HAVE_C_BACKSLASH_A
case '\a': esc = 'a'; goto c_escape;
#endif
case '\b': esc = 'b'; goto c_escape;
case '\f': esc = 'f'; goto c_escape;
case '\n': esc = 'n'; goto c_and_shell_escape;
case '\r': esc = 'r'; goto c_and_shell_escape;
case '\t': esc = 't'; goto c_and_shell_escape;
case '\v': esc = 'v'; goto c_escape;
case '\\': esc = c; goto c_and_shell_escape;
c_and_shell_escape:
if (quoting_style == shell_quoting_style)
goto use_shell_always_quoting_style;
c_escape:
if (backslash_escapes)
{
c = esc;
goto store_escape;
}
break;
case '#': case '~':
if (i != 0)
break;
/* Fall through. */
case ' ':
case '!': /* special in bash */
case '"': case '$': case '&':
case '(': case ')': case '*': case ';':
case '<': case '>': case '[':
case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
case '`': case '|':
/* A shell special character. In theory, '$' and '`' could
be the first bytes of multibyte characters, which means
we should check them with mbrtowc, but in practice this
doesn't happen so it's not worth worrying about. */
if (quoting_style == shell_quoting_style)
goto use_shell_always_quoting_style;
break;
case '\'':
switch (quoting_style)
{
case shell_quoting_style:
goto use_shell_always_quoting_style;
case shell_always_quoting_style:
STORE ('\'');
STORE ('\\');
STORE ('\'');
break;
default:
break;
}
break;
case '%': case '+': case ',': case '-': case '.': case '/':
case '0': case '1': case '2': case '3': case '4': case '5':
case '6': case '7': case '8': case '9': case ':': case '=':
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
case 'o': case 'p': case 'q': case 'r': case 's': case 't':
case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
case '{': case '}':
/* These characters don't cause problems, no matter what the
quoting style is. They cannot start multibyte sequences. */
break;
default:
/* If we have a multibyte sequence, copy it until we reach
its end, find an error, or come back to the initial shift
state. For C-like styles, if the sequence has
unprintable characters, escape the whole sequence, since
we can't easily escape single characters within it. */
{
/* Length of multibyte sequence found so far. */
size_t m = 0;
int printable = 1;
mbstate_t mbstate;
memset (&mbstate, 0, sizeof mbstate);
if (argsize == (size_t) -1)
argsize = strlen (arg);
do
{
wchar_t w;
size_t bytes = mbrtowc (&w, &arg[i + m],
argsize - (i + m), &mbstate);
if (bytes == 0)
break;
else if (bytes == (size_t) -1)
{
printable = 0;
break;
}
else if (bytes == (size_t) -2)
{
printable = 0;
while (i + m < argsize && arg[i + m])
m++;
break;
}
else
{
if (! iswprint (w))
printable = 0;
m += bytes;
}
}
while (! mbsinit (&mbstate));
if (m <= 1)
{
/* Escape a unibyte character like a multibyte
sequence if using backslash escapes, and if the
character is not printable. */
m = backslash_escapes && ! ISPRINT (c);
printable = 0;
}
if (m)
{
/* Output a multibyte sequence, or an escaped
unprintable unibyte character. */
size_t imax = i + m - 1;
for (;;)
{
if (backslash_escapes && ! printable)
{
STORE ('\\');
STORE ('0' + (c >> 6));
STORE ('0' + ((c >> 3) & 7));
c = '0' + (c & 7);
}
if (i == imax)
break;
STORE (c);
c = arg[++i];
}
goto store_c;
}
}
}
if (! (backslash_escapes
&& o->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
goto store_c;
store_escape:
STORE ('\\');
store_c:
STORE (c);
}
if (quote_string)
for (; *quote_string; quote_string++)
STORE (*quote_string);
if (len < buffersize)
buffer[len] = '\0';
return len;
use_shell_always_quoting_style:
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
shell_always_quoting_style, o);
}
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
argument ARG (of size ARGSIZE), using O to control quoting.
If O is null, use the default.
@@ -159,161 +453,9 @@ quotearg_buffer (char *buffer, size_t buffersize,
char const *arg, size_t argsize,
struct quoting_options const *o)
{
unsigned char c;
size_t i;
size_t len = 0;
char const *quote_string;
size_t quote_string_len;
struct quoting_options const *p = o ? o : &default_quoting_options;
enum quoting_style quoting_style = p->style;
#define STORE(c) \
do \
{ \
if (len < buffersize) \
buffer[len] = (c); \
len++; \
} \
while (0)
switch (quoting_style)
{
case shell_quoting_style:
if (! (argsize == (size_t) -1 ? arg[0] == '\0' : argsize == 0))
{
switch (arg[0])
{
case '#': case '~':
break;
default:
for (i = 0; ; i++)
{
if (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize)
goto done;
c = arg[i];
switch (c)
{
case '\t': case '\n': case ' ':
case '!': /* special in csh */
case '"': case '$': case '&': case '\'':
case '(': case ')': case '*': case ';':
case '<': case '>': case '?': case '[': case '\\':
case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
case '`': case '|':
goto needs_quoting;
}
if (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
goto needs_quoting;
STORE (c);
}
needs_quoting:;
len = 0;
break;
}
}
/* Fall through. */
case shell_always_quoting_style:
STORE ('\'');
quote_string = "'";
quote_string_len = 1;
break;
case c_quoting_style:
STORE ('"');
quote_string = "\"";
quote_string_len = 1;
break;
case locale_quoting_style:
for (quote_string = _("`"); *quote_string; quote_string++)
STORE (*quote_string);
quote_string = _("'");
quote_string_len = strlen (quote_string);
break;
default:
quote_string = 0;
quote_string_len = 0;
break;
}
for (i = 0; ! (argsize == (size_t) -1 ? arg[i] == '\0' : i == argsize); i++)
{
c = arg[i];
switch (quoting_style)
{
case literal_quoting_style:
break;
case shell_quoting_style:
case shell_always_quoting_style:
if (c == '\'')
{
STORE ('\'');
STORE ('\\');
STORE ('\'');
}
break;
case c_quoting_style:
case escape_quoting_style:
case locale_quoting_style:
switch (c)
{
case '?': /* Do not generate trigraphs. */
case '\\': goto store_escape;
/* Not all C compilers know what \a means. */
case 7 : c = 'a'; goto store_escape;
case '\b': c = 'b'; goto store_escape;
case '\f': c = 'f'; goto store_escape;
case '\n': c = 'n'; goto store_escape;
case '\r': c = 'r'; goto store_escape;
case '\t': c = 't'; goto store_escape;
case '\v': c = 'v'; goto store_escape;
case ' ': break;
default:
if (quote_string_len
&& strncmp (arg + i, quote_string, quote_string_len) == 0)
goto store_escape;
if (!ISGRAPH (c))
{
STORE ('\\');
STORE ('0' + (c >> 6));
STORE ('0' + ((c >> 3) & 7));
c = '0' + (c & 7);
goto store_c;
}
break;
}
if (! (p->quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
goto store_c;
store_escape:
STORE ('\\');
}
store_c:
STORE (c);
}
if (quote_string)
for (; *quote_string; quote_string++)
STORE (*quote_string);
done:
if (len < buffersize)
buffer[len] = '\0';
return len;
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
p->style, p);
}
/* Use storage slot N to return a quoted version of the string ARG.

View File

@@ -1,5 +1,5 @@
/* GNU's read utmp module.
Copyright (C) 1992-1999 Free Software Foundation, Inc.
Copyright (C) 1992-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,11 +41,11 @@ extract_trimmed_name (const STRUCT_UTMP *ut)
{
char *p, *trimmed_name;
trimmed_name = xmalloc (sizeof (ut->ut_name) + 1);
strncpy (trimmed_name, ut->ut_name, sizeof (ut->ut_name));
trimmed_name = xmalloc (sizeof (UT_USER (ut)) + 1);
strncpy (trimmed_name, UT_USER (ut), sizeof (UT_USER (ut)));
/* Append a trailing space character. Some systems pad names shorter than
the maximum with spaces, others pad with NULs. Remove any spaces. */
trimmed_name[sizeof (ut->ut_name)] = ' ';
trimmed_name[sizeof (UT_USER (ut))] = ' ';
p = strchr (trimmed_name, ' ');
if (p != NULL)
*p = '\0';

View File

@@ -1,5 +1,5 @@
/* Declarations for GNU's read utmp module.
Copyright (C) 1992-1999 Free Software Foundation, Inc.
Copyright (C) 1992-2000 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
@@ -48,6 +48,29 @@
# define UTMP_NAME_FUNCTION utmpname
# endif
/* Accessor macro for the member named ut_user or ut_name. */
# ifdef HAVE_UTMPX_H
# if HAVE_STRUCT_UTMPX_UT_USER
# define UT_USER(Utmp) Utmp->ut_user
# endif
# if HAVE_STRUCT_UTMPX_UT_NAME
# undef UT_USER
# define UT_USER(Utmp) Utmp->ut_name
# endif
# else
# if HAVE_STRUCT_UTMP_UT_USER
# define UT_USER(Utmp) Utmp->ut_user
# endif
# if HAVE_STRUCT_UTMP_UT_NAME
# undef UT_USER
# define UT_USER(Utmp) Utmp->ut_name
# endif
# endif
typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;
# include <time.h>

View File

@@ -1,113 +0,0 @@
/* BSD compatible rename and directory rename function for System V.
Copyright (C) 1988, 1990 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. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#if STAT_MACROS_BROKEN
# undef S_ISDIR
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* Rename file FROM to file TO.
Return 0 if successful, -1 if not. */
int
rename (char *from, char *to)
{
struct stat from_stats, to_stats;
if (stat (from, &from_stats))
return -1;
/* Be careful not to unlink `from' if it happens to be equal to `to' or
(on filesystems that silently truncate filenames after 14 characters)
if `from' and `to' share the significant characters. */
if (stat (to, &to_stats))
{
if (errno != ENOENT)
return -1;
}
else
{
if ((from_stats.st_dev == to_stats.st_dev)
&& (from_stats.st_ino == to_stats.st_ino))
/* `from' and `to' designate the same file on that filesystem. */
return 0;
if (unlink (to) && errno != ENOENT)
return -1;
}
#ifdef MVDIR
/* If MVDIR is defined, it should be the full filename of a setuid root
program able to link and unlink directories. If MVDIR is not defined,
then the capability of renaming directories may be missing. */
if (S_ISDIR (from_stats.st_mode))
{
/* Need a setuid root process to link and unlink directories. */
int status;
pid_t pid = fork ();
switch (pid)
{
case -1: /* Error. */
return -1; /* errno already set */
case 0: /* Child. */
execl (MVDIR, "mvdir", from, to, (char *) 0);
_exit (1);
default: /* Parent. */
while (wait (&status) != pid)
/* Do nothing. */ ;
if (status)
{
/* MVDIR failed. */
errno = EIO;
return -1;
}
}
}
else
#endif /* MVDIR */
{
if (link (from, to))
return -1;
if (unlink (from) && errno != ENOENT)
{
unlink (to);
return -1;
}
}
return 0;
}

7185
lib/rx.c

File diff suppressed because it is too large Load Diff

3732
lib/rx.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,22 @@
/* Determine whether two file names refer to the same file.
Copyright (C) 1997-2000 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 Jim Meyering */
#if HAVE_CONFIG_H
# include <config.h>
#endif

View File

@@ -1,3 +1,20 @@
/* Determine whether two file names refer to the same file.
Copyright (C) 1997-2000 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 SAME_H_
# define SAME_H_ 1

View File

@@ -1,5 +1,5 @@
/* savedir.c -- save the list of files in a directory in a string
Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1990, 1997, 1998, 1999, 2000 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
@@ -87,6 +87,10 @@ savedir (const char *dir, off_t name_size)
if (dirp == NULL)
return NULL;
/* Be sure name_size is at least `1' so there's room for
the final NUL byte. */
name_size += !name_size;
name_space = (char *) malloc (name_size);
if (name_space == NULL)
{

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1994, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -16,15 +16,13 @@
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
#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Find the first ocurrence in S of any character in ACCEPT. */
char *
strpbrk (s, accept)
register const char *s;
register const char *accept;
strpbrk (const char *s, const char *accept)
{
while (*s != '\0')
{

View File

@@ -1,4 +1,4 @@
/* Copyright (C) 1994 Free Software Foundation, Inc.
/* Copyright (C) 1994, 1999 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
@@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
*
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <string.h>
#include <sys/types.h>
@@ -71,7 +75,7 @@ strstr (const char *phaystack, const char *pneedle)
a = *++haystack;
if (a == '\0')
goto ret0;
shloop: }
shloop:; }
while (a != b);
jin: a = *++haystack;

View File

@@ -37,8 +37,12 @@
# endif
#endif
#if HAVE_UNSIGNED_LONG_LONG && ! HAVE_STRTOULL
unsigned long long strtoull PARAMS ((char const *, char **, int));
#ifndef HAVE_DECL_STRTOUL
unsigned long long strtoul PARAMS ((char const *, char **, int));
#endif
#ifndef HAVE_DECL_STRTOULL
unsigned long long strtoull PARAMS ((char const *, char **, int));
#endif
uintmax_t
@@ -56,3 +60,16 @@ strtoumax (char const *ptr, char **endptr, int base)
abort ();
}
#ifdef TESTING
# include <stdio.h>
int
main ()
{
char *p, *endptr;
printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t));
printf ("sizeof strtoull(): %d\n", sizeof strtoull(p, &endptr, 10));
printf ("sizeof strtoul(): %d\n", sizeof strtoul(p, &endptr, 10));
exit (0);
}
#endif

View File

@@ -1,5 +1,5 @@
/* Compare strings while treating digits characters numerically.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-Francois Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
@@ -36,6 +36,15 @@
#define CMP 2
#define LEN 3
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char.
- It's guaranteed to evaluate its argument exactly once.
- It's typically faster.
Posix 1003.2-1992 section 2.5.2.1 page 50 lines 1556-1558 says that
only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless
it's important to use the locale's definition of `digit' even when the
host does not conform to Posix. */
#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
/* Compare S1 and S2 as strings holding indices/version numbers,
returning less than, equal to or greater than zero if S1 is less than,
@@ -83,17 +92,17 @@ strverscmp (const char *s1, const char *s2)
c1 = *p1++;
c2 = *p2++;
/* Hint: '0' is a digit too. */
state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
state = S_N | ((c1 == '0') + (ISDIGIT (c1) != 0));
while ((diff = c1 - c2) == 0 && c1 != '\0')
{
state = next_state[state];
c1 = *p1++;
c2 = *p2++;
state |= (c1 == '0') + (isdigit (c1) != 0);
state |= (c1 == '0') + (ISDIGIT (c1) != 0);
}
state = result_type[state << 2 | ((c2 == '0') + (isdigit (c2) != 0))];
state = result_type[state << 2 | ((c2 == '0') + (ISDIGIT (c2) != 0))];
switch (state)
{
@@ -101,11 +110,11 @@ strverscmp (const char *s1, const char *s2)
return diff;
case LEN:
while (isdigit (*p1++))
if (!isdigit (*p2++))
while (ISDIGIT (*p1++))
if (!ISDIGIT (*p2++))
return 1;
return isdigit (*p2) ? -1 : diff;
return ISDIGIT (*p2) ? -1 : diff;
default:
return state;

View File

@@ -15,6 +15,8 @@
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 Jim Meyering. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -28,19 +30,41 @@
#else
# define _(Text) Text
#endif
#define N_(Text) Text
/* Default copyright goes to the FSF. */
char* version_etc_copyright =
N_("Copyright (C) 1999 Free Software Foundation, Inc.");
/* Display the --version information the standard way.
If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
the program. The formats are therefore:
PACKAGE VERSION
or
COMMAND_NAME (PACKAGE) VERSION. */
void
version_etc (FILE *stream,
const char *command_name, const char *package,
const char *version, const char *authors)
{
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
if (command_name)
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
else
fprintf (stream, "%s %s\n", package, version);
fprintf (stream, _("Written by %s.\n"), authors);
putc ('\n', stream);
fputs (_(version_etc_copyright), stream);
putc ('\n', stream);
fputs (_("\
\n\
Copyright (C) 1999 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"
), stream);
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
stream);
}

View File

@@ -1,3 +1,22 @@
/* Utility to help print --version output in a consistent format.
Copyright (C) 1999 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 Jim Meyering. */
#ifndef VERSION_ETC_H
# define VERSION_ETC_H 1
@@ -9,9 +28,11 @@
# endif
# endif
extern char *version_etc_copyright;
void
version_etc PARAMS ((FILE *stream,
const char *command_name, const char *package,
const char *version, const char *authors));
const char *command_name, const char *package,
const char *version, const char *authors));
#endif /* VERSION_ETC_H */

View File

@@ -26,6 +26,16 @@
# endif
# endif
# ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# define __attribute__(x)
# endif
# endif
# ifndef ATTRIBUTE_NORETURN
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
# endif
/* Exit value when the requested amount of memory is not available.
It is initialized to EXIT_FAILURE, but the caller may set it to
some other value. */
@@ -33,20 +43,45 @@ extern int xalloc_exit_failure;
/* If this pointer is non-zero, run the specified function upon each
allocation failure. It is initialized to zero. */
extern void (*xalloc_fail_func) ();
extern void (*xalloc_fail_func) PARAMS ((void));
/* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
message must be non-NULL. It is translated via gettext.
The default value is "Memory exhausted". */
extern char *const xalloc_msg_memory_exhausted;
/* This function is always triggered when memory is exhausted. It is
in charge of honoring the three previous items. This is the
function to call when one wants the program to die because of a
memory allocation failure. */
extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
void *xmalloc PARAMS ((size_t n));
void *xcalloc PARAMS ((size_t n, size_t s));
void *xrealloc PARAMS ((void *p, size_t n));
char *xstrdup PARAMS ((const char *str));
# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
# define XREALLOC(Ptr, Type, N_items) \
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
/* Declare and alloc memory for VAR of type TYPE. */
# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
/* Free VAR only if non NULL. */
# define XFREE(Var) \
do { \
if (Var) \
free (Var); \
} while (0)
/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
# define CCLONE(Src, Num) \
(memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
/* Return a malloc'ed copy of SRC. */
# define CLONE(Src) CCLONE (Src, 1)
# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
# define XREALLOC(Ptr, Type, N_bytes) \
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
#endif /* !XALLOC_H_ */

View File

@@ -59,18 +59,22 @@ you must run the autoconf test for a properly working realloc -- see realloc.m4
int xalloc_exit_failure = EXIT_FAILURE;
/* If non NULL, call this function when memory is exhausted. */
void (*xalloc_fail_func) () = 0;
void (*xalloc_fail_func) PARAMS ((void)) = 0;
/* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
before exiting when memory is exhausted. Goes through gettext. */
char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
static void
xalloc_fail (void)
void
xalloc_die (void)
{
if (xalloc_fail_func)
(*xalloc_fail_func) ();
error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
/* The `noreturn' cannot be given to error, since it may return if
its first argument is 0. To help compilers understand the
xalloc_die does terminate, call exit. */
exit (EXIT_FAILURE);
}
/* Allocate N bytes of memory dynamically, with error checking. */
@@ -82,7 +86,7 @@ xmalloc (size_t n)
p = malloc (n);
if (p == 0)
xalloc_fail ();
xalloc_die ();
return p;
}
@@ -95,7 +99,7 @@ xrealloc (void *p, size_t n)
{
p = realloc (p, n);
if (p == 0)
xalloc_fail ();
xalloc_die ();
return p;
}
@@ -108,6 +112,6 @@ xcalloc (size_t n, size_t s)
p = calloc (n, s);
if (p == 0)
xalloc_fail ();
xalloc_die ();
return p;
}

View File

@@ -4,7 +4,7 @@
/* Work around the bug in some systems whereby @xstat@ succeeds when
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
has this bug.
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Copyright (C) 1997-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,58 @@
#ifndef errno
extern int errno;
#endif
@BEGIN_LSTAT_ONLY@
#ifdef STAT_MACROS_BROKEN
# undef S_ISLNK
#endif
#if !defined(S_ISLNK) && defined(S_IFLNK)
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
char *xmalloc ();
/* lstat works different on Linux and Solaris systems. POSIX (see
`pathname resolution' in the glossary) requires that programs like `ls'
take into consideration the fact that FILE has a trailing slash when
FILE is a symbolic link. On Linux systems, the lstat function already
has the desired semantics (in treating `lstat("symlink/",sbuf)' just like
`lstat("symlink/.",sbuf)', but on Solaris it does not.
If FILE has a trailing slash and specifies a symbolic link,
then append a `.' to FILE and call lstat a second time. */
static int
slash_aware_lstat (const char *file, struct stat *sbuf)
{
size_t len;
char *new_file;
int lstat_result = lstat (file, sbuf);
if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
return lstat_result;
len = strlen (file);
if (file[len - 1] != '/')
return lstat_result;
/* FILE refers to a symbolic link and the name ends with a slash.
Append a `.' to FILE and repeat the lstat call. */
/* Add one for the `.' we might have to append, and one more
for the trailing NUL. */
new_file = xmalloc (len + 1 + 1);
memcpy (new_file, file, len);
new_file[len] = '.';
new_file[len + 1] = 0;
lstat_result = lstat (new_file, sbuf);
free (new_file);
return lstat_result;
}
@END_LSTAT_ONLY@
/* This is a wrapper for @xstat@(2).
If FILE is the empty string, fail with errno == ENOENT.
@@ -38,6 +90,11 @@ extern int errno;
This works around the bug in some systems whereby @xstat@ succeeds when
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
has this bug. */
@BEGIN_LSTAT_ONLY@
/* This function also provides a version of lstat with consistent semantics
when FILE specifies a symbolic link and has a trailing slash. */
@END_LSTAT_ONLY@
int
rpl_@xstat@ (const char *file, struct stat *sbuf)
@@ -48,5 +105,10 @@ rpl_@xstat@ (const char *file, struct stat *sbuf)
return -1;
}
return @xstat@ (file, sbuf);
@BEGIN_LSTAT_ONLY@
return slash_aware_lstat (file, sbuf);
@END_LSTAT_ONLY@
@BEGIN_STAT_ONLY@
return stat (file, sbuf);
@END_STAT_ONLY@
}

View File

@@ -1,5 +1,5 @@
/* xstrtod.c - error-checking interface to strtod
Copyright (C) 1996, 1999 Free Software Foundation, Inc.
Copyright (C) 1996, 1999, 2000 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
@@ -32,6 +32,11 @@ double strtod ();
#include <limits.h>
#include "xstrtod.h"
/* Tell the compiler that non-default rounding modes are used. */
#if 199901 <= __STDC_VERSION__
#pragma STDC FENV_ACCESS ON
#endif
/* An interface to strtod that encapsulates all the error checking
one should usually perform. Like strtod, but upon successful
conversion put the result in *RESULT and return zero. Return

View File

@@ -1,5 +1,5 @@
/* A more useful interface to strtol.
Copyright 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1998-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@@ -1,3 +1,261 @@
2000-01-30 Jim Meyering <meyering@lucent.com>
* lib-check.m4: Clean up some kludgy old shadow password tests.
* prereq.m4 (utmp_includes): Define.
Check for ut_user and ut_name members in both struct utmpx
and struct utmp.
2000-01-29 Jim Meyering <meyering@lucent.com>
* lib-check.m4: New file containing library-related checks from
fileutils and sh-utils (textutils had none).
2000-01-28 Jim Meyering <meyering@lucent.com>
* perl.m4: Change format of warning message to look more like that
from the missing script. Suggestion from François Pinard.
2000-01-25 Jim Meyering <meyering@lucent.com>
* timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as well
as time.h in the compile check.
* nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
Fix typo in cross-compiling case: s/yes/no/.
2000-01-23 Jim Meyering <meyering@lucent.com>
* jm-macros.m4: Move df-related tests here from fileutils/configure.in
* ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
(jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
* fsusage.m4: New file. Extracted from fileutils/configure.in.
s/space/ac_fsusage_space/.
(jm_FILE_SYSTEM_USAGE): Take two parameters.
* ftruncate.m4: New file (derived from part of fileutils/configure.in).
* jm-macros.m4: (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
(jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
* jm-macros.m4: (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
AC_SUBST these here, rather than just in sh-util/configure.in, so
that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
all the same.
(AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
(AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
(AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
(AC_SUBST(POW_LIBM)): Likewise.
(AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
2000-01-22 Jim Meyering <meyering@lucent.com>
* jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
* prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
* jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
configure.in
(AC_CHECK_HEADERS): Likewise for sh-utils.
(AC_CHECK_HEADERS): Likewise for textutils.
Merge the three lists of headers.
* prereq.m4 (jm_PREREQ_ADDEXT): New macro. Parts moved here
from fileutils' configure.in.
* decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)' code.
Moved tests into their own function (_jm_DECL_HEADERS) in check-decl.m4.
* check-decl.m4: Use #if rather than #ifdef.
Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
(jm_CHECK_DECLARATIONS): Add strtoul strtoull.
(_jm_DECL_HEADERS): Define new function.
(jm_CHECK_DECLARATIONS): Require it.
2000-01-19 Jim Meyering <meyering@lucent.com>
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc
defines `struct timespec' in <sys/time.h>
* c-bs-a.m4: Remove uses of changequote altogether.
Thanks to Akim for explaining.
2000-01-16 Jim Meyering <meyering@lucent.com>
* jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
2000-01-16 Jim Meyering <meyering@lucent.com>
* c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
because the latter didn't work.
2000-01-15 Jim Meyering <meyering@lucent.com>
* jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
(AC_REPLACE_FUNCS): Add memcpy and memset.
Add these, too: stime strcspn stpcpy strstr strtol strtoul.
Add strpbrk.
Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
2000-01-12 Jim Meyering <meyering@lucent.com>
* prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
(jm_PREREQ): Use it.
(jm_PREREQ_READUTMP): New macro.
(jm_PREREQ): Use it.
2000-01-11 Paul Eggert <eggert@twinsun.com>
Quote multibyte characters correctly.
* m4/c-bs-a.m4: New file.
* m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
(jm_PREREQ): Use it.
2000-01-11 Paul Eggert <eggert@twinsun.com>
* m4/uintmax_t.m4: Port to autoconf 2.13.
2000-01-08 Jim Meyering <meyering@ascend.com>
* strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
* jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
2000-01-04 Jim Meyering <meyering@ascend.com>
* d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
jm_STRUCT_DIRENT_D_TYPE.
* d-ino.m4: (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
jm_STRUCT_DIRENT_D_INO.
* utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
jm_STRUCT_UTIMBUF.
* jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/ renamings.
* utime.m4: Likewise.
* timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
* jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
2000-01-03 Paul Eggert <eggert@twinsun.com>
* nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
(for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
2000-01-02 Jim Meyering <meyering@ascend.com>
* search-libs.m4: Escape `$' in $3 of dnl comment. I no longer
remember if this is necessary.
1999-12-26 Jim Meyering <meyering@ascend.com>
* jm-macros.m4: Use it here.
* nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
1999-12-23 Jim Meyering <meyering@ascend.com>
* jm-macros.m4: Check for clock_gettime (moved from
fileutils/configure.in)
Check for gettimeofday.
1999-12-20 Jim Meyering <meyering@ascend.com>
* strftime.m4: Remove kludge, now that I'm using the fixed
autoconf-2.14a-1999-12-20.
1999-12-19 Jim Meyering <meyering@ascend.com>
* lstat-slash.m4: New file.
* jm-macros.m4: Use the new macro:
jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
1999-12-07 Jim Meyering <meyering@ascend.com>
* perl.m4: Require that File::Compare be available, too.
Too many systems seem to lack it.
* strftime.m4: Add checks for most of the cpp macros tested in
GNU's strftime.c. Prompted by a patch from Paul Eggert.
1999-11-18 Paul Eggert <eggert@twinsun.com>
* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
problem with the QNX 4.25 shell, which doesn't propagate exit
status of failed commands inside shell assignments.
1999-11-17 Jim Meyering <meyering@ascend.com>
* gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
1999-11-07 Jim Meyering <meyering@ascend.com>
* getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
1999-11-06 Jim Meyering <meyering@ascend.com>
* link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
* jm-macros.m4 (jm_MACROS): Use it here.
1999-11-05 Jim Meyering <meyering@ascend.com>
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from configure.in
of textutils, fileutils, and sh-utils into this one (shared between
those packages) file.
Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
AC_STRUCT_ST_BLKSIZE.
1999-11-03 Jim Meyering <meyering@ascend.com>
* ssize_t.m4: Remove file. No longer needed since the new version of
AC_CHECK_TYPE checks includes unistd.h.
* jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
Suggestion from Akim Demaille.
1999-10-30 Jim Meyering <meyering@ascend.com>
* uintmax_t.m4: Require 2.14a. Remove backslash before backtick in
m4-quoted string.
* ls-mntd-fs.m4: Likewise.
* jm-macros.m4: Likewise. Also, use AC_TYPE_SSIZE_T instead
* jm-winsz1.m4: Likewise.
* const.m4: Remove file, since the fix made it into the experimental
version of autoconf.
* mktime.m4: Likewise.
* check-type.m4: Remove file, now that the latest version of
AC_CHECK_TYPE takes a third arg to specify additional #includes.
* ssize_t.m4: New file, requires experimental version of autoconf.
* jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
AC_CHECK_TYPE.
1999-10-04 Jim Meyering <meyering@ascend.com>
* jm-macros.m4: Don't require autoconf-2.14.1.
1999-09-22 Paul Eggert <eggert@twinsun.com>
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
2.95.1 bug with HP-UX 10.20.
1999-09-17 Jim Meyering <meyering@ascend.com>
* jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
due to missing strdup (against sh-utils-2.0).
1999-08-29 Jim Meyering <meyering@ascend.com>
* jm-macros.m4: Require jm_BISON.
* bison.m4: New file.
1999-08-17 Paul Eggert <eggert@twinsun.com>
* m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
1999-08-05 Jim Meyering <meyering@ascend.com>
* getline.m4: Rename test file from conftestdata to conftest.data

View File

@@ -4,16 +4,18 @@
EXTRA_DIST = README Makefile.am.in \
afs.m4 \
assert.m4 \
bison.m4 \
c-bs-a.m4 \
check-decl.m4 \
check-type.m4 \
chown.m4 \
const.m4 \
d-ino.m4 \
d-type.m4 \
decl.m4 \
error.m4 \
fnmatch.m4 \
fstypename.m4 \
fsusage.m4 \
ftruncate.m4 \
getgroups.m4 \
getline.m4 \
getloadavg.m4 \
@@ -30,11 +32,14 @@ jm-winsz2.m4 \
largefile.m4 \
lchown.m4 \
lcmessage.m4 \
lib-check.m4 \
link-follow.m4 \
ls-mntd-fs.m4 \
lstat-slash.m4 \
lstat.m4 \
malloc.m4 \
memcmp.m4 \
mktime.m4 \
nanosleep.m4 \
perl.m4 \
prereq.m4 \
progtest.m4 \
@@ -46,7 +51,9 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \
ulonglong.m4 \
uptime.m4 \

View File

@@ -59,13 +59,18 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMDEP = @AMDEP@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DATADIRNAME = @DATADIRNAME@
DEPDIR = @DEPDIR@
DF_PROG = @DF_PROG@
GENCAT = @GENCAT@
GETCONF = @GETCONF@
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
@@ -81,7 +86,6 @@ INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
KMEM_GROUP = @KMEM_GROUP@
LIBOBJS = @LIBOBJS@
LIB_CRYPT = @LIB_CRYPT@
MAKEINFO = @MAKEINFO@
MAN = @MAN@
MKINSTALLDIRS = @MKINSTALLDIRS@
@@ -95,29 +99,30 @@ POFILES = @POFILES@
POSUB = @POSUB@
POW_LIBM = @POW_LIBM@
RANLIB = @RANLIB@
SEQ_LIBM = @SEQ_LIBM@
SQRT_LIBM = @SQRT_LIBM@
U = @U@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
YACC = @YACC@
install_sh = @install_sh@
l = @l@
EXTRA_DIST = README Makefile.am.in \
afs.m4 \
assert.m4 \
bison.m4 \
c-bs-a.m4 \
check-decl.m4 \
check-type.m4 \
chown.m4 \
const.m4 \
d-ino.m4 \
d-type.m4 \
decl.m4 \
error.m4 \
fnmatch.m4 \
fstypename.m4 \
fsusage.m4 \
ftruncate.m4 \
getgroups.m4 \
getline.m4 \
getloadavg.m4 \
@@ -134,11 +139,14 @@ jm-winsz2.m4 \
largefile.m4 \
lchown.m4 \
lcmessage.m4 \
lib-check.m4 \
link-follow.m4 \
ls-mntd-fs.m4 \
lstat-slash.m4 \
lstat.m4 \
malloc.m4 \
memcmp.m4 \
mktime.m4 \
nanosleep.m4 \
perl.m4 \
prereq.m4 \
progtest.m4 \
@@ -150,7 +158,9 @@ search-libs.m4 \
st_dm_mode.m4 \
st_mtim.m4 \
stat.m4 \
strerror_r.m4 \
strftime.m4 \
timespec.m4 \
uintmax_t.m4 \
ulonglong.m4 \
uptime.m4 \
@@ -186,22 +196,16 @@ TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits m4/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
cp -pR $$d/$$file $(distdir); \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
@@ -237,6 +241,7 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am

8
m4/bison.m4 Normal file
View File

@@ -0,0 +1,8 @@
#serial 1
AC_DEFUN(jm_BISON,
[
# getdate.y works with bison only.
: ${YACC='bison -y'}
AC_SUBST(YACC)
])

23
m4/c-bs-a.m4 Normal file
View File

@@ -0,0 +1,23 @@
#serial 3
dnl From Paul Eggert.
AC_DEFUN(AC_C_BACKSLASH_A,
[
AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
[AC_TRY_COMPILE([],
[
#if '\a' == 'a'
syntax error;
#endif
char buf['\a' == 'a' ? -1 : 1];
buf[0] = '\a';
return buf[0] != "\a"[0];
],
ac_cv_c_backslash_a=yes,
ac_cv_c_backslash_a=no)])
if test $ac_cv_c_backslash_a = yes; then
AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
[Define if backslash-a works in C strings.])
fi
])

View File

@@ -1,26 +1,27 @@
#serial 5
#serial 6
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
dnl different packages.
AC_DEFUN(jm_CHECK_DECLS,
[
AC_REQUIRE([_jm_DECL_HEADERS])
headers='
#include <stdio.h>
#ifdef HAVE_STRING_H
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#else
# ifdef HAVE_STRINGS_H
# if HAVE_STRINGS_H
# include <strings.h>
# endif
#endif
#ifdef HAVE_STDLIB_H
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
'
@@ -38,8 +39,18 @@ AC_DEFUN(jm_CHECK_DECLS,
AC_DEFINE(HAVE_DECL_REALLOC, 1, [Define if this function is declared.])
AC_DEFINE(HAVE_DECL_STPCPY, 1, [Define if this function is declared.])
AC_DEFINE(HAVE_DECL_STRSTR, 1, [Define if this function is declared.])
AC_DEFINE(HAVE_DECL_STRTOUL, 1, [Define if this function is declared.])
AC_DEFINE(HAVE_DECL_STRTOULL, 1, [Define if this function is declared.])
fi
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
memchr realloc stpcpy strstr)
memchr realloc stpcpy strstr strtoul strtoull)
])
dnl FIXME: when autoconf has support for it.
dnl This is a little helper so we can require these header checks.
AC_DEFUN(_jm_DECL_HEADERS,
[
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h)
])

View File

@@ -1,30 +0,0 @@
#serial 2
dnl Just like AC_CHECK_TYPE from autoconf-2.12, but also checks in unistd.h
dnl on systems that have it. Fujitsu UXP/V needs this for ssize_t.
dnl Now, also uses the three-argument form of AC_DEFINE.
undefine([AC_CHECK_TYPE])
dnl AC_CHECK_TYPE(TYPE, DEFAULT)
AC_DEFUN(AC_CHECK_TYPE,
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_CHECK_HEADERS(unistd.h)
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<$1[^a-zA-Z_0-9]>>dnl
changequote([,]), [#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2,
[ Define to \`$2' if certain system header files doesn't define it.])
fi
])

View File

@@ -1,66 +0,0 @@
#serial 1
dnl Just like AC_C_CONST from autoconf-2.12, but with an initializer
dnl for `charset x' and with
dnl AC_DEFINE(const, )
dnl changed to
dnl AC_DEFINE_UNQUOTED(const, [/* empty */])
dnl to avoid this warning:
dnl [...]/m4: Warning: Excess arguments to built-in `define' ignored
undefine([AC_C_CONST])
AC_DEFUN(AC_C_CONST,
[dnl This message is consistent in form with the other checking messages,
dnl and with the result message.
AC_CACHE_CHECK([for working const], ac_cv_c_const,
[AC_TRY_COMPILE(,
changequote(<<, >>)dnl
<<
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x = {0, 0};
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
>>,
changequote([, ])dnl
ac_cv_c_const=yes, ac_cv_c_const=no)])
if test $ac_cv_c_const = no; then
AC_DEFINE_UNQUOTED(const, [/* empty */])
fi
])

View File

@@ -1,11 +1,11 @@
#serial 2
#serial 3
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
AC_DEFUN(jm_STRUCT_DIRENT_D_INO,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_DIRENT_D_INO,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK([for d_ino member in directory struct],
jm_cv_struct_dirent_d_ino,

View File

@@ -1,11 +1,11 @@
#serial 2
#serial 3
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl
AC_DEFUN(jm_STRUCT_DIRENT_D_TYPE,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE,
[AC_REQUIRE([AC_HEADER_DIRENT])dnl
AC_CACHE_CHECK([for d_type member in directory struct],
jm_cv_struct_dirent_d_type,

View File

@@ -1,13 +1,7 @@
#serial 3
#serial 5
AC_DEFUN(jm_CHECK_DECLARATION,
[
AC_REQUIRE([AC_HEADER_STDC])dnl
test -z "$ac_cv_header_memory_h" && AC_CHECK_HEADERS(memory.h)
test -z "$ac_cv_header_string_h" && AC_CHECK_HEADERS(string.h)
test -z "$ac_cv_header_strings_h" && AC_CHECK_HEADERS(strings.h)
test -z "$ac_cv_header_stdlib_h" && AC_CHECK_HEADERS(stdlib.h)
test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h)
AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(jm_cv_func_decl_$1,
[AC_TRY_COMPILE($2,

192
m4/fsusage.m4 Normal file
View File

@@ -0,0 +1,192 @@
#serial 1
# From fileutils/configure.in
# Try to determine how a program can obtain filesystem usage information.
# If successful, define the appropriate symbol (see fsusage.c) and
# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND.
#
# jm_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN(jm_FILE_SYSTEM_USAGE,
[
AC_CHECKING(how to get filesystem space usage)
ac_fsusage_space=no
# Perform only the link test since it seems there are no variants of the
# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs)
# because that got a false positive on SCO OSR5. Adding the declaration
# of a `struct statvfs' causes this test to fail (as it should) on such
# systems. That system is reported to work fine with STAT_STATFS4 which
# is what it gets when this test fails.
if test $ac_fsusage_space = no; then
# SVR4
AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
[AC_TRY_LINK([#include <sys/types.h>
#include <sys/statvfs.h>],
[struct statvfs fsd; statvfs (0, &fsd);],
fu_cv_sys_stat_statvfs=yes,
fu_cv_sys_stat_statvfs=no)])
if test $fu_cv_sys_stat_statvfs = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATVFS, 1,
[ Define if there is a function named statvfs. (SVR4)])
fi
fi
if test $ac_fsusage_space = no; then
# DEC Alpha running OSF/1
AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
[AC_TRY_RUN([
#include <sys/param.h>
#include <sys/types.h>
#include <sys/mount.h>
main ()
{
struct statfs fsd;
fsd.f_fsize = 0;
exit (statfs (".", &fsd, sizeof (struct statfs)));
}],
fu_cv_sys_stat_statfs3_osf1=yes,
fu_cv_sys_stat_statfs3_osf1=no,
fu_cv_sys_stat_statfs3_osf1=no)])
AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATFS3_OSF1, 1,
[ Define if statfs takes 3 args. (DEC Alpha running OSF/1)])
fi
fi
if test $ac_fsusage_space = no; then
# AIX
AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
member (AIX, 4.3BSD)])
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
[AC_TRY_RUN([
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
main ()
{
struct statfs fsd;
fsd.f_bsize = 0;
exit (statfs (".", &fsd));
}],
fu_cv_sys_stat_statfs2_bsize=yes,
fu_cv_sys_stat_statfs2_bsize=no,
fu_cv_sys_stat_statfs2_bsize=no)])
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
if test $fu_cv_sys_stat_statfs2_bsize = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATFS2_BSIZE, 1,
[ Define if statfs takes 2 args and struct statfs has a field named f_bsize.
(4.3BSD, SunOS 4, HP-UX, AIX PS/2)])
fi
fi
if test $ac_fsusage_space = no; then
# SVR3
AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/statfs.h>
main ()
{
struct statfs fsd;
exit (statfs (".", &fsd, sizeof fsd, 0));
}],
fu_cv_sys_stat_statfs4=yes,
fu_cv_sys_stat_statfs4=no,
fu_cv_sys_stat_statfs4=no)])
AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
if test $fu_cv_sys_stat_statfs4 = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATFS4, 1,
[ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)])
fi
fi
if test $ac_fsusage_space = no; then
# 4.4BSD and NetBSD
AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
member (4.4BSD and NetBSD)])
AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
[AC_TRY_RUN([#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
main ()
{
struct statfs fsd;
fsd.f_fsize = 0;
exit (statfs (".", &fsd));
}],
fu_cv_sys_stat_statfs2_fsize=yes,
fu_cv_sys_stat_statfs2_fsize=no,
fu_cv_sys_stat_statfs2_fsize=no)])
AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
if test $fu_cv_sys_stat_statfs2_fsize = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATFS2_FSIZE, 1,
[ Define if statfs takes 2 args and struct statfs has a field named f_fsize.
(4.4BSD, NetBSD)])
fi
fi
if test $ac_fsusage_space = no; then
# Ultrix
AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
[AC_TRY_RUN([#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fs_types.h>
#endif
main ()
{
struct fs_data fsd;
/* Ultrix's statfs returns 1 for success,
0 for not mounted, -1 for failure. */
exit (statfs (".", &fsd) != 1);
}],
fu_cv_sys_stat_fs_data=yes,
fu_cv_sys_stat_fs_data=no,
fu_cv_sys_stat_fs_data=no)])
AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
if test $fu_cv_sys_stat_fs_data = yes; then
ac_fsusage_space=yes
AC_DEFINE(STAT_STATFS2_FS_DATA, 1,
[ Define if statfs takes 2 args and the second argument has
type struct fs_data. (Ultrix)])
fi
fi
if test $ac_fsusage_space = no; then
# SVR2
AC_TRY_CPP([#include <sys/filsys.h>],
AC_DEFINE(STAT_READ_FILSYS, 1,
[ Define if there is no specific function for reading filesystems usage
information and you have the <sys/filsys.h> header file. (SVR2)])
ac_fsusage_space=yes)
fi
AC_SHELL_IFELSE([test $ac_fsusage_space = yes], [$1], [$2])dnl
])

27
m4/ftruncate.m4 Normal file
View File

@@ -0,0 +1,27 @@
#serial 1
# See if we need to emulate a missing ftruncate function using fcntl.
AC_DEFUN(jm_FUNC_FTRUNCATE,
[
AC_CHECK_FUNCS(ftruncate, , [ftruncate_missing=yes])
if test "$ftruncate_missing" = yes; then
AC_CHECK_HEADERS(unistd.h)
AC_MSG_CHECKING([fcntl emulation of ftruncate])
AC_CACHE_VAL(fu_cv_sys_ftruncate_emulation,
[AC_TRY_LINK([
#include <sys/types.h>
#include <fcntl.h>], [
#if !defined(F_CHSIZE) && !defined(F_FREESP)
chsize();
#endif
],
fu_cv_sys_ftruncate_emulation=yes,
fu_cv_sys_ftruncate_emulation=no)])
AC_MSG_RESULT($fu_cv_sys_ftruncate_emulation)
if test $fu_cv_sys_ftruncate_emulation = yes; then
LIBOBJS="$LIBOBJS ftruncate.$ac_objext"
fi
fi
])

View File

@@ -37,14 +37,14 @@ fi
AC_REPLACE_FUNCS(getloadavg)
if test $ac_cv_func_getloadavg = yes; then
AC_DEFINE(HAVE_GETLOADAVG)
AC_DEFINE(HAVE_GETLOADAVG, 1, [FIXME])
ac_have_func=yes
else
AC_DEFINE(C_GETLOADAVG, 1, [Define if using getloadavg.c.])
# Figure out what our getloadavg.c needs.
ac_have_func=no
AC_CHECK_HEADER(sys/dg_sys_info.h,
[ac_have_func=yes; AC_DEFINE(DGUX)
[ac_have_func=yes; AC_DEFINE(DGUX, 1, [FIXME])
AC_CHECK_LIB(dgc, dg_sys_info)])
AC_CHECK_HEADER(locale.h)
@@ -54,18 +54,18 @@ else
# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
# Irix 4.0.5F has the header but not the library.
if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
ac_have_func=yes; AC_DEFINE(SVR4)
ac_have_func=yes; AC_DEFINE(SVR4, 1, [FIXME])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(inq_stats/cpustats.h,
[ac_have_func=yes; AC_DEFINE(UMAX)
AC_DEFINE(UMAX4_3)])
[ac_have_func=yes; AC_DEFINE(UMAX, 1, [FIXME])
AC_DEFINE(UMAX4_3, 1, [FIXME])])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(sys/cpustats.h,
[ac_have_func=yes; AC_DEFINE(UMAX)])
[ac_have_func=yes; AC_DEFINE(UMAX, 1, [FIXME])])
fi
if test $ac_have_func = no; then
@@ -73,13 +73,13 @@ else
fi
AC_CHECK_HEADER(nlist.h,
[AC_DEFINE(NLIST_STRUCT)
[AC_DEFINE(NLIST_STRUCT, 1, [FIXME])
AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
[AC_TRY_COMPILE([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;],
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION)
AC_DEFINE(NLIST_NAME_UNION, 1, [FIXME])
fi
])dnl
fi # Do not have getloadavg in system libraries.
@@ -95,7 +95,7 @@ Yowza Am I SETGID yet
#endif],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, [FIXME])
else
NEED_SETGID=false
fi

View File

@@ -160,7 +160,7 @@ AC_DEFUN(AM_WITH_NLS,
# Clean out junk possibly left behind by a previous configuration.
rm -f intl/libintl.h
fi
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_CONFIG_LINKS($nls_cv_header_intl:$nls_cv_header_libgt)
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
@@ -305,7 +305,7 @@ strdup __argz_count __argz_stringify __argz_next])
test -d po || mkdir po
changequote(, )dnl
case "$srcdir" in
.)
.)
posrcprefix="../" ;;
/* | [A-Za-z]:*)
posrcprefix="$srcdir/" ;;

View File

@@ -1,26 +1,69 @@
#serial 7
#serial 12
dnl Misc type-related macros for fileutils, sh-utils, textutils.
AC_DEFUN(jm_MACROS,
[
AC_PREREQ(2.14.1) dnl Minimum Autoconf version required.
AC_PREREQ(2.14a)
GNU_PACKAGE="GNU $PACKAGE"
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
[The concatenation of the strings \`GNU ', and PACKAGE.])
[The concatenation of the strings `GNU ', and PACKAGE.])
AC_SUBST(GNU_PACKAGE)
AC_SUBST(OPTIONAL_BIN_PROGS)
AC_SUBST(OPTIONAL_BIN_ZCRIPTS)
AC_SUBST(MAN)
AC_SUBST(DF_PROG)
dnl This macro actually runs replacement code. See isc-posix.m4.
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_CHECK_HEADERS( \
errno.h \
fcntl.h \
fenv.h \
float.h \
limits.h \
memory.h \
mntent.h \
mnttab.h \
netdb.h \
paths.h \
stdlib.h \
string.h \
sys/acl.h \
sys/filsys.h \
sys/fs/s5param.h \
sys/fs_types.h \
sys/fstyp.h \
sys/ioctl.h \
sys/mntent.h \
sys/mount.h \
sys/param.h \
sys/socket.h \
sys/statfs.h \
sys/statvfs.h \
sys/systeminfo.h \
sys/time.h \
sys/timeb.h \
sys/vfs.h \
sys/wait.h \
syslog.h \
termios.h \
unistd.h \
utime.h \
values.h \
)
jm_INCLUDED_REGEX([lib/regex.c])
AC_REQUIRE([jm_BISON])
AC_REQUIRE([jm_ASSERT])
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
AC_REQUIRE([jm_STRUCT_UTIMBUF])
AC_REQUIRE([jm_STRUCT_DIRENT_D_TYPE])
AC_REQUIRE([jm_STRUCT_DIRENT_D_INO])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_INO])
AC_REQUIRE([jm_CHECK_DECLS])
AC_REQUIRE([jm_PREREQ])
@@ -29,19 +72,45 @@ AC_DEFUN(jm_MACROS,
AC_REQUIRE([jm_FUNC_CHOWN])
AC_REQUIRE([jm_FUNC_MKTIME])
AC_REQUIRE([jm_FUNC_LSTAT])
AC_REQUIRE([jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
AC_REQUIRE([jm_FUNC_STAT])
AC_REQUIRE([jm_FUNC_REALLOC])
AC_REQUIRE([jm_FUNC_MALLOC])
AC_REQUIRE([jm_FUNC_STRERROR_R])
AC_REQUIRE([jm_FUNC_NANOSLEEP])
AC_REQUIRE([jm_FUNC_READDIR])
AC_REQUIRE([jm_FUNC_MEMCMP])
AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
AC_REQUIRE([jm_FUNC_FNMATCH])
AC_REQUIRE([jm_FUNC_GROUP_MEMBER])
AC_REQUIRE([jm_FUNC_PUTENV])
AC_REQUIRE([jm_AFS])
AC_REQUIRE([jm_AC_PREREQ_XSTRTOUMAX])
AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
AC_REQUIRE([AM_FUNC_ERROR_AT_LINE])
AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
AC_REQUIRE([jm_FUNC_MKTIME])
AC_REQUIRE([jm_FUNC_GETGROUPS])
test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
AC_REQUIRE([AC_FUNC_VPRINTF])
AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([AM_FUNC_GETLOADAVG])
AC_REQUIRE([jm_SYS_PROC_UPTIME])
AC_REQUIRE([jm_FUNC_FTRUNCATE])
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
AC_REPLACE_FUNCS(dup2)
AC_REPLACE_FUNCS(memchr)
AC_REPLACE_FUNCS(memmove)
AC_REPLACE_FUNCS(gethostname getusershell)
AC_REPLACE_FUNCS(stime strcspn stpcpy strstr strtol strtoul)
AC_REPLACE_FUNCS(strpbrk)
AC_REPLACE_FUNCS(euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp)
dnl used by e.g. intl/*domain.c and lib/canon-host.c
AC_REPLACE_FUNCS(strdup)
AC_REPLACE_FUNCS(memchr memmove memcpy memset)
AC_CHECK_FUNCS(getpagesize)
# By default, argmatch should fail calling usage (1).
@@ -55,15 +124,91 @@ AC_DEFUN(jm_MACROS,
dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling
AC_FUNC_SETVBUF_REVERSED
# used by sleep and shred
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
AC_CHECK_FUNCS(clock_gettime)
AC_CHECK_FUNCS(gettimeofday)
AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
AC_REQUIRE([jm_FUNC_UTIME])
AC_CHECK_FUNCS( \
acl \
bcopy \
endgrent \
endpwent \
fchdir \
fdatasync \
fseeko \
ftime \
ftruncate \
getcwd \
gethrtime \
getmntinfo \
hasmntopt \
isascii \
lchown \
listmntent \
localeconv \
memcpy \
mempcpy \
mkfifo \
realpath \
resolvepath \
sethostname \
strchr \
strerror \
strrchr \
sysinfo \
tzset \
)
AM_FUNC_GETLINE
if test $am_cv_func_working_getline != yes; then
AC_CHECK_FUNCS(getdelim)
fi
AM_FUNC_OBSTACK
AM_FUNC_STRTOD
AC_SUBST(POW_LIBM)
test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
# These tests are for df.
jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
jm_FSTYPENAME
jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
if test $list_mounted_fs = yes && test $space = yes; then
DF_PROG="df"
LIBOBJS="$LIBOBJS fsusage.$ac_objext"
LIBOBJS="$LIBOBJS mountlist.$ac_objext"
fi
])
AC_DEFUN(jm_CHECK_ALL_TYPES,
[
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
AC_PROG_CC_STDC
AC_C_CONST
AC_C_INLINE
AC_C_LONG_DOUBLE
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_MEMBERS((struct stat.st_blksize))
AC_STRUCT_ST_BLOCKS
AC_STRUCT_TM
AC_HEADER_TIME
AC_STRUCT_TIMEZONE
AC_HEADER_STAT
AC_STRUCT_ST_MTIM_NSEC
AC_STRUCT_ST_DM_MODE
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_TIMESPEC])
AC_TYPE_GETGROUPS
AC_TYPE_MODE_T
AC_TYPE_OFF_T
@@ -72,7 +217,15 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_CHECK_TYPE(ino_t, unsigned long)
dnl This relies on the fact that autoconf 2.14a's implementation of
dnl AC_CHECK_TYPE checks includes unistd.h.
AC_CHECK_TYPE(ssize_t, int)
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
AC_REQUIRE([AC_HEADER_MAJOR])
AC_REQUIRE([AC_HEADER_DIRENT])
])

View File

@@ -1,5 +1,5 @@
dnl From Jim Meyering.
#serial 2
#serial 3
AC_DEFUN(jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
[AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h],
@@ -21,6 +21,6 @@ AC_DEFUN(jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
AC_DEFUN(jm_WINSIZE_IN_PTEM,
[AC_CHECK_HEADER([sys/ptem.h],
AC_DEFINE(WINSIZE_IN_PTEM, 1,
[Define if your system defines \`struct winsize' in sys/ptem.h.]))
[Define if your system defines `struct winsize' in sys/ptem.h.]))
]
)

View File

@@ -1,4 +1,4 @@
#serial 4
#serial 7
dnl By default, many hosts won't let programs access large files;
dnl one must use special compiler options to get large-file access to work.
@@ -12,10 +12,21 @@ dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
[AC_CACHE_CHECK([for $1 value to request large file support],
ac_cv_sys_largefile_$1,
[ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
then
ac_cv_sys_largefile_$1=`cat conftest.1`
else
ac_cv_sys_largefile_$1=no
ifelse($1, CFLAGS,
[case "$host_os" in
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
changequote(, )dnl
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
changequote([, ])dnl
if test "$GCC" = yes; then
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
fi
;;
# IRIX 6.2 and later require cc -n32.
changequote(, )dnl
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
@@ -23,12 +34,15 @@ changequote([, ])dnl
if test "$GCC" != yes; then
ac_cv_sys_largefile_CFLAGS=-n32
fi
esac
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
ac_save_CC="$CC"
CC="$CC $ac_cv_sys_largefile_CFLAGS"
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
CC="$ac_save_CC"
esac])
}])])
fi])
fi
rm -f conftest*])])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
@@ -89,7 +103,7 @@ AC_DEFUN(AC_SYS_LARGEFILE,
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
ac_cv_sys_file_offset_bits,
[Number of bits in a file offset, on hosts where this is settable.]
[Number of bits in a file offset, on hosts where this is settable.],
[case "$host_os" in
# HP-UX 10.20 and later
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)

56
m4/lib-check.m4 Normal file
View File

@@ -0,0 +1,56 @@
#serial 2
dnl Misc lib-related macros for fileutils, sh-utils, textutils.
AC_DEFUN(jm_LIB_CHECK,
[
# Check for libypsec.a on Dolphin M88K machines.
AC_CHECK_LIB(ypsec, main)
# m88k running dgux 5.4 needs this
AC_CHECK_LIB(ldgc, main)
# Some programs need to link with -lm. printf does if it uses
# lib/strtod.c which uses pow. And seq uses the math functions,
# floor, modf, rint. And factor uses sqrt. And sleep uses fesetround.
# Save a copy of $LIBS and add $FLOOR_LIBM before these tests
# Check for these math functions used by seq.
ac_su_saved_lib="$LIBS"
LIBS="$LIBS -lm"
AC_CHECK_FUNCS(floor modf rint)
LIBS="$ac_su_saved_lib"
AC_SUBST(SQRT_LIBM)
AC_CHECK_FUNCS(sqrt)
if test $ac_cv_func_sqrt = no; then
AC_CHECK_LIB(m, sqrt, [SQRT_LIBM=-lm])
fi
AC_SUBST(FESETROUND_LIBM)
AC_CHECK_FUNCS(fesetround)
if test $ac_cv_func_fesetround = no; then
AC_CHECK_LIB(m, fesetround, [FESETROUND_LIBM=-lm])
fi
# The -lsun library is required for YP support on Irix-4.0.5 systems.
# m88k/svr3 DolphinOS systems using YP need -lypsec for id.
AC_SEARCH_LIBS(yp_match, [sun ypsec])
# SysV needs -lsec, older versions of Linux need -lshadow for
# shadow passwords.
AC_SEARCH_LIBS(getspnam, [shadow sec])
# Requirements for su.c.
AC_CHECK_MEMBERS((struct passwd.sp_pwdp))
AC_CHECK_FUNCS(getspnam)
AC_CHECK_HEADERS(shadow.h)
# SCO-ODT-3.0 is reported to need -lufc for crypt.
# NetBSD needs -lcrypt for crypt.
ac_su_saved_lib="$LIBS"
AC_SEARCH_LIBS(crypt, [ufc crypt], [LIB_CRYPT="$ac_cv_search_crypt"])
LIBS="$ac_su_saved_lib"
AC_SUBST(LIB_CRYPT)
])

64
m4/link-follow.m4 Normal file
View File

@@ -0,0 +1,64 @@
#serial 1
dnl Run a program to determine whether whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
AC_DEFUN(jm_AC_FUNC_LINK_FOLLOWS_SYMLINK,
[dnl
AC_CACHE_CHECK([whether link(2) follows symlinks],
jm_ac_cv_func_link_follows_symlink,
[
dnl poor-man's AC_REQUIRE: FIXME: repair this once autoconf-3 provides
dnl the appropriate framework.
test -z "$ac_cv_header_unistd_h" \
&& AC_CHECK_HEADERS(unistd.h)
# Create a regular file.
echo > conftest.file
AC_TRY_RUN(
[
# include <sys/types.h>
# include <sys/stat.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
int
main ()
{
const char *file = "conftest.file";
const char *sym = "conftest.sym";
const char *hard = "conftest.hard";
struct stat sb_file, sb_hard;
/* Create a symlink to the regular file. */
if (symlink (file, sym))
abort ();
/* Create a hard link to that symlink. */
if (link (sym, hard))
abort ();
if (lstat (hard, &sb_hard))
abort ();
if (lstat (file, &sb_file))
abort ();
/* If the dev/inode of hard and file are the same, then
the link call followed the symlink. */
return SAME_INODE (sb_hard, sb_file) ? 0 : 1;
}
],
jm_ac_cv_func_link_follows_symlink=yes,
jm_ac_cv_func_link_follows_symlink=no,
jm_ac_cv_func_link_follows_symlink=yes dnl We're cross compiling.
)
])
if test $jm_ac_cv_func_link_follows_symlink = yes; then
AC_DEFINE(LINK_FOLLOWS_SYMLINKS, 1,
[Define if `link(2)' dereferences symbolic links.])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 2
#serial 3
dnl From Jim Meyering.
dnl
@@ -11,10 +11,13 @@ dnl FIXME: add AC_REQUIRE uses to pull in all definitions required
dnl for all uses of $ac_cv_func_* and $ac_cv_header_* variables below.
dnl
AC_PREREQ(2.14a)
# jm_LIST_MOUNTED_FILESYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
AC_DEFUN(jm_LIST_MOUNTED_FILESYSTEMS,
[
# Determine how to get the list of mounted filesystems.
list_mounted_fs=
ac_list_mounted_fs=
# If the getmntent function is available but not in the standard library,
# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
@@ -29,7 +32,7 @@ AC_FUNC_GETMNTENT
# I think there is too great a chance that some non-Cray system has a
# function named listmntent to risk the false positive.
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# Cray UNICOS 9
AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent,
@@ -45,7 +48,7 @@ yes
)
AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent)
if test $fu_cv_sys_mounted_cray_listmntent = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_LISTMNTENT, 1,
[Define if there is a function named listmntent that can be used to
list all mounted filesystems. (UNICOS)])
@@ -57,7 +60,7 @@ if test $ac_cv_func_getmntent = yes; then
# This system has the getmntent function.
# Determine whether it's the one-argument variant or the two-argument one.
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# 4.3BSD, SunOS, HP-UX, Dynix, Irix
AC_MSG_CHECKING([for one-argument getmntent function])
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1,
@@ -66,7 +69,7 @@ if test $ac_cv_func_getmntent = yes; then
|| fu_cv_sys_mounted_getmntent1=no])
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
if test $fu_cv_sys_mounted_getmntent1 = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTENT1, 1,
[Define if there is a function named getmntent for reading the list
of mounted filesystems, and that function takes a single argument.
@@ -74,7 +77,7 @@ if test $ac_cv_func_getmntent = yes; then
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# SVR4
AC_MSG_CHECKING([for two-argument getmntent function])
AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2,
@@ -83,20 +86,20 @@ if test $ac_cv_func_getmntent = yes; then
fu_cv_sys_mounted_getmntent2=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2)
if test $fu_cv_sys_mounted_getmntent2 = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTENT2, 1,
[Define if there is a function named getmntent for reading the list of
mounted filesystems, and that function takes two arguments. (SVR4)])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# DEC Alpha running OSF/1.
AC_MSG_CHECKING([for getfsstat function])
AC_CACHE_VAL(fu_cv_sys_mounted_getsstat,
@@ -110,14 +113,14 @@ if test -z "$list_mounted_fs"; then
fu_cv_sys_mounted_getsstat=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_getsstat)
if test $fu_cv_sys_mounted_getsstat = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETFSSTAT, 1,
[Define if there is a function named getfsstat for reading the
list of mounted filesystems. (DEC Alpha running OSF/1)])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# AIX.
AC_MSG_CHECKING([for mntctl function and struct vmount])
AC_CACHE_VAL(fu_cv_sys_mounted_vmount,
@@ -126,15 +129,15 @@ if test -z "$list_mounted_fs"; then
fu_cv_sys_mounted_vmount=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_vmount)
if test $fu_cv_sys_mounted_vmount = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_VMOUNT, 1,
[Define if there is a function named mntctl that can be used to read
the list of mounted filesystems, and there is a system header file
that declares \`struct vmount.' (AIX)])
that declares `struct vmount.' (AIX)])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# SVR3
AC_MSG_CHECKING([for FIXME existence of three headers])
AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp,
@@ -146,7 +149,7 @@ if test -z "$list_mounted_fs"; then
fu_cv_sys_mounted_fread_fstyp=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp)
if test $fu_cv_sys_mounted_fread_fstyp = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_FREAD_FSTYP, 1,
[Define if (like SVR2) there is no specific function for reading the
list of mounted filesystems, and your system has these header files:
@@ -154,7 +157,7 @@ if test -z "$list_mounted_fs"; then
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# 4.4BSD and DEC OSF/1.
AC_MSG_CHECKING([for getmntinfo function])
AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo,
@@ -170,7 +173,7 @@ if test -z "$list_mounted_fs"; then
])
AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo)
if test $fu_cv_sys_mounted_getmntinfo = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNTINFO, 1,
[Define if there is a function named getmntinfo for reading the
list of mounted filesystems. (4.4BSD)])
@@ -179,7 +182,7 @@ fi
# FIXME: add a test for netbsd-1.1 here
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# Ultrix
AC_MSG_CHECKING([for getmnt function])
AC_CACHE_VAL(fu_cv_sys_mounted_getmnt,
@@ -190,14 +193,14 @@ if test -z "$list_mounted_fs"; then
fu_cv_sys_mounted_getmnt=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_getmnt)
if test $fu_cv_sys_mounted_getmnt = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_GETMNT, 1,
[Define if there is a function named getmnt for reading the list of
mounted filesystems. (Ultrix)])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
# SVR2
AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
AC_CACHE_VAL(fu_cv_sys_mounted_fread,
@@ -206,17 +209,19 @@ if test -z "$list_mounted_fs"; then
fu_cv_sys_mounted_fread=no)])
AC_MSG_RESULT($fu_cv_sys_mounted_fread)
if test $fu_cv_sys_mounted_fread = yes; then
list_mounted_fs=found
ac_list_mounted_fs=found
AC_DEFINE(MOUNTED_FREAD, 1,
[Define if there is no specific function for reading the list of
mounted filesystems. fread will be used to read /etc/mnttab. (SVR2) ])
fi
fi
if test -z "$list_mounted_fs"; then
if test -z "$ac_list_mounted_fs"; then
AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
# FIXME -- no need to abort building the whole package
# Can't build mountlist.c or anything that needs its functions
fi
AC_SHELL_IFELSE([test $ac_list_mounted_fs = found], [$1], [$2])dnl
])

57
m4/lstat-slash.m4 Normal file
View File

@@ -0,0 +1,57 @@
#serial 1
dnl From Jim Meyering.
dnl FIXME: describe
AC_DEFUN(jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
[
AC_CACHE_CHECK(
[whether lstat dereferences a symlink specified with a trailing slash],
jm_cv_func_lstat_dereferences_slashed_symlink,
[
rm -f conftest.sym conftest.file
: > conftest.file
if ln -s conftest.file conftest.sym; then
AC_TRY_RUN([
# include <sys/types.h>
# include <sys/stat.h>
int
main ()
{
struct stat sbuf;
/* Linux will dereference the symlink and fail.
That is better in the sense that it means we will not
have to compile and use the lstat wrapper. */
exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
}
],
jm_cv_func_lstat_dereferences_slashed_symlink=yes,
jm_cv_func_lstat_dereferences_slashed_symlink=no,
dnl When crosscompiling, be pessimistic so we will end up using the
dnl replacement version of lstat that checkes for trailing slashes
dnl and calls lstat a second time when necessary.
jm_cv_func_lstat_dereferences_slashed_symlink=no
)
else
# If the `ln -s' command failed, then we probably don't even
# have an lstat function.
jm_cv_func_lstat_dereferences_slashed_symlink=no
fi
])
test $jm_cv_func_lstat_dereferences_slashed_symlink = yes \
&& zero_one=1 \
|| zero_one=0
AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, $zero_one,
[Define if lstat dereferences a symlink specified with a trailing slash])
if test $jm_cv_func_lstat_dereferences_slashed_symlink = no; then
AC_SUBST(LIBOBJS)
# Append lstat.o if it's not already in $LIBOBJS.
case "$LIBOBJS" in
*lstat.$ac_objext*) ;;
*) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;;
esac
fi
])

View File

@@ -1,170 +0,0 @@
#serial 1000
dnl From Paul Eggert
dnl Check for a working mktime.
dnl This is a preview of what should appear in the next public autoconf release.
dnl Override any existing definition.
undefine([AC_FUNC_MKTIME])
AC_DEFUN(AC_FUNC_MKTIME,
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/time.h unistd.h)
AC_CHECK_FUNCS(alarm)
AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
[AC_TRY_RUN(
changequote(<<, >>)dnl
<</* Test program from Paul Eggert (eggert@twinsun.com)
and Tony Leneis (tony@plaza.ds.adp.com). */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#if !HAVE_ALARM
# define alarm(X) /* empty */
#endif
/* Work around redefinition to rpl_putenv by other config tests. */
#undef putenv
static time_t time_t_max;
/* Values we'll use to set the TZ environment variable. */
static const char *const tz_strings[] = {
(const char *) 0, "TZ=GMT0", "TZ=JST-9",
"TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
};
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
/* Fail if mktime fails to convert a date in the spring-forward gap.
Based on a problem report from Andreas Jaeger. */
static void
spring_forward_gap ()
{
/* glibc (up to about 1998-10-07) failed this test) */
struct tm tm;
/* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
instead of "TZ=America/Vancouver" in order to detect the bug even
on systems that don't support the Olson extension, or don't have the
full zoneinfo tables installed. */
putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
tm.tm_year = 98;
tm.tm_mon = 3;
tm.tm_mday = 5;
tm.tm_hour = 2;
tm.tm_min = 0;
tm.tm_sec = 0;
tm.tm_isdst = -1;
if (mktime (&tm) == (time_t)-1)
exit (1);
}
static void
mktime_test (now)
time_t now;
{
struct tm *lt;
if ((lt = localtime (&now)) && mktime (lt) != now)
exit (1);
now = time_t_max - now;
if ((lt = localtime (&now)) && mktime (lt) != now)
exit (1);
}
static void
irix_6_4_bug ()
{
/* Based on code from Ariel Faigon. */
struct tm tm;
tm.tm_year = 96;
tm.tm_mon = 3;
tm.tm_mday = 0;
tm.tm_hour = 0;
tm.tm_min = 0;
tm.tm_sec = 0;
tm.tm_isdst = -1;
mktime (&tm);
if (tm.tm_mon != 2 || tm.tm_mday != 31)
exit (1);
}
static void
bigtime_test (j)
int j;
{
struct tm tm;
time_t now;
tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
now = mktime (&tm);
if (now != (time_t) -1)
{
struct tm *lt = localtime (&now);
if (! (lt
&& lt->tm_year == tm.tm_year
&& lt->tm_mon == tm.tm_mon
&& lt->tm_mday == tm.tm_mday
&& lt->tm_hour == tm.tm_hour
&& lt->tm_min == tm.tm_min
&& lt->tm_sec == tm.tm_sec
&& lt->tm_yday == tm.tm_yday
&& lt->tm_wday == tm.tm_wday
&& ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
== (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
exit (1);
}
}
int
main ()
{
time_t t, delta;
int i, j;
/* This test makes some buggy mktime implementations loop.
Give up after 60 seconds; a mktime slower than that
isn't worth using anyway. */
alarm (60);
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
continue;
time_t_max--;
delta = time_t_max / 997; /* a suitable prime number */
for (i = 0; i < N_STRINGS; i++)
{
if (tz_strings[i])
putenv (tz_strings[i]);
for (t = 0; t <= time_t_max - delta; t += delta)
mktime_test (t);
mktime_test ((time_t) 60 * 60);
mktime_test ((time_t) 60 * 60 * 24);
for (j = 1; 0 < j; j *= 2)
bigtime_test (j);
bigtime_test (j - 1);
}
irix_6_4_bug ();
spring_forward_gap ();
exit (0);
}
>>,
changequote([, ])dnl
ac_cv_func_working_mktime=yes, ac_cv_func_working_mktime=no,
ac_cv_func_working_mktime=no)])
if test $ac_cv_func_working_mktime = no; then
LIBOBJS="$LIBOBJS mktime.${ac_objext}"
fi
])

50
m4/nanosleep.m4 Normal file
View File

@@ -0,0 +1,50 @@
#serial 4
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
AC_DEFUN(jm_FUNC_NANOSLEEP,
[
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
AC_SEARCH_LIBS(nanosleep, [rt posix4])
AC_CACHE_CHECK([whether nanosleep works],
jm_cv_func_nanosleep_works,
[
AC_REQUIRE([AC_HEADER_TIME])
AC_TRY_RUN([
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
int
main ()
{
struct timespec ts_sleep, ts_remaining;
ts_sleep.tv_sec = 0;
ts_sleep.tv_nsec = 1;
exit (nanosleep (&ts_sleep, &ts_remaining) == 0 ? 0 : 1);
}
],
jm_cv_func_nanosleep_works=yes,
jm_cv_func_nanosleep_works=no,
dnl When crosscompiling, assume the worst.
jm_cv_func_nanosleep_works=no)
])
if test $jm_cv_func_nanosleep_works = no; then
AC_SUBST(LIBOBJS)
LIBOBJS="$LIBOBJS nanosleep.$ac_objext"
AC_DEFINE_UNQUOTED(nanosleep, gnu_nanosleep,
[Define to gnu_nanosleep if the replacement function should be used.])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 1
#serial 3
dnl From Jim Meyering.
dnl Find a new-enough version of Perl.
@@ -24,7 +24,7 @@ AC_DEFUN(jm_PERL,
for perl in $candidate_perl_names; do
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
if ( $perl -e 'require 5.003' ) > /dev/null 2>&1; then
if ( $perl -e 'require 5.003; use File::Compare' ) > /dev/null 2>&1; then
PERL=$perl
found=yes
break
@@ -33,7 +33,9 @@ AC_DEFUN(jm_PERL,
AC_MSG_RESULT($found)
test $found = no && AC_MSG_WARN([
*** You don't seem to have perl5.003 or newer installed.
*** Because of that, you may be unable to regenerate certain files
*** if you modify the sources from which they are derived.] )
WARNING: You don't seem to have perl5.003 or newer installed, or you lack
a usable version of the Perl File::Compare module. As a result,
you may be unable to run a few tests or to regenerate certain
files if you modify the sources from which they are derived.
] )
])

View File

@@ -1,15 +1,71 @@
#serial 2
#serial 5
dnl These are the prerequisite macros for files in the lib/
dnl directories of the fileutils, sh-utils, and textutils packages.
AC_DEFUN(jm_PREREQ,
[
jm_PREREQ_ADDEXT
jm_PREREQ_CANON_HOST
jm_PREREQ_ERROR
jm_PREREQ_QUOTEARG
jm_PREREQ_READUTMP
jm_PREREQ_REGEX
])
dnl FIXME: maybe put this in a separate file
AC_DEFUN(jm_PREREQ_ADDEXT,
[
dnl For addext.c.
AC_SYS_LONG_FILE_NAMES
AC_CHECK_FUNC(pathconf)
AC_CHECK_HEADERS(limits.h string.h unistd.h)
])
AC_DEFUN(jm_PREREQ_CANON_HOST,
[
dnl Add any libraries as early as possible.
dnl In particular, inet_ntoa needs -lnsl at least on Solaris5.5.1,
dnl so we have to add -lnsl to LIBS before checking for that function.
AC_SEARCH_LIBS(gethostbyname, [inet nsl])
dnl These come from -lnsl on Solaris5.5.1.
AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
AC_CHECK_FUNCS(gethostbyname gethostbyaddr inet_ntoa)
AC_CHECK_HEADERS(unistd.h string.h netdb.h sys/socket.h \
netinet/in.h arpa/inet.h)
])
AC_DEFUN(jm_PREREQ_QUOTEARG,
[
AC_CHECK_FUNCS(isascii mbrtowc)
AC_CHECK_HEADERS(limits.h stdlib.h string.h wchar.h wctype.h)
AC_HEADER_STDC
AC_C_BACKSLASH_A
AM_C_PROTOTYPES
])
AC_DEFUN(jm_PREREQ_READUTMP,
[
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h utmpx.h sys/param.h)
AC_CHECK_FUNCS(utmpname)
AM_C_PROTOTYPES
utmp_includes="\
$ac_includes_default
#ifdef HAVE_UTMPX_H
# include <utmpx.h>
#else
# include <utmp.h>
#endif
"
AC_CHECK_MEMBERS((struct utmpx.ut_user),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmp.ut_user),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmpx.ut_name),,,[$utmp_includes])
AC_CHECK_MEMBERS((struct utmp.ut_name),,,[$utmp_includes])
])
AC_DEFUN(jm_PREREQ_REGEX,
[
dnl FIXME: Maybe provide a btowc replacement someday: solaris-2.5.1 lacks it.

View File

@@ -1,8 +1,8 @@
#serial 2
#serial 3
dnl A replacement for autoconf's macro by the same name. This version
dnl uses `ac_lib' rather than `i' for the loop variable, but more importantly
dnl moves the ACTION-IF-FOUND ($3) into the inner `if'-block so that it is
dnl moves the ACTION-IF-FOUND ([$]3) into the inner `if'-block so that it is
dnl run only if one of the listed libraries ends up being used (and not in
dnl the `none required' case.
dnl I hope it's only temporary while we wait for that version to be fixed.

40
m4/strerror_r.m4 Normal file
View File

@@ -0,0 +1,40 @@
#serial 2
dnl From Jim Meyering.
dnl Determine whether the strerror_r implementation is one of
dnl the broken ones that returns `int' rather than `char*'.
dnl Actually, this tests only whether it returns a scalar
dnl or an array, but that should be enough.
dnl On at least DEC UNIX 4.0[A-D] and HP-UX B.10.20, strerror_r
dnl returns `int'. This is used by lib/error.c.
AC_DEFUN(jm_FUNC_STRERROR_R,
[
# Check strerror_r
AC_CHECK_FUNCS([strerror_r])
if test $ac_cv_func_strerror_r = yes; then
AC_CHECK_HEADERS(string.h)
AC_CACHE_CHECK([for working strerror_r],
jm_cv_func_working_strerror_r,
[
AC_TRY_COMPILE(
[
# include <stdio.h>
# if HAVE_STRING_H
# include <string.h>
# endif
],
[
int buf; /* avoiding square brackets makes this easier */
char x = *strerror_r (0, buf, sizeof buf);
],
jm_cv_func_working_strerror_r=yes,
jm_cv_func_working_strerror_r=no
)
if test $jm_cv_func_working_strerror_r = yes; then
AC_DEFINE_UNQUOTED(HAVE_WORKING_STRERROR_R, 1,
[Define to 1 if strerror_r returns a string.])
fi
])
fi
])

View File

@@ -1,14 +1,25 @@
#serial 6
#serial 8
dnl This macro is intended to be used solely in this file.
dnl These are the prerequisite macros for GNU's strftime.c replacement.
dnl FIXME: the list is far from complete
AC_DEFUN(_jm_STRFTIME_PREREQS,
[
dnl strftime.c uses localtime_r if it exists. Check for it.
AC_CHECK_FUNCS(localtime_r)
dnl FIXME: add tests for everything in strftime.c: e.g., HAVE_BCOPY,
dnl HAVE_TZNAME, HAVE_TZSET, HAVE_TM_ZONE, etc.
AC_CHECK_HEADERS(limits.h)
AC_CHECK_FUNCS(bcopy tzset mempcpy memcpy memset)
# This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
AC_STRUCT_TIMEZONE
AC_CHECK_FUNCS(mblen mbrlen)
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
[Define if struct tm has the tm_gmtoff member.])],
,
[#include <time.h>])
])
dnl Determine if the strftime function has all the features of the GNU one.

34
m4/timespec.m4 Normal file
View File

@@ -0,0 +1,34 @@
#serial 3
dnl From Jim Meyering
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
dnl in time.h or sys/time.h.
AC_DEFUN(jm_CHECK_TYPE_STRUCT_TIMESPEC,
[
AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
AC_REQUIRE([AC_HEADER_TIME])
[AC_TRY_COMPILE(
[
# if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
],
[static struct timespec x; x.tv_sec = x.tv_nsec;],
fu_cv_sys_struct_timespec=yes,
fu_cv_sys_struct_timespec=no)
])
if test $fu_cv_sys_struct_timespec = yes; then
AC_DEFINE_UNQUOTED(HAVE_STRUCT_TIMESPEC, 1,
[Define if struct timespec is declared in <time.h>. ])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 3
#serial 5
dnl From Paul Eggert.
@@ -16,7 +16,7 @@ AC_DEFUN(jm_AC_TYPE_UINTMAX_T,
&& ac_type='unsigned long long' \
|| ac_type='unsigned long'
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
[ Define to \`unsigned long' or \`unsigned long long'
[ Define to unsigned long or unsigned long long
if <inttypes.h> doesn't define.])
fi
])

View File

@@ -1,4 +1,4 @@
#serial 2
#serial 3
dnl From Jim Meyering
@@ -6,7 +6,7 @@ dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
dnl usually in <utime.h>.
dnl Some systems have utime.h but don't declare the struct anywhere.
AC_DEFUN(jm_STRUCT_UTIMBUF,
AC_DEFUN(jm_CHECK_TYPE_STRUCT_UTIMBUF,
[
AC_CHECK_HEADERS(utime.h)
AC_REQUIRE([AC_HEADER_TIME])

View File

@@ -1,4 +1,4 @@
#serial 1
#serial 2
dnl From Jim Meyering
dnl Replace the utime function on systems that need it.
@@ -8,7 +8,7 @@ dnl FIXME
AC_DEFUN(jm_FUNC_UTIME,
[
AC_CHECK_HEADERS(utime.h)
AC_REQUIRE([jm_STRUCT_UTIMBUF])
AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
AC_REQUIRE([AC_FUNC_UTIME_NULL])
if test $ac_cv_func_utime_null = no; then

View File

@@ -1,2 +1,4 @@
[NAME]
basename \- strip directory and suffix from filenames
[DESCRIPTION]
.\" Add any additional description here

View File

@@ -1,2 +1,4 @@
[NAME]
cat \- concatenate files and print on the standard output
[DESCRIPTION]
.\" Add any additional description here

View File

@@ -1,2 +1,4 @@
[NAME]
chgrp \- change group ownership
[DESCRIPTION]
." Add any additional description here

View File

@@ -1,3 +1,5 @@
[NAME]
chmod \- change file access permissions
[DESCRIPTION]
This manual page
documents the GNU version of

View File

@@ -1,3 +1,5 @@
[NAME]
chown \- change file owner and group
[DESCRIPTION]
This manual page
documents the GNU version of

View File

@@ -1,2 +1,4 @@
[NAME]
chroot \- run command or interactive shell with special root directory
[DESCRIPTION]
.\" Add any additional description here

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