Commit Graph
22888 Commits
Author SHA1 Message Date
Jim Meyering 88d7328ed3 (gl_CLOCK_TIME): Require AC_GNU_SOURCE. 2004-03-17 10:12:39 +00:00
Jim Meyering 6073a82874 *** empty log message *** 2004-03-17 10:11:12 +00:00
Jim Meyering 590b3ed337 *** empty log message *** 2004-03-17 10:09:24 +00:00
Jim Meyering bf3bf1462e Include "getdate.h" first, as we can now
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.
2004-03-17 10:09:16 +00:00
Jim Meyering aa11f812a2 Include stdbool.h, and timespec.h instead of
the usual <time.h> dance.
(get_date): Change signature to support fractional time stamps.
All callers changed.
2004-03-17 10:09:02 +00:00
Jim Meyering 1110307672 (enum Time_spec): New enum TIME_SPEC_NS.
(time_spec_string, time_spec, show_date): Support it.
(usage): Remove description of -ITIMESPEC, as it's obsolete and
confusing.  Mention --iso-8601=ns.
(batch_convert): getline returns ssize_t, not int.
2004-03-17 10:07:19 +00:00
Jim Meyering 553e0746b0 (newtime): Now an array of two timespecs, one
for access and one for modification.
(ref_stats): Remove.
(get_reldate): Use get_date's parameter profile.
(touch, main): Adjust to above changes.
(main): Work even if tm_year == INT_MAX (so long as long int is wider).
Use gettime instead of gettimeofday, for new get_date signature.
2004-03-17 10:06:57 +00:00
Jim Meyering 1188f599d9 *** empty log message *** 2004-03-15 15:16:37 +00:00
Jim Meyering e0501d9d25 . 2004-03-15 13:06:09 +00:00
Jim Meyering be0d8823c4 *** empty log message *** 2004-03-15 13:03:19 +00:00
Jim Meyering 17257fea63 (date invocation): Add missing `C' to %[...] range
in the `Date directives:: ...' menu entry.  From Bob Proulx.
2004-03-15 13:03:13 +00:00
Jim Meyering 580518862c *** empty log message *** 2004-03-15 12:03:46 +00:00
Jim Meyering 88cc709aac (alpha beta major): `Make' the emit_upload_commands
target before updating $(prev_version_file).
2004-03-15 12:03:43 +00:00
Jim Meyering 00072cac19 *** empty log message *** 2004-03-15 12:02:25 +00:00
Jim Meyering a613e4f93a Add FIXME comment:
The following don't have `invocation' nodes: [, pinky, shasum, uptime
2004-03-15 12:02:19 +00:00
Jim Meyering 2666b09b19 *** empty log message *** 2004-03-15 09:46:47 +00:00
Jim Meyering ecb2429437 *** empty log message *** 2004-03-15 09:39:02 +00:00
Jim Meyering 4b7f712702 New file, to test for just-fixed bug in date.
See today's change in lib/getdate.y.
2004-03-15 09:11:20 +00:00
Jim Meyering ec55878bfe (TESTS): Add date-sec. 2004-03-15 09:02:50 +00:00
Jim Meyering f18a2980a7 *** empty log message *** 2004-03-15 08:37:07 +00:00
Jim Meyering fae8b8505c `date --date="21:04 +0100" +%S' would print the seconds value
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.
2004-03-15 08:37:03 +00:00
Jim Meyering b9ccb4b8e8 *** empty log message *** 2004-03-15 08:35:28 +00:00
Jim Meyering 878f73298b *** empty log message *** 2004-03-14 16:09:32 +00:00
Jim Meyering eb3eb5a85f (print_changelog_deltas): Use `.sig' suffix for
signature files, not `.asc'.  Reported by angico@yahoo.com.
2004-03-14 16:09:28 +00:00
Jim Meyering d5c36aff6d bump version to 5.3.0 2004-03-13 08:10:53 +00:00
Jim Meyering 76f2b41952 *** empty log message *** 2004-03-13 08:10:13 +00:00
Jim Meyering ca0f9a0a29 (do_copy): Tweak wording in a diagnostic.
Suggestion from Karl Berry.
Include "quoatearg.h".
(do_copy): Use quotearg_colon (not quote) for diagnostics
that begin with `"%s:'.
2004-03-13 08:09:58 +00:00
Jim Meyering effb220c14 *** empty log message *** 2004-03-13 07:58:55 +00:00
Jim Meyering d86b014ebb (usage): Specify that nl uses _basic_ regular expressions. 2004-03-13 07:58:45 +00:00
Jim Meyering eddf022d34 . 2004-03-12 19:19:50 +00:00
Jim Meyering 808f8a1f56 *** empty log message *** COREUTILS-5_2_1 2004-03-12 19:04:31 +00:00
Jim Meyering eebc36755a *** empty log message *** 2004-03-12 19:03:46 +00:00
Jim Meyering 4763a4baa8 Exit 77 (not 1) if we can't set up for the test.
This was triggered on a Linux-2.2.19 system using a file system
NFS-mounted from some sort of Sun.
2004-03-12 19:03:07 +00:00
Jim Meyering 2ea4bf6e9c *** empty log message *** 2004-03-12 16:00:59 +00:00
Jim Meyering 4c4dae631f *** empty log message *** 2004-03-12 16:00:41 +00:00
Jim Meyering 0d37ee121a *** empty log message *** 2004-03-12 15:59:20 +00:00
Jim Meyering 2e09cb8e92 *** empty log message *** 2004-03-12 14:07:14 +00:00
Jim Meyering bff76faefd Sync with autoconf. 2004-03-12 14:06:44 +00:00
Jim Meyering 2b41266890 . 2004-03-12 13:59:39 +00:00
Jim Meyering e0bc86781f . 2004-03-12 13:55:52 +00:00
Jim Meyering 67d9979529 *** empty log message *** 2004-03-12 13:55:28 +00:00
Jim Meyering cdf1dc368e *** empty log message *** 2004-03-12 12:04:57 +00:00
Jim Meyering 8915472521 (TESTS): Add part-hardlink. 2004-03-12 12:04:15 +00:00
Jim Meyering fc3ce57024 # Before coreutils-5.2.1, this test would fail. 2004-03-12 12:04:02 +00:00
Jim Meyering 97ce436ba5 *** empty log message *** 2004-03-12 11:53:57 +00:00
Jim Meyering ec65003050 (src_to_dest_lookup): Add prototype. 2004-03-12 11:53:46 +00:00
Jim Meyering 83f4f1abd9 (src_to_dest_lookup): New function. 2004-03-12 11:53:29 +00:00
Jim Meyering bcea8e96ea Sometimes, when source and destination partition are different,
mv mistakenly fails to preserve a hard link.  Reported by IIDA Yosiaki.

When moving a set of N hard-linked files between
partitions, via two or more command line arguments where the
command line argument containing the Nth link contains no other
link to that same file, mv would mistakenly copy the file, rather
than hard-linking it to the other(s).  That happens because when the
final link is processed, its link count has been reduced to 1 since
the other links have been `copied' to the destination partition
and the source links have been removed.
(copy_internal): When in move mode, use the source dev/inode
pair to look up destination name even when st_nlink == 1.
2004-03-12 11:53:18 +00:00
Jim Meyering 04975d2592 . 2004-03-11 18:58:29 +00:00
Jim Meyering 98ea4dad08 . 2004-03-11 09:25:53 +00:00