Commit graph

1563 commits

Author SHA1 Message Date
Elliott Hughes
4612763b44 Update generate-NOTICE.py to know about tzdata.
Also regenerate the NOTICE files. One had slipped behind.

Bug: 7012465
Change-Id: Ice2e909b521472eb1acd53d8151038bebe19984a
2012-10-19 14:55:19 -07:00
Elliott Hughes
8af5412efc Track the tzdata2012g update in the new file format.
Change-Id: Id18aeb1122df769d83c4be06fbf37681231e79f0
2012-10-19 14:28:56 -07:00
Elliott Hughes
c2c2a48845 Upgrade to tzdata2012g.
This release reflects the following changes recently circulated on the tz
mailing list:

        Samoa fall 2012 and later.  (Thanks to Nicholas Pereira
        and Robert Elz.)

        Palestine fall 2012.  (Thanks to Steffen Thorsen.)

This release does not reflect the possible changes discussed yesterday
for Tocantins and Bahia.

(cherry-pick of f0e402dbd257ab495eab514b347db4b3d6844826.)

Change-Id: I8202292b11accedb811194a821dacf837a1bbd6e
2012-10-19 13:43:10 -07:00
Elliott Hughes
328a484588 Do all the zoneinfo.* file generation in Java.
Bug: 7012465
Change-Id: Ia5d5ad75db94d680a6b34ccc26eb68d5bd2bfc29
2012-10-19 13:03:52 -07:00
Elliott Hughes
eb06129c5c Switch bionic over to using libcore's copy of libcore.util.ZoneInfo.
Bug: 7012465
Change-Id: I1225494c5d77a20fd48be1e904d8695ef95860e3
2012-10-19 12:05:24 -07:00
Elliott Hughes
8b95404d00 Fixes x86 build.
Change-Id: I0e576784b2224668d58ebea03986d534ee0e43b4
2012-10-18 13:42:59 -07:00
Elliott Hughes
914d8d4cff Make bionic's dependency on the tzdata explicit.
Also stop building the obsolete three files, now bionic and libcore
both use the new single file.

Bug: 7012465
Change-Id: I1b9b49af7382c57b6cb8820c2275e6d4044b2bb6
2012-10-18 12:23:34 -07:00
Elliott Hughes
5ae762a393 Merge "Pull bionic's time zone data from the new single 'tzdata' file." 2012-10-18 10:48:11 -07:00
Elliott Hughes
9ffaabcc49 Merge "Remove obsolete CHANGES.TXT and ISSUES.TXT." 2012-10-18 10:09:47 -07:00
Elliott Hughes
d23af23268 Pull bionic's time zone data from the new single 'tzdata' file.
Bug: 7012465
Change-Id: Iec71e448bf7a40af30ca89150b3c336e67a44a43
2012-10-17 16:30:47 -07:00
Elliott Hughes
fb018a2dde Put all the tzdata in one file.
I'll come back and remove the separate files (and change the regular 'generate'
script) when the separate files are obsolete, but in the interim period, it's
easier to have both old and new files available.

Bug: 7012465
Change-Id: I36e2fd49c08ff79ded6eca1c5bc4c08837cc490a
2012-10-17 14:24:50 -07:00
Elliott Hughes
ead7819f51 Remove obsolete CHANGES.TXT and ISSUES.TXT.
These haven't been updated in a long time, and "git log" is the source of truth.

Change-Id: I99036f6111e53425f32df510b7b717deb77513a5
2012-10-17 11:33:59 -07:00
Elliott Hughes
5419b94747 Make dlerror(3) thread-safe.
I gave up trying to use the usual thread-local buffer idiom; calls to
calloc(3) and free(3) from any of the "dl" functions -- which live in
the dynamic linker -- end up resolving to the dynamic linker's stubs.
I tried to work around that, but was just making things more complicated.
This alternative costs us a well-known TLS slot (instead of the
dynamically-allocated TLS slot we'd have used otherwise, so no difference
there), plus an extra buffer inside every pthread_internal_t.

Bug: 5404023
Change-Id: Ie9614edd05b6d1eeaf7bf9172792d616c6361767
2012-10-16 17:58:17 -07:00
David 'Digit' Turner
f8a2c51bf3 LONG_LONG_MIN/MAX: Move declarations to <limits.h>
LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros that are better defined in <limits.h>
instead of the current exotic location (<pthread.h>).

Note that GCC's <limits.h> only defines these macros
when __GNU_LIBRARY__ is also defined. This is only the
case when building against GLibc, so manually redefine
the macros here.

Note that using LLONG_MIN/LLONG_MAX/ULLONG_MAX is the
C99-compliant way to get these values, but it's easier
to define these compatibility macros for the sake of
porting existing code.

Change-Id: I8023918d73b4685238054932f94a4006c1ca7d03
2012-10-15 18:52:55 +02:00
Elliott Hughes
e7e274b13a Fix realloc(3) when chk_malloc debugging is on.
The tests for a NULL pointer and size 0 were the wrong way round.

From Intel's patch 9cae4f2ffc4778ed82be04711d8775a84092d4e2.

Change-Id: I118aff3358aa5f34126d74bfaa43f6e2f1a89055
2012-10-12 17:05:05 -07:00
Elliott Hughes
3b297c4079 Fix dlerror(3).
Add unit tests for dlerror(3) in various situations. I think We're at least
as good as glibc now.

Also factor out the ScopedPthreadMutexLock and use it here too.

Bug: http://code.google.com/p/android/issues/detail?id=38398
Change-Id: I040938b4366ab836e3df46d1d8055b92f4ea6ed8
2012-10-11 16:08:51 -07:00
Shuo Gao
4e75c4b2d7 Fix perf_event_open syscall for x86 and mips
perf_event_open syscall has a different syscall number for
the 3 supported architectures: arm, x86 and mips. Currenlty
only the arm syscall number is defined for all architectures.
Tracing tools like perf will not work on other architectures
than arm.

Add the different values for perf_event_open on x86 and mips
and run gensyscalls.py to update generated headers.

Change-Id: I2ed78bd42c0e5df8dbc51d784be49cccda5fab30
Author: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2012-10-11 10:24:51 -07:00
Elliott Hughes
1ceb9824ab Merge "Fix a getcwd(3) bug and make our tests run correctly under valgrind." 2012-10-09 18:14:37 -07:00
Elliott Hughes
e5d5f7f0d8 Fix two comment typos.
Change-Id: Icb2d6f7fa97ef5a4409a7606875e416cfab0a4b3
2012-10-09 17:23:09 -07:00
Elliott Hughes
156da96621 Fix a getcwd(3) bug and make our tests run correctly under valgrind.
The getcwd(3) bug was found by valgrind.

Bug: 7291287
Change-Id: I59f3bff1c1392a408b905934eebcd5d894d37492
2012-10-09 17:17:24 -07:00
Elliott Hughes
857fed50cb Fix MIPS build.
ARM and x86 have custom memcpy implementations, but MIPS relies on the generic
one, which I recently moved.

Change-Id: I9e49243f63b27a4123f2c6623d6286ec82d333c7
2012-10-02 11:20:07 -07:00
Elliott Hughes
b98204a9fb Merge "Move non-upstream code into the libc/bionic directory." 2012-10-02 09:13:34 -07:00
Elliott Hughes
7d56ccbfaa Always take GCC's definition of NULL.
There's a (bad) definition of NULL in <linux/stddef.h>, and this
definition of NULL, and the One True definition in the <stddef.h> provided
by the compiler. This change at least kills one of the bad duplicates.
Killing the <linux/stddef.h> one is harder, because it's in a generated
file.

Change-Id: Iea4ccb12d6758199f312ea9cd753b84322d5c471
2012-10-01 17:56:58 -07:00
Elliott Hughes
a89864a20b Move non-upstream code into the libc/bionic directory.
I'll need at least one more pass, because there's some upstream code
lurking in libc/bionic, but this is still a step in the right direction.

Change-Id: I55927315972da8327ae01c5240ed587db17e8462
2012-10-01 17:35:49 -07:00
Elliott Hughes
0cc0d250fd Remove useless #defines and incorrect claims from header files.
The various __need_* macros were write-only.

Change-Id: Id3cca34188e0801fdf93a038b22f2817226ad9c2
2012-10-01 15:12:40 -07:00
Elliott Hughes
31a1060a5a Upgrade seed48 too.
Missed this in 774c7f54ff.

Change-Id: Ic24fd67f003d0e2d192cfb08f96f63024ca817eb
2012-10-01 14:14:21 -07:00
Elliott Hughes
774c7f54ff Upgrade to the current NetBSD rand implementation.
Also add basic unit tests.

Change-Id: I7fc7ef61d47c1e8fdf8b8eff67a635220c3afd56
2012-10-01 13:53:41 -07:00
Elliott Hughes
422b6ef92c Define ssize_t if necessary.
Change-Id: I63801cc1f09be5e4ca20a6da7ec3366ba6441afd
2012-09-28 10:15:52 -07:00
Irina Tirdea
eac9eb462e Add getdelim(3) and getline(3) to bionic
Some userspace programs (e.g. perf) need getline.

Changes:
() add getdelim.c, getline.c from NetBSD (http://netbsd.org/) under the
NetBSD Foundation's (TNF) license ("2 clause" Berkeley-style license).
() add stub for reentrant.h header that is needed by getdelim.c
() add tests for getdelim(3) and getline(3).
() update NOTICE file.

Change-Id: I22ed82dd5904b9d7a3695535c04f502be3c27c5d
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
2012-09-27 11:38:57 -07:00
Elliott Hughes
e4030e0bfc Merge "Fix several compiler warnings." 2012-09-26 15:51:01 -07:00
Elliott Hughes
827a2604ee Merge "Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h" 2012-09-26 14:58:11 -07:00
Elliott Hughes
ac184b2142 Fix several compiler warnings.
Change-Id: I55caa50a5937442734f4fcbdb4edf1c70f335bf8
2012-09-26 14:20:22 -07:00
Elliott Hughes
855dde4426 Merge "Fix tmpfile(3)." 2012-09-26 12:04:59 -07:00
Elliott Hughes
91875dcd6e Fix tmpfile(3).
This could be better, but at least now it works.

Change-Id: I88b7cf3f7ce8e5fa0b3fe678b7d1679a68ffffc9
2012-09-26 12:02:17 -07:00
Nick Kralevich
cd587701c8 FORTIFY_SOURCE: add umask check
Verify that the call to umask makes sense. While this wouldn't
have detected bug 7094213 (because the low order bits were all zero),
it might detect other similar bugs.

References: https://code.google.com/p/android-source-browsing/source/detail?r=acba45cc4b1f98f67fcdeda2f7c13ed57659b92a&repo=platform--libcore

Change-Id: I966a531d6b3cf8e1c5eacd69bd3cbec475b5fa58
2012-09-26 10:19:31 -07:00
Raghu Gandham
0e77287209 Replace __unused in kernel headers with __linux_unused to avoid
conflicts with __unused macro in sys/cdefs.h

Change-Id: Ice664397e0b7c7a90795012f30be5e43a9675525
2012-09-25 17:54:43 -07:00
Raghu Gandham
bfeb8a98b6 Add the cleaned kernel headers
Change-Id: Ied4e3ca765672ebaebe9d4d0909b3278c2ff3cd8
2012-09-24 12:33:57 -07:00
Raghu Gandham
d769826b0d [MIPS] Removed the unused header
Change-Id: I8756a862669d4e5f283945496983f11a59dea30c
2012-09-24 11:52:00 -07:00
Elliott Hughes
0c24effd01 Merge "Add the libcutils localtime_tz and mktime_t extensions to bionic." 2012-09-24 08:41:55 -07:00
Elliott Hughes
95a7a64ac8 Use hidden visibility for several internal-use-only functions.
Change-Id: Ibeea6963ff0cc06479d0a3ed7e868eeece8c55a0
2012-09-21 18:27:40 -07:00
Raghu Gandham
988ff8ff9f [MIPS] Add CONFIG_32BIT to kernel_default_arch_macros for MIPS.
Some of the required structure definitons are defined under this macro.

Change-Id: I7a9a986e371381697dcb56bd8ea362856ffa7509
2012-09-21 17:14:05 -07:00
Dave Burke
88f1ea8f82 Make pthread_create more forgiving of invalid sched_policy.
Bug: 7005326

(cherry-pick of e58303249b9e799a4fe84c5a2dfe71518441a6ec.)

Change-Id: Ie81494e0f6a71caa6fd9fabbcfc47a23077554d6
2012-09-18 16:55:24 -07:00
Elliott Hughes
77ac158e90 Merge "Don't copy strerror(3) or strsignal(3) strings if we can share." 2012-09-17 15:36:27 -07:00
Elliott Hughes
4198fa4c23 Don't copy strerror(3) or strsignal(3) strings if we can share.
Change-Id: Ic405269f63b945c6fb347e7c4346cd6f104aff35
2012-09-17 15:23:35 -07:00
Elliott Hughes
047a285d41 Merge "Fix <sys/klog.h> to correspond to the kernel operations." 2012-09-14 16:14:48 -07:00
Elliott Hughes
5151952197 Merge "Add tty defaults to bionic" 2012-09-14 15:45:46 -07:00
Elliott Hughes
e249b05963 Fix <sys/klog.h> to correspond to the kernel operations.
This makes the constants correspond to those in the Linux kernel's
include/linux/syslog.h, but keeping our old badly-named constants for
source compatibility.

Change-Id: Ia47d1299205754cbfffd29ed48b497b53d1edaae
2012-09-14 15:42:30 -07:00
Nick Kralevich
5e58ea07d4 libc: add ftw / nftw functions
Please see "man 3 ftw" for a description of the
ftw / nftw functions.

This code is taken directly from netbsd unmodified.

Change-Id: Ia4879ac57212b424adf5281b5e92858e216d0f14
2012-09-13 16:54:57 -07:00
Elliott Hughes
e895e6deaa Merge "Update libc/NOTICE and record the incantation." 2012-09-13 16:52:35 -07:00
Elliott Hughes
965b867512 Update libc/NOTICE and record the incantation.
Change-Id: I0673d6263de2c5a21cd549f18c0648d0fa4bb40f
2012-09-13 16:51:57 -07:00