summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2004-08-02Include <stdbool.h>.Paul Eggert
(strip_trailing_slashes): Now returns bool.
2004-08-02(argmatch, __xargmatch_internal, argmatch_invalid):Paul Eggert
Use ptrdiff_t, not int, when counting arguments, to allow more than INT_MAX arguments. Use bool when appropriate.
2004-08-02(argmatch, __xargmatch_internal, argmatch_invalid):Paul Eggert
Use ptrdiff_t, not int, when counting arguments, to allow more than INT_MAX arguments.
2004-08-02Install safe-read fix for blocksizes greater than 2**31.Paul Eggert
2004-08-02(errno): Remove decl; we now assume C89 or better.Paul Eggert
(safe_rw): Don't work around Tru64 bug unless the bug symptoms manifest themselves. This allows us to do proper reads and writes on other hosts, e.g., "dd" with a block size greater than 2**31.
2004-08-02Regenerate.Paul Eggert
2004-08-02uintptr_t and uint32_t port to Solaris 8.Paul Eggert
2004-08-02(UNALIGNED_P): Use size_t; in practice, this is just asPaul Eggert
good as uintptr_t in checking for alignments, and has fewer configuration hassles.
2004-08-02Don't include inttypes.h or stdint.h.Paul Eggert
(UNALIGNED_P): Remove. (__memrchr): Use size_t, not uintptr_t, to test alignment.
2004-08-02Don't include inttypes.h or stdint.h.Paul Eggert
(UNALIGNED_P): Remove. (__memchr): Use size_t, not uintptr_t, to test alignment.
2004-08-02Don't include <limits.h>. Include <inttypes.h> if available,Paul Eggert
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).
2004-08-02(UNALIGNED_P): Use size_t; in practice, this is just asPaul Eggert
good as uintptr_t in checking for alignments, and has fewer configuration hassles.
2004-08-01Fix typo: down -> done.Paul Eggert
2004-07-30makepath int cleanupPaul Eggert
2004-07-30(make_path, make_dir): Use bool, not int, since we're not setting errno.Paul Eggert
Use mode_t for modes, not int. All uses changed. (errno): Remove decl; no longer needed since we assume C89.
2004-07-30Include <stdbool.h>.Paul Eggert
(make_path, make_dir): Use bool, not int, since we're not setting errno. Use mode_t for modes, not int. All uses changed.
2004-07-30modechange.c now uses bool.Paul Eggert
2004-07-30Update copyright.Paul Eggert
2004-07-30Include <stdbool.h>.Paul Eggert
(mode_compile): Use bool when appropriate.
2004-07-30Fix copyright year.Paul Eggert
2004-07-29Use sizeof, not alignof, in memchr and memrchr.Paul Eggert
2004-07-29(UNALIGNED_P): Use sizeof, not alignof.Paul Eggert
2004-07-29(UNALIGNED_P): Use sizeof, not alignof.Paul Eggert
2004-07-28userspec.c cleanup, e.g. for "chown 010 file".Paul Eggert
2004-07-28Include <stdbool.h>, "inttostr.h".Paul Eggert
(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.
2004-07-28Regenerate.Paul Eggert
2004-07-28memchr and memrchr portability fixes.Paul Eggert
2004-07-28Include <stddef.h>, not <stdlib.h> and <sys/types.h>.Paul Eggert
(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.
2004-07-28Include <stddef.h>, not <stdlib.h> and <sys/types.h>.Paul Eggert
(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.
2004-07-28md5, sha1 cleanups; getugroups change.Paul Eggert
2004-07-28Don't include <sys/types.h> or <stdlib.h>; <stddef.h>Paul Eggert
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.
2004-07-28Include <stdint.h> if HAVE_STDINT_H || _LIBC, notPaul Eggert
ifdef _LIBC. (md5_uint32): Use uint32_t if available. Simplify fallback ifdefs.
2004-07-28Include <errno.h>.Paul Eggert
(EOVERFLOW): Define if not defined. (getgroups): Return -1 with errno=EOVERFLOW if an integer overflow occurs.
2004-07-28Regenerate.Paul Eggert
2004-07-28Get eaccess from libgen if available; that's where it is on Solaris 9.Paul Eggert
2004-07-28euidaccess.c [HAVE_LIBGEN_H]: Include <libgen.h>, forPaul Eggert
eaccess on Solaris and SVR4-like systems. (euidaccess): Use HAVE_EACCESS, not HAVE_DECL_EACCESS.
2004-07-28cycle-check integer overflow fixup.Paul Eggert
2004-07-28Remove now-inaccurate comment about the filesPaul Eggert
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.
2004-07-28(is_zero_or_power_of_two): Renamed fromPaul Eggert
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.
2004-07-27Regenerate.Paul Eggert
2004-07-27Merged into backupfile.c.Paul Eggert
2004-07-27backupfile integer overflow fixupsPaul Eggert
2004-07-27backupfile.c rewrite to avoid arbitrary limits on lengths ofPaul Eggert
numeric backup extensions. Include "backupfile.h" first. Include errno.h, stdbool.h, limits.h, unistd.h, xalloc.h. (CLOSEDIR, INT_STRLEN_BOUND): Remove. (pathconf) [! (HAVE_PATHCONF && defined _PC_NAME_MAX)]: New macro. (_POSIX_NAME_MAX) [!defined _POSIX_NAME_MAX]: New macro. (NAME_MAX_MAXIMUM): New macro. Unlike the old addext.c, we also look at _XOPEN_NAME_MAX, for better performance on modern hosts that support only file names of length 255 or more. (ISDIGIT): unsigned -> unsigned int (max_backup_version, version_number): Remove. (check_extension): New function. Similar to the old addext, but static, assumes that the extension has already been added, and a bit more careful on DOS hosts. (numbered_backup): New function. It does what max_backup_version and version_number used to do, but it doesn't use integer arithmetic to calculate extensions so it doesn't overflow. (find_backup_file_name): Rewrite to use these new functions. This has a new optimization: we needn't call pathconf if the new numbered backup name has the same length as the old. Also, use xmalloc rather than malloc, so that the caller needn't worry about memory exhaustion.
2004-07-27backupfile.h (addext): Remove decl.Paul Eggert
2004-07-27(libfetish_a_SOURCES): Remove addext.c.Paul Eggert
2004-07-25euidaccess fixesPaul Eggert
2004-07-25[!defined LIBC]: Included group-member.h, stat-macros.h.Paul Eggert
(S_IXUSR, S_IXGRP, S_IXOTH, S_IROTH, S_IWOTH, S_IXOTH): Remove; now done by stat-macros.h. (NGROUPS_MAX, group_member): Remove; now down by group-member.h. No need to include <limits.h>. (errno): Remove decl; we now assume C89 or better. (access, getuid, getgid, geteuid, getegid, stat) [defined _LIBC]: New macros. (uid, gid, have_ids): Remove these static variables. They weren't accurate for programs that also invoked setreuid etc. (euidaccess) [defined EFF_ONLY_OK || defined ACC_SELF || HAVE_DECL_EACCSS]: Use builtin substitutes. [defined _LIBC]: Ignore __libc_enable_secure; it's not a correct optimization for programs run as root that later invoke setreuid. [no builtin substitutes && HAVE_DECL_SETREGID && PREFER_NONREENTRANT_EUIDACCESS]: Use setreuid+setregid to get the correct answer. [no builtin substitutes && ! (HAVE_DECL_SETREGID && PREFER_NONREENTRANT_EUIDACCESS)]: Don't assume that the stat macros have their historical values, as POSIX doesn't require this. [defined TEST]: Include <stdlib.h>; don't include errno.h twice; include <error.h> rather than "error.h".
2004-07-24Move some changelog entries here from ../ChangeLog.Paul Eggert
2004-07-23Regenerate.Paul Eggert
2004-07-23(libfetish_a_SOURCES): Add fcntl-safer.h, open-safer.c.Paul Eggert