Commit Graph

4911 Commits

Author SHA1 Message Date
Christopher Ferris
a694517909 Merge "Add gen syscalls step to instructions." into lmp-dev 2014-07-17 21:15:46 +00:00
Christopher Ferris
013c9b8035 Add gen syscalls step to instructions.
Also, fix incorrect path to some tools.

(cherry picked from commit ea271fdf26)

Change-Id: Ie93cbc84b9a46d622b0b462a33bed0ee129992cb
2014-07-18 16:56:33 -07:00
Elliott Hughes
9a7fdb2dae ptrace(3) should be varargs.
Bug: 16352070

(cherry picked from commit 98b088dce7)

Change-Id: I6193ef44df9a5668020916eaca90b47fc4c8ab77
2014-07-16 16:59:31 -07:00
Elliott Hughes
3002131da3 Use VDSO for clock_gettime(2) and gettimeofday(2).
Bug: 15387103

(cherry picked from commit 625993dfbb)

Change-Id: I0e156d7049ba1495902259071a96936592e74025
2014-07-16 15:15:53 -07:00
Dan Albert
a446505874 Merge "Remove isascii_l(3)." into lmp-dev 2014-07-16 13:12:22 +00:00
Elliott Hughes
97ba2a5cc4 Regenerate the syscalls list after the uapi update.
(cherry picked from commit 3fa60e10bc)

Change-Id: Id545a5b0b0953967effd819177f0dadb134f2011
2014-07-15 19:09:12 -07:00
Dan Albert
da8accfefe Remove isascii_l(3).
Had intended to remove this one before submitting the locale changes,
but forgot. It isn't a standard ctype function, so we don't need it.

Change-Id: Ie9c09fa6c61b1101b5992fa06da30e373a0c6bf7
2014-07-15 16:49:30 -07:00
Christopher Ferris
73c963e4c5 Fix BIONIC_ROUND_UP_POWER_OF_2 for 64 bit.
There were two bugs here:

- For 64 bit values, this did not properly round up.
- The macro rounded to the power of 2 less than value, not to the power
  of 2 greater than value.

(cherry picked from commit 27047faf28)

Change-Id: Idf1ec67854e1eb423704e599ae1c6b674d36618d
2014-07-15 13:23:06 -07:00
Elliott Hughes
ca276c40df Fix visibility for a bunch more symbols.
Bug: 11156955
Bug: 15291317

(cherry picked from commit a167eef548)

Change-Id: Ib038ad34ef59631f7b4ed6dff2b7956001b8b159
2014-07-14 18:59:51 -07:00
Elliott Hughes
99ae0983c0 Implement rand/srand in terms of random/srandom.
Code developed for glibc or older versions of bionic might expect more
randomness than the BSD implementation provides.

Bug: 15829381

(cherry picked from commit 76c241b091)

Change-Id: If721b3f16efdb21cb67df5ec5034c0ba905bd029
2014-07-14 14:06:11 -07:00
Elliott Hughes
caaf71ebb3 Sync upstream-openbsd.
(cherry picked from commit 4f0b67a8db)

Change-Id: I8753959853312ab978bc4eb1bbbcdc7d1b007b95
2014-07-14 13:59:03 -07:00
Dmitriy Ivanov
38778e3b6c Upstream atexit
Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
(cherry picked from commit 53c3c271dc)
2014-07-14 13:29:34 -07:00
Elliott Hughes
f6968e3c08 Define SIOCKILLADDR which isn't in the common kernel uapi headers.
(cherry picked from commit 2ba2888cac)

Change-Id: I3845871bb44dae94d9a0428af0f562ddfb8bd660
2014-07-11 22:37:13 -07:00
Elliott Hughes
b962ab81fc am 57a5b338: Merge "Define three prctl constants that went missing from uapi."
* commit '57a5b3380a8834ecb4a32d01433a3127454443d7':
  Define three prctl constants that went missing from uapi.
2014-07-12 03:10:36 +00:00
Elliott Hughes
0594b9ddde am b8e82b5e: Merge "EM_ARM and EM_AARCH64 are now in the uapi header."
* commit 'b8e82b5e729a1f6e30ee9593b2dbcbb3ad623874':
  EM_ARM and EM_AARCH64 are now in the uapi header.
2014-07-12 01:41:51 +00:00
Christopher Ferris
efdf7862be am 385bb1ed: Merge "Add optimized memchr implementation from newlib"
* commit '385bb1ededa734e88bafb8aaf817e9a984bf0d18':
  Add optimized memchr implementation from newlib
2014-07-12 01:41:51 +00:00
Christopher Ferris
55230dd048 am 96502e27: Merge "Make jemalloc the default choice."
* commit '96502e273eea49c95899af57fa578c8055b9618c':
  Make jemalloc the default choice.
2014-07-12 01:41:51 +00:00
Christopher Ferris
18a25078f0 am c6bc0017: Merge "Update kernel headers to v3.14."
* commit 'c6bc001776931fd1c8583df2b8948dcb8bf61007':
  Update kernel headers to v3.14.
2014-07-12 01:41:50 +00:00
Elliott Hughes
ce1422b985 am 040e1187: Merge "Enable building libc with clang."
* commit '040e11877d19f2fdd7a9c730d33056e88f43a760':
  Enable building libc with clang.
2014-07-12 01:41:50 +00:00
Dan Albert
c0afc23e26 am 37f09d6d: Merge "Revert "Revert "Add locale aware APIs."""
* commit '37f09d6d2ea329984a3182b99a38f170dc86661d':
  Revert "Revert "Add locale aware APIs.""
2014-07-12 01:41:50 +00:00
Elliott Hughes
d19f2d859f am 76df69d1: Merge "The err family allow null format strings."
* commit '76df69d1f5cbbc8a2c1e899bc1ad5ada8b083e1e':
  The err family allow null format strings.
2014-07-12 01:41:49 +00:00
Elliott Hughes
35805377f9 am 9b491470: Merge "Slim down static binaries by avoiding stdio."
* commit '9b491470ac65a11775e52631ef5e655af9eb2a85':
  Slim down static binaries by avoiding stdio.
2014-07-12 01:41:49 +00:00
Elliott Hughes
7d9f1cc55c am f0f8cd1f: Merge "Remove the global lock around thread stack creation."
* commit 'f0f8cd1ff3e7f7124cab8a687370b51df4ec93de':
  Remove the global lock around thread stack creation.
2014-07-12 01:41:48 +00:00
Elliott Hughes
12ce91157a am cd23370c: Merge "Remove the obsolete _thread_created_hook."
* commit 'cd23370ca737dffc49166f8aacd19a025e72266f':
  Remove the obsolete _thread_created_hook.
2014-07-12 01:41:48 +00:00
Calin Juravle
9712d913eb am 02459d34: Merge "Move __cmsg_nxthdr to its proper file."
* commit '02459d34c9b82741155fbbb32850a7987eb7abaf':
  Move __cmsg_nxthdr to its proper file.
2014-07-12 01:41:48 +00:00
Calin Juravle
cd061f6e43 am 8a71a745: Merge "Removed obsolete symbol cmsg_nxthdr."
* commit '8a71a745cb2a1eb573c6dc41e30c2f94a3a99db7':
  Removed obsolete symbol cmsg_nxthdr.
2014-07-12 01:41:48 +00:00
Christopher Ferris
4306b0f82b am 25fba981: Merge "Do not include libc_common in malloc debug code."
* commit '25fba981a17c51df6cf88d5ace7ffe3c5a5766e4':
  Do not include libc_common in malloc debug code.
2014-07-12 01:41:47 +00:00
Elliott Hughes
1cad0226f5 am 84f0c7c2: Merge "update-tzdata.py needs to know where to find icu."
* commit '84f0c7c258b3a72eed8737662bb5a730d6d9f5e2':
  update-tzdata.py needs to know where to find icu.
2014-07-12 01:41:47 +00:00
Dan Albert
ea04b5a6d9 am 7a85d9a1: Merge "Revert "Add locale aware APIs.""
* commit '7a85d9a1de7f0970af19eca5f3ca6938cbc2ce95':
  Revert "Add locale aware APIs."
2014-07-12 01:41:47 +00:00
Dan Albert
f6b9599348 am 430d5f93: Merge "Add locale aware APIs."
* commit '430d5f93ceea2e5172144a05885c295dca51b876':
  Add locale aware APIs.
2014-07-12 01:41:46 +00:00
Dmitriy Ivanov
ca673e7300 am b9c5d606: am 006e0770: Merge "Change android_dlextinfo flags to uint64_t"
* commit 'b9c5d606aab6c1a21e3785d155613c35c276eb18':
  Change android_dlextinfo flags to uint64_t
2014-07-11 17:28:53 +00:00
Elliott Hughes
7e43f0d40d resolved conflicts for merge of aedc14b1 to lmp-dev
Change-Id: I36d3a6ca42778686f1f2971ae72cd3b7b156a3da
2014-07-11 10:03:35 -07:00
Elliott Hughes
040e11877d Merge "Enable building libc with clang." 2014-07-11 16:35:27 +00:00
Elliott Hughes
c999f76977 Enable building libc with clang.
Bug: 16218205
Change-Id: I024de2044fe016412c7bead22c264e96be4cb39c
2014-07-11 09:28:53 -07:00
Christopher Ferris
c6bc001776 Merge "Update kernel headers to v3.14." 2014-07-10 21:32:00 +00:00
Elliott Hughes
2f61fba72b The err family allow null format strings.
Also remove declarations for the _* variants that were never implemented in bionic (or glibc).

Change-Id: I4ea1f17bbb377e70632c10dd218f47110cabc27b
2014-07-11 02:53:27 +00:00
Elliott Hughes
263325d4b0 Define three prctl constants that went missing from uapi.
Change-Id: Ib81846ddefe9a75e02151c6592ed99b1f8ec5858
2014-07-11 19:54:55 -07:00
Dan Albert
dfb5ce42bc Revert "Revert "Add locale aware APIs.""
This reverts commit 063e20c269.

Change-Id: Ib8c9004efefe75a5346b3af50dfe37952d91eb21
2014-07-11 16:21:31 +00:00
Elliott Hughes
b8e82b5e72 Merge "EM_ARM and EM_AARCH64 are now in the uapi header." 2014-07-10 20:49:23 +00:00
Elliott Hughes
10cf0d8c1f EM_ARM and EM_AARCH64 are now in the uapi header.
Change-Id: Ice73403daff75ea45b24e02351269f6c012df6c1
2014-07-11 11:01:42 -07:00
Christopher Ferris
385bb1eded Merge "Add optimized memchr implementation from newlib" 2014-07-10 20:49:23 +00:00
Bernhard Rosenkränzer
8c20c13100 Add optimized memchr implementation from newlib
Add NEON optimized memchr adapted from newlib

Change-Id: I91b2fafa243e4ab35fa56bb6171d48433c947cfd
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-07-11 00:17:07 +02:00
Christopher Ferris
8e32b7b354 Make jemalloc the default choice.
Change-Id: I5ff0cf0c396b7ae6278e6fcd5a0d50f8b966fb54
2014-07-11 11:01:30 -07:00
Christopher Ferris
38062f954c Update kernel headers to v3.14.
Other changes:
- Modify update_all.py to skip ion header files when importing into aosp.
- Fix generate_uapi_headers.sh to handle imports from a linux-stable kernel.

Change-Id: I1ad81b9ccb063c21740f9875f2cc1238052cd4b3
2014-07-10 13:32:32 -07:00
Elliott Hughes
91570ce987 Slim down static binaries by avoiding stdio.
It's okay for a program to choose to drag in stdio, but it's unfortunate
if even the minimal "int main() { return 42; }" drags in stdio...

This brings the minimal static binary on ARM down from 78KiB to 46KiB.

Given that we don't have a separate -lpthread it's not obvious to me that
we can shave this down any further. I'm not sure whether this is a worthwhile
change for that reason. (And the fact that dynamic binaries, the usual case,
are unaffected either way.)

Change-Id: I02f91dcff37d14354314a30b72fed2563f431c88
2014-07-10 12:34:23 -07:00
Elliott Hughes
e959a3b315 Remove the global lock around thread stack creation.
This lock has been here since the original commits, but as far as I can tell
it never served any purpose. We've never had a free list of cached stacks or
anything like that.

Change-Id: I9d665c7eaa9c699ce0659ffb111402a0239fe1f5
2014-07-10 10:25:26 -07:00
Elliott Hughes
cd23370ca7 Merge "Remove the obsolete _thread_created_hook." 2014-07-10 16:05:36 +00:00
Elliott Hughes
e0f25dda3f Remove the obsolete _thread_created_hook.
gdb won't even try to use this on Android because it knows we don't
support old enough kernels to need it.

Bug: 15470251
Change-Id: Ia6d54585d888bbab8ee0490a148a1586b25437b9
2014-07-09 22:13:55 -07:00
Christopher Ferris
25fba981a1 Merge "Do not include libc_common in malloc debug code." 2014-07-09 22:27:32 +00:00
Christopher Ferris
dda1c6c466 Do not include libc_common in malloc debug code.
The inclusion of the static libc_common library in the malloc_debug_XXX.so
shared libraries causes constructors to be called twice. This doesn't seem
to have caused any issues when setting the libc.debug.malloc property.
However, jemalloc crashes because there are two jemalloc implementations,
one in the static libc_common library and one in the shared library. Each
implementation has created overlapping thread keys that are not the same.
The crash comes because one of the jemalloc keys is actually used by the
locale setting code. Thus if someone sets the locale, the jemalloc code
crashes trying to access the same key.

Change-Id: Iaac650a82d69064db148a6333e9403744f68b4a4
2014-07-09 21:27:15 -07:00
Elliott Hughes
30ab939496 update-tzdata.py needs to know where to find icu.
Change-Id: If5561b92c233276fb072da62be21f23df4781c41
2014-07-09 15:42:59 -07:00
Dan Albert
e087eac404 Add locale aware APIs.
Since we only support the C locale, we can just forward all of these to
their non-locale equivalents for correct behavior.

Change-Id: Ib7be71b7f636309c0cc3be1096a4c1f693f04fbb
2014-07-09 15:41:53 -07:00
Calin Juravle
f8408c58fa Move __cmsg_nxthdr to its proper file.
Change-Id: I095fb6bc5318f2d256baa97658bdfe679d235aec
2014-07-10 12:47:13 +01:00
Calin Juravle
e95d0fc34c Removed obsolete symbol cmsg_nxthdr.
Bug: 15822452
Change-Id: I5322fb29522fc58e9c3489ff86216e25a12ef970
2014-07-10 12:44:52 +01:00
Dan Albert
063e20c269 Revert "Add locale aware APIs."
Accidentally verified against a dirty tree. Needs the companion change to libc++ to land upstream before I can submit this.

This reverts commit e087eac404.

Change-Id: I317ecd0923114f415eaad7603002f77feffb5e3f
2014-07-09 22:50:43 +00:00
Elliott Hughes
1558138315 Regenerate the bionic NOTICE files.
Also fix a few formatting issues in copyright headers that were confusing
the script (though obviously it would be better if the script were smarter).

Change-Id: I7f561bef4f84fdcbd84f375ee226bd65db0e507b
2014-07-07 15:42:06 -07:00
Elliott Hughes
e20bbaf8bb am 4568e344: am 2b2916d1: Merge "Remove some dead data."
* commit '4568e344c0a7581dc1b32387ba18c99df76ffeea':
  Remove some dead data.
2014-07-07 18:08:48 +00:00
Elliott Hughes
88ed7d2cc1 am d5a6a5e1: am db42a9f5: Merge "Fix three clang complaints about the DNS code."
* commit 'd5a6a5e18d66543bdfa4dffdfeec80eff32a87b9':
  Fix three clang complaints about the DNS code.
2014-07-07 18:08:47 +00:00
Elliott Hughes
4324fd7916 am a19e1d1c: am 4d763df3: Merge "Fix a broken boolean test found by clang."
* commit 'a19e1d1c6519e6adaa37ae151dc87cb04fe998b0':
  Fix a broken boolean test found by clang.
2014-07-07 18:08:46 +00:00
Elliott Hughes
ea24c25512 am 13610bec: am 1ee1bfde: Merge "Use __unused rather than self assignment for unused parameters."
* commit '13610bec6bfc0af64efdeeafc4c25d34912c2856':
  Use __unused rather than self assignment for unused parameters.
2014-07-07 18:08:46 +00:00
Dmitriy Ivanov
3a8646fc5d Change android_dlextinfo flags to uint64_t
Change-Id: Id27e8f8e58dbcf6ae79644f2ad3af3dd0aef9ae7
2014-07-08 11:24:03 -07:00
Dan Albert
67afc421f3 am 731f9273: am 2d94ee29: Merge "Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."""
* commit '731f9273134b861b86ef65f785f4811c2f17b5be':
  Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64.""
2014-07-07 16:25:28 +00:00
Elliott Hughes
4d763df324 Merge "Fix a broken boolean test found by clang." 2014-07-05 03:01:43 +00:00
Elliott Hughes
29edbfd64f Fix a broken boolean test found by clang.
This was only on the failure case, so this probably never caused
any real trouble.

Change-Id: Id983689772102cbb9171693b927e544fb0b584fb
2014-07-07 09:45:15 -07:00
Nick Kralevich
80d877d6c3 am e6ef1977: am f95964c9: Merge "libc_logging: Set SOCK_CLOEXEC on socket"
* commit 'e6ef19779f35bfc1e49b50dd6d3189ab393328f1':
  libc_logging: Set SOCK_CLOEXEC on socket
2014-07-03 16:09:56 +00:00
Elliott Hughes
ca771fc396 am bebe8de7: am 1f262b35: Merge "Fix recv.cpp so it can build with clang."
* commit 'bebe8de7e2d2df2605fe96f7426f26ecbcd7d251':
  Fix recv.cpp so it can build with clang.
2014-07-03 00:13:14 +00:00
Elliott Hughes
cda4006cc7 am 2a70aba8: am ab4fc823: Merge "Fix all resolv warnings and turn on -Werror."
* commit '2a70aba8460eff1bfb1417c271c6a5a53c560afa':
  Fix all resolv warnings and turn on -Werror.
2014-07-02 23:54:12 +00:00
Dmitriy Ivanov
e9fa0de5b0 am 8551bfb0: am 950a435f: Merge "Load library using file handle."
* commit '8551bfb04385781c3b8c68afaf9c055c22a4e985':
  Load library using file handle.
2014-07-02 23:13:56 +00:00
Elliott Hughes
f5bd675225 am 9ff95c47: am 99e2a2f0: Merge "Switch to upstream OpenBSD mktemp.c."
* commit '9ff95c4763bcbc44d25092510fde299f0ba0be7f':
  Switch to upstream OpenBSD mktemp.c.
2014-07-02 23:13:47 +00:00
Elliott Hughes
6917e6c2ae Fix recv.cpp so it can build with clang.
Change-Id: Iac3e676aa256837333240219bcadbdc31985b5dd
2014-07-02 16:46:34 -07:00
Elliott Hughes
ab4fc82315 Merge "Fix all resolv warnings and turn on -Werror." 2014-07-02 21:12:58 +00:00
Elliott Hughes
37b1b5bbcd Fix all resolv warnings and turn on -Werror.
The res_init.c changes bring us a bit closer to upstream too, though
there's still work to be done there. Some of the remaining differences
look like bugs we'd want to fix, so we should definitely try to come
back to that.

Change-Id: I50baa148e967c90d55d711e9904ad54c7d724d4d
2014-07-02 16:27:20 -07:00
Nick Kralevich
bae5b1dbd8 libc_logging: Set SOCK_CLOEXEC on socket
Socket file descriptors remain open across exec unless
SOCK_CLOEXEC is set. Enable this option, to avoid leaking
file descriptors.

In practice, this isn't a big deal, since the socket only remains
open for a very short period to write a message. However, this
socket might leak for for multithreaded programs if an exec occurs
between the open and close.

Change-Id: Ica2e71fe28657c32d56de1431c8f7f1f5c7b7c58
2014-07-02 22:39:14 -07:00
Dmitriy Ivanov
950a435fc0 Merge "Load library using file handle." 2014-07-02 20:52:43 +00:00
Dan Albert
2d94ee29f4 Merge "Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64.""" 2014-07-02 20:51:20 +00:00
Elliott Hughes
1ee1bfdeec Merge "Use __unused rather than self assignment for unused parameters." 2014-07-02 20:49:53 +00:00
Elliott Hughes
668da74ef1 Use __unused rather than self assignment for unused parameters.
Clang, reasonably enough, doesn't like self assignment.

Change-Id: Ie5843287802949dad148a1a815231035678e1306
2014-07-07 09:46:54 -07:00
Elliott Hughes
2b2916d154 Merge "Remove some dead data." 2014-07-02 20:49:42 +00:00
Elliott Hughes
920d831ba1 Remove some dead data.
Clang doesn't like dead data, and this is just an LP32 compatibility turd.

Change-Id: I3832748a4e773b254877f4438b5340e7d4c1ce70
2014-07-07 09:46:11 -07:00
Elliott Hughes
db42a9f5a3 Merge "Fix three clang complaints about the DNS code." 2014-07-02 20:49:42 +00:00
Elliott Hughes
68c2755d71 Fix three clang complaints about the DNS code.
These are all already fixed upstream in the same way.

Change-Id: I2881b6d0fbd0237fffc0f00563bc14750dcce0d9
2014-07-07 09:44:17 -07:00
Dmitriy Ivanov
04dc91ae76 Load library using file handle.
* This patch enables dlopen by file descriptor
   instead of path/name.

Bug: 15984217
Change-Id: Ib39051e00567fb97070bf96d8ce63993877c0a01
2014-07-02 13:20:47 -07:00
Elliott Hughes
6593597931 Switch to upstream OpenBSD mktemp.c.
Almost all of our stdio is actually OpenBSD, so although this isn't
really a core part of stdio (it doesn't touch struct FILE, for example)
it probably makes sense for it to come from the same upstream. My
actual motivation though is that it's the only FreeBSD file we have
compiler warnings from.

This patch moves us over to -Werror by default, with only the DNS code
having -Wno-error.

Change-Id: Id244a5b445cba41b0a1ca30298ca7b1ed177810c
2014-07-02 11:22:26 -07:00
Elliott Hughes
a230741e47 am e20fcb2d: am e9975987: Merge "Quiten warnings in semaphore.c."
* commit 'e20fcb2d70af950cff4ae5df8038d800630e39be':
  Quiten warnings in semaphore.c.
2014-07-02 00:46:18 +00:00
Elliott Hughes
dc615691c9 am d103c98b: am f2102f54: Merge "Quiten warnings in fts.c."
* commit 'd103c98be845e060d86463a895c2e33aa8256839':
  Quiten warnings in fts.c.
2014-07-02 00:46:17 +00:00
Dan Albert
c492450147 am 30c958f7: am 42a5a177: Merge "Revert "Revert "Prevent symbols from libgcc from being reexported."""
* commit '30c958f7f5dfd712f11026c5caa78aa7d67f082d':
  Revert "Revert "Prevent symbols from libgcc from being reexported.""
2014-07-01 22:57:06 +00:00
Dan Albert
f79ee064b6 Revert "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64.""
This reverts commit 715242fd0f.

Change-Id: Ia9892fa3b03287129aa72a49974cef9fd94ae735
2014-07-01 22:41:50 +00:00
Dmitriy Ivanov
4d8f3c4d99 am 51c812cd: am 442d41fc: Merge "Write message to stderr on __libc_fatal()"
* commit '51c812cd220cd9f493d61df98ca77dd0b5f000da':
  Write message to stderr on __libc_fatal()
2014-07-01 22:10:25 +00:00
Elliott Hughes
eae0d91dd5 am 94f8beb7: am dc42d7ff: Merge "Fix a warning in if_indextoname.c."
* commit '94f8beb7e3450204bb117ca2301c1769a9b76dc2':
  Fix a warning in if_indextoname.c.
2014-07-01 19:39:38 +00:00
Elliott Hughes
ec67cded1d Quiten warnings in fts.c.
Also bring us closer to upstream. Sadly the Linux and BSD dirent
structs don't match, so we'll never be completely in sync (and I don't
think we can hide the difference with macro trickery).

Change-Id: Ief4275856116cd1d5b5e0f9166db1ead9439515c
2014-07-01 17:20:06 -07:00
Elliott Hughes
e997598790 Merge "Quiten warnings in semaphore.c." 2014-07-01 19:22:04 +00:00
Elliott Hughes
95d3cd0b85 Quiten warnings in semaphore.c.
Change-Id: I30aff82174f789ab407d2282c07e6207123d4d5b
2014-07-01 17:07:43 -07:00
Elliott Hughes
ff7d2d0920 am 56d0f8ca: am f573a52c: Merge "Silence time64.c build warnings."
* commit '56d0f8ca50900edca67e24cfdcfb33824551b0c2':
  Silence time64.c build warnings.
2014-07-01 18:25:16 +00:00
Dmitriy Ivanov
12bf3bcdee Write message to stderr on __libc_fatal()
Change-Id: Ia8d6e256768fa51786d0139d3f3b6e9e4bebe027
2014-07-01 14:46:03 -07:00
Elliott Hughes
49eb761306 Fix a warning in if_indextoname.c.
Change-Id: Ib6afe2a5452022f5c98ec28fd110d6b910dccdad
2014-07-01 11:13:25 -07:00
Dan Albert
42a5a177e9 Merge "Revert "Revert "Prevent symbols from libgcc from being reexported.""" 2014-07-01 14:58:20 +00:00
Christopher Ferris
f1be48d4c2 am 4ba40564: am 4ec3bc83: Merge "Add optimized stpcpy."
* commit '4ba40564c62bbd6ac52e53aad003bb424f1e8f10':
  Add optimized stpcpy.
2014-07-01 02:57:13 +00:00
Nick Kralevich
b18a1c3d19 am e844f27a: am bcf77b5d: Merge "add CLOEXEC to various DNS related code"
* commit 'e844f27a05b32b7bf2fd68b1bd69e450040c1e24':
  add CLOEXEC to various DNS related code
2014-06-30 23:23:47 +00:00
Elliott Hughes
dd9efcbab6 am c5f1504e: am 6cdab387: Merge "Restore <nsswitch.h> which is BSD API, not private."
* commit 'c5f1504e3db3a39bb951bf01e2d0d758ca93cc44':
  Restore <nsswitch.h> which is BSD API, not private.
2014-06-30 23:16:01 +00:00
Christopher Ferris
4ec3bc83c6 Merge "Add optimized stpcpy." 2014-06-30 22:26:48 +00:00
Nick Kralevich
bcf77b5dff Merge "add CLOEXEC to various DNS related code" 2014-06-30 22:26:48 +00:00
Elliott Hughes
a311704103 Restore <nsswitch.h> which is BSD API, not private.
Also make nsdispatch non-hidden. Firefox uses it.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1030899
Change-Id: Iaccc1ec813d196ec91ac475fcc4ae9dca756861d
2014-06-30 14:15:34 -07:00
Christopher Ferris
753eb7f07e Add optimized stpcpy.
Change-Id: Ifed38f92a54fef4488fd0ed26a1569059a054574
2014-06-30 12:48:13 -07:00
Elliott Hughes
71ee128e0c am e1047515: am f72c56d6: Merge "Switch to upstream NetBSD nsap_addr.c."
* commit 'e104751566da6e8ef340926781d5ef120bf1d801':
  Switch to upstream NetBSD nsap_addr.c.
2014-06-30 19:44:47 +00:00
Elliott Hughes
a210cae724 Switch to upstream NetBSD nsap_addr.c.
These symbols should be public (and Firefox uses them), and we'd also probably
rather have the upstream thread-safe implementation.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1030899
Change-Id: I2a5888fbb3198546848398f576fd2195ff3fe00c
2014-06-30 12:03:43 -07:00
Nick Kralevich
1781ed7774 add CLOEXEC to various DNS related code
Occasionally file descriptors seem to be leaking across execs
from DNS related calls. Set close-on-execute for the various
sockets / file to prevent file descriptor leakage.

Change-Id: I4724b47bc7236f40c29518a6075598a9bba48b0a
2014-06-29 20:46:17 -07:00
Elliott Hughes
066eb0b06d Silence time64.c build warnings.
Change-Id: Ibc5672480ee5e72eedf2bc29e420315b5346b0df
2014-07-01 10:48:23 -07:00
Christopher Ferris
29642e8ec6 am d1bf0706: am 2e249c2e: Merge "Add optimized 64 bit strcpy."
* commit 'd1bf0706425d7ee4b6fd99fbda7653b788c1eb6f':
  Add optimized 64 bit strcpy.
2014-06-27 22:40:14 +00:00
Elliott Hughes
26c69d6438 am 5d4cb156: am ec97c3f0: Merge "asm/sigcontext.h is required to build unwind-dw2.c in gcc-4.9."
* commit '5d4cb15610e91c99b062589e6297d423ed2e1176':
  asm/sigcontext.h is required to build unwind-dw2.c in gcc-4.9.
2014-06-27 21:30:20 +00:00
Christopher Ferris
35cf5c59b9 am 627a8096: am a4a28d90: Merge "Add optimized neon strchr implementation based on newlib"
* commit '627a8096ea34a4dfe790a1a85617136e58e0ba4a':
  Add optimized neon strchr implementation based on newlib
2014-06-27 19:52:09 +00:00
Elliott Hughes
ec97c3f024 Merge "asm/sigcontext.h is required to build unwind-dw2.c in gcc-4.9." 2014-06-26 18:34:59 +00:00
Christopher Ferris
2e249c2e7a Merge "Add optimized 64 bit strcpy." 2014-06-26 18:12:01 +00:00
Christopher Ferris
77561bfe0b Add optimized 64 bit strcpy.
Change-Id: I4ac12735a53c3ae9336b148ce694fe6c63613139
2014-06-26 17:51:56 -07:00
Bernhard Rosenkränzer
12c0274d9c Add optimized neon strchr implementation based on newlib
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Change-Id: I276ff0f879e733a1115456247e1342b9c5a09015
2014-06-27 13:21:42 +02:00
Raghu Gandham
93e7b9f3ea asm/sigcontext.h is required to build unwind-dw2.c in gcc-4.9.
Change-Id: Ie36b68d1260a656056f66a67750232a7da78c61f
Signed-off-by: Steve Ellcey <steve.ellcey@imgtec.com>
2014-06-25 18:03:41 -07:00
Elliott Hughes
f9ebc87c2c am e3ee7819: am ba4ebf78: Merge "Change the LP64 off_t/loff_t/off64_t definitions to reduce warnings."
* commit 'e3ee7819378096fcc207262704dafea54101b712':
  Change the LP64 off_t/loff_t/off64_t definitions to reduce warnings.
2014-06-25 20:47:33 +00:00
Elliott Hughes
00fb5f97be Change the LP64 off_t/loff_t/off64_t definitions to reduce warnings.
Code written for glibc can be sloppy about these types on LP64 and
get away with it. It's probably better for our users if these types
are identical rather than just being the same size.

Change-Id: I3dd116d80569d2d101342a552c55f4a18884025b
2014-06-25 12:09:11 -07:00
Elliott Hughes
671ffdbf0e am 19fe877e: am d59ed678: Merge "Add splice, tee, and vmsplice."
* commit '19fe877ec35b7ff7d356d6f4020e77886fff89e2':
  Add splice, tee, and vmsplice.
2014-06-25 02:19:53 +00:00
Elliott Hughes
3f525d41c2 Add splice, tee, and vmsplice.
Change-Id: I5f43380b88d776a8bb607b47dbbc5db5a2fe6163
2014-06-24 19:03:31 -07:00
Elliott Hughes
8a41df6521 am cc9acb8d: am 52f9b051: Merge "Sync to current upstream arc4random."
* commit 'cc9acb8d7b10304e2cb215b471dc9f9636de47f8':
  Sync to current upstream arc4random.
2014-06-25 00:28:09 +00:00
Elliott Hughes
256f07ec5c am 1411afd6: am 598f4b3a: Merge "Fix getpid caching across a clone."
* commit '1411afd6d18ee363b96c8e4b20561d5e946abfbf':
  Fix getpid caching across a clone.
2014-06-24 19:42:41 +00:00
Elliott Hughes
52f9b051c8 Merge "Sync to current upstream arc4random." 2014-06-24 18:00:13 +00:00
Elliott Hughes
0468feb286 Sync to current upstream arc4random.
This is actually revision 1.33, which is no longer the latest, but it's
as close to head as we can currently reasonably get. I've also switched
to the OpenBSD getentropy_linux.c implementation of getentropy, lightly
modified to try to report an error on failure.

Bug: 14499627
Change-Id: Ia7c561184b1f366c9bf66f248aa60f0d53535fcb
2014-06-24 14:13:48 -07:00
Calin Juravle
05509541af am b52d7e7b: am 63fa660b: Merge "Prefix cmsg_nxthdr with "__"."
* commit 'b52d7e7b6ebfac476a1f9506a1a8b2999797ef15':
  Prefix cmsg_nxthdr with "__".
2014-06-24 12:32:41 +00:00
Elliott Hughes
598f4b3ac1 Merge "Fix getpid caching across a clone." 2014-06-24 07:45:29 +00:00
Calin Juravle
63fa660b52 Merge "Prefix cmsg_nxthdr with "__"." 2014-06-24 06:28:56 +00:00
Calin Juravle
096b4eb752 Prefix cmsg_nxthdr with "__".
This brings us on par with glibc.

To avoid breaking clients, temporary keep cmsg_nxthdr until the next NDK
refresh.

Bug: 15822452
Change-Id: I24c24e68c31f4f2b8f3d2df7acd575cb75174173
2014-06-24 11:53:06 +01:00
Dan Albert
71f9b34fbe Revert "Revert "Prevent symbols from libgcc from being reexported.""
This reverts commit 4e4e1a5d78.

Change-Id: I8e78c3a59598e052e02965dd37b3fba8f567eed9
2014-06-24 04:31:08 +00:00
Elliott Hughes
fa9e16efaf Fix getpid caching across a clone.
If you make clone, fork, or vfork system calls directly, you're still
on your own, but we now do the right thing for the clone wrapper.
With this implementation, children lose the getpid caching, but we've
no reason to think that that covers any significant use cases.

Bug: 15387103
Change-Id: Icfab6b63c708fea830960742ec92aeba8ce7680d
2014-06-23 17:49:45 -07:00
Dan Albert
15a75decbf am af8046a9: am 66a805b9: Merge "Revert "Prevent symbols from libgcc from being reexported.""
* commit 'af8046a9f9ee4d341047dfff156077d7e7a559db':
  Revert "Prevent symbols from libgcc from being reexported."
2014-06-23 21:26:33 +00:00
Dan Albert
4e4e1a5d78 Revert "Prevent symbols from libgcc from being reexported."
This reverts commit 65e80cf622.

Change-Id: I5f94b123f73db8d0b03cd71a5cffa0662776a017
2014-06-23 20:12:05 +00:00
Dan Albert
66a805b91e Merge "Revert "Prevent symbols from libgcc from being reexported."" 2014-06-23 17:14:09 +00:00
Dan Albert
ff1917e08d am 203ec23c: am 559f3cb5: Merge "Use __builtin_*_chk for bcopy/bzero."
* commit '203ec23c4b92d76b6bc2597d7d07b7e01e52d83e':
  Use __builtin_*_chk for bcopy/bzero.
2014-06-23 17:12:18 +00:00
Dan Albert
0163222d18 am b5e050d2: am 54e9dc02: Merge "Prevent symbols from libgcc from being reexported."
* commit 'b5e050d2f98d7a196ac85ffae42ebc057985a664':
  Prevent symbols from libgcc from being reexported.
2014-06-21 10:36:53 +00:00
Dan Albert
509cf86c80 am 4b62f0d8: am 0d7415fb: Merge "Remove SHA1 from LP64 in favor of libcrypto."
* commit '4b62f0d809e6a29366f8bbc987b4091b0fb94863':
  Remove SHA1 from LP64 in favor of libcrypto.
2014-06-21 10:36:52 +00:00
Dan Albert
65e80cf622 Prevent symbols from libgcc from being reexported.
Since this was not done earlier, there are binary compatibility concerns
that prevent us from being able to apply this to LP32.

Bug: 11156955
Change-Id: Ie717c3ae4b81c749548a45a993c834e109700b27
2014-06-21 00:09:31 -07:00
Christopher Ferris
92f979725f am 6131798e: am ac86f994: Merge "[MIPS64] Regenerate mips kernel headers with fixed tool"
* commit '6131798e574d85200053d93bc2673ab5a0f715fe':
  [MIPS64] Regenerate mips kernel headers with fixed tool
2014-06-21 01:06:58 +00:00
Christopher Ferris
4a96c1b216 am 40b85d34: am eee5f173: Merge "[MIPS64] Adjust kernel/tools for mips32,mips64 headers"
* commit '40b85d34e0f87bdb0ede4c36d6389a7af9c6548c':
  [MIPS64] Adjust kernel/tools for mips32,mips64 headers
2014-06-21 01:06:57 +00:00
Elliott Hughes
8e34804df8 am 3e2ea6ba: am fb0a3622: Merge "Cache getpid."
* commit '3e2ea6ba22092ab23f4836d68eec2528f6f88ed1':
  Cache getpid.
2014-06-20 23:14:37 +00:00
Dan Albert
0d7415fb22 Merge "Remove SHA1 from LP64 in favor of libcrypto." 2014-06-20 20:43:43 +00:00
Christopher Ferris
ac86f99405 Merge "[MIPS64] Regenerate mips kernel headers with fixed tool" 2014-06-20 20:43:43 +00:00
Duane Sand
2300332596 [MIPS64] Regenerate mips kernel headers with fixed tool
Change-Id: I530891123cba78edbea4aa8af88390213711ab16
2014-06-20 11:08:49 -07:00
Duane Sand
a69eaec4d4 [MIPS64] Adjust kernel/tools for mips32,mips64 headers
Define CONFIG_32BIT as _ABIO32 rather than as 1;
it needs to be undefined for calls from mips64.
We need  defined(CONFIG_32BIT) == !defined(CONFIG_64BIT),
and get that via  defined(_ABIO32) == !defined(__LP64__).

Define CONFIG_CPU_LITTLE_ENDIAN to get correctly-placed
struct msqid64_ds fillers on ipc calls from mips32.
Without this, big-endian fillers were erroneously used.
This bug exists in prior mips32 Android releases.

Define __SANE_USERSPACE_TYPES__ to use int_ll64.h
rather than int_ll64.h on mips64.
This depends on external/kernel-headers patch
 https://android-review.googlesource.com/#/c/98915/
 http://patchwork.linux-mips.org/patch/6890/

Change-Id: If65fa80746533723cdf46eebe95733bea7ce24ba
2014-06-20 10:46:28 -07:00
Christopher Ferris
eee5f173d1 Merge "[MIPS64] Adjust kernel/tools for mips32,mips64 headers" 2014-06-20 02:09:57 +00:00
Dan Albert
8ca440089f Use __builtin_*_chk for bcopy/bzero.
Replacing memmove/memset with their builtin check equivalents fixes an
implicit definition warning when only including strings.h.

Change-Id: I74f03b9506ea37f5c2f9c11498e379a70998b430
2014-06-23 08:30:40 -07:00
Elliott Hughes
fb0a3622f7 Merge "Cache getpid." 2014-06-20 00:26:25 +00:00
Elliott Hughes
7086ad6919 Cache getpid.
In practice, with this implementation we never need to make a system call.
We get the main thread's tid (which is the same as our pid) back from
the set_tid_address system call we have to make during initialization.
A new pthread will have the same pid as its parent, and a fork child's
main (and only) thread will have a pid equal to its tid, which we get for
free from the kernel before clone returns.

The only time we'd actually have to make a getpid system call now is if
we take a signal during fork and the signal handler calls getpid. (That,
or we call getpid in the dynamic linker while it's still dealing with its
own relocations and hasn't even set up the main thread yet.)

Bug: 15387103
Change-Id: I6d4718ed0a5c912fc75b5f738c49a023dbed5189
2014-06-20 09:06:57 -07:00
Elliott Hughes
d5706a1a84 am 87170203: am e58055f0: Merge "Expose tzname, daylight, and timezone."
* commit '8717020375529de8b6027b9040c34246e9a97f9d':
  Expose tzname, daylight, and timezone.
2014-06-19 23:21:10 +00:00
Elliott Hughes
dc042c64d1 am 9d963b40: am d1bf3778: Merge "Build tzcode with hidden visibility."
* commit '9d963b406b9e2ac98a820b868c99be91a0f5842d':
  Build tzcode with hidden visibility.
2014-06-19 22:34:29 +00:00
Elliott Hughes
06366724d5 Expose tzname, daylight, and timezone.
These were accidentally hidden.

Bug: 11156955
Change-Id: I380f00bdafa547aea13d4634f3de9ec6f0b50a6f
2014-06-19 16:08:03 -07:00