summaryrefslogtreecommitdiffstats
path: root/libc/misc/time/time.c
Commit message (Collapse)AuthorAgeFilesLines
* time.c, time.h: remove unused hidden strftime/strptimePeter S. Mazinger2011-03-101-6/+6
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* time.c, wchar.h: remove unused hidden wcsftimePeter S. Mazinger2011-03-101-3/+3
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* initialize 2 variables to get rid of compiler warningPeter S. Mazinger2011-03-031-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* Fix ctime() standard compliance bugDavid A Ramos2010-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | fixes issue2209: ctime() was updated in 0.9.31 to call localtime_r() instead of localtime() to avoid using a static buffer. Unfortunately, this change replaces the static buffer (which is zeroed out on initialization) with an uninitialized local buffer. In the common case, this has no effect. However, with a sufficiently large time_t value, the value returned differs from that returned by asctime(localtime(t)), and thus violates the ANSI/ISO standard. An example input is (on a 64-bit machine): time_t t = 0x7ffffffffff6c600; Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* time.c: fix unreadable code style: assignments within if(), misplaced commentsDenys Vlasenko2010-04-291-35/+48
| | | | | | No logic changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* optional /etc/localtime supportDenys Vlasenko2010-04-291-3/+41
| | | | | | | | This patch teaches uclibc to use /etc/localtime. This is possible since recent TZif2 file format contains TZ-like ASCII string at the end. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ctime: do not use static struct tm bufferDenys Vlasenko2010-01-211-3/+17
| | | | | | | | | | | text data bss dec hex filename - 19 0 0 19 13 libc/misc/time/ctime.o + 25 0 0 25 19 libc/misc/time/ctime.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> (cherry picked from commit 957e238614326198452b53498ae98e546fce7366) Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* remove a few more empty #if/#endif pairsDenys Vlasenko2009-09-191-2/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* time.c: style cleanup. no code changes (verified with objdump)Denys Vlasenko2009-09-081-89/+37
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* simpler and shorter read_TZ_file() helperDenys Vlasenko2009-09-081-10/+23
| | | | | | | | text data bss dec hex filename - 1109 8 76 1193 4a9 libc/misc/time/tzset.o + 1095 8 76 1179 49b libc/misc/time/tzset.o Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Deal with a few data fields which may be made constant.Denis Vlasenko2008-12-201-19/+24
| | | | | | | | | text data bss dec hex filename - 1237 9 28 1274 4fa libc/inet/rpc/getrpcent.os + 1246 0 28 1274 4fa libc/inet/rpc/getrpcent.os - 773 24 0 797 31d libc/misc/time/_time_localtime_tzi.os + 772 16 0 788 314 libc/misc/time/_time_localtime_tzi.os
* - revert 24148:24151Bernhard Reutner-Fischer2008-11-261-10/+7
|
* - hide some time related relocsBernhard Reutner-Fischer2008-11-251-7/+10
|
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-201-20/+20
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-4/+4
|
* libc_hidden_proto removal, a few more functionsDenis Vlasenko2008-11-181-2/+2
|
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-181-1/+1
|
* - cast both times to double for consistencyBernhard Reutner-Fischer2008-09-251-1/+1
|
* - remove a couple of duplicate includesBernhard Reutner-Fischer2008-08-271-1/+0
|
* This fixes a problem with the move of libc_hidden_proto to string.h.Bernd Schmidt2008-06-041-1/+0
| | | | | | | | | | | | | The obsolete functions bcopy, index, etc. are not supposed to be used within uClibc itself. Hence, there is no libc_hidden_def for them, but the previous patch did not just move libc_hidden_protos, it also added new ones for the legacy functions. As a result, programs which use these functions can no longer link with uClibc. This fixes it by removing the unnecessary libc_hidden_protos. I've also removed all inclusions of <strings.h> from uClibc source files: since we define _GNU_SOURCE, it is sufficient to include <string.h>. We then do not need to duplicate the libc_hidden_proto block in <strings.h>.
* suppress a few "might be used uninitialized" warnings. No code growth.Denis Vlasenko2008-06-011-2/+2
|
* - Avoid warning about undefined preprocessor token. No obj-code changes.Bernhard Reutner-Fischer2008-05-301-1/+1
|
* - fix warning about static not being at the beginning of a declBernhard Reutner-Fischer2008-05-211-1/+1
|
* Introduce and use small[u]int type. Changes in size:Denis Vlasenko2008-05-201-3/+3
| | | | | | | | | | | | | | - 79 0 28 107 6b libc/inet/rpc/create_xid.o + 76 0 25 101 65 libc/inet/rpc/create_xid.o - 126 0 4 130 82 libc/misc/assert/__assert.o + 123 0 1 124 7c libc/misc/assert/__assert.o - 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o + 645 4 21 670 29e libc/misc/internals/__uClibc_main.o - 230 0 4 234 ea libc/stdlib/abort.o + 216 0 1 217 d9 libc/stdlib/abort.o - 129 0 4 133 85 libc/termios/tcgetsid.o + 126 0 1 127 7f libc/termios/tcgetsid.o
* - silence warningBernhard Reutner-Fischer2008-05-201-1/+1
|
* Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko2008-05-191-9/+9
| | | | | | | | | in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
* Functions should be either exported in public .h filesDenis Vlasenko2008-04-121-2/+1
| | | | | | | | | | | | | and marked with libc_hidden_proto/def(), or not be exported in .h files and be hidden (or even static if possible). We have five functions which violate this. Fixing: netdb.h: export ruserpass() rpc/rpc.h: export xdr_accepted_reply() and xdr_rejected_reply() make inet_ntoa_r static function (it is not exported in any .h file) make _time_tzset hidden function (it is not exported in any .h file)
* Major cleanup of internal mutex locking. Be more consistant in how we doEric Andersen2006-12-071-50/+49
| | | | | | | things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
* I failed to check the patch adding support for the new (stupid) US 2007Eric Andersen2006-11-071-1/+3
| | | | daylight savings time rules when xlocale was enabled. Fix compile error.
* In bug 622, JohnAta writes:Eric Andersen2006-11-021-4/+38
| | | | | | | | In 2005, Congress passed a law so that in 2007, the second week of March starts DST. Previously, it was the first week of April. The uclibc time library routines apparently have not been updated to reflect this new processing. Using the current version of uclibc, on March 11, 2007 the reported time will be incorrect.
* select needs sys/select.h, str[n]casecmp/ffs needs strings.h, if BSD is not ↵Peter S. Mazinger2006-03-231-2/+18
| | | | defined, gettimeofday has other prototype and tm_gmtoff/tm_zone do not exist
* Correct build if UCLIBC_HAS_CTYPE_TABLES is not definedPeter S. Mazinger2006-03-221-1/+1
|
* Mark some functions as GNU, provide missing hidden memmem, remove ↵Peter S. Mazinger2006-03-221-1/+2
| | | | _ISOC99/XOPEN_SOURCE
* Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, ↵Peter S. Mazinger2006-03-101-6/+0
| | | | most of global data relocations are back
* return NULL if year is too bigMike Frysinger2006-03-011-0/+12
|
* global data uses libc_hidden_data_def, convert all -I hope- and add some newPeter S. Mazinger2006-02-011-3/+3
|
* Some warnings go awayPeter S. Mazinger2006-01-271-4/+4
|
* Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA ↵Peter S. Mazinger2006-01-221-1/+0
| | | | is a useless attempt
* s/weak_alias/strong_alias/, only what I knew as needed are kept. We will now ↵Peter S. Mazinger2006-01-161-1/+1
| | | | see what libpthread will do ...
* Last relocs jump and global data, (even locales) that I could remove are ↵Peter S. Mazinger2006-01-161-2/+11
| | | | gone from libc. The remaining are left as exercise for others ;-)
* make tzset jump reloc free if UCLIBC_HAS_CTYPE_CTABLES is not enabledPeter S. Mazinger2006-01-151-0/+4
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-23/+15
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-110/+125
| | | | missing headers, other jump relocs removed
* hide internal __time_tm/_time_tzinfo symbolsMike Frysinger2006-01-081-2/+2
|
* Remove all trailing ; after *_alias and change 2 to use weak_alias instead ↵Peter S. Mazinger2005-12-161-1/+1
| | | | of __attribute__ ...
* Do __nl_langinfo, partly sync header w/ glibc, add missing nl_langinfo_l, ↵Peter S. Mazinger2005-12-091-6/+10
| | | | change users to hidden version
* Implement hidden poll, switch user to hidden *printf/*scanf/pollPeter S. Mazinger2005-12-091-1/+1
|
* Use internal versionsPeter S. Mazinger2005-12-081-2/+10
|
* Hide morePeter S. Mazinger2005-12-071-5/+7
|
* Hide strftime/strptime/wcsftime and make use of internalsPeter S. Mazinger2005-12-061-10/+23
|