Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(readtoken): Use `size_t' rather than int/long.
All callers adjusted.
Use `bool' rather than `int' where appropriate.
Use memset rather than an explicit loop.
Use x2nrealloc rather than xrealloc.
Allow the use of `\0' as a delimiter.
(readtokens): Likewise.
|
|
|
|
|
|
assume C89 and don't need to worry about 'const'.
Similarly, include "unlocked-io.h" near start, not in middle.
Include <limits.h>.
(textint.value): Use long int rather than int.
(textint.digits): Use size_t rather than int.
(BILLION, LOG10_BILLION): New constants.
(parser_control): New member rel_ns. Members day_ordinal,
time_zone, month, day, hour, minutes, rel_year, rel_month,
rel_day, rel_hour, rel_minutes, rel_seconds
are now long int, not int. Member seconds is now struct timespec,
not int. New member timespec_seen. Members dates_seen, days_seen,
local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
not int.
(%union.intval): Now long int, not int.
New member timespec.
(tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
(seconds, signed_seconds, unsigned_seconds): New nonterminals.
(spec): Now is a timespec or an item list.
(timespec, items): New nonterminals.
(time, rel, relunit, number, get_date):
Add support for fractional seconds.
(time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
(gmtime, localtime, mktime): Remove decls; not needed with C89.
(to_hour): First arg is now long int, not int.
(to_year): Returns long int, not int.
Don't treat year -70 like 70.
(tm_diff): Returns long int, not int.
(lookup_word): Use bool instead of int when appropriate.
(yylex): Use size_t for count, not int.
Detect overflow when parsing large integer constants.
Add support for fractions.
(get_date): Make pointers 'const' if possible.
Use more-portable code to detect integer overflow.
(main) [TEST]: Adjust to above changes. Test for localtime failure.
Don't use ctime; it's not reliable if the year has >4 digits.
|
|
the usual <time.h> dance.
(get_date): Change signature to support fractional time stamps.
All callers changed.
|
|
|
|
from the current time, rather than `00'.
For a date string like `10:23 +0100',
set the number of seconds to zero. Reported by Marc Haber.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjust signature to use `bool' rather than `int'.
|
|
(set_cloexec_flag): Use bool for booleans. All uses changed.
If F_GETFD returns a negative number (not just -1), report a
failure. Don't use F_SETFD if the flags are already right.
Don't report a failure with F_SETFD unless it returns -1.
|
|
(getloadavg): Use set_cloexec_flag instead of manual fcntl call.
|
|
|
|
|
|
|
|
The set_cloexec_flag implementation imported from GNU C Library
Reference Manual.
|
|
|
|
(parse_user_spec): Fall back on USER.GROUP parsing regardless
of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
compatible extension. Simplify code by removing a boolean int
that was always nonzero if a string was nonnull.
|
|
|
|
|
|
(ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
From coreutils' system.h.
|
|
|
|
|
|
|
|
(STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
|
|
Now a macro referring to exit_failure, instead of a separate
variable. Include "exitfail.h" to get it.
|
|
Pass it EXIT_SUCCESS rather than 0, for clarity.
|
|
|
|
Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
|
|
|
|
|
|
so as not to conflict with a different-sized __mktime_internal
function in GNU libc.
|
|
|
|
|
|
|
|
Include <stdio.h>, so that the caller
doesn't have to include <stdio.h> before us.
(clearerr_unlocked, feof_unlocked, ferror_unlocked,
fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
if not declared, so that we can use getpass.c code from libc without
rewriting it.
(flockfile, ftrylockfile, funlockfile): New macros.
|
|
|
|
(mbsinit): Remove define.
Add libc_hidden_ver (__fnmatch, fnmatch).
|