Commit Graph

212 Commits

Author SHA1 Message Date
ginsbach 48dc241150 Crank date for previous. 2009-05-24 02:30:17 +00:00
ginsbach 98fa92ea04 Add %s to strptime(3) to make symmetric with strftime(3). 2009-05-24 02:25:43 +00:00
jakllsch 6a0e3cf139 Update MLINKS to match the flist. 2009-05-15 02:23:42 +00:00
ginsbach c8da0e5fef Add the getdate(3) function and getdate_err value, conforming to IEEE
Std 1003.1 (``POSIX.1'') and the Open Group Base Specifications X/Open
System Interfaces extension (``XSI'').
2009-05-14 02:37:35 +00:00
wiz 15dfd8155b Drop trailing whitespace. 2009-05-01 21:34:45 +00:00
ginsbach 8f7e60d3bc Extend %z to support all RFC-2822 timezone formats. 2009-05-01 20:15:05 +00:00
lukem b129d71a05 Fix -Wcast-qual issue 2009-04-23 01:39:47 +00:00
joerg 868fe66e65 Add missing quotes. 2009-04-11 16:29:09 +00:00
joerg 71c479831e Fix markup. 2009-04-11 16:13:49 +00:00
joerg a7d7c3857f Remove redundant .IP. Remove use of .Xo/Xc to workaround ancient macro
argument limit.
2009-03-10 23:25:32 +00:00
joerg 997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
drochner fb535ac77e Make mktime(3) work with 64-bit time_t.
The problem is that the tm_year field of "struct tm" is just an "int"
(per POSIX), and thus time_t values >  2^31*60*60*24*365 cannot
be converted. This made mktime(3) fail even if no such large time values
were passed in by user code because the algorithm does a binary search
over the time_t range which fails if a probe value cannot be converted.
To fix this, limit the time_t range to be scanned to 55 bits (which
is a bit on the safe side, but still good until y570855533).
This is more a stopgap fix, the overflow should be checked for
at other places as well (eg localtime(3)), and there are some more
limitations in timezone parsing code.
2009-01-18 10:57:15 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
christos 9f012c8aed don't forget to use neg. 2008-11-04 21:08:33 +00:00
christos 2844d6eadc we don't need * 2008-11-04 20:17:56 +00:00
christos b4be570207 Our new syslogd seems to want to depend on %z which is a gnu extension.
- While here, add all the rest of gnu extensions: %g, %G, %u.
- Fix long standing bug where %Z would not work because "private.h" was
  not included. (Hi Brian!)
2008-11-04 18:37:28 +00:00
christos 40d362f8e0 malloc(3) and getenv(3) affect errno; make sure we save and restore it
Reported by Andy Shevchenko
2008-08-27 08:49:03 +00:00
dholland d617ea4585 Fix handling of legacy global variable timezone outputs. PR misc/22221. 2008-05-25 06:18:06 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ginsbach b876d7a7df Add %F the ISO 8601 date format which is equivalent to %Y-%m-%d. This
format character is supported for reasons of symmetry with strftime(3).
FreeBSD and GNU versions of strptime(3) both support %F.
2008-04-25 20:51:10 +00:00
ginsbach 52de4d6274 Change date for previous change (addition of %Z). 2008-04-25 14:37:00 +00:00
ginsbach 43e9d46aab Add support for %Z ala FreeBSD and some other strptime(3) implementations.
Reviewed by christos.
2008-04-24 21:34:48 +00:00
ginsbach f5f9bb5739 Make sure that %r honors the LC_TIME t_fmt_ampm. This restores
functionality lost at revision 1.12!
2007-07-31 20:19:16 +00:00
kleink b290748021 Restore i18n wrapping removed in previous. 2006-12-04 17:24:40 +00:00
christos 1d83cc5b6c nuke perror. 2006-11-03 20:21:16 +00:00
perry 35a6eb4807 Make the declarations of wday_name and mon_name less eccentric. I
suppose they were legal before, but lint was unhappy about them. It
was probably unhappy for the wrong reasons, but I think it certainly
wasn't something one would want anyway. Declaring a string of length
three to have storage of length three without room for the nul is
asking for trouble even if it does work in context, and there was no
reason not to state how many days there are in a week or months in a
year -- they aren't onerous and aren't going to change.

NOTE: If this code isn't being synced with the central TZCODE stuff,
it probably should be KNFed etc. It is full of K&R declarations,
register, lots of eccentricities, etc.
2006-10-15 15:32:42 +00:00
reed 5fe28dc7e5 Fix typo or mispelling. 2006-06-17 04:58:14 +00:00
christos 1324bf1ab1 Remove a variable that became set-and-not-used after the dead code removal. 2006-03-22 14:01:30 +00:00
christos e5d3e31596 Coverity CID 578: remove dead code 2006-03-22 00:14:18 +00:00
christos ee43724903 Coverity CID 580: fix 'c' handling to match 'x' ('c' used the wrong variable) 2006-03-22 00:11:28 +00:00
christos 03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
christos 5b84b3983f compat core reorg. 2005-09-13 01:44:08 +00:00
christos 86741d79ab - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
2005-07-30 15:21:20 +00:00
christos ed7ae36357 Fix linted comments and use __UNCONST. 2005-07-16 19:48:09 +00:00
christos aeec445c81 Use CPPFLAGS for -D flags otherwise lint does not get it. 2005-07-16 19:36:25 +00:00
lukem 88c3eadbfa Add missing __RCSID() 2005-06-12 05:21:25 +00:00
dsl 8476342d19 Some more optimisations - I must stop looking at this file!
Update copyright to include 2005
(I have a compleetly different version, but it is only a few 100 bytes
smaller due to a 560 byte data area.)
2005-03-05 14:07:15 +00:00
dsl 3fa8666b4f A going-over with the optimiser, save over 500 bytes.
I think this is enough to get rescue_tiny to fit again.
While there fix some bugs:
- %y failed to subtract 1900 from tm_year
- %p (am/pm) only worked at the end of the string
- %E% was treated at %% (ie match a % character)
regression test being added....
2005-03-04 21:41:42 +00:00
christos 13c63648cb PR/28324: Takayoshi Kochi: localtime_r(3) returns GMT
Add missing tzset_unlocked(); as suggested.
2004-11-16 04:15:28 +00:00
kleink 8bd97363d6 Merge tzcode2004a. 2004-05-27 20:39:49 +00:00
kleink 0e5c1261b9 Update for tzcode2004a. 2004-05-27 20:33:31 +00:00
kleink 15a5f3876a Don't use tm_gmtoff for %z: a strictly conforming ISO C application won't
initialize it.  However, instead of using what is suggested in this code
path, attempt get it right for DST as well.  Addresses PR standards/21722
from Richard Earnshaw.
2004-05-12 23:03:11 +00:00
kleink 4c5383c22f Don't use tm_zone for %Z: a strictly conforming ISO C application won't
initialize it.  Addresses PR standards/21722 from Richard Earnshaw.
2004-05-11 09:32:02 +00:00
kleink f52f2d3dfe Add a manual page for the standard-inspired offtime(3) and friends;
requested by Thomas Klausner.
2004-05-10 02:02:00 +00:00
kleink 84c861c7a5 Add documentation for %v. Noted by Havard Eidnes in PR bin/25180. 2004-04-14 21:59:39 +00:00
kleink 78a2369a15 Make casing in previous consistent. 2004-03-19 19:30:23 +00:00
kleink ddfc3e5143 %% doesn't write anything; a literal % is matched. Noted by Hubert Feyrer. 2004-03-19 19:28:08 +00:00
kleink a2c17b5c1e One merge-o missed in previous. 2003-12-20 00:21:00 +00:00
kleink 84a2a5ca6e Merge tzcode2003e. 2003-12-20 00:12:05 +00:00