Commit Graph
21713 Commits
Author SHA1 Message Date
Paul Eggert 555bbf598d Import file time stamp resolution improvements from gnulib. 2005-09-16 07:55:12 +00:00
Jim Meyering 60da98e144 . 2005-09-16 07:53:31 +00:00
Paul Eggert 158d982669 Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
2005-09-16 07:50:33 +00:00
Paul Eggert 3ecd35f56f Include stat-time.h, and use its functions instead of the obsolete
TIMESPEC_NS macro.
(get_mtime): Renamed from age_of.  All uses changed.
2005-09-16 07:42:56 +00:00
Paul Eggert b95a4ed1ce Remove; no longer needed. 2005-09-16 07:41:10 +00:00
Paul Eggert 5926f89242 (gl_TIMESPEC): Require AC_C_INLINE.
Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
2005-09-16 07:40:48 +00:00
Paul Eggert 0bc67e2851 (gl_PREREQ): Require gl_STAT_TIME. 2005-09-16 07:40:19 +00:00
Paul Eggert b946f4c96b (gl_CHECK_ALL_TYPES): Do not require
AC_STRUCT_ST_MTIM_NSEC; it's obsolete.
2005-09-16 07:40:02 +00:00
Paul Eggert e9f5a9b719 Include stat-time.h.
(SYSCALL_RESOLUTION): Depend on whether various struct stat
members exist, not on the obsolescent ST_MTIM_NSEC.
(utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
2005-09-16 07:39:41 +00:00
Paul Eggert b5a377a22b (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
(MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
in a different way.
(timespec_cmp): New function.
2005-09-16 07:39:18 +00:00
Jim Meyering 27d4959a08 *** empty log message *** 2005-09-16 07:39:08 +00:00
Paul Eggert 0877688dc8 New file. 2005-09-16 07:38:17 +00:00
Paul Eggert 24e27d10f9 New file. 2005-09-16 07:36:48 +00:00
Paul Eggert 2bc8e10316 Add stat-time.h. 2005-09-16 07:36:35 +00:00
Jim Meyering 3da8b9a6d8 *** empty log message *** 2005-09-16 07:35:32 +00:00
Jim Meyering 1e7fb2186b *** empty log message *** 2005-09-16 07:33:41 +00:00
Jim Meyering d514933c67 Include fprintftime.h.
Don't include strftime.h or xanstrftime.h -- no longer needed.
(show_date): Use fprintftime rather than xanstrftime.
2005-09-16 07:33:36 +00:00
Jim Meyering 4fa029bd7d (libcoreutils_a_SOURCES): Add fprintftime.c and fprintftime.h. 2005-09-16 07:32:13 +00:00
Jim Meyering 5d8614cf2f *** empty log message *** 2005-09-16 07:31:34 +00:00
Jim Meyering 0277ce3913 [FPRINTFTIME] (fprintftime): Provide a new interface:
size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
		    int utc, int nanoseconds);
Background:
date should not have to allocate a megabyte of virtual memory to
handle a format argument like +%1048575T.  When implemented with
strftime, it must allocate such a buffer, use strftime to fill it
in, print it, then free it.

With fprintftime, it simply prints everything and exits.
With no need for memory allocation, that's one fewer way to fail.
2005-09-16 07:31:29 +00:00
Jim Meyering ab526003e4 *** empty log message *** 2005-09-16 07:01:00 +00:00
Jim Meyering f7711ee699 *** empty log message *** 2005-09-16 06:54:26 +00:00
Jim Meyering 8a11d99e7d (subfmt-up1): Test the combination of the
to-upper-case modifier (^) and a conversion specifier that
expands to a string containing lower case characters.
2005-09-16 06:54:19 +00:00
Paul Eggert d2fa6df35e (usage, main): uname -a no longer generates the -p and -i outputs if
they are unknown.
2005-09-15 19:57:04 +00:00
Paul Eggert a2365f2d84 uname -a no longer generates the -p and -i outputs if they are unknown. 2005-09-15 19:56:35 +00:00
Paul Eggert 0144e1ae89 Rewrite previous strftime change slightly. 2005-09-15 18:48:13 +00:00
Paul Eggert a08b44ea30 (my_strftime): Rewrite the previous change slightly,
to make it a bit faster and (I hope) clearer.
2005-09-15 18:47:56 +00:00
Jim Meyering 5185512286 *** empty log message *** 2005-09-14 16:10:41 +00:00
Jim Meyering cc4800dd1b (my_strftime): Be sure to use L_('x') for literals. 2005-09-14 16:10:38 +00:00
Jim Meyering 9d55b89d59 *** empty log message *** 2005-09-14 10:02:57 +00:00
Jim Meyering ad98202690 (my_strftime): Parse the colons of %:::z *after* the
optional field width, not before, so we accept %9:z, not %:9z.
2005-09-14 10:02:54 +00:00
Jim Meyering 4da7283547 *** empty log message *** 2005-09-14 09:54:27 +00:00
Jim Meyering f6198493b8 (tz-5w, tz-5wf): Test new %:z format with a field width. 2005-09-14 09:54:15 +00:00
Paul Eggert e386e5642d Fix typos noted by Eric Blake. 2005-09-14 06:59:17 +00:00
Paul Eggert 20b858a1e6 Add tz-1 through tz-5. 2005-09-14 06:58:44 +00:00
Paul Eggert 33b49b7cac (my_strftime): Fix typo in octal number introduced in last change. 2005-09-14 06:58:08 +00:00
Paul Eggert a487dcee70 du and pr also have +:z etc. 2005-09-14 06:57:35 +00:00
Paul Eggert 5b0ca7f5c1 Merge md5 from libc, and clean up some sha1 glitches. 2005-09-13 23:32:50 +00:00
Paul Eggert bf0cc9f753 (SWAP): Renamed from NOTSWAP, to avoid a horrible misnaming.
All uses changed.  Remove the old SWAP.
Remove obvious comment about BLOCKSIZE.
(rol): New macro, moved here from md5.h.
(sha1_process_block): Remove an incoherent FIXME comment.
2005-09-13 23:32:35 +00:00
Paul Eggert 9a5d4089bc (struct sha1_ctx): Mark buffer as being aligned. 2005-09-13 23:32:15 +00:00
Paul Eggert 14d1fdaec1 (CYCLIC): New macro. All uses of rol changed to use CYCLIC.
Redo comment to minimize changes from libc.
2005-09-13 23:32:01 +00:00
Paul Eggert a19c71988b (__GNUC_PREREQ, __THROW, __attribute__): New macros.
(__md5_buffer): Renamed from md5_buffer.  Add a macro undoing this
if _LIBC is not defined.  Add __THROW.
(__md5_finish_ctx, __md5_init_ctx, __md5_process_block):
(__md5_process_bytes, __md5_read_ctx, __md5_stream): Likewise.
(struct md5_ctx): Mark buffer as being aligned.
(rol): Remove; all uses changed to CYCLIC.
2005-09-13 23:31:37 +00:00
Paul Eggert 9e64eb8369 Fix wording in previous patch. 2005-09-13 23:01:59 +00:00
Paul Eggert f4e071662d (uname invocation): Mention that Linux outputs "unknown" for -i and -p. 2005-09-13 22:57:25 +00:00
Paul Eggert 36081fa635 * src/dd.c: Detect some very unlikely buffer overflows.
(INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP): New macros.
(MAX_BLOCKSIZE): Now accepts an arg.  All uses changed.
(page_size): New var.
(scanargs, skip, main): Use more-straightforward way to detect overflow.
(dd_copy): Use page_size rather than invoking getpagesize.
Use INPUT_BLOCK_SLOP, OUTPUT_BLOCK_SLOP.
(main): Set page_size.
Avoid a call to stat in the usual case where ftruncate succeeds.
2005-09-13 22:43:11 +00:00
Paul Eggert 360b98042f (docolon): Add IF_LINT check to avoid GCC warning. 2005-09-13 22:30:56 +00:00
Paul Eggert 24cae62c93 * configure.ac: Don't invoke AC_CONFIGURE_HOST directly. 2005-09-13 22:20:25 +00:00
Paul Eggert b673eeb49c Add date --rfc-3339. 2005-09-13 22:09:25 +00:00
Paul Eggert 7cc7ac0574 Add tests for --rfc-3339. 2005-09-13 22:09:03 +00:00
Paul Eggert 2c29ba03ac (TIME_SPEC_DATE): No longer needs to be nonzero, so
remove the "=1".
(TIME_SOEC_HOURS, TIME_SPEC_MINUTES): Must be at end now, so put
them there.
(time_spec_string, time_spec): Hours and minutes must be at
start now, so put them there.
(rfc_2822_format): Now a string constant, not a boolean.  All uses
changed.
(iso_8601_format, rfc_format): Remove.
(RFC_3339_OPTION): New constant.
(long_options): Add --rfc-3339.
(usage): Add --rfc-3339.  Don't mention --iso-8601.
Mention %:z, %::z, %:::z.
(main): Simplify calculation of 'format'; it was getting too hairy
to follow.  Add --rfc-3339.
(show_date): Assume format arg is not NULL, which is the case
now.  The default code is moved to 'main'.  This simplifies things
and allows the default to be calculated just once.
2005-09-13 22:08:41 +00:00