90cb5ffb85a9bc2e725824b3ca8db932d02c45db |
07-Aug-2014 |
Elliott Hughes <enh@google.com> |
Fix the tzdata update tools. The recent libcore ZoneInfo changes mean that we can no longer compile libcore's ZoneInfo against the RI. Luckily, the field in our data file that we needed ZoneInfo for isn't actually used. This change removes our dependence on libcore. I've left the field in to avoid a file format change. We can remove the field if/when we next have a real need to bump the file format. Bug: 16168653 Change-Id: Iedad2252c2b49f4d8bb2c7d9078b39b622444ca7
ocaltime.c
|
c1a6a7256026431a9ae49ef2a6139ea99410819b |
26-Jul-2014 |
Elliott Hughes <enh@google.com> |
Remove localtime_tz and strftime_tz. This also brings our copy of strftime.c much closer to upstream, though we still have several GNU extensions and hacks to deal with Android32's broken time_t. Bug: 15765976 (cherry picked from commit 39d903aea901cd29a4eef3a82c2dbda59b5bc292) Change-Id: Ie278d3e976b7adc77bad5ce795dd4899cfbf3648
ocaltime.c
trftime.c
|
708c11205443cda14cfb21138d441106aa77a5f9 |
25-Jul-2014 |
Elliott Hughes <enh@google.com> |
Start hiding "private/bionic_time.h". Bug: 15765976 (cherry picked from commit 905e6d58aaf515bf237e62078f8a321920fe4c6b) Change-Id: Ic7435308e8b521886f42ac7bf59531924921ea67
ocaltime.c
trftime.c
|
d10db8261949e4d84b65f5c369153d0ca86ab22c |
19-Jun-2014 |
Elliott Hughes <enh@google.com> |
Build tzcode with hidden visibility. Bug: 11156955 Change-Id: Ib98d837b56cbbdfd01687cb3054fe3103eec0da9
ocaltime.c
trftime.c
|
2cb752664bbde379c20931fa330563d775b60033 |
19-Jun-2014 |
Elliott Hughes <enh@google.com> |
Fix arm64 localtime.c build. I'm sick of having so many different compilers. Change-Id: I9088c38df2504e2b827d0ce5ba0fa551ae48f8f9
ocaltime.c
|
5f564540a953a670925e058dabc521f68ffb997c |
19-Jun-2014 |
Elliott Hughes <enh@google.com> |
Build tzcode with -Werror. Parts of this are just getting us in sync with upstream, but the 'const' stuff is our own mess. We should kill the *_tz functions and lose this difference from upstream. Change-Id: I17d26534ed3f54667143d78147a8c53be56d7b33
ocaltime.c
rivate.h
trftime.c
|
906eb9999b39edc0d09cd19ae94523e92ed5ad2e |
19-Jun-2014 |
Elliott Hughes <enh@google.com> |
Update localtime.c. This brings us closer to upstream's ToT localtime.c; our main interest being their alternative fix for the stack usage we addressed in commit 8a8b0c9bfcd80c67154ed2aca1e60d815c822acb. Bug: 14468519 Change-Id: Ic28600115afda7f3158d91255edf422678bac082
ocaltime.c
|
5204a9e8ca1ca7304db9998dcf3fc5a2d6087662 |
12-Jun-2014 |
Elliott Hughes <enh@google.com> |
Fix most of the tzcode warnings. There's one left, but that's not fixed upstream yet. Change-Id: Iba920cb7b156357c7f5e8220eb55ff1637ff48a1
ocaltime.c
|
8a8b0c9bfcd80c67154ed2aca1e60d815c822acb |
15-May-2014 |
Christopher Ferris <cferris@google.com> |
Do not keep struct state on the stack. This structure is huge (~18000 bytes on arm64) and can blow out the stack very easily. Modify the code to allocate these structures instead of leaving them on the stack. Bug: 14468519 Change-Id: I774f71235d896d32a14ab1af06f95ca9ef819f52
ocaltime.c
|
1728b2396591853345507a063ed6075dfd251706 |
14-May-2014 |
Elliott Hughes <enh@google.com> |
Switch to g_ for globals. That's what the Google style guide recommends, and we're starting to get a mix. Change-Id: Ib0c53a890bb5deed5c679e887541a715faea91fc
ocaltime.c
|
9a5a3e8e74e2c6d7850ab29711189acf0f7378a2 |
06-May-2014 |
Elliott Hughes <enh@google.com> |
Fix <math.h> to quieten most of our warnings. I've reported the wcsftime bug upstream, but we really just want to use -D to ensure the buggy code isn't built. (I've also brought our strftime a bit closer to upstream now we have the right define.) I don't think upstream is likely to fix all their sign-compare and uninitialized warnings, so let's just silence them. As for libm, again upstream isn't likely to fix all their warnings, and silencing those made the ones that were our fault stand out. I've fixed our <math.h> to fix the warnings caused by our lack of definitions for the non-imprecise long-double functions. I checked the C99 standard, and all these functions are there. Change-Id: Iee8e1182c1db375058fb2c451eceb212bab47a37
trftime.c
|
52defb7c702306d4e81c7089cbadd7a6da1d7b6b |
06-May-2014 |
Elliott Hughes <enh@google.com> |
Remove the non-standard time64 stuff for LP64. We need a workaround in strftime as long as we still need to support 64-bit times on LP32. Change-Id: I8ffb616f6312d4063fb9ea3c36b52653e8f4c5f8
trftime.c
|
329103d3e2f42d3e35a060c3e0d326d6476eb2ef |
26-Apr-2014 |
Elliott Hughes <enh@google.com> |
Don't use so much stack in tzcode. Bug: 14313703 Bug: https://code.google.com/p/android/issues/detail?id=61130 Change-Id: Id9b240fce20d4a6f2660792070e02b2b5f287655
ocaltime.c
|
d51db86aafb988aea04355f2b6a6c925d67e5976 |
28-Feb-2014 |
Calin Juravle <calin@google.com> |
Merge "Fix locatime.c indentation after sync"
|
4ab29a3e4a797cff05a3a1a6fea3db5a800ac5ba |
28-Feb-2014 |
Calin Juravle <calin@google.com> |
Merge "Update tzcode to 2013i"
|
d892892e8e185b9b948dec6a576f6202b186dc9d |
28-Feb-2014 |
Calin Juravle <calin@google.com> |
Fix locatime.c indentation after sync Bug: 12246757 Change-Id: I8186e75f4899161af48cbf66e8f907dac0a326a2
ocaltime.c
|
627d37cd1f7bb6680f611dbe5f28b74a086567a7 |
28-Feb-2014 |
Calin Juravle <calin@google.com> |
Update tzcode to 2013i Bug: 12246757 Change-Id: I3d5d2318155b1f54ef80afd58b1e5ca9a6d7018e
ocaltime.c
rivate.h
zfile.h
|
fd3a9fb0c3b555d2fc93a6436da840ab4ea2fac1 |
28-Feb-2014 |
Elliott Hughes <enh@google.com> |
Vastly reduce the number of read(2)s done in tzload. This costs us about 1000 fewer syscalls, which makes "adb shell strace date" a lot more readable (which is the reason I've been meaning to fix this for a long time now), but also actually saves a measurable amount of time. Longer-term we should try to keep the tzdata mmap(2)ed in like libcore does. Change-Id: I1dd9c81968a13d3a6a55ba17f8a7d5c1f38cd103
ocaltime.c
|
3073f90b17b1d2899b036e2c45ba5324f8c34298 |
28-Feb-2014 |
Elliott Hughes <enh@google.com> |
Fix a leak on error in tzload. Change-Id: Ib5d9aaa7a618e478ce8e5e82f967cf535bb1a5a3
ocaltime.c
|
eb847bc8666842a3cfc9c06e8458ad1abebebaf0 |
10-Oct-2013 |
Elliott Hughes <enh@google.com> |
Fix x86_64 build, clean up intermediate libraries. The x86_64 build was failing because clone.S had a call to __thread_entry which was being added to a different intermediate .a on the way to making libc.so, and the linker couldn't guarantee statically that such a relocation would be possible. ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC This patch addresses that by ensuring that the caller and callee end up in the same intermediate .a. While I'm here, I've tried to clean up some of the mess that led to this situation too. In particular, this removes libc/private/ from the default include path (except for the DNS code), and splits out the DNS code into its own library (since it's a weird special case of upstream NetBSD code that's diverged so heavily it's unlikely ever to get back in sync). There's more cleanup of the DNS situation possible, but this is definitely a step in the right direction, and it's more than enough to get x86_64 building cleanly. Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
trftime.c
|
51aeff70218e18a7213fc6b7b9a4112be488bf58 |
09-Oct-2013 |
Elliott Hughes <enh@google.com> |
Fix 32-bit build. libc/tzcode/localtime.c: In function 'differ_by_repeat': libc/tzcode/localtime.c:338:2: error: comparison is always false due to limited range of data type [-Werror=type-limits] Change-Id: Ic84be6391a66e9d50ed98f41d865387c77a60ffa
ocaltime.c
|
e0d0b15de6eaee6c3975e13ad2b0e1238d0fdd8f |
27-Sep-2013 |
Elliott Hughes <enh@google.com> |
Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications). localtime.c and strftime.c are still quite different from upstream because of our extensions, but the other files continue to be identical, and the two exceptions should be otherwise identical. From the tzcode2013e release notes: Changes affecting Godthab time stamps after 2037 if version mismatch Allow POSIX-like TZ strings where the transition time's hour can range from -167 through 167, instead of the POSIX-required 0 through 24. E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the new Fiji rules. This is a more-compact way to represent far-future time stamps for America/Godthab, America/Santiago, Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem, Pacific/Easter, and Pacific/Fiji. Other zones are unaffected by this change. (Derived from a suggestion by Arthur David Olson.) Allow POSIX-like TZ strings where daylight saving time is in effect all year. E.g., TZ='WART4WARST,J1/0,J365/25' for Western Argentina Summer Time all year. This supports a more-compact way to represent the 2013d data for America/Argentina/San_Luis. Because of the change for San Luis noted above this change does not affect the current data. (Thanks to Andrew Main (Zefram) for suggestions that improved this change.) Where these two TZ changes take effect, there is a minor extension to the tz file format in that it allows new values for the embedded TZ-format string, and the tz file format version number has therefore been increased from 2 to 3 as a precaution. Version-2-based client code should continue to work as before for all time stamps before 2038. Existing version-2-based client code (tzcode, GNU/Linux, Solaris) has been tested on version-3-format files, and typically works in practice even for time stamps after 2037; the only known exception is America/Godthab. Changes affecting API Support for floating-point time_t has been removed. It was always dicey, and POSIX no longer requires it. (Thanks to Eric Blake for suggesting to the POSIX committee to remove it, and thanks to Alan Barrett, Clive D.W. Feather, Andy Heninger, Arthur David Olson, and Alois Treindl, for reporting bugs and elucidating some of the corners of the old floating-point implementation.) The signatures of 'offtime', 'timeoff', and 'gtime' have been changed back to the old practice of using 'long' to represent UT offsets. This had been inadvertently and mistakenly changed to 'int_fast32_t'. (Thanks to Christos Zoulos.) The code avoids undefined behavior on integer overflow in some more places, including gmtime, localtime, mktime and zdump. Changes affecting code internals Minor changes pacify GCC 4.7.3 and GCC 4.8.1. Changes affecting documentation and commentary Documentation and commentary is more careful to distinguish UT in general from UTC in particular. (Thanks to Steve Allen.) From the tzcode2013f release notes: Changes affecting API The types of the global variables 'timezone' and 'altzone' (if present) have been changed back to 'long'. This is required for 'timezone' by POSIX, and for 'altzone' by common practice, e.g., Solaris 11. These variables were originally 'long' in the tz code, but were mistakenly changed to 'time_t' in 1987; nobody reported the incompatibility until now. The difference matters on x32, where 'long' is 32 bits and 'time_t' is 64. (Thanks to Elliott Hughes.) Change-Id: I14937c42a391ddb865e4d89f0783961bcc6baa21
ifftime.c
ocaltime.c
rivate.h
trftime.c
zfile.h
|
cf178bf7d0300edfeec31528a744aa38a7177c0e |
19-Sep-2013 |
Elliott Hughes <enh@google.com> |
Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata. This lets us run binaries linked against bionic on an x86 host. Change-Id: Icd60cf99a90d747c77304c05b4f764e4d26af985
ocaltime.c
|
713fe6463e6ff8cb9689aa8ead88c885d25d03aa |
22-Aug-2013 |
Elliott Hughes <enh@google.com> |
Apply upstream commit 943a6621866e9d6e654f5cfe1494378c1fb8957a. Author: Paul Eggert <eggert@cs.ucla.edu> Date: Thu Aug 22 12:47:51 2013 -0700 * localtime.c: Fix another integer overflow bug in mktime. (time2sub): Avoid undefined behavior on time_t overflow. Reported by Elliott Hughes in <http://mm.icann.org/pipermail/tz/2013-August/019580.html>. Bug: 10310929 Change-Id: I3bf26f1f91371552e0a3828457d27e22af55acb2
ocaltime.c
rivate.h
|
ce4783ce76a4ef888466e02e4c6f3a0a3910bce8 |
13-Jul-2013 |
Elliott Hughes <enh@google.com> |
Upgrade to tzcode2013d. Well, kinda... localtime.c still contains a bunch of Android-specific hacks, as does strftime.c. But the other files are now exactly the same as upstream. This catches up with several years of bug fixes, and fixes most of the compiler warnings that were in this code. (Just two remain.) Bug: 1744909 Change-Id: I2ddfecb6fd408c847397c17afb0fff859e27feef
sctime.c
ifftime.c
ocaltime.c
rivate.h
trftime.c
zfile.h
|
e7aaad8b832bdff3b88aa62b5c7597e5fd3db520 |
25-Apr-2013 |
Elliott Hughes <enh@google.com> |
Improve diagnostics in the face of bad tzdata. Bug: 8373554 Change-Id: If8df5e956105e01cce95221ff0a7fa9d2b474db3
ocaltime.c
|
e0175ca7e440a87e9d03f249fc8f210063df7908 |
14-Mar-2013 |
Elliott Hughes <enh@google.com> |
Don't search off the end of the index for bad Olson ids. In the old code, the index was a file to itself, so it made sense to read until you hit the end of the file. In the new code, the index is followed by hundreds of KiB of data, so we need to just search the index. Bug: 8368791 Change-Id: Icf5f8b5516cf3a93679fa849c9f6cd1cb100e0f1
ocaltime.c
|
4a05bef4c06dac05f1c9aa8cfc5b7e7dd6642385 |
12-Mar-2013 |
Elliott Hughes <enh@google.com> |
Cache the most-recently used timezone for mktime_tz and localtime_tz. Normally, the C library implicitly caches your timezone by virtue of the fact that the prehistoric API assumes a single timezone for the entire process. The unfortunate mktime_tz and localtime_tz extensions work around this, but represent timezones as strings to their callers, so code that makes heavy use of these needs a cache to be able to perform acceptably until it can hopefully one day be rewritten to use java.util.Calendar or icu4c. Bug: 8270865 Change-Id: I92e3964e86dc33ceac925f819cc5e26ff4203f50
ocaltime.c
|
b989c9ceda71f6f75112645b5c45af341275cbab |
16-Jan-2013 |
Elliott Hughes <enh@google.com> |
Revert "DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic."" This reverts commit f4b34b6c3942be273ad7298a40be0d312b183aab.
ocaltime.c
|
85819efe8f771759d12ab86f0bd47ede621dbb7d |
26-Oct-2012 |
Elliott Hughes <enh@google.com> |
am f2b3ac95: Merge "Fix recovery: don\'t assert if there\'s no tzdata." * commit 'f2b3ac9502e08ef53d4eedd7e93ea9a00d185055': Fix recovery: don't assert if there's no tzdata.
|
49271d89dabae182f5614c0d5fb232dac3c16067 |
25-Oct-2012 |
Elliott Hughes <enh@google.com> |
Fix recovery: don't assert if there's no tzdata. Change-Id: I4d808b57c63ec1ccc024da7fd6a65691e0d455c5
ocaltime.c
|
008744cedaa7e3be533bbedb51dd986c6dfea987 |
23-Oct-2012 |
Elliott Hughes <enh@google.com> |
am df92635a: Merge "Support zone.tab in bionic, and remove the file format version." * commit 'df92635a57e8093d9cbffc38bbf513f3361ee91e': Support zone.tab in bionic, and remove the file format version.
|
2393535f0d7df55dae3b4fbf5dbcfa7f87192762 |
22-Oct-2012 |
Elliott Hughes <enh@google.com> |
Support zone.tab in bionic, and remove the file format version. Bug: 7012465 Change-Id: I6335c91ebadc609fae85bad94db972be7574b6e4
ocaltime.c
|
417834b17ee00a6b1cd4e816f632c3596f3f51c3 |
22-Oct-2012 |
Elliott Hughes <enh@google.com> |
am eb370aa3: Merge "Make bionic look in /data/misc for tzdata updates." * commit 'eb370aa31dd549ad7a7a2044dedab1140a7aeda9': Make bionic look in /data/misc for tzdata updates.
|
1c295720343009a7393706f2285a4d026e97eebf |
20-Oct-2012 |
Elliott Hughes <enh@google.com> |
Make bionic look in /data/misc for tzdata updates. Bug: 7012465 Change-Id: I4d1018f686f2409600fdb6630732cae33efe8f02
ocaltime.c
|
4d71adbc0d12e5153f537f84cce8d9686762e5b9 |
18-Oct-2012 |
Elliott Hughes <enh@google.com> |
am 10225071: Merge "Fixes x86 build." * commit '102250719f8aff443741e54ba5633c7722544620': Fixes x86 build.
|
8b95404d001b285220ae7cbef661b0446a02858b |
18-Oct-2012 |
Elliott Hughes <enh@google.com> |
Fixes x86 build. Change-Id: I0e576784b2224668d58ebea03986d534ee0e43b4
ocaltime.c
|
1b315363c22fdf53d77fc83ec0bbada32e73ccc7 |
18-Oct-2012 |
Elliott Hughes <enh@google.com> |
am 5ae762a3: Merge "Pull bionic\'s time zone data from the new single \'tzdata\' file." * commit '5ae762a393168932602eb7269a7d30a53de1c83c': Pull bionic's time zone data from the new single 'tzdata' file.
|
d23af232688bf6980e4503cda6b12ed739292931 |
18-Oct-2012 |
Elliott Hughes <enh@google.com> |
Pull bionic's time zone data from the new single 'tzdata' file. Bug: 7012465 Change-Id: Iec71e448bf7a40af30ca89150b3c336e67a44a43
ocaltime.c
|
f4b34b6c3942be273ad7298a40be0d312b183aab |
24-Sep-2012 |
Elliott Hughes <enh@google.com> |
DO NOT MERGE Revert "Add the libcutils localtime_tz and mktime_t extensions to bionic." This reverts commit 3a936a4980046a7eeb8d53a3296058d8f3a1f770. We don't want this in jb-mr1.
ocaltime.c
|
3a936a4980046a7eeb8d53a3296058d8f3a1f770 |
11-Sep-2012 |
Elliott Hughes <enh@google.com> |
Add the libcutils localtime_tz and mktime_t extensions to bionic. Bug: 7012465 Change-Id: Ib66f061e29199ba134545111dc79f9b50c8f4a21
ocaltime.c
|
208898ee776117f42815c2fcb15903b2781bf0aa |
13-Jan-2012 |
David 'Digit' Turner <digit@google.com> |
libc: remove private declarations from <time.h> and <resolv.h> This patch is used to remove private C library declarations from the public headers (that are exported to the NDK). It should *only* be submitted after all other patches modifying the users of said private functions have been submitted to the tree, to avoid breakages. Change-Id: I0a5e3014f8e3ac9ed8df86a5cdae506337c23252
trftime.c
|
cd9f1f0b2726fbaac75b47231eb80a91841231f9 |
23-Jun-2011 |
David Turner <digit@android.com> |
am ac56f5ca: Merge "strftime: Use snprintf() instead of sprintf()" * commit 'ac56f5ca2f4c54ddbd37b033f9465d89542c2cbe': strftime: Use snprintf() instead of sprintf()
|
e6cff939e603e445c2576958c3777d7b7f5d84fa |
16-Jun-2011 |
Jim Huang <jim.huang@linaro.org> |
strftime: Use snprintf() instead of sprintf() Change-Id: I112ac012894eddc96e5f3e77cb87bb300596e3ce Signed-off-by: Jim Huang <jserv@0xlab.org>
trftime.c
|
b138e4f90ffec34b4cc903cffbe18f9ea2d903d4 |
09-Jan-2011 |
Glenn Kasten <gkasten@google.com> |
Bug 3330205 Thread safe strptime implementation Change-Id: I03e72b0253a7a2e015455ab81dbf155ed1e574d2
trptime.c
|
6481b91520150e9664a3c4abc5d2aebdce422f93 |
06-Dec-2010 |
David 'Digit' Turner <digit@google.com> |
<time.h>: Add timegm(), timelocal() and others. Add timegm(), timelocal(), time2posix() and posix2time() to the C library. Change-Id: I34d5771ed83dd994870a5ca58a511d01898b1ffb
ocaltime.c
|
50ace4fec5e8cb5afcbc656a4556fa528adfd760 |
17-Jun-2010 |
David 'Digit' Turner <digit@google.com> |
Remove compiler warnings when building Bionic. Also add missing declarations to misc. functions. Fix clearerr() implementation (previous was broken). Handle feature test macros like _POSIX_C_SOURCE properly. Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
ocaltime.c
|
2093d350be21ff086f9e145404877941b9a42c5c |
10-Sep-2009 |
David 'Digit' Turner <digit@google.com> |
Fix an infinite loop in time2sub. The problem is that time_t is signed, and the original code relied on the fact that (X + c < X) in case of overflow for c >= 0. Unfortunately, this condition is only guaranteed by the standard for unsigned arithmetic, and the gcc 4.4.0 optimizer did completely remove the corresponding test from the code. This resulted in a missing boundary check, and an infinite loop. The problem is solved by testing explicitely for TIME_T_MIN and TIME_T_MAX in the loop that uses this. Also fix increment_overflow and long_increment_overflow which were buggy for exactly the same reasons. Note: a similar fix is needed for system/core/libcutils
ocaltime.c
|
d5f72afd4984744a7198c8ec80341a6d2602d02f |
04-Aug-2009 |
Eric Fischer <enf@google.com> |
Fix strftime to use localized month names. It was using the default locale (capital L) instead of the current locale (lowercase l). Bug 2030864
trftime.c
|
a48fa7f4deb6ba703e1da55143771476d4e668ce |
15-May-2009 |
Eric Fischer <enf@google.com> |
Add standalone_months field to libc strftime(). Replicate my change 722a5c0462f38827f4097065bfc3826b9e0e9fb4 into bionic in an attempt to fix the build.
trftime.c
|
edbe7fc97bab7ff0684053d1be564330689bf3ad |
19-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import //branches/master/...@140412
sctime.c
ifftime.c
ocaltime.c
rivate.h
trftime.c
trptime.c
zfile.h
|
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
sctime.c
ifftime.c
ocaltime.c
rivate.h
trftime.c
trptime.c
zfile.h
|
1767f908af327fa388b1c66883760ad851267013 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
sctime.c
ifftime.c
ocaltime.c
rivate.h
trftime.c
trptime.c
zfile.h
|
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 |
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
sctime.c
ifftime.c
ocaltime.c
rivate.h
trftime.c
trptime.c
zfile.h
|