Commit Graph

20968 Commits

Author SHA1 Message Date
Paul Eggert fe34f6c28d (cp_options_init): Use chown_privileges rather than geteuid. 2005-05-31 06:16:09 +00:00
Paul Eggert 1b3bf65c51 (re_protect): Remove unnecessary call to geteuid.
Use chown_failure_ok rather than our own code.
(cp_options_init): Use chown_privileges rather than getuid.
2005-05-31 06:15:48 +00:00
Paul Eggert d8ce6bf143 Add copyright notice.
(struct cp_options): Remove myeuid member.  Add chown_privileges
member.
(chown_privileges, chown_failure_ok): New function decls.
2005-05-31 06:15:18 +00:00
Paul Eggert e6a9bbce56 Port to Solaris 10's rules for whether programs can chown files.
[HAVE_PRIV_H]: Include <priv.h>.
(DO_CHOWN): Remove.  Replaced by chown_failure_ok.  All callers
changed.
(copy_internal): If chown failed, don't worry about what happened
to the mode bits; they can't have changed.
(chown_privileges, chown_failure_ok): New functions.
2005-05-31 06:14:24 +00:00
Paul Eggert ff3775ea5b * jm-macros.m4 (gl_CHECK_ALL_HEADERS): Check for priv.h. 2005-05-31 06:13:44 +00:00
Paul Eggert 3809452e3e (gl_CHECK_ALL_HEADERS): Check for priv.h. 2005-05-31 06:13:25 +00:00
Jim Meyering 275c4eb298 . 2005-05-30 09:04:13 +00:00
Paul Eggert ff57f59217 Regenerate. 2005-05-30 07:41:32 +00:00
Paul Eggert 53d6509846 _POSIX_VERSION cleanup 2005-05-30 07:37:02 +00:00
Paul Eggert 3ada325679 Include sys/param.h if it exists, not if _POSIX_VERSION
isn't defined.
Don't include <sys/file.h>; no longer needed.
(getegid, geteuid): Remove no-longer-necessary decls.
2005-05-30 07:34:23 +00:00
Paul Eggert 21c907252b Don't bother mentioning _POSIX_VERSION in comment. 2005-05-30 07:33:55 +00:00
Paul Eggert 3068ea6b4d (OPENOPTS, TEXT1T01, TEXTCNVT): Remove.
(digest_file): Use O_BINARY-using expr instead of OPENOPTS.
2005-05-30 07:33:38 +00:00
Paul Eggert 003510fda2 (getpwnam, getgrnam): Remove decl.
(getuid, getgid) [!defined _POSIX_VERSION]: Remove decls.
2005-05-30 07:33:16 +00:00
Paul Eggert db3e479ab3 (getpwuid, getgrgid, getuid, getgid, geteuid, getegid)
[!defined _POSIX_VERSION]: Remove decls.
2005-05-30 07:33:00 +00:00
Paul Eggert f071607aa1 (geteuid) [!defined _POSIX_VERSION]: Remove decl. 2005-05-30 07:32:16 +00:00
Paul Eggert 6a9173f43e (getgrnam, getgrgid) [!defined _POSIX_VERSION]:
Remove decls.
2005-05-30 07:31:51 +00:00
Paul Eggert 739904ab06 (getgrnam) [!defined _POSIX_VERSION]: Remove decl. 2005-05-30 07:31:31 +00:00
Paul Eggert 4ab39ecf75 (getpwnam, getgrnam, getgrgid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:31:12 +00:00
Paul Eggert c86717d0dd Include <limits.h> unconditionally, since other
files have been getting away with it for years (MORE/BSD 4.3
is extinct now).
2005-05-30 07:30:51 +00:00
Paul Eggert fcb5c87adb (getpwuid, getpwnam, getgrgid, getgrnam)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:30:31 +00:00
Paul Eggert 241ed9e339 (getuid, getgid, getuid, getegid)
[!defined _POSIX_VERSION]: Remove decls; not needed these days.
2005-05-30 07:30:01 +00:00
Paul Eggert b224f94761 (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
Define to 256, not 255, as per modern POSIX.
2005-05-30 07:05:07 +00:00
Paul Eggert 47db304b3c dd seek=N now conforms to POSIX if the output isn't seekable. 2005-05-28 04:24:14 +00:00
Paul Eggert 5923469a3c dd seek=N now conforms to POSIX if the output isn't seekable. 2005-05-28 04:22:43 +00:00
Paul Eggert 8f10bd11cf (skip): Return the number of records that were not
skipped due to encountering EOF.
(dd_copy): If the file wasn't seekable and EOF was encountered,
write zeros past EOF until the desired offset is reached.
2005-05-28 04:22:26 +00:00
Paul Eggert c3dc98bb5e * fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
and don't require gt_INTTYPES_PRI.
2005-05-28 00:01:15 +00:00
Paul Eggert abe28983a6 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
and don't require gt_INTTYPES_PRI.
2005-05-28 00:01:00 +00:00
Paul Eggert a73860cb2f fts.c: Don't worry about debugging on pre-C99-comopatible hosts. 2005-05-28 00:00:38 +00:00
Paul Eggert 644cca3ead Don't worry about debugging on pre-C99-comopatible hosts;
the configuration hassle isn't worth it.
Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
(LONGEST_MODIFIER, PRIuMAX): Remove.
2005-05-28 00:00:06 +00:00
Paul Eggert 42a4ba9143 expr and test now correctly compare integers of unlimited size. 2005-05-27 20:37:14 +00:00
Paul Eggert a2b86be295 Include inttostr.h, strnumcmp.h.
(whitespace, digit, digit_value, integer_expected_error): Remove.
(is_int): Remove; replaced by...
(find_int): New function.
(binary_operator): Don't let integers overflow in comparisons;
return the correct answer instead.  Simplify the code.
(unary_operator): Convert the integer ourself, since find_int
no longer does so.
2005-05-27 20:36:58 +00:00
Paul Eggert 58aa95b54b Refactor so that others can use large-integer
comparison functions.
Include "strnumcmp.h".
(NEGATION_SIGN, NUMERIC_ZERO, fraccompare):
Remove; moved to strnumcmp.
(decimal_point): Now int, to simplify converison overhead with
new API.  All uses changed.
(thousands_sep): Now -1 if there isn't one, as per new API.
All uses changed.
(numcompare): Move contents to strnumcmp module, except for
skipping blanks.
2005-05-27 20:36:40 +00:00
Paul Eggert 6d740fd9ee Include strnumcmp.h, xstrtol.h.
(looks_like_integer): New function.
(toarith): Use it.  Also, use xstrtoimax rather than rolling our
own diagnostics.
(eval2): Don't look for trouble if !evaluate; this simplifies things.
Compare numbers using string comparison, so that overflow is
not possible.
2005-05-27 20:36:20 +00:00
Paul Eggert 1ef7a75fa8 Break integer-in-string comparison code out from src/sort. 2005-05-27 20:35:33 +00:00
Paul Eggert dc0465e9c7 (gl_PREREQ): Require gl_STRINTCMP, gl_STRNUMCMP. 2005-05-27 20:35:07 +00:00
Paul Eggert e277ba010e Compare numeric strings. 2005-05-27 20:34:48 +00:00
Paul Eggert 606321fa32 Break integer-in-string comparison code out from src/sort. 2005-05-27 20:34:03 +00:00
Paul Eggert 8cb4f7039d (eq-6, gt-5, lt-5): New tests. 2005-05-27 20:32:43 +00:00
Paul Eggert 9b4b372182 (bigcmp): New test. 2005-05-27 20:32:28 +00:00
Paul Eggert 08338cd87f expr and test now correctly compare integers of unlimited size.
(Also, correct a comment that claimed that expr detects integer
overflow; it does so only when converting from strings.)
2005-05-27 20:31:59 +00:00
Paul Eggert 3a662c37cd Fix typo in comment. 2005-05-26 19:30:04 +00:00
Paul Eggert 8597e1fd2d nohup now redirects a tty stdin to an unreadable fd instead of closing it. 2005-05-26 19:27:50 +00:00
Jim Meyering 3d8bc90af3 *** empty log message *** 2005-05-26 18:35:59 +00:00
Jim Meyering 239409b480 *** empty log message *** 2005-05-26 18:35:33 +00:00
Jim Meyering 607d3de687 . 2005-05-26 18:34:18 +00:00
Jim Meyering 45a1996268 *** empty log message *** 2005-05-26 16:09:43 +00:00
Jim Meyering 6fc0ccf717 (toarith): Fix a sign error introduced on 2005-01-14. 2005-05-26 16:09:38 +00:00
Jim Meyering f3dfdff460 Add tests using arithmetic on negative integers. 2005-05-26 16:09:29 +00:00
Paul Eggert a7102ac430 (fd_safer) [_LGPL_PACKAGE]: New static function,
so that unistd-safer.h (GPL'ed code) need not be included.
2005-05-22 17:29:46 +00:00
Jim Meyering b72d60e7a4 *** empty log message *** 2005-05-21 06:44:36 +00:00