summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2004-07-28Check for declaration of strtoumax, for src/printf.c.Paul Eggert
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-28(cp_LDADD, ginstall_LDADD, mv_LDADD,Paul Eggert
pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess.
2004-07-28(gl_PREREQ_EUIDACCESS): Don't bother checking forPaul Eggert
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.
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-28Don't assume that we can remove the working directory in tests.Paul Eggert
2004-07-27Regenerate.Paul Eggert
2004-07-27Merged into backupfile.c.Paul Eggert
2004-07-27backupfile integer overflow fixupsPaul Eggert
2004-07-27backupfile integer overflow fixupsPaul Eggert
2004-07-27(do_link): find_backup_file_name no longer returns NULL, so don'tPaul Eggert
bother to check for this.
2004-07-27(do_copy): find_backup_file_name no longer returns NULL, so don'tPaul Eggert
bother to check for this.
2004-07-27(copy_internal): find_backup_file_name no longerPaul Eggert
returns NULL, so don't bother to check for this.
2004-07-27(gl_BACKUPFILE): AC_REQUIREPaul Eggert
gl_CHECK_TYPE_STRUCT_DIRENT_D_INO instead of invoking it directly. Do not require AC_FUNC_CLOSEDIR_VOID.
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-26Regenerate.Paul Eggert
2004-07-26(GET_NICE_VALUE): Renamed from GET_PRIORITY.Paul Eggert
All uses changed. (NZERO): New macro, if system doesn't define it already. (usage): Distinguish priorities from nice values. Don't assume NZERO is 20. (main): Use bool instead of int where appropriate. If user specifies an adjustment out of range, always truncate it to an inrange value instead of sometimes giving an error message and sometimes not. Do not assume that -1 is an error return from "nice" or "getpriority", as it might be the current nice value minus NZERO. If nice/setpriority fails with errno == EPERM, go ahead and run the command anyway; POSIX requires this.
2004-07-26(nice invocation): Document the "nice value", andPaul Eggert
how it affects the scheduling priority. (The old documentation implied that the nice value equaled the scheduling priority, which isn't accurate.) Document that the range of nice values might exceed -20..19. Specify what happens when you give a nice value that is out of range, or when you don't have permissions to lower the nice value. Bash doesn't have a builtin 'nice', so don't say "most shells" have one.
2004-07-26Document portability and POSIX fixes for "nice".Paul Eggert
2004-07-26Portability and POSIX fixes for "nice".Paul Eggert
2004-07-26Portability and POSIX fixes for "nice".Paul Eggert
2004-07-25Remove setreuid/setregid test from gl_MACROS.Paul Eggert
2004-07-25Update serial number.Paul Eggert
2004-07-25(gl_MACROS): Remove test for setreuid and setregid,Paul Eggert
as test.c no longer uses them directly.
2004-07-25Regenerate.Paul Eggert
2004-07-25euidaccess fixesPaul Eggert
2004-07-25(R_OK, W_OK, X_OK, FOK): Remove; system.h defines them.Paul Eggert
(eaccess): Remove. All users changed to use euidaccess instead.
2004-07-25pathchk.c: Include euidaccess.h.Paul Eggert
(dir_ok): Use euidaccess, not access.
2004-07-25(gl_PREREQ): Invoke gl_FUNC_NONREENTRANT_EUIDACCESS,Paul Eggert
not gl_FUNC_EUIDACCESS.
2004-07-25(gl_FUNC_NONREENTRANT_EUIDACCESS): New macro.Paul Eggert
(gl_FUNC_EUIDACCESS): Use AC_CHECK_DECLS_ONCE, not AC_CHECK_DECLS. (gl_PREREQ_EUIDACCESS): Check for eaccess and setregid decls. Require AC_HEADER_STAT.
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-24Fix non-null-terminated-string bugs in who and uptime.Paul Eggert
2004-07-24(print_uptime) [defined BOOT_MSG]:Paul Eggert
Don't assume ut_line is null-terminated.
2004-07-24(print_line): New arguments USERLEN and LINELEN, since USER and LINEPaul Eggert
might not be null terminated. All callers changed.
2004-07-23Regenerate.Paul Eggert
2004-07-23Fix bug with tail -f and pipes, plus a few other problems with tail.Paul Eggert
2004-07-23Add fcntl-safer.Paul Eggert
2004-07-23(gl_PREREQ): Add gl_FCNTL_SAFER.Paul Eggert
2004-07-23Include fcntl-safer.h.Paul Eggert
(COPY_TO_EOF): Set to UINTMAX_MAX, not OFF_T_MAX (which was wrong). (COPY_A_BUFFER): New macro. (struct File_spec): New members mtime, mode, blocking. Remove member n_consecutive_size_changes. (DEFAULT_MAX_N_CONSECUTIVE_SIZE_CHANGES, max_n_consecutive_size_changes_between_opens, MAX_CONSECUTIVE_SIZE_CHANGES_OPTION): Remove. (long_options, tail_forever, parse_options): Remove (non-)support for --max-consecutive-size-changes. (record_open_fd): New function. (recheck, tail_file): Use it. Don't assume that stdin is open. (dump_remainder): Add support for new COPY_A_BUFFER special value. Treat errno==EAGAIN like EOF, since it might be a nonblocking read. (recheck): New arg BLOCKING, specifying whether to use blocking reads. All uses changed. (n_live_files): Remove, replacing with... (any_live_files): New function. All uses changed. (tail_forever): Use nonblocking I/O unless we know that blocking I/O is safe; this avoids some hangs when reading from a fifo. Avoid invoking fstat or sleep when using blocking I/O. Do not check for changes to size if the file is not a regular file, as the size is undefined in that case. Check for changes to mtime or mode, too; this works for non-regular files. (tail_forever, main): Redo fflush strategy to work even when input is nonblocking. Don't use unbuffered output; just flush when needed.
2004-07-23(libfetish_a_SOURCES): Add fcntl-safer.h, open-safer.c.Paul Eggert
2004-07-23New file.Paul Eggert
2004-07-23(tail invocation): "size has remained the same"Paul Eggert
-> "file has not changed", which is more accurate for fifos.
2004-07-23tail: Fix bug with -f and pipes; remove --max-consecutive-size-changes.Paul Eggert