summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* mdoc(7) police: excessive quotes.ru2002-12-191-1/+1
|
* mdoc(7) police: "The .Fn function".ru2002-12-181-1/+13
|
* Document what happens when the format string contains insufficienttjr2002-12-181-0/+23
| | | | | | | | conversion specifications to completely specify the resulting struct tm. PR: 46331 Submitted by: Christian S.J. Peron MFC after: 2 weeks
* Do not guarantee an overflow of tm_year when doing the binary search inpeter2002-12-051-0/+6
| | | | | | localtime/mktime/tmcomp and friends on ia64. Approved by: re
* Replace rev 1.33 with a real fix. The problem was integer overflowspeter2002-12-021-8/+2
| | | | | | | | | | | | | | | | when trying to store the year in a signed int. The maximum time_t on ia64 is around 292 billion years in the future, but 'int' and struct tm.tm_year can only represent then ext 2.1 billion years or so. This solves the problem of mktime/localtime looping on ia64. Unfortunately, the standards say that tm_year is an 'int', so we are still stuck with a y2147483647 bug. bash2's configure script looks for bugs in mktime() and fails on ia64 because of this. However, mktime() on FreeBSD fails the test normally anyway so this is no big loss. This change does not affect any other platforms besides ia64. Approved by: re
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-3/+1
|
* Add cross-references to the wide character counterparts of these functions.tjr2002-10-151-1/+2
|
* Style: One space between "restrict" qualifier and "*".tjr2002-09-064-12/+12
|
* Fix a nasty bug exposed by mktime() when time_t is significantly biggerpeter2002-09-031-0/+6
| | | | | | | than 32 bits. It was trying to figure out things like the day of week of when time_t is roughly 2^62 etc. Make a better guess for the starting point for the binary search that works on both 32 and 64 bit types. I have been using this for a while now.
* Use one line for each function argument to keep the linerobert2002-08-152-2/+11
| | | | | | | width smaller than 80 columns. Thanks to Ruslan for an explanation of multiple ways to achieve this.
* - Add the 'restrict' qualifier to the function definition ofrobert2002-08-142-7/+5
| | | | | | | | | strftime(3) for IEEE Std 1003.1-2001 compliance and remove excessive usage of the 'const' qualifier that was neither present in the prototype in the publice header, nor in the local prototype just above the function definition. - Replace the K&R function definition with a ANSI-C one. - Update the prototype of strftime(3) in its manual page.
* - Add the C99 'restrict' qualifier using the '__restrict' macro torobert2002-08-142-2/+3
| | | | | function prototype and definition of strptime(3). - Update the manual page.
* Style fixesache2002-08-071-9/+6
|
* Move dillon's time conversion functions to a new header <timeconv.h>.wollman2002-06-171-1/+1
| | | | | | Since they were never documented and have never appeared in a FreeBSD release, no repo-copy of the header is done. This removes namespace pollution from <time.h>.
* Grammar nit: treat "contents" as plural.archie2002-05-311-1/+1
|
* Remove use of __P() (actually P()) from code now that it's no longeralfred2002-05-282-42/+42
| | | | available.
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-13/+0
| | | | Submitted by: keramida
* Fix fd leak. Threads people: does the call above to `access' need to bewollman2002-05-031-1/+3
| | | | | | | underscored as well? PR: 37717 Submitted by: fred@clift.org (slightly modified by me)
* Fix the style of the SCM ID's.obrien2002-03-222-3/+5
| | | | I believe have made all of libc .h's as consistent as possible.
* Fix the style of the SCM ID's.obrien2002-03-227-25/+18
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove 'register' keyword.obrien2002-03-212-75/+75
|
OpenPOWER on IntegriCloud