summaryrefslogtreecommitdiff
path: root/lib/libc/stdtime/localtime.c
Commit message (Collapse)AuthorAgeFilesLines
* Temporary cosmetic change to prevent gcc-2.95.2 from doing anMartin Cracauer2000-03-081-1/+1
| | | | | | | | | | | | | | | | optimization that generates code our current as doesn't understand. The result is bad code that damages dynamic symbol locations at runtime. Ouch. See PR bin/16862 and discussion in -current. This change will be backed out when gcc and gas are back in sync. PR: Fixes bin/16862, but not the underlying problem. Submitted by: bde Approved by: jdk Notes: svn path=/head/; revision=57822
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-3/+5
| | | | | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read(). Notes: svn path=/head/; revision=55837
* Merge from vendor branch: timezone file structure changes and doco.Garrett Wollman1999-01-211-1/+1
| | | | | | | | | Fix localtime.c to deal with new magic number field. Obtained from: ftp://elsie.nci.nih.gov/pub/tzcode1999a.tar.gz Notes: svn path=/head/; revision=42989
* Make ctime_r, asctime_r, gmtime_r, and localtime_r available in libc.Dmitrij Tejblum1999-01-041-6/+4
| | | | Notes: svn path=/head/; revision=42293
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-09-161-2/+7
| | | | | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... Notes: svn path=/head/; revision=39327
* Add a #ifdef _THREAD_SAFE around ctime_rPoul-Henning Kamp1998-04-201-0/+2
| | | | Notes: svn path=/head/; revision=35331
* ctime_r and asctime_r are not implemented.Poul-Henning Kamp1998-04-191-0/+9
| | | | | | | | | | | prototypes in time.h do not match POSIX. PR: 6345 Reviewed by: phk Submitted by: Dmitry Khrustalev <dima@xyzzy.machaon.ru> Notes: svn path=/head/; revision=35285
* Change in name of the static initializer define.John Birrell1998-04-041-4/+4
| | | | Notes: svn path=/head/; revision=35026
* Submitted by: Jeremy Allison (jallison@whistle.com)Julian Elischer1998-02-181-3/+5
| | | | | | | | | fix a slight confusion about which draft of threads we are supporting. this allows something as big and ugly as samba to be compiled with libc_r and still work! our user-level pthreads seems amazingly robust! Notes: svn path=/head/; revision=33527
* Back out 1.14 until I reproduce trouble reportsWarner Losh1997-03-251-4/+2
| | | | Notes: svn path=/head/; revision=24253
* Don't open the tz file if we're running setuid or setgid to prevent infomrationWarner Losh1997-03-241-2/+4
| | | | | | | | | leakage. Submitted by: Julian Assange Notes: svn path=/head/; revision=24195
* Submitted by: John BirrellJulian Elischer1997-02-051-5/+3
| | | | | | | uthreads update from the author. Notes: svn path=/head/; revision=22315
* When attempting to load a `lastditch' timezone (e.g., because the loadGarrett Wollman1997-01-131-7/+8
| | | | | | | | | | | | of the user's timezone failed), don't bail if the specified timezone doesn't have an offset; in this case it isn't going to. (Perhaps it would be better to change the caller to always supply one, but this is quick and clean and fixes the bug in the easiest possible way.) Should be in 2.2. Fixes (properly) PR#1740. Notes: svn path=/head/; revision=21659
* Parameters for localtime_r() and gmtime_r() definitions changed.Jeffrey Hsu1996-11-111-8/+8
| | | | | | | | Parameters for pthread_getspecific() call changed. pthread_keycreate() renamed to pthread_key_create(). Notes: svn path=/head/; revision=19636
* Require that a timezone specified via the TZ envariable be a regularGarrett Wollman1996-10-091-1/+7
| | | | | | | | file (and not a directory or a device which might also be readable). Closes PR#1740. Notes: svn path=/head/; revision=18834
* Submitted by: John Birrell <cimaxp1!jb@werple.net.au>Julian Elischer1996-08-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are the diffs for libc_r to get it one step closer to P1003.1c These make most of the thread/mutex/condvar structures opaque to the user. There are three functions which have been renamed with _np suffixes because they are extensions to P1003.1c (I did them for JAVA, which needs to suspend/resume threads and also start threads suspended). I've created a new header (pthread_np.h) for the non-POSIX stuff. The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented doesn't work. I think its best to delete it. I don't think libc_r needs tags anyway, 'cause most of the source is in libc which does have tags. also: Here's the first batch of man pages for the thread functions. The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was inherited from /usr/src/lib/libc/Makefile that should only be done with libc. also: I should have sent this diff with the pthread(3) man page. It allows people to type make -DWANT_LIBC_R world to get libc_r built with the rest of the world. I put this in the pthread(3) man page. The default is still not to build libc_r. also: The diff attached adds a pthread(3) man page to /usr/src/share/man/man3. The idea is that without libc_r installed, this man page will give people enough info to know that they have to build libc_r. Notes: svn path=/head/; revision=17706
* Merge the recently-imported tzcode96h distribution (libc portion). TheGarrett Wollman1996-07-181-56/+59
| | | | | | | | | part that does zic(8)/zdump(8) is still yet to be imported (but the old zic and zdump will work just fine with these header files and the data format has not changed). Notes: svn path=/head/; revision=17209
* Removed false copyrights...Marc G. Fournier1996-05-271-34/+0
| | | | Notes: svn path=/head/; revision=15927
* Added in appropriate Berkeley copyright and RCS Id: stringMarc G. Fournier1996-05-271-0/+36
| | | | | | | Closes PR#doc/536 Notes: svn path=/head/; revision=15923
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-221-1/+129
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* The European Commission went out and invented a new sort of summer-timeGarrett Wollman1995-08-051-129/+211
| | | | | | | | | changeover, so we have to extend the format of timezone files (in a backward- compatible way, of course). This probably means that libc needs a minor version number bump before 2.2 is released (or maybe not). Notes: svn path=/head/; revision=9936
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8870
* Port to FreeBSD. Not ready for inclusion in libc just yet, but hereGarrett Wollman1994-09-131-1/+1
| | | | | | | so we can compile zic. Notes: svn path=/head/; revision=2713
* One more try, and if it doesn't work this time I'm giving up.Garrett Wollman1994-09-131-1/+1
| | | | | | | (Check in original localtime.c.) Notes: svn path=/vendor/tzcode/dist/; revision=2710
* The rest of tzcode94g from Arthur David Olson.Garrett Wollman1994-09-131-0/+1530
Obtained From: Arthur David Olson, ftp://elsie.nci.nih.gov/pub/tzcode94g.tar.gz Notes: svn path=/vendor/tzcode/dist/; revision=2708