platform/upstream/coreutils.git
19 years agouintptr_t and uint32_t port to Solaris 8.
Paul Eggert [Mon, 2 Aug 2004 05:26:59 +0000 (05:26 +0000)]
uintptr_t and uint32_t port to Solaris 8.

19 years ago(ptr_align): Use size_t; in practice, this is just as
Paul Eggert [Mon, 2 Aug 2004 05:26:19 +0000 (05:26 +0000)]
(ptr_align): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.

19 years ago(UINT_MAX_32_BITS): Remove.
Paul Eggert [Mon, 2 Aug 2004 05:26:01 +0000 (05:26 +0000)]
(UINT_MAX_32_BITS): Remove.
(word32): Remove.  All uses changed to uint32_t.
(isaac_seed_data): Remove unnecessary cast.

19 years ago(hash_int) [!defined UINTPTR_MAX]: Use size_t instead of uintptr_t.
Paul Eggert [Mon, 2 Aug 2004 05:25:33 +0000 (05:25 +0000)]
(hash_int) [!defined UINTPTR_MAX]: Use size_t instead of uintptr_t.

19 years agoInitial revision.
Paul Eggert [Mon, 2 Aug 2004 05:24:47 +0000 (05:24 +0000)]
Initial revision.

19 years ago(gl_MD5): Require gl_AC_TYPE_UINT32_T.
Paul Eggert [Mon, 2 Aug 2004 05:23:39 +0000 (05:23 +0000)]
(gl_MD5): Require gl_AC_TYPE_UINT32_T.

19 years ago(gl_CHECK_ALL_TYPES):
Paul Eggert [Mon, 2 Aug 2004 05:22:57 +0000 (05:22 +0000)]
(gl_CHECK_ALL_TYPES):
Require gl_AC_TYPE_UINTPTR_T instead of using AC_CHECK_TYPE
on uintptr_t.  Require gl_AC_TYPE_UINT32_T.

19 years ago(UNALIGNED_P): Use size_t; in practice, this is just as
Paul Eggert [Mon, 2 Aug 2004 05:22:22 +0000 (05:22 +0000)]
(UNALIGNED_P): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.

19 years agoDon't include inttypes.h or stdint.h.
Paul Eggert [Mon, 2 Aug 2004 05:21:47 +0000 (05:21 +0000)]
Don't include inttypes.h or stdint.h.
(UNALIGNED_P): Remove.
(__memrchr): Use size_t, not uintptr_t, to test alignment.

19 years agoDon't include inttypes.h or stdint.h.
Paul Eggert [Mon, 2 Aug 2004 05:21:12 +0000 (05:21 +0000)]
Don't include inttypes.h or stdint.h.
(UNALIGNED_P): Remove.
(__memchr): Use size_t, not uintptr_t, to test alignment.

19 years agoDon't include <limits.h>. Include <inttypes.h> if available,
Paul Eggert [Mon, 2 Aug 2004 05:20:05 +0000 (05:20 +0000)]
Don't include <limits.h>.  Include <inttypes.h> if available,
as it defines symbols like UINT32_MAX on Solaris 8.
(md5_uint32): Assume uint32_t exists; Autoconf will define it
otherwise (if the host has a 32-bit unsigned type, anyway).

19 years ago(UNALIGNED_P): Use size_t; in practice, this is just as
Paul Eggert [Mon, 2 Aug 2004 05:19:30 +0000 (05:19 +0000)]
(UNALIGNED_P): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.

19 years agoFix typo: down -> done.
Paul Eggert [Sun, 1 Aug 2004 15:21:56 +0000 (15:21 +0000)]
Fix typo: down -> done.

19 years ago* src/Makefile.am (localedir.h): Make it readonly.
Paul Eggert [Sun, 1 Aug 2004 15:19:02 +0000 (15:19 +0000)]
* src/Makefile.am (localedir.h): Make it readonly.

19 years ago(localedir.h): Make it readonly; this
Paul Eggert [Sun, 1 Aug 2004 15:18:29 +0000 (15:18 +0000)]
(localedir.h): Make it readonly; this
undoes part of the 2004-07-27 patch.

19 years agoImprove comment for first_same_file.
Paul Eggert [Fri, 30 Jul 2004 23:24:03 +0000 (23:24 +0000)]
Improve comment for first_same_file.

19 years agosort, system.h, tr int cleanup
Paul Eggert [Fri, 30 Jul 2004 21:09:04 +0000 (21:09 +0000)]
sort, system.h, tr int cleanup

19 years ago(to_uchar): Remove; now in system.h.
Paul Eggert [Fri, 30 Jul 2004 21:08:48 +0000 (21:08 +0000)]
(to_uchar): Remove; now in system.h.
(is_char_class_member): Use bool when appropriate.

19 years ago(errno, CHAR_BIT): Remove decls;
Paul Eggert [Fri, 30 Jul 2004 21:08:25 +0000 (21:08 +0000)]
(errno, CHAR_BIT): Remove decls;
no longer needed now we assume C89 or better.
Include <inttypes.h> before <stdint.h>, as it's the Autoconf-recommended pattern.
(to_uchar): New inline function, moved here from tr.c.
Use full names for int types, e.g. "long int" rather than "long".

19 years ago(UCHAR): Remove; all uses changed to to_uchar.
Paul Eggert [Fri, 30 Jul 2004 21:08:02 +0000 (21:08 +0000)]
(UCHAR): Remove; all uses changed to to_uchar.
(IS_THOUSANDS_SEP): Use bool when appropriate.
(numcompare, main): Use char, not int, when the value is always a char.
(numcompare): Remove "register"; compilers are smart enough these days.

19 years agomakepath int cleanup
Paul Eggert [Fri, 30 Jul 2004 20:30:39 +0000 (20:30 +0000)]
makepath int cleanup

19 years agomkdir.c int cleanup.
Paul Eggert [Fri, 30 Jul 2004 20:30:18 +0000 (20:30 +0000)]
mkdir.c int cleanup.

19 years ago(create_parents, main): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 20:29:29 +0000 (20:29 +0000)]
(create_parents, main): Use bool when appropriate.
(main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.

19 years ago(make_path, make_dir): Use bool, not int, since we're not setting errno.
Paul Eggert [Fri, 30 Jul 2004 20:29:01 +0000 (20:29 +0000)]
(make_path, make_dir): Use bool, not int, since we're not setting errno.
Use mode_t for modes, not int.  All uses changed.
(errno): Remove decl; no longer needed since we assume C89.

19 years agoInclude <stdbool.h>.
Paul Eggert [Fri, 30 Jul 2004 20:28:13 +0000 (20:28 +0000)]
Include <stdbool.h>.
(make_path, make_dir): Use bool, not int, since we're not setting errno.
Use mode_t for modes, not int.  All uses changed.

19 years agomodechange.c now uses bool.
Paul Eggert [Fri, 30 Jul 2004 08:02:27 +0000 (08:02 +0000)]
modechange.c now uses bool.

19 years agoint cleanups for chmod, rm, cp, install, mkfifo.
Paul Eggert [Fri, 30 Jul 2004 08:01:38 +0000 (08:01 +0000)]
int cleanups for chmod, rm, cp, install, mkfifo.

19 years ago(main): Use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1.
Paul Eggert [Fri, 30 Jul 2004 08:00:40 +0000 (08:00 +0000)]
(main): Use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1.

19 years ago(right_justify), full_filename_, AD_pop_and_chdir,
Paul Eggert [Fri, 30 Jul 2004 08:00:02 +0000 (08:00 +0000)]
(right_justify), full_filename_, AD_pop_and_chdir,
AD_push, prompt, remove_dir): Use bool when appropriate.
(top_dir, pop_dir, full_filename_):
Use size_t for sizes.

19 years ago(rm_option_init, main): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 07:59:19 +0000 (07:59 +0000)]
(rm_option_init, main): Use bool when appropriate.
(main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.

19 years ago(remove_trailing_slashes, rm_option_init,
Paul Eggert [Fri, 30 Jul 2004 07:58:07 +0000 (07:58 +0000)]
(remove_trailing_slashes, rm_option_init,
cp_option_init, do_move, movefile, main): Likewise.
* src/remove.c (right_justify), full_filename_, AD_pop_and_chdir,
AD_push, prompt, remove_dir): Likewise.

19 years ago(isdir, change_timestamps, change_attributes,
Paul Eggert [Fri, 30 Jul 2004 07:57:50 +0000 (07:57 +0000)]
(isdir, change_timestamps, change_attributes,
copy_file, install_file_to_path, install_file_in_dir,
install_file_in_file, strip_files, dir_arg, cp_option_init, main,
change_attributes, change_timestamps): Likewise.

19 years ago(struct dir_attr, flag_path, remove_trailing_slashes,
Paul Eggert [Fri, 30 Jul 2004 07:57:27 +0000 (07:57 +0000)]
(struct dir_attr, flag_path, remove_trailing_slashes,
re_protect, make_path_private, target_directory_operand, do_copy,
cp_option_init, decode_preserve_arg, main): Use bool when appropriate.
(target_directory_operand): Do not clear *NEW_DST if stat
succeeds.  It's not necessary in that case, as *NEW_DST is always
false already.
(do_copy): Rewrite slightly to avoid need for "unreachable" comment.
(main): Use EXIT_SUCCESS, EXIT_FAILURE instead of 0, 1.

19 years ago(remember_created): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 07:55:59 +0000 (07:55 +0000)]
(remember_created): Use bool when appropriate.

19 years ago(remember_created): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 07:55:33 +0000 (07:55 +0000)]
(remember_created): Use bool when appropriate.

19 years ago(copy_internal, is_ancestor, copy_dir, copy_reg,
Paul Eggert [Fri, 30 Jul 2004 07:51:59 +0000 (07:51 +0000)]
(copy_internal, is_ancestor, copy_dir, copy_reg,
same_file_ok, seen_file, copy_internal, valid_options, copy):
Use bool when appropriate.

19 years ago(struct cp_options): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 07:49:39 +0000 (07:49 +0000)]
(struct cp_options): Use bool when appropriate.

19 years ago(hard_LC_COLLATE, only_file_1, only_file_2, both, compare_files, main):
Paul Eggert [Fri, 30 Jul 2004 05:25:17 +0000 (05:25 +0000)]
(hard_LC_COLLATE, only_file_1, only_file_2, both, compare_files, main):
Use bool when appropriate.

19 years ago(cksum, main): Use bool when appropriate.
Paul Eggert [Fri, 30 Jul 2004 04:12:25 +0000 (04:12 +0000)]
(cksum, main): Use bool when appropriate.

19 years ago(recurse, force_silent, process_file, process_files, main): Use bool
Paul Eggert [Fri, 30 Jul 2004 04:06:41 +0000 (04:06 +0000)]
(recurse, force_silent, process_file, process_files, main): Use bool
when appropriate.

19 years agoUpdate copyright.
Paul Eggert [Fri, 30 Jul 2004 04:06:16 +0000 (04:06 +0000)]
Update copyright.

19 years agoInclude <stdbool.h>.
Paul Eggert [Fri, 30 Jul 2004 04:05:50 +0000 (04:05 +0000)]
Include <stdbool.h>.
(mode_compile): Use bool when appropriate.

19 years agomd5sum, sha1sum integer cleanups.
Paul Eggert [Fri, 30 Jul 2004 00:55:09 +0000 (00:55 +0000)]
md5sum, sha1sum integer cleanups.

19 years ago(OPENOPTS, have_read_stdin, status_only, warn,
Paul Eggert [Fri, 30 Jul 2004 00:54:44 +0000 (00:54 +0000)]
(OPENOPTS, have_read_stdin, status_only, warn,
bsd_split_3, split_3, hex_digits, digest_file, digest_check, main):
Use bool when appropriate.
(digest_check): Increase limit of number of input lines to
UINTMAX_MAX from INT_MAX.  Diagnose any overflows of this counter.
Use ngettext instead of hard-to-i18nize hardcoded stuff for plurals.

19 years agoDon't include any files other than checksum.h.
Paul Eggert [Fri, 30 Jul 2004 00:54:02 +0000 (00:54 +0000)]
Don't include any files other than checksum.h.

19 years agoDon't include config.h, sys/types.h, stdio.h: not needed.
Paul Eggert [Fri, 30 Jul 2004 00:53:49 +0000 (00:53 +0000)]
Don't include config.h, sys/types.h, stdio.h: not needed.
(ALG_UNSPECIFIED): Remove.
(ALG_MDT): Don't make it equal to CHAR_MAX + 1; this isn't necessary.

19 years agomd5sum and sha1sum overflow detection.
Paul Eggert [Fri, 30 Jul 2004 00:53:23 +0000 (00:53 +0000)]
md5sum and sha1sum overflow detection.

19 years agoFix copyright year.
Paul Eggert [Fri, 30 Jul 2004 00:40:40 +0000 (00:40 +0000)]
Fix copyright year.

19 years agoUse sizeof, not alignof, in memchr and memrchr.
Paul Eggert [Thu, 29 Jul 2004 17:34:38 +0000 (17:34 +0000)]
Use sizeof, not alignof, in memchr and memrchr.

19 years ago(UNALIGNED_P): Use sizeof, not alignof.
Paul Eggert [Thu, 29 Jul 2004 17:34:20 +0000 (17:34 +0000)]
(UNALIGNED_P): Use sizeof, not alignof.

19 years ago(UNALIGNED_P): Use sizeof, not alignof.
Paul Eggert [Thu, 29 Jul 2004 17:33:38 +0000 (17:33 +0000)]
(UNALIGNED_P): Use sizeof, not alignof.

19 years ago'int' cleanup for "cat".
Paul Eggert [Thu, 29 Jul 2004 06:12:44 +0000 (06:12 +0000)]
'int' cleanup for "cat".

19 years ago(exit_status): Remove. Now done by passing a boolean
Paul Eggert [Thu, 29 Jul 2004 06:12:27 +0000 (06:12 +0000)]
(exit_status): Remove.  Now done by passing a boolean
'ok' flag around.
(simple_cat, cat): Return true if successful.  All callers changed.
(simple_cat, cat, main): Use bool for booleans.
(simple_cat): Use size_t for sizes.
(cat, main): Use the same names for parameters that we use for
long options, to avoid confusion.  This inverts the sense of the
show_tabs (formerly output_tabs) and number_nonblank
(formerly numbers_at_empty_lines) variables.
(main): Don't mess up (due to integer overflow) if we are given
INT_MAX - INT_MIN + 1 options.
[O_BINARY]: Don't invoke isatty unless the other options require it.
(main): When deciding whether to use simple_cat, don't worry
about binary option; it's irrelevant.

19 years agodcgen cleanup.
Paul Eggert [Wed, 28 Jul 2004 23:59:37 +0000 (23:59 +0000)]
dcgen cleanup.

19 years agoRemove comments, trailing white space, and empty
Paul Eggert [Wed, 28 Jul 2004 23:59:11 +0000 (23:59 +0000)]
Remove comments, trailing white space, and empty
lines from the output strings, to save space.
Use a narrower type like 'unsigned char' for line lengths, if
that will do.
Make the output variables static, not extern.

19 years agochown/chgrp cleanup.
Paul Eggert [Wed, 28 Jul 2004 23:39:12 +0000 (23:39 +0000)]
chown/chgrp cleanup.

19 years ago(chown_files): Return true/false, not 0/-1, since we don't set errno.
Paul Eggert [Wed, 28 Jul 2004 23:38:36 +0000 (23:38 +0000)]
(chown_files): Return true/false, not 0/-1, since we don't set errno.

19 years agoInclude inttostr.h.
Paul Eggert [Wed, 28 Jul 2004 23:37:49 +0000 (23:37 +0000)]
Include inttostr.h.
(UINT_MAX_DECIMAL_DIGITS, uint_to_string): Remove.
(gid_to_name, uid_to_name): Use imaxtostr/umaxtostr
instead of uint_to_string).
(describe_change): Instead of an int flag, use a char *
auxiliary; this avoids the need for casts.
Assume free (NULL) works.
(change_file_owner): Return true/false, not 0/-1, since
we don't set errno.  All callers changed.
Use bool when appropriate.
(chown_files): Likewise.

19 years ago(main): int -> bool when appropriate.
Paul Eggert [Wed, 28 Jul 2004 23:37:21 +0000 (23:37 +0000)]
(main): int -> bool when appropriate.

19 years ago(parse_group): Require base 10 when parsing groups as integers.
Paul Eggert [Wed, 28 Jul 2004 23:36:59 +0000 (23:36 +0000)]
(parse_group): Require base 10 when parsing groups as integers.
(main): int -> bool when appropriate.

19 years agouserspec.c cleanup, e.g. for "chown 010 file".
Paul Eggert [Wed, 28 Jul 2004 23:06:25 +0000 (23:06 +0000)]
userspec.c cleanup, e.g. for "chown 010 file".

19 years agoInclude <stdbool.h>, "inttostr.h".
Paul Eggert [Wed, 28 Jul 2004 23:06:11 +0000 (23:06 +0000)]
Include <stdbool.h>, "inttostr.h".
(V_STRDUP): Don't assume the string's length fits in int.
(ISDIGIT): unsigned -> unsigned int
(is_number): Define only ifdef __DJGPP__; not needed elsewhere.
Use bool instead of int where appropriate.
Do not allow empty strings.
(parse_user_spec): Parse numbers as decimal integers, even if
they have a leading 0.  Don't assume uids and gids fit in int.

19 years agoTest for "chown 010 file".
Paul Eggert [Wed, 28 Jul 2004 23:05:52 +0000 (23:05 +0000)]
Test for "chown 010 file".

19 years agoTest for proper handling of uids like
Paul Eggert [Wed, 28 Jul 2004 23:05:27 +0000 (23:05 +0000)]
Test for proper handling of uids like
"010", which must be parsed as decimal.

19 years agoRegenerate.
Paul Eggert [Wed, 28 Jul 2004 22:32:26 +0000 (22:32 +0000)]
Regenerate.

19 years agomemchr and memrchr portability fixes.
Paul Eggert [Wed, 28 Jul 2004 22:21:33 +0000 (22:21 +0000)]
memchr and memrchr portability fixes.

19 years agoInclude <stddef.h>, not <stdlib.h> and <sys/types.h>.
Paul Eggert [Wed, 28 Jul 2004 22:21:18 +0000 (22:21 +0000)]
Include <stddef.h>, not <stdlib.h> and <sys/types.h>.
(LONG_MAX_32_BITS): Remove.
Include <inttypes.h> and <stdint.h> if available.
(alignof, UNALIGNEDP): New macro, portable to all C89 hosts.
(__memrchr): Don't assume unsigned long int is either 4 or 8 bytes;
let it be any number of bytes greater than or equal to 4.

19 years agoInclude <stddef.h>, not <stdlib.h> and <sys/types.h>.
Paul Eggert [Wed, 28 Jul 2004 22:20:56 +0000 (22:20 +0000)]
Include <stddef.h>, not <stdlib.h> and <sys/types.h>.
(LONG_MAX_32_BITS): Remove.
Include <inttypes.h> and <stdint.h> if available.
(alignof, UNALIGNEDP): New macro, portable to all C89 hosts.
(__memchr): Don't assume unsigned long int is either 4 or 8 bytes;
let it be any number of bytes greater than or equal to 4.
* memrchr.c: Likewise, with __memrchr.

19 years agomd5, sha1 cleanups; getugroups change.
Paul Eggert [Wed, 28 Jul 2004 20:11:45 +0000 (20:11 +0000)]
md5, sha1 cleanups; getugroups change.

19 years agomd5, sha1 cleanups.
Paul Eggert [Wed, 28 Jul 2004 20:10:55 +0000 (20:10 +0000)]
md5, sha1 cleanups.

19 years ago(gl_SHA): Require AC_C_BIGENDIAN.
Paul Eggert [Wed, 28 Jul 2004 20:10:44 +0000 (20:10 +0000)]
(gl_SHA): Require AC_C_BIGENDIAN.

19 years ago(gl_MD5): Do not require AC_C_INLINE, since it doesn't
Paul Eggert [Wed, 28 Jul 2004 20:10:18 +0000 (20:10 +0000)]
(gl_MD5): Do not require AC_C_INLINE, since it doesn't
use inline any more.  Require AC_C_BIGENDIAN, though.

19 years agoDon't include <sys/types.h> or <stdlib.h>; <stddef.h>
Paul Eggert [Wed, 28 Jul 2004 20:09:39 +0000 (20:09 +0000)]
Don't include <sys/types.h> or <stdlib.h>; <stddef.h>
suffices with C89 or better.
(alignof): New macro, portable to all C89 hosts.
(UNALIGNED): Use it.  Use uintptr_t if available, and assume
everything is unaligned otherwise; this is more portable than
assuming 'unsigned long int' will always work.

19 years agoInclude <stdint.h> if HAVE_STDINT_H || _LIBC, not
Paul Eggert [Wed, 28 Jul 2004 20:09:09 +0000 (20:09 +0000)]
Include <stdint.h> if HAVE_STDINT_H || _LIBC, not
ifdef _LIBC.
(md5_uint32): Use uint32_t if available.  Simplify fallback ifdefs.

19 years agoInclude <errno.h>.
Paul Eggert [Wed, 28 Jul 2004 19:41:08 +0000 (19:41 +0000)]
Include <errno.h>.
(EOVERFLOW): Define if not defined.
(getgroups): Return -1 with errno=EOVERFLOW if an integer overflow
occurs.

19 years agoRegenerate.
Paul Eggert [Wed, 28 Jul 2004 19:26:33 +0000 (19:26 +0000)]
Regenerate.

19 years agoDon't assume that Perl's getpwd agrees with ours.
Paul Eggert [Wed, 28 Jul 2004 19:23:28 +0000 (19:23 +0000)]
Don't assume that Perl's getpwd agrees with ours.

19 years agoDon't assume that Perl's getpwd agrees with our
Paul Eggert [Wed, 28 Jul 2004 19:23:07 +0000 (19:23 +0000)]
Don't assume that Perl's getpwd agrees with our
pwd when there are multiple names for the working directory
(which can happen with an automounter, sigh).

19 years agoIn src/Makefile.am, don't have 'groups' or 'localedir.h' depend on Makefile.
Paul Eggert [Wed, 28 Jul 2004 18:54:05 +0000 (18:54 +0000)]
In src/Makefile.am, don't have 'groups' or 'localedir.h' depend on Makefile.

19 years agothis causes Solaris 8 'make' to refuse to build "groups".
Paul Eggert [Wed, 28 Jul 2004 18:53:22 +0000 (18:53 +0000)]
this causes Solaris 8 'make' to refuse to build "groups".
(localedir.h): Don't depend on Makefile: this causes Solaris
8 'make' to build localedir.h unnecessarily.  The dependence
on Makefile is ineffective anyway, since $(localedir) might
change even if Makefile hasn't.

19 years ago* src/remove.c (remove_dir): If we can't save the state of the
Paul Eggert [Wed, 28 Jul 2004 14:50:25 +0000 (14:50 +0000)]
* src/remove.c (remove_dir): If we can't save the state of the
working directory, pretend we started from "/", not ".".

19 years ago(remove_dir): If we can't save the state of the
Paul Eggert [Wed, 28 Jul 2004 14:50:06 +0000 (14:50 +0000)]
(remove_dir): If we can't save the state of the
working directory, pretend we started from "/", not ".".
This avoids a bug on hosts like Solaris that don't let you
remove the working directory.

19 years agoIn src/printf.c, declare strtoimax and strtoumax if not already declared.
Paul Eggert [Wed, 28 Jul 2004 06:59:27 +0000 (06:59 +0000)]
In src/printf.c, declare strtoimax and strtoumax if not already declared.

19 years ago(strtiomax, strtoumax): Declare if not already
Paul Eggert [Wed, 28 Jul 2004 06:58:25 +0000 (06:58 +0000)]
(strtiomax, strtoumax): Declare if not already
declared: this fixes a portability bug with Solaris 8 + GCC.
(STRTOX): Parenthesize use of macro arg as expression.
(vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary
parentheses.

19 years agoCheck for declaration of strtoumax, for src/printf.c.
Paul Eggert [Wed, 28 Jul 2004 06:58:09 +0000 (06:58 +0000)]
Check for declaration of strtoumax, for src/printf.c.

19 years agoRegenerate.
Paul Eggert [Wed, 28 Jul 2004 05:26:31 +0000 (05:26 +0000)]
Regenerate.

19 years agoGet eaccess from libgen if available; that's where it is on Solaris 9.
Paul Eggert [Wed, 28 Jul 2004 05:02:17 +0000 (05:02 +0000)]
Get eaccess from libgen if available; that's where it is on Solaris 9.

19 years ago(cp_LDADD, ginstall_LDADD, mv_LDADD,
Paul Eggert [Wed, 28 Jul 2004 05:00:35 +0000 (05:00 +0000)]
(cp_LDADD, ginstall_LDADD, mv_LDADD,
pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess.

19 years ago(gl_PREREQ_EUIDACCESS): Don't bother checking for
Paul Eggert [Wed, 28 Jul 2004 05:00:10 +0000 (05:00 +0000)]
(gl_PREREQ_EUIDACCESS): Don't bother checking for
unistd.h, as autoconf does this for us.  Check for libgen.h.
Also look for eaccess within -lgen, which is where it is in
Solaris.  Set LIB_EACCESS accordingly.

19 years agoeuidaccess.c [HAVE_LIBGEN_H]: Include <libgen.h>, for
Paul Eggert [Wed, 28 Jul 2004 04:59:44 +0000 (04:59 +0000)]
euidaccess.c [HAVE_LIBGEN_H]: Include <libgen.h>, for
eaccess on Solaris and SVR4-like systems.
(euidaccess): Use HAVE_EACCESS, not HAVE_DECL_EACCESS.

19 years agocycle-check integer overflow fixup.
Paul Eggert [Wed, 28 Jul 2004 00:31:58 +0000 (00:31 +0000)]
cycle-check integer overflow fixup.

19 years agoRemove now-inaccurate comment about the files
Paul Eggert [Wed, 28 Jul 2004 00:31:14 +0000 (00:31 +0000)]
Remove now-inaccurate comment about the files
you need to include first.  You don't need to include any files
other than the usual config.h.
Include <inttypes.h> and <stdint.h> if available, for uintmax_t.
Remove 'struct stat;' not needed since we know sys/stat.h has
been included by dev-ino.h.
(struct cycle_check_state): Change chdir_counter to uintmax_t,
not size_t, since it isn't limited by object sizes.
Change magic from long unsigned int to int; that's good enough
for our use.

19 years ago(is_zero_or_power_of_two): Renamed from
Paul Eggert [Wed, 28 Jul 2004 00:30:45 +0000 (00:30 +0000)]
(is_zero_or_power_of_two): Renamed from
is_power_of_two, to reflect better what it really does.
All uses changed.  Arg is now uintmax_t, not unsigned int
(it should have been unsigned long int -- that was a bug).
(cycle_check): Check for integer overflow in cycle count,
and report a cycle if that happens, as it must be a cycle
by this point.

19 years agoDon't assume that we can remove the working directory in tests.
Paul Eggert [Wed, 28 Jul 2004 00:06:57 +0000 (00:06 +0000)]
Don't assume that we can remove the working directory in tests.

19 years agoRegenerate.
Paul Eggert [Tue, 27 Jul 2004 23:20:48 +0000 (23:20 +0000)]
Regenerate.

19 years agoMerged into backupfile.c.
Paul Eggert [Tue, 27 Jul 2004 23:20:03 +0000 (23:20 +0000)]
Merged into backupfile.c.

19 years agobackupfile integer overflow fixups
Paul Eggert [Tue, 27 Jul 2004 23:15:05 +0000 (23:15 +0000)]
backupfile integer overflow fixups

19 years agobackupfile integer overflow fixups
Paul Eggert [Tue, 27 Jul 2004 23:14:53 +0000 (23:14 +0000)]
backupfile integer overflow fixups

19 years ago(do_link): find_backup_file_name no longer returns NULL, so don't
Paul Eggert [Tue, 27 Jul 2004 23:14:30 +0000 (23:14 +0000)]
(do_link): find_backup_file_name no longer returns NULL, so don't
bother to check for this.

19 years ago(do_copy): find_backup_file_name no longer returns NULL, so don't
Paul Eggert [Tue, 27 Jul 2004 23:14:05 +0000 (23:14 +0000)]
(do_copy): find_backup_file_name no longer returns NULL, so don't
bother to check for this.