Commit Graph

21056 Commits

Author SHA1 Message Date
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
Jim Meyering
716ad689e0 fix typo in a comment 2005-05-21 06:42:41 +00:00
Paul Eggert
c84d7e1cb0 Import chown fixes from gnulib. 2005-05-20 22:48:40 +00:00
Paul Eggert
be7a96a273 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs of -1. 2005-05-20 22:48:25 +00:00
Paul Eggert
7a905c6ecc (rpl_chown): Return -1 on failure. 2005-05-20 22:48:08 +00:00
Paul Eggert
e8ddf93a19 Regenerate. 2005-05-20 22:38:38 +00:00
Paul Eggert
e4afa11074 * config.guess: Sync from gnulib. 2005-05-20 22:37:58 +00:00
Paul Eggert
bf8be6caa9 Sync from gnulib. 2005-05-20 22:37:45 +00:00
Paul Eggert
8cc757279d Split fts into LGPL'ed and GPL'ed parts. 2005-05-20 22:34:44 +00:00
Paul Eggert
6ee2045428 Don't include "cycle-check.h" or "hash.h".
(setup_dir, free_dir): New functions.
(enter_dir, leave_dir): Define trivial
alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
(HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
Move to fts-cycle.c.
(fts_open): Use setup_dir.
(fts_close): Use free_dir.
(fts_read): Have just one copy of the ENTER_DIR code rather than three.
This adds a label and some gotos, but the alternatives were messier.
Check for memory allocation failure when entering a dir.
(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
2005-05-20 22:34:19 +00:00
Paul Eggert
fea1ba2d14 (_LGPL_PACKAGE) [defined _LIBC]: New macro.
(FTS): New member fts_cycle, that is a union that contains the
old active_dir_ht and cycle_state.  All uses changed to mention
fts_cycle.ht and fts_cycle.state.
2005-05-20 22:33:59 +00:00
Paul Eggert
eea59b706d * fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
(gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
2005-05-20 22:33:32 +00:00
Paul Eggert
ae2855ebc6 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
(gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
2005-05-20 22:33:12 +00:00