Commit Graph

2405 Commits

Author SHA1 Message Date
Jim Meyering
8f5baf053e *** empty log message *** 2002-08-07 22:03:24 +00:00
Jim Meyering
ea1d6448fb (posixtime): Return bool instead of time_t, so
that we can return (time_t) -1 successfully.
2002-08-07 22:02:52 +00:00
Jim Meyering
c66dd95e8e Fix some minor time-related bugs with POSIX time arguments.
Some valid time stamps were being rejected (notably -1, and
time stamps before 1900 on 64-bit hosts).  And some invalid
time stamps were being accepted, e.g. September 31.

* lib/posixtm.h (posixtime): Return bool instead of time_t, so
that we can return (time_t) -1 successfully.
* lib/posixtm.c: Likewise.
[HAVE_STDBOOL_H]: Include <stdbool.h>.
(bool, false, true) [!HAVE_STDBOOL_H]: New type.
(t): Remove static var.
(year, posix_time_parse): Now takes struct tm * arg to modify, instead
of static var.  All uses changed.
(year): Do not reject years before 1900; they can occur with
64-bit time_t.
(posix_time_parse): Do not check for out-of-range components;
that is now the caller's responsibility, since our checks were
only approximations.
(posixtime): Use mktime to check for out-of-range components,
since it knows them exactly.
If mktime returns (time_t) -1, check whether an error actually occurred
by invoking localtime on -1.
(main) [TEST_POSIXTIME]: Check for input data errors, and report
posixtime failures better.
Improve the test data (in comments only).
2002-08-07 22:02:23 +00:00
Jim Meyering
03089e39cb . 2002-07-28 21:45:04 +00:00
Jim Meyering
e1b511adc6 . 2002-07-27 21:39:33 +00:00
Jim Meyering
598ed91d62 If we have both utmpx.h and utmp.h, and there exists
the utmp.ut_exit member, but not the utmpx.ut_exit member, then
undefine HAVE_UTMPX_H.  For AIX 4.3.3.  Doing all this in cpp is
a big kludge; someday we'll put the brains in an autoconf macro.
(UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
2002-07-27 21:35:39 +00:00
Jim Meyering
edc5d1e500 . 2002-07-20 14:06:47 +00:00
Jim Meyering
a5c943a9b4 . 2002-07-20 11:16:45 +00:00
Jim Meyering
2b6249f98c . 2002-07-20 07:12:58 +00:00
Jim Meyering
a848d8b02b Adjust to work with new autoconf macros, AC_FUNC_MALLOC
and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
2002-07-20 07:07:48 +00:00
Jim Meyering
ca66dd1648 . 2002-07-20 06:31:28 +00:00
Jim Meyering
2200bd0564 Upgrade to gettext-0.11.3. 2002-07-20 06:31:12 +00:00
Jim Meyering
cdcc745b6b *** empty log message *** 2002-07-15 13:00:46 +00:00
Jim Meyering
33b79abe90 #undef MNT_IGNORE before defining it, to avoid warning on FreeBSD. 2002-07-15 13:00:40 +00:00
Jim Meyering
bac77ea3d9 Include <string.h>. 2002-07-15 12:59:47 +00:00
Jim Meyering
703f6c0969 *** empty log message *** 2002-07-09 08:40:23 +00:00
Jim Meyering
00489c764a (ME_DUMMY): Don't count entries of type `auto' as dummy ones.
At least on GNU/Linux systems, `auto' means something else.
From Michael Stone.
2002-07-09 08:40:15 +00:00
Jim Meyering
bec7e2c432 *** empty log message *** 2002-07-01 14:23:28 +00:00
Jim Meyering
214d3ee739 Include sys/time.h.
From Volker Borchert.
2002-07-01 14:19:20 +00:00
Jim Meyering
3ba3282be5 *** empty log message *** 2002-06-26 06:18:04 +00:00
Jim Meyering
0d051ba221 (WIDE_CHAR_SUPPORT): New macro. Use it uniformly instead of
(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
reported by Vin Shelton.
2002-06-26 06:17:35 +00:00
Jim Meyering
5da70319a7 from libc 2002-06-26 06:13:24 +00:00
Jim Meyering
67e6f0f233 *** empty log message *** 2002-06-22 18:03:44 +00:00
Jim Meyering
8965df82d1 (ISASCII, ISPRINT): Undefine, to avoid warning about
redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
2002-06-22 18:03:40 +00:00
Jim Meyering
453257fa71 *** empty log message *** 2002-06-22 16:20:19 +00:00
Jim Meyering
9e7746f4c0 (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
Do not assume SA_SIGINFO behavior.
Bug reported by Jim Meyering on NetBSD 1.5.2.
2002-06-22 16:20:15 +00:00
Jim Meyering
7721a2148a *** empty log message *** 2002-06-22 10:11:25 +00:00
Jim Meyering
64a1747ac5 Update from diffutils-2.8.2. 2002-06-22 10:11:14 +00:00
Jim Meyering
2e53304940 . 2002-06-22 10:09:47 +00:00
Jim Meyering
a715ff5d80 (libfetish_a_SOURCES): Add exitfail.c and exitfail.h. 2002-06-22 09:26:57 +00:00
Jim Meyering
e3dbc8d753 New files, from diffutils-2.8.2. 2002-06-22 09:25:36 +00:00
Jim Meyering
d8cfcf1a19 *** empty log message *** 2002-06-22 09:23:32 +00:00
Jim Meyering
7fc37adff9 (libfetish_a_SOURCES): Add c-stack.c, too. 2002-06-22 09:23:17 +00:00
Jim Meyering
53ba358c4b New file, from diffutils-2.8.2. 2002-06-22 09:03:14 +00:00
Jim Meyering
6e8cd75ccf *** empty log message *** 2002-06-22 08:55:43 +00:00
Jim Meyering
ff6434052f (libfetish_a_SOURCES): Add fnmatch_.h in place of fnmatch.h.
(EXTRA_DIST): Add fnmatch_loop.c.
2002-06-22 08:47:57 +00:00
Jim Meyering
c230b93ee1 . 2002-06-22 08:34:59 +00:00
Jim Meyering
343d7d4065 *** empty log message *** 2002-06-19 11:13:29 +00:00
Jim Meyering
f35cc0e4a0 Report an error if neither S_ISREG nor
S_IFREG is defined, instead of using a test specific to glibc
2.2.  This should be safe, since POSIX requires S_ISREG and
Unix Version 7 had S_IFREG.  We don't need to check for
<sys/types.h> since we don't use any symbols that it defines.
2002-06-19 11:12:59 +00:00
Jim Meyering
58e6f3d386 *** empty log message *** 2002-06-15 08:47:12 +00:00
Jim Meyering
39237a241f (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
so that each temporary file name is unique and valid in the first
8 characters, for operation under DOS.
2002-06-15 08:46:59 +00:00
Jim Meyering
8ba0cddae4 (FILE_TYPE_H): Guard entire contents with #ifndef.
For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
have been included before this file.
2002-06-15 08:43:45 +00:00
Jim Meyering
3351c8aada . 2002-06-15 08:04:23 +00:00
Jim Meyering
06b1f74288 *** empty log message *** 2002-06-15 07:37:29 +00:00
Jim Meyering
dbb90872ee (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK is defined. 2002-06-15 07:37:21 +00:00
Jim Meyering
cb8155615a (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK is defined. 2002-06-15 07:36:57 +00:00
Jim Meyering
02d8535f9e *** empty log message *** 2002-06-14 07:53:01 +00:00
Jim Meyering
dfe88896b5 Use the version from diffutils-2.8.2. 2002-06-14 07:52:32 +00:00
Jim Meyering
faa8bced59 *** empty log message *** 2002-05-27 16:43:00 +00:00
Jim Meyering
d2be1268c4 Fix a problem seen only on nonconforming systems whereby ls.c's
use of localtime, and then of gettimeofday would cause trouble:
the localtime call used to initialize rpl_gettimeofday's save
mechanism would clobber ls's current local time information so
that in any long listing the first file would always be listed
with date 1970-01-01.  Analysis by Volker Borchert.

(localtime): Undefine.
(rpl_localtime): New function.
2002-05-27 16:42:55 +00:00