summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
Commit message (Collapse)AuthorAgeFilesLines
* strptime(3) confused July with June with the fr_FR locale.edwin2010-05-091-0/+8
| | | | | | | | | | | | | When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain <denis@tikuts.com> MFC after: 1 week
* Split the contributed code from libc/stdtime from lib/libc/stdtimeedwin2010-02-269-3620/+4
| | | | to contrib/tzcode/stdtime.
* %U was macroized in mdoc(7), escape.ru2010-02-161-1/+1
|
* Use _pthread_once() rather than _once() for localtime() and gmtime(). Thesejhb2010-01-061-2/+2
| | | | | | | methods are only invoked when __isthreaded is true at which point it is safe to use _pthread_once() directly. MFC after: 1 week
* Use _once() to initialize the pthread key for thread-local storage to holdjhb2009-12-301-14/+14
| | | | | | the results of gmtime() instead of using a pthread mutex directly. MFC after: 1 week
* MFV of tzdata2009t, r200831edwin2009-12-221-1/+1
| | | | | | | | | | zic: - Fix URL / reference to Calendrical Calculations: Third Edition libc/stdtime: - Fix typo in tzfile.5 (no changes in our part) MFC after: 1 week
* Use _once() to initialize the pthread key for thread-local storage to holdjhb2009-12-211-14/+14
| | | | | | the results of localtime() instead of using a pthread mutex directly. MFC after: 1 week
* Replace gmt_is_set and the gmt_mutex lock with a pthread_once_t variable andjhb2009-11-201-12/+13
| | | | | | an init routine run on the first invocation via _once(). MFC after: 1 week
* Improve the way failure of pthread_key_create() gets detected.edwin2009-09-141-2/+9
| | | | | | PR: threads/138603 Submitted by: Mikulas Patocka MFC after: 1 week
* Use (unsigned char) cast for ctype macroache2009-09-021-1/+1
|
* Implement %z for strptime.delphij2009-06-251-0/+28
| | | | | | PR: kern/63064 Submitted by: Stefan `Sec` Zehl <sec 42 org> (with some small changes) MFC after: 1 month
* Remove duplicate if-statement on gmt_is_set in gmtsub().edwin2009-06-231-8/+6
| | | | MFC after: 1 week
* Spacing fixes. No actual change.delphij2009-06-091-2/+2
|
* MFV of tzcode2009h revision r192887edwin2009-05-271-1/+1
| | | | | | - Clarify the license for the tzcode: public domain MFC after: 1 month
* MFV of tzcode2009e:edwin2009-05-238-376/+922
| | | | | | | | | | | | | | | | | | | | | | | | | Upgrade of the tzcode from 2004a to 2009e. Changes are numerous, but include... - New format of the output of zic, which supports both 32 and 64 bit time_t formats. - zdump on 64 bit platforms will actually produce some output instead of doing nothing for a looooooooong time. - linux_base-fX, with X >= at least 8, will work without problems related to the local time again. The original patch, based on the 2008e, has been running for a long time on both my laptop and desktop machine and have been tested by other people. After the installation of this code and the running of zic(8), you need to run tzsetup(8) again to install the new datafile. Approved by: wollman@ for usr.sbin/zic MFC after: 1 month
* Pass a pointer to warn2 so the warn2 == IN_ALL would not be andelphij2008-10-301-1/+1
| | | | always-false condition.
* Clarify that "ante meridiem" and "post meridiem" mean the same thinggrog2008-05-161-2/+2
| | | | | | | | as the more commonly used "a.m." and "p.m.". Tripped over by: Callum Gibson. MFC after: 2 weeks
* Normally, we are often reading local time rather than setting time zone,davidxu2008-04-011-22/+63
| | | | | replace mutex with rwlock, this should eliminate lock contention in most cases.
* Reduce lock contention for simple cases.imp2007-12-191-16/+22
| | | | | | # this really should be done with pthread_once, but I've debugged this code. Reviewed by: arch@
* Some libc symbol map cleanups.deischen2007-05-311-1/+0
| | | | | | | | | | | | | | | | | | | | | net: endhostdnsent is named _endhostdnsent and is private to netdb family of functions. posix1e: acl_size.c has been never compiled in, so there's no "acl_size". rpc: "getnetid" is a static function. stdtime: "gtime" is #ifdef'ed out in the source. some symbols are specific only to some architectures, e.g., ___tls_get_addr is only defined on i386. __htonl, __htons, __ntohl and __ntohs are no longer functions, they are now (internal) defines in <machine/endian.h>. Submitted by: ru
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-1/+3
|
* On FreeBSD/arm, any value > 50 bits will result in a rediculously hugeimp2007-01-191-2/+2
| | | | | | | | | | | number being returned for mktime and timegm calls. Choose 48 because that works well. This does reduce the dynamic range of tm_year from about 2 billion years down to "only" about 9 million years. Please contact me if this restriction poses a problem. Due to the complexity of the code, I admit that I didn't trace down what, exactly, was overflowing with longer bits. This fixes software that we run on the embedded systems we have.
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-092-8/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* add a missing the...jmg2006-12-191-1/+1
| | | | MFC after: 3 days
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+34
| | | | Reviewed by: davidxu
* The arguments for time2posix() and posix2time() are time_t values, notstefanf2005-09-111-3/+3
| | | | pointers.
* Fix all the spelling mistakes I could find in the man pages for wordskeramida2005-07-311-1/+1
| | | | | | | | that have at least 3 characters. MFC after: 1 week Thanks to: Music band ``Chingon'' for keeping me company while searching for these.
* Expand contractions.ru2005-02-131-1/+1
|
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sort sections.ru2005-01-201-5/+5
|
* Scheduled mdoc(7) sweep.ru2005-01-111-8/+10
|
* Add glibc-style strftime(3) padding specifiers, namely, -(no padding),delphij2004-11-042-21/+79
| | | | | | | | | | | | _(use space as padding), and 0(zero padding). These GNU extensions are widely used ones that is worthy for us to have. Discussed with: stefanf, roam, -current Approved by: murray Prodded by: ports/72722, ports/72723 MFC After: 1 month
* struct tm.tm_year is listed as 'years since 1900', and is signed. Onpeter2004-08-241-0/+3
| | | | | | | | | | | | | | | | | | | | | 64 bit systems, years roughly -2^31 through 2^31 can be represented in time_t without any trouble. 32 bit time_t systems only range from roughly 1902 through 2038. As a consequence, none of the date munging code for all the various calendar tweaks before then is present. There are other problems including the fact that there was no 'year zero' and so on. So rather than get excited about trying to figure out when the calendar jumped by two weeks etc, simply disallow negative (ie: prior to 1900) years. This happens to have an important side effect. If you bzero a 'struct tm', it corresponds to 'Jan 0, 1900, 00:00 GMT'. This happens to be representable (after canonification) in 64 bit time_t space. Zero tm structs are generally an error and mktime normally returns -1 for them. Interestingly, it tries to canonify the 'jan 0' to 'dec 31, 1899', ie: year -1. This conveniently trips the negative year test above, which means we can trivially detect the null 'tm' struct. This actually tripped up code at work. :-/ (Don't ask)
* Mechanically kill hard sentence breaks.ru2004-07-023-3/+6
|
* Merge changes from the tzcode2004a import. Wherever possible I tried to bringstefanf2004-06-145-151/+374
| | | | | | us closer to the vendor branch. Requested by: wollman
* Remove a stale reference to %Ef and %EF from a comment.stefanf2004-06-131-2/+2
|
* Change defualt time zone from GMT to UTC. This will not be MFC-ed, andkensmith2004-06-111-1/+6
| | | | was done before 5-STABLE on purpose...
* Remove a couple of casts added for an ancient Sun compiler.stefanf2004-06-081-11/+2
| | | | Approved by: das (mentor)
* Detect range errors when using the %s specifier. Previously, LONG_MAXnectar2003-11-171-3/+10
| | | | | | | was rejected as a range error, while any values less than LONG_MIN were silently substituted with LONG_MIN. Furthermore, on some platforms `time_t' has less range than `long' (e.g. alpha), which may give incorrect results when parsing some strings.
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* Fixes to locale code to properly use indirect pointers in order to preventjkh2003-06-131-1/+1
| | | | | | | memory leaks (fixes bugs earlier purported to be fixed). Submitted by: Ed Moy <emoy@apple.com> Obtained from: Apple Computer, Inc. MFC after: 2 weeks
* Backout my changes in rev. 1.32 and 1.33. There is some code that dependsmtm2003-04-301-4/+2
| | | | | | | on the previous behaviour. This also brings strptime(3) behaviour back in line with the other BSDs. Approved by: markm (mentor)
* Zero out the struct tm supplied by the caller. Otherwise,mtm2003-04-051-0/+1
| | | | | | | | strange things might happen when garbage values in the struct get passed in to localtime_r() and family. Noticed by: marcus Approved by: markm (mentor)(implicit)
* Fill in the rest of the fields in the resulting struct tmmtm2003-03-291-2/+3
| | | | | | | | | | from strptime(3). Previously, they would get filled only for the %s specifier and as a side effect of using the the %Z specifier with a GMT time zone. PR: misc/48993 Approved by: markm (mentor) Silence on: -standards
* Ditch a static global and the mutex that protected it. Achieve themtm2003-03-121-27/+18
| | | | | | | | desired strptime(3) reentrancy by adding an extra argument to _strptime() instead. Approved by: markm (mentor) MFC: 4 weeks
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-164-9/+9
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* strptime(), like strftime(), does not handle multibyte characterstjr2003-01-041-1/+7
| | | | in the format string correctly.
* Mention in the BUGS section that strftime() does not handle multibytetjr2003-01-041-1/+7
| | | | characters in the format string correctly.
* mdoc(7) police: Fixed a few .Fa abuses.ru2002-12-191-2/+4
|
OpenPOWER on IntegriCloud