Commit Graph

4911 Commits

Author SHA1 Message Date
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
Elliott Hughes
dbb4328da3 am abd03d34: am 29e3a0e3: Merge "Fix arm64 localtime.c build."
* commit 'abd03d348c13b5d5301702151e0729f6a491092f':
  Fix arm64 localtime.c build.
2014-06-19 21:37:43 +00:00
Elliott Hughes
15dcc6f4cb am ef0273e1: am 477b45b8: Merge "Build tzcode with -Werror."
* commit 'ef0273e130e171523e256efc2f077dbccca50ad6':
  Build tzcode with -Werror.
2014-06-19 21:29:14 +00:00
Elliott Hughes
d10db82619 Build tzcode with hidden visibility.
Bug: 11156955
Change-Id: Ib98d837b56cbbdfd01687cb3054fe3103eec0da9
2014-06-19 14:49:30 -07:00
Elliott Hughes
2cb752664b Fix arm64 localtime.c build.
I'm sick of having so many different compilers.

Change-Id: I9088c38df2504e2b827d0ce5ba0fa551ae48f8f9
2014-06-19 14:19:24 -07:00
Elliott Hughes
a2e7dc7cef am 442a0b1c: am 942fa486: Merge "Update localtime.c."
* commit '442a0b1ca3a4a1ae0ddc022991bc25f8df92b23f':
  Update localtime.c.
2014-06-19 18:18:23 +00:00
Christopher Ferris
66802993d5 am fa817e64: am 5c864766: Merge "add 64-bit bionic implementation for denver arch"
* commit 'fa817e64e9a422b6c9380b81597cf8bf8d44849f':
  add 64-bit bionic implementation for denver arch
2014-06-19 18:09:11 +00:00
Dan Albert
3b46eaa80c am 6eeb6176: am 0df59bd3: Merge "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64.""
* commit '6eeb61767d367258bb5709265769a3a931090529':
  Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."
2014-06-19 10:04:11 +00:00
Dan Albert
715242fd0f Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."
This reverts commit dd4ad5c463.

Change-Id: If3c9771825e460ce68604082f4feb0ca783e56c6
2014-06-19 03:57:05 +00:00
Christopher Ferris
15d0e2a1c1 am 79cd486d: am 0b09153c: Merge "Move common macros into bionic_macros.h."
* commit '79cd486d54edd1fbaf6b33872f5c35e273d3c324':
  Move common macros into bionic_macros.h.
2014-06-18 23:03:26 +00:00
Dan Albert
0df59bd3a5 Merge "Revert "Hide _tolower_tab_ and _toupper_tab_ on LP64."" 2014-06-18 22:48:04 +00:00
Dan Albert
ee5b17b479 am 9fbcc435: am a5fe7b89: Merge "Hide _tolower_tab_ and _toupper_tab_ on LP64."
* commit '9fbcc435dc8ab7d82653230c810e3071c5b5cc06':
  Hide _tolower_tab_ and _toupper_tab_ on LP64.
2014-06-18 21:40:32 +00:00
Dan Albert
65e8bca624 am 9ac80645: am 49d5399b: Merge "Hide __atexit and remove __atexit_invalid."
* commit '9ac80645542e03559ecee6524d87791b1b1f5fd7':
  Hide __atexit and remove __atexit_invalid.
2014-06-18 21:40:29 +00:00
Dan Albert
dd4ad5c463 Hide _tolower_tab_ and _toupper_tab_ on LP64.
We can't hide them on LP32 because they appeared in NDK headers.

Bug: 11156955
Change-Id: I22bf5a0f4d330c04b49565bc598cd0568128d4fc
2014-06-18 13:11:07 -07:00
Dan Albert
a5fe7b8952 Merge "Hide _tolower_tab_ and _toupper_tab_ on LP64." 2014-06-18 19:25:04 +00:00
Dan Albert
1cd8f57cbc am b29a7f1d: am ef82c28d: Merge "Hide declaration of gets(3) for C11 and later."
* commit 'b29a7f1d29a1183c1f1a67433f36ae09cf1eee89':
  Hide declaration of gets(3) for C11 and later.
2014-06-18 01:54:57 +00:00
Dan Albert
3bb25acb46 am b86ffd8d: am 1ef3ba2b: Merge "Revert "Hide declaration of gets(3) for C11 and later.""
* commit 'b86ffd8d82c177b393e6ed3199ee94331776afc7':
  Revert "Hide declaration of gets(3) for C11 and later."
2014-06-17 23:44:26 +00:00
Dan Albert
7cd4e72561 am 285a1c13: am 185c399c: Merge "Hide declaration of gets(3) for C11 and later."
* commit '285a1c13482f64813dd8f5dd54b479199c0f2569':
  Hide declaration of gets(3) for C11 and later.
2014-06-17 23:34:10 +00:00
Dan Albert
9635046e53 Hide declaration of gets(3) for C11 and later.
gets(3) was removed from C11.

This reverts commit 1291680c2a.

Bug: 14500800
Change-Id: I5e5146bdbb80f2be818a17f287b112bab37d1f6d
2014-06-17 17:37:06 -07:00
Elliott Hughes
8a72b6187f am 775b2a0d: am 4ac22649: Merge "Add <linux/tty.h> to libc/include/sys/ioctl.h"
* commit '775b2a0d9ca8ba17f9f443b203536c9879bd519c':
  Add <linux/tty.h> to libc/include/sys/ioctl.h
2014-06-17 21:58:19 +00:00
Elliott Hughes
5f564540a9 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
2014-06-19 13:54:10 -07:00
Elliott Hughes
942fa486f6 Merge "Update localtime.c." 2014-06-17 21:42:00 +00:00
Elliott Hughes
906eb9999b 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
8a8b0c9bfc.

Bug: 14468519
Change-Id: Ic28600115afda7f3158d91255edf422678bac082
2014-06-18 19:48:14 -07:00
Christopher Ferris
5c8647665c Merge "add 64-bit bionic implementation for denver arch" 2014-06-17 21:42:00 +00:00
Christopher Ferris
0b09153c12 Merge "Move common macros into bionic_macros.h." 2014-06-17 21:42:00 +00:00
Christopher Ferris
03eebcb6e8 Move common macros into bionic_macros.h.
Bug: 15590152
Change-Id: I730636613ef3653f68c5ab1d43b53beaf8e0dc25
2014-06-18 14:23:46 -07:00
Dan Albert
11f715c62e Hide __atexit and remove __atexit_invalid.
Bug: 11156955
Change-Id: I8c72edee8ecb92b75a282384277253bae19f7455
2014-06-18 13:19:22 -07:00
Dan Albert
1ef3ba2b4f Merge "Revert "Hide declaration of gets(3) for C11 and later."" 2014-06-17 20:56:23 +00:00
Dan Albert
1291680c2a Revert "Hide declaration of gets(3) for C11 and later."
Breaks stlport. checkbuild lied to me?

This reverts commit c0ce590827.

Change-Id: I72fb21aba7eaea96a7c3208236fd03411527fa5e
2014-06-17 23:28:38 +00:00
Dan Albert
c0ce590827 Hide declaration of gets(3) for C11 and later.
gets(3) was removed from C11.

Change-Id: I4040a8a6c6d5d2a86878e8a80ca67964fbbb82a8
2014-06-17 15:52:07 -07:00
Elliott Hughes
4ac2264944 Merge "Add <linux/tty.h> to libc/include/sys/ioctl.h" 2014-06-17 20:56:23 +00:00
Dan Albert
185c399c58 Merge "Hide declaration of gets(3) for C11 and later." 2014-06-17 20:49:57 +00:00
Christopher Ferris
49b7175138 am d61729c0: am b656410a: Merge "Use a separate config.h for config like defines."
* commit 'd61729c0a55ce139c57cbf526cbfd3e448e3d3f1':
  Use a separate config.h for config like defines.
2014-06-17 18:35:46 +00:00
Christopher Ferris
b656410a73 Merge "Use a separate config.h for config like defines." 2014-06-17 04:51:41 +00:00
Christopher Ferris
6361964381 Use a separate config.h for config like defines.
This allows an easier way to share config parameters between unit tests
and the bionic code.

It also fixes a problem where the 32 bit bionic tests based on glibc, or
the cts list executable did not have the pvalloc,valloc tests.

Change-Id: Ib47942cb8a278252faa7498a6ef23e9578db544f
2014-06-16 23:35:53 -07:00
Christopher Ferris
c92354b66d am 6589ba15: am d10d3acd: Merge "Move jemalloc due to whole_static_library bug."
* commit '6589ba1561fd97785a0eb5c2eb8cc7d41a5b83e1':
  Move jemalloc due to whole_static_library bug.
2014-06-17 01:47:47 +00:00
Dan Albert
c82c0b7e07 Remove SHA1 from LP64 in favor of libcrypto.
Keep the symbols around on LP32 for binary compatibility.

Bug: 11156955
Change-Id: I379a7e0fa3092e9a70daeafcbcb2aacfc314031a
2014-06-16 16:52:27 -07:00
Dan Albert
c4978a5646 am 7a11b7a6: am a217a0cd: Merge "libc: Fix \'index\' symbol export."
* commit '7a11b7a674805f8373fd9f126ee46721ccab8eeb':
  libc: Fix 'index' symbol export.
2014-06-16 22:13:20 +00:00
Dan Albert
f3fc2fe72c am c732859d: am 4fb0d4fb: Merge "Revert "Revert "Remove ftime from bionic LP64"""
* commit 'c732859d241a182dc0a9c8b2a2bca9ec5926cd39':
  Revert "Revert "Remove ftime from bionic LP64""
2014-06-16 22:13:08 +00:00
Dan Albert
15d00e2989 am f49791fd: am 9a3ad98f: Merge "Removes getdtablesize(3) from LP64."
* commit 'f49791fd8767a3b09fe70febc9142da45c4398f1':
  Removes getdtablesize(3) from LP64.
2014-06-16 22:13:05 +00:00
Elliott Hughes
b618aa818d am fe6e646c: Update NOTICE files.
* commit 'fe6e646cb79fe15d7815fdb9c92cc66be56ab1d4':
  Update NOTICE files.
2014-06-16 20:05:43 +00:00
Dan Albert
ac6467587e Revert "Revert "Remove ftime from bionic LP64""
This reverts commit 0921204660.

Change-Id: I749af8d7d429cda9f9d09a75bd30df54e6b1dd65
2014-06-16 12:32:38 -07:00
Elliott Hughes
fe6e646cb7 Update NOTICE files.
Change-Id: I459caf48ba861372a4d0bc75f98a9cb4acc20fd5
2014-06-16 10:24:37 -07:00
Dan Albert
462abab12b Removes getdtablesize(3) from LP64.
getdtablesize(3) was removed fro POSIX 2004. Keep the symbol around in LP32 for
binary compatibility, but remove the declaration from unistd.h.

Bug: 13935372
Change-Id: I1f96cd290bf9176f922dad58bd5a7ab2cae7ef0f
2014-06-16 10:12:37 -07:00
Christopher Ferris
3a37576d4b Move jemalloc due to whole_static_library bug.
Rename jemalloc.cpp to jemalloc_wrapper.cpp to avoid problems with
the libc library having two jemalloc.o files that clobber each other.

Change-Id: I9a2d966dbf414b1367ee0ef1f0d73fca6f25b518
2014-06-16 17:13:09 -07:00
David 'Digit' Turner
891dedb935 libc: Fix 'index' symbol export.
The C library didn't export the 'index' symbol, but its C++ name-mangling
instead, which broke the ABI and prevented some applications from loading
properly.

The main reason was that the implementation under bionic/index.cpp relied
on the declaration to specify that the function has C linkage.

However, the declaration for index() was removed from both <string.h>
and <strings.h> in a recent patch, which made the compiler think it was
ok to compile the function with C++ linkage instead!

This patch does the following:

- Move index() definition to bionic/ndk_cruft.cpp and ensure it uses
  C linkage.

  Note that this removes index() from the 64-bit library entirely, this
  is intentional and will break source compatibility. Simply replacing
  an index() call with the equivalent strchr() should be enough to fix
  this in third-party code.

- Remove bionic/index.cpp from the tree and build files.

- Remove x86 assembly implementation from arch-x86/ to avoid conflict
  with the one in ndk_cruft.cpp

BUG=15606653

Change-Id: I816b589f69c8f8a6511f6be6195d20cf1c4e8123
2014-06-16 13:10:20 -07:00
Dan Albert
ca24f7dcfa am 38ebfc09: am 72dc1c22: Merge "Revert "Backing this one out since the counterpart needs to be sent upstream.""
* commit '38ebfc09ea610687d028db5f0a7b8f6789932288':
  Revert "Backing this one out since the counterpart needs to be sent upstream."
2014-06-14 01:22:09 +00:00
Dan Albert
758f56d368 am 54c61d57: am b84783ec: Merge "Backing this one out since the counterpart needs to be sent upstream."
* commit '54c61d5715715ac7f1c6a4f7a53f981e09dc7134':
  Backing this one out since the counterpart needs to be sent upstream.
2014-06-14 01:17:44 +00:00
Dan Albert
dd45ea3c08 am 263fe685: am 65b1c90a: Merge "Hides valloc(3)/pvalloc(3) on LP64."
* commit '263fe68548f430d532517056963cb5de6863b9cc':
  Hides valloc(3)/pvalloc(3) on LP64.
2014-06-14 00:58:02 +00:00
Dan Albert
4ef9bbb01d am 080c820d: am b725e762: Merge "Removes wait3(2) from LP64."
* commit '080c820d3f4506f5ef2c2ccc90c0197342b33472':
  Removes wait3(2) from LP64.
2014-06-14 00:58:02 +00:00
Dan Albert
0af830d29c am 0021dcef: am f87ac523: Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64."
* commit '0021dcef7214823824555d9d694a59e2f4aba45d':
  Remove ioprio_get(2) and ioprio_set(2) from LP64.
2014-06-13 22:26:51 +00:00
Elliott Hughes
1f29fd72c8 am 7e6f6965: am 1e7ae47d: Merge "Bring our "libresolv" stuff in line with glibc."
* commit '7e6f6965982183ebae357e61e7bad55b91e97cc9':
  Bring our "libresolv" stuff in line with glibc.
2014-06-13 21:50:45 +00:00
Elliott Hughes
edf7d7a723 am f005d976: am 15330331: Merge "Upgrade to tzdata2014e."
* commit 'f005d9769096d92a31d3b4377d29fcc251a07c87':
  Upgrade to tzdata2014e.
2014-06-13 21:50:16 +00:00
Elliott Hughes
773b85eff8 am a335c869: am 0f690d9e: Merge "Fix x86-64 libvpx build."
* commit 'a335c869748b133c661cc1efff3028984ee9f7aa':
  Fix x86-64 libvpx build.
2014-06-13 10:24:38 +00:00
Qiming Shi
0069f31066 Add <linux/tty.h> to libc/include/sys/ioctl.h
This is the change to export the tty ldisc definitions (like N_TTY)
from Linux uapi kernel header. So bionic is compatbile with glibc
which has its own tty ldisc definition exported through ioctl.h

Change-Id: I44e4c7cc2eba31549e9c9c75f74961a949d4a696
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
Signed-off-by: Yin, Fengwei <fengwei.yin@intel.com>
2014-06-13 16:39:39 +08:00
Elliott Hughes
62e50ea8de am 294cae0f: am 1aaed87f: Merge "Somewhere, the declaration of _resolv_delete_cache_for_net went missing."
* commit '294cae0f18ceae96e1a5f8b42ae9fd8064b98746':
  Somewhere, the declaration of _resolv_delete_cache_for_net went missing.
2014-06-13 01:51:30 +00:00
Christopher Ferris
ec93f16302 am 9552809d: am 2ba734d8: Merge "Fix %u format that should have been %zu."
* commit '9552809d30a6f1ac54af8c8e9bcb616bd4da6c93':
  Fix %u format that should have been %zu.
2014-06-13 01:31:43 +00:00
Elliott Hughes
48691a0bb4 am eb917428: am ff17671b: Merge "Add a hack to <stdlib.h> until we can fix libvpx."
* commit 'eb91742861607539fa88ae6d962597dde00ff860':
  Add a hack to <stdlib.h> until we can fix libvpx.
2014-06-13 01:12:14 +00:00
Elliott Hughes
bbc485c892 am cc24144e: am 5d25d548: Merge "Remove __memcmp16 from bionic."
* commit 'cc24144e5b431d5eb7d688a7f8f32c743c6469e0':
  Remove __memcmp16 from bionic.
2014-06-13 00:54:44 +00:00
Elliott Hughes
b38018f786 am c189362d: am 564222e3: Merge "Use default hidden visibility to build libc_dns."
* commit 'c189362d879520243cc9e1ba65b9828165efa159':
  Use default hidden visibility to build libc_dns.
2014-06-13 00:48:44 +00:00
Christopher Ferris
658150d431 am d92ba899: am 29ddd78c: Merge "Put all allocation functions into dispatch table."
* commit 'd92ba899450953e5ec9259f826c1790fc09004f7':
  Put all allocation functions into dispatch table.
2014-06-13 00:48:43 +00:00
Elliott Hughes
78ad3cd2eb am d13ff0f0: am 346fa721: Merge "Get the full set of PRNG functions in <stdlib.h>"
* commit 'd13ff0f0b3c228753b11ac55015618978b49ada3':
  Get the full set of PRNG functions in <stdlib.h>
2014-06-12 22:05:50 +00:00
Elliott Hughes
addd6a2f1d Upgrade to tzdata2014e.
From the release notes:

  Changes affecting near-future time stamps

    Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00.
    (Thanks to Imed Chihi.)  Guess that from 2015 on Egypt will temporarily
    switch to standard time at 24:00 the last Thursday before Ramadan, and
    back to DST at 00:00 the first Friday after Ramadan.

    Similarly, Morocco's are June 28 at 03:00 and August 2 at 02:00. (Thanks
    to Milamber Space Network.)  Guess that from 2015 on Morocco will
    temporarily switch to standard time at 03:00 the last Saturday before
    Ramadan, and back to DST at 02:00 the first Saturday after Ramadan.

  Changes affecting past time stamps

    The abbreviation "MSM" (Moscow Midsummer Time) is now used instead of
    "MSD" for Moscow's double daylight time in summer 1921.  Also, a typo
    "VLASST" has been repaired to be "VLAST" for Vladivostok summer time
    in 1991.  (Thanks to Hank W. for reporting the problems.)

Change-Id: Iaca5e8c2d572559b464b10d24f4315405e413ada
2014-06-13 10:55:19 -07:00
Elliott Hughes
e61919ad11 Fix x86-64 libvpx build.
This is now fixed upstream, but we need to wait for it to come back down
via chromium...

Bug: 15598056
Change-Id: I08f1be4296c391cfc1616a5ff0815be14071594a
2014-06-12 20:07:47 -07:00
Christopher Ferris
2ba734d8cd Merge "Fix %u format that should have been %zu." 2014-06-12 21:07:49 +00:00
Christopher Ferris
580b6e09fe Fix %u format that should have been %zu.
Change-Id: Icedacf6783d6b0cf4783c838b3c4622d2e67f073
2014-06-12 18:20:44 -07:00
Christopher Ferris
a403780538 Put all allocation functions into dispatch table.
Implement these new functions for all of the debug malloc types.

Fix a number of bugs in the debug malloc functions related to overflow
conditions.
Fix a bug in dlpvalloc due to an overflow condition.

Fix various other bugs in the debug malloc functions.

Add new tests for malloc functions.

Bug: 11225066

Change-Id: Idf50f389603e2157645565bc15cd9365eec2e9dd
2014-06-12 15:08:18 -07:00
Christopher Ferris
29ddd78c21 Merge "Put all allocation functions into dispatch table." 2014-06-12 21:07:49 +00:00
Dan Albert
8e20420064 am fde37008: am 37b845f9: Merge "Remove declaration for putw(3)/getw(3)."
* commit 'fde37008e514d408ba8075144a1903c1509707e8':
  Remove declaration for putw(3)/getw(3).
2014-06-12 20:33:33 +00:00
Elliott Hughes
fcaa13e354 am e1c47a2e: am d242aff4: Merge "Fix most of the tzcode warnings."
* commit 'e1c47a2e87985d339ef5a85dbf637c42736b0ba7':
  Fix most of the tzcode warnings.
2014-06-12 19:23:42 +00:00
Shu Zhang
0ef7a8fd31 add 64-bit bionic implementation for denver arch
Add 64-bit bionic implementation for denver. memcpy/memset are
denver-specific optimized. Use generic version of other routines.

Change-Id: I44a830e07b82b2986001d73d1540b4080aaa839b
2014-06-12 15:08:27 +08:00
Dan Albert
72dc1c22dc Merge "Revert "Backing this one out since the counterpart needs to be sent upstream."" 2014-06-12 05:34:11 +00:00
Dan Albert
e5fdaa4f9d Revert "Backing this one out since the counterpart needs to be sent upstream."
This reverts commit a04d2bc28e.

Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
2014-06-14 01:04:31 +00:00
Dan Albert
a04d2bc28e Backing this one out since the counterpart needs to be sent upstream.
This reverts commit 5ee320dd35.

Change-Id: I1a9c6b06c3aca595f01c629f7649be743dc48e77
2014-06-14 00:51:14 +00:00
Dan Albert
5ee320dd35 Hides valloc(3)/pvalloc(3) on LP64.
These were removed from POSIX 2004. Hides the header declarations for all
targets, and hides the symbols for LP64.

Bug: 13935372
Change-Id: Id592f67e9b7051517a05f536e1373b30162e669c
2014-06-13 15:35:05 -07:00
Dan Albert
b84783ecaa Merge "Backing this one out since the counterpart needs to be sent upstream." 2014-06-12 05:34:11 +00:00
Elliott Hughes
5d25d5480a Merge "Remove __memcmp16 from bionic." 2014-06-12 05:34:11 +00:00
Elliott Hughes
24614b4729 Remove __memcmp16 from bionic.
Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
2014-06-12 15:35:22 -07:00
Elliott Hughes
564222e338 Merge "Use default hidden visibility to build libc_dns." 2014-06-12 05:34:11 +00:00
Elliott Hughes
8563802b04 Use default hidden visibility to build libc_dns.
Bug: 11156955
Change-Id: Ia443705f5fbee0681039d4480abc89850968f475
2014-06-12 13:35:41 -07:00
Dan Albert
37b845f9e4 Merge "Remove declaration for putw(3)/getw(3)." 2014-06-12 05:34:11 +00:00
Dan Albert
65b1c90a32 Merge "Hides valloc(3)/pvalloc(3) on LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
b725e7627f Merge "Removes wait3(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
8229ae46f4 Removes wait3(2) from LP64.
wait3(2) was removed from POSIX 2004. Keep the symbol around in LP32 for binary
compatibility, but remove the declaration in sys/wait.h.

Bug: 13935372
Change-Id: Ic715fce6781aae43b4ac6d745dc6d1e6b9914e71
2014-06-13 16:04:41 -07:00
Dan Albert
f87ac523a1 Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
607341e226 Remove ioprio_get(2) and ioprio_set(2) from LP64.
Bug: 11156955
Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
2014-06-12 18:10:13 -07:00
Elliott Hughes
1e7ae47d40 Merge "Bring our "libresolv" stuff in line with glibc." 2014-06-12 03:32:07 +00:00
Elliott Hughes
e8e453439f Bring our "libresolv" stuff in line with glibc.
Despite the name, most of resolv_private.h is actually in glibc; it's just
that there it's tucked away in libresolv whereas we have it in libc.

Change-Id: Ibcf6603f1141ffd2661cee0bffa83052d4f9e549
2014-06-13 11:50:07 -07:00
Elliott Hughes
7f2d4c21cc Somewhere, the declaration of _resolv_delete_cache_for_net went missing.
I couldn't work out where this went missing from "git log", but it became
important with the switch to hidden visibility.

Change-Id: I921f81e36642a2c65c3ec85dc9b5b87c5d977a5b
2014-06-12 18:40:06 -07:00
Elliott Hughes
ff17671bc6 Merge "Add a hack to <stdlib.h> until we can fix libvpx." 2014-06-12 03:32:07 +00:00
Elliott Hughes
3fb5097a7e Add a hack to <stdlib.h> until we can fix libvpx.
libvpx should probably change its assembler to refer to lrand48 directly,
because that will work on old and new versions of Android. This keeps things
building until that happens.

Bug: 15598056
Change-Id: I4a1f59e710a083b9f9a707ceeb9ca0a28141a954
2014-06-12 17:50:52 -07:00
Elliott Hughes
346fa721ca Merge "Get the full set of PRNG functions in <stdlib.h>" 2014-06-12 03:32:07 +00:00
Elliott Hughes
a0beeeabbc Get the full set of PRNG functions in <stdlib.h>
Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I435250bdae302e8bd7e29977d0fde7b9afbfca5e
2014-06-12 14:37:31 -07:00
Elliott Hughes
ea13c54b17 am e02086a6: am 2c02d005: Merge "Add __pure2 to a few more functions, most notably gettid and pthread_self."
* commit 'e02086a6dc789b427c817b39a6adb9c50db8f70d':
  Add __pure2 to a few more functions, most notably gettid and pthread_self.
2014-06-11 23:44:01 +00:00
Dan Albert
cb7048138a am 6f7f1caa: am 48082a0a: Merge "Remove declarations related to cuserid(3)."
* commit '6f7f1caa1dc14c3f8b522653d20aa5075b7203f2':
  Remove declarations related to cuserid(3).
2014-06-11 21:49:00 +00:00
Dan Albert
8e613cf342 Remove declaration for putw(3)/getw(3).
These were both removed from POSIX 2004, and we don't define an
implementation for getw(3). Keep the definition of put(3) on LP32 for
binary compatibility.

Bug: 13935372
Change-Id: Iba384b45093ac6d2d7c2d81f7980cd7701dd6f56
2014-06-11 14:41:45 -07:00
Dan Albert
4880b0a820 am abf16559: am 440bd6bc: Merge "Replaces vfork() implementation with fork()"
* commit 'abf16559d31c49d52fba6f42a3d7b4566de0493b':
  Replaces vfork() implementation with fork()
2014-06-11 21:38:19 +00:00
Elliott Hughes
617573af9f am b94b1bc0: am 80664231: Merge "Revert "Temporarily expose dlmalloc_usable_size.""
* commit 'b94b1bc0342744d351db8f7720dfec8bd2279784':
  Revert "Temporarily expose dlmalloc_usable_size."
2014-06-11 21:37:50 +00:00
Elliott Hughes
5204a9e8ca Fix most of the tzcode warnings.
There's one left, but that's not fixed upstream yet.

Change-Id: Iba920cb7b156357c7f5e8220eb55ff1637ff48a1
2014-06-11 17:15:56 -07:00
Elliott Hughes
4e863b2f21 am df8a09b1: am 2b8246fa: Merge "Hide rand48 implementation details."
* commit 'df8a09b132573b021850fe41ed23ec6684d9b329':
  Hide rand48 implementation details.
2014-06-11 18:37:20 +00:00
Elliott Hughes
f1771794af am 228b33e9: am bdcab25e: Merge "Hide non-standard syslog API."
* commit '228b33e90c34a1392e77b4a9100210233a390ad0':
  Hide non-standard syslog API.
2014-06-11 18:37:18 +00:00
Elliott Hughes
f2a131cf4e am 97fbf8e7: am 87d4233c: Merge "Remove the MD5 implementation that was only used by toolbox."
* commit '97fbf8e746ca6e90f890a43d759a16901882c93a':
  Remove the MD5 implementation that was only used by toolbox.
2014-06-11 18:18:51 +00:00
Dan Albert
cd32219c5b Remove declarations related to cuserid(3).
cuserid(3) was removed from POSIX 2004, and we don't have an
implementation anyway.

Bug: 13935372
Change-Id: I7ac7cde931ba802d0d5b917c22f5116618b21d2f
2014-06-11 13:20:18 -07:00
Elliott Hughes
80664231b8 Merge "Revert "Temporarily expose dlmalloc_usable_size."" 2014-06-10 22:20:24 +00:00
Elliott Hughes
2c02d0057c Merge "Add __pure2 to a few more functions, most notably gettid and pthread_self." 2014-06-10 22:15:14 +00:00
Elliott Hughes
b27a840f4b Add __pure2 to a few more functions, most notably gettid and pthread_self.
Change-Id: I7eee9f26f45130038af09d8285782b07f70a996f
2014-06-11 16:32:10 -07:00
Dan Albert
440bd6bcc3 Merge "Replaces vfork() implementation with fork()" 2014-06-10 22:08:45 +00:00
Dan Albert
210331d976 Replaces vfork() implementation with fork()
vfork() was removed from POSIX 2008, so this replaces its implementation
with a call to fork().

Bug: 13935372
Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
2014-06-10 21:38:52 -07:00
Elliott Hughes
809093bc21 Hide rand48 implementation details.
Bug: 11156955
Change-Id: I130272286989487dc22e246fb4ffbee5230225c4
2014-06-09 18:10:20 -07:00
Elliott Hughes
a382a792a4 Hide non-standard syslog API.
The definitions are still available on LP32 for binary compatibility, but
they're gone on LP64, and the declarations are gone everywhere.

We should probably just make syslog(3) log to the regular Android log,
but that's a job for another day.

Bug: 11156955
Change-Id: I74a98c92f7922ea733549ec6d37c6fa8b7014860
2014-06-09 17:42:14 -07:00
Elliott Hughes
87d4233c72 Merge "Remove the MD5 implementation that was only used by toolbox." 2014-06-09 23:29:21 +00:00
Elliott Hughes
67401638a9 Remove the MD5 implementation that was only used by toolbox.
I've already moved toolbox over to openssl.

Change-Id: Ia75fba5b5e3335a975b97787f653bf4df78e1b4e
2014-06-09 16:26:29 -07:00
Elliott Hughes
4e33504927 am 1dcb8471: am 36ed5971: Merge "AArch64: Remove Frame Record from ARM64 syscalls"
* commit '1dcb84712c2dad520eb49e283bff06ae47a6c1b1':
  AArch64: Remove Frame Record from ARM64 syscalls
2014-06-09 19:39:21 +00:00
Serban Constantinescu
602b4e482c AArch64: Remove Frame Record from ARM64 syscalls
This patch removes the frame record created on svc calls.

Change-Id: I67cf926ba59540e824fb9749d30538e332df7c1e
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2014-06-09 11:36:37 -07:00
Elliott Hughes
47907ba49b am 3b1e9bf3: am e18c2714: Merge "Add the missing issetugid binary compatibility stub."
* commit '3b1e9bf3e9bec519a75031dda231cdbfbac53005':
  Add the missing issetugid binary compatibility stub.
2014-06-07 09:57:41 +00:00
Elliott Hughes
44ac8af8ed am 20811f9e: am 19718f0c: Merge "Rewrite and hide longjmperror."
* commit '20811f9e87b86ba7171b9c9480a9212d787c732e':
  Rewrite and hide longjmperror.
2014-06-07 03:56:27 +00:00
Elliott Hughes
bffbfeed7a Add the missing issetugid binary compatibility stub.
Bug: 14569474
Change-Id: I3bedc1a0acf356af76424ceaf62ae7e85239f617
2014-06-06 20:41:42 -07:00
Elliott Hughes
19718f0cd6 Merge "Rewrite and hide longjmperror." 2014-06-07 03:35:28 +00:00
Christopher Ferris
28f321aa0f am 1b8163f5: am 1cada9b3: Merge "Remove unused scripts."
* commit '1b8163f5e686bc2405731d529c684c06bae65f17':
  Remove unused scripts.
2014-06-07 02:11:49 +00:00
Elliott Hughes
47ba295b06 Rewrite and hide longjmperror.
This shouldn't be public API, isn't supported on x86/x86_64, and it's
unlikely anyone would have actually seen the message before anyway.
Using __libc_fatal makes it much more likely to be seen.

Bug: 11156955
Change-Id: Icf7f654b22a7dacd89668b60c11e5705c7215c08
2014-06-06 16:49:39 -07:00
Elliott Hughes
3b9da0f99a Fix the printf family for non-ASCII.
The bug here turned out to be that we hadn't increased the constant
corresponding to the maximum number of bytes in a character to match
our new implementation, so any character requiring more than a byte
in UTF-8 would break our printf family.

Bug: 15439554

(cherry picked from commit 69f05d291d)

Change-Id: Ia5467e22ccb022e8d118de82291916050656147e
2014-06-06 16:25:13 -07:00
Elliott Hughes
53495dad3a am afd4df20: am 6fa47ca4: Merge "Fix ndk_cruft.cpp __getdents64 build failure."
* commit 'afd4df20c99e52be84d1cac2108c18619f32b5f2':
  Fix ndk_cruft.cpp __getdents64 build failure.
2014-06-06 22:45:50 +00:00
Elliott Hughes
12e98b459d am 655dba09: am 1c60f808: Merge "Rename __bionic_clone_entry to __start_thread."
* commit '655dba09c72ceb5852dae296cef49cbad6b1053f':
  Rename __bionic_clone_entry to __start_thread.
2014-06-06 22:45:50 +00:00
Elliott Hughes
449e4aa0a8 am e932f5b5: am 087b3cfa: Merge "Add a few more C11 functions to the whitelist."
* commit 'e932f5b5d89fcffe1c2e9e68eac4e9092f24719e':
  Add a few more C11 functions to the whitelist.
2014-06-06 22:45:49 +00:00
Elliott Hughes
3f508b3fc0 am 132a66be: am 3e0e7eea: Merge "Remove getdents from bionic."
* commit '132a66be4692840b13b3a6d6fb93d6e7965003c5':
  Remove getdents from bionic.
2014-06-06 22:45:48 +00:00
Christopher Ferris
4ff5aa3568 am 5261fd2c: am b837767a: Merge "Update kernel header generation docs."
* commit '5261fd2cacc8a53643089cab9fbbeb8142f98dea':
  Update kernel header generation docs.
2014-06-06 22:35:55 +00:00
Christopher Ferris
ab39aba70e Remove unused scripts.
Change-Id: I3391d6c903f710b45e62bcf01058cf3ad9abe399
2014-06-06 15:28:42 -07:00
Elliott Hughes
6fa47ca484 Merge "Fix ndk_cruft.cpp __getdents64 build failure." 2014-06-06 22:25:19 +00:00
Elliott Hughes
1c60f8080a Merge "Rename __bionic_clone_entry to __start_thread." 2014-06-06 22:24:44 +00:00
Elliott Hughes
d1ead2af8b Fix ndk_cruft.cpp __getdents64 build failure.
Change-Id: Ia463113da0575b36b5a9935d8d45e7bd2c801357
2014-06-06 15:24:20 -07:00
Elliott Hughes
f6b1d439cc Add a few more C11 functions to the whitelist.
Change-Id: Ie2e767910d7cc8a78c05e29960cf4ab52a59fe9d
2014-06-06 15:20:50 -07:00
Elliott Hughes
ebc8cd117a Rename __bionic_clone_entry to __start_thread.
This seems a bit less obscure.

Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
2014-06-06 15:18:54 -07:00
Elliott Hughes
3e0e7eea49 Merge "Remove getdents from bionic." 2014-06-06 22:17:59 +00:00
Christopher Ferris
b837767a63 Merge "Update kernel header generation docs." 2014-06-06 22:10:19 +00:00
Elliott Hughes
3d5cb30d23 Remove getdents from bionic.
Bug: 11156955
Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
2014-06-06 15:05:58 -07:00
Christopher Ferris
08b60747fe Update kernel header generation docs.
Also move the description of the cleanup data to the cleanup script.

Bug: 15433575
Change-Id: I21e2cbbfab55da483af1bbe36bbe59126b518e3c
2014-06-06 13:54:36 -07:00
Elliott Hughes
5f409720ec Merge "Use __libc_fatal() for failed malloc in new" into lmp-preview-dev 2014-06-06 18:33:03 +00:00
Dan Albert
acc2f79ed7 Use __libc_fatal() for failed malloc in new
This way we can print a useful message to the log isntead of just dying
mysteriously.

(cherry picked from commit 989725940e)

Bug: 13564922
Change-Id: I704e1263ec1e7556808348b821a20bacc934eb4a
2014-06-06 18:30:35 +00:00
Elliott Hughes
d45b2e5084 am fd0de89e: am c3bdc792: Merge "Fix the printf family for non-ASCII."
* commit 'fd0de89e4cd46de5f3439a7112c4dd25d62ec392':
  Fix the printf family for non-ASCII.
2014-06-06 18:26:25 +00:00
Elliott Hughes
c3bdc792be Merge "Fix the printf family for non-ASCII." 2014-06-06 18:06:44 +00:00
Elliott Hughes
bd7a892c30 Fix unwinding through x86-64 __bionic_clone.
x86-64 needs these CFI directives to stop unwinding here.
I've also cleaned up the assembler a little, and made x86 and x86-64
a little more alike.

Bug: 15195760

(cherry picked from commit aeb3016f81)

Change-Id: I511fe238b1ef1a1c16aef735f93bbee9accb0689
2014-06-06 10:00:32 -07:00
Elliott Hughes
69f05d291d Fix the printf family for non-ASCII.
The bug here turned out to be that we hadn't increased the constant
corresponding to the maximum number of bytes in a character to match
our new implementation, so any character requiring more than a byte
in UTF-8 would break our printf family.

Bug: 15439554
Change-Id: I693e5e6eb11c640b5886e848502908ec5fff53b1
2014-06-05 23:19:15 -07:00
Elliott Hughes
aa8979269b am 6db22710: am e2a54ca8: Merge "Remove unnecessary instructions from x86/x86_64 syscalls."
* commit '6db22710ce11766cc88f55f1e3c48d3167d5eb4c':
  Remove unnecessary instructions from x86/x86_64 syscalls.
2014-06-06 01:56:15 +00:00
Elliott Hughes
15a0456d0b Remove unnecessary instructions from x86/x86_64 syscalls.
__set_errno returns -1 exactly so that callers don't need to bother.
The other architectures were already taking advantage of this, but
no one had ever fixed x86 and x86_64.

Change-Id: Ie131494be664f6c4a1bbf8c61bbbed58eac56122
2014-06-05 17:24:30 -07:00
Elliott Hughes
76166f85e2 am a271b977: am 50b79530: Merge "Fix unwinding through x86-64 __bionic_clone."
* commit 'a271b97773e16974cb59b6636546641a14b0fe68':
  Fix unwinding through x86-64 __bionic_clone.
2014-06-05 23:59:54 +00:00
Elliott Hughes
50b79530c6 Merge "Fix unwinding through x86-64 __bionic_clone." 2014-06-05 23:38:19 +00:00
Elliott Hughes
aeb3016f81 Fix unwinding through x86-64 __bionic_clone.
x86-64 needs these CFI directives to stop unwinding here.
I've also cleaned up the assembler a little, and made x86 and x86-64
a little more alike.

Bug: 15195760
Change-Id: I40f92c007843c29c933bb6876fe2b4611e1b946b
2014-06-05 16:36:06 -07:00
Dan Albert
c99f9845fb am 802d4cab: am 9c101eb9: Merge "Removes index() from bionic."
* commit '802d4cabf37fc0008db3d7d265e18a0b6112ddb6':
  Removes index() from bionic.
2014-06-05 21:56:44 +00:00
Dan Albert
9c101eb9d1 Merge "Removes index() from bionic." 2014-06-05 21:34:49 +00:00
Christopher Ferris
72240e7b62 am 675a41f5: am 8ac8278b: Merge "Fix for slm-tuned memmove (both 32- and 64-bit)."
* commit '675a41f56eb65b91d8f3c39304869b6ae64fa983':
  Fix for slm-tuned memmove (both 32- and 64-bit).
2014-06-05 18:33:26 +00:00
Dan Albert
48089efd92 am a66c43ea: am 431aa4dc: Merge "Remove bsd_signal and sysv_signal from bionic LP64."
* commit 'a66c43eab073aae5e1e5754c476a5c39ece6930b':
  Remove bsd_signal and sysv_signal from bionic LP64.
2014-06-05 18:33:26 +00:00
Varvara Rainchik
fce861498c Fix for slm-tuned memmove (both 32- and 64-bit).
Introduce a test for memmove that catches a fault.
Fix both 32- and 64-bit versions of slm-tuned memmove.

Change-Id: Ib416def2610a0972e32c3b9b6055b54967643dc3
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-06-05 11:08:09 -07:00
Dan Albert
40fca0f08b Removes index() from bionic.
This function has been removed from POSIX.

Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place
because defining a preprocessor macro for index() breaks a whole lot of code.

Bug: 13935372
Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
2014-06-05 11:05:10 -07:00
Dan Albert
205dd7d9b3 Remove bsd_signal and sysv_signal from bionic LP64.
bsd_signal was removed in POSIX 2008, sysv_signal was never POSIX.

Bug: 13935372
Change-Id: I7688e5cc317247ff075dcf99b598f515fb4f15c4
2014-06-05 08:21:17 -07:00
Elliott Hughes
a6bd78a30a am 3cd4b783: am 8aabecf3: Merge "Hide __libc_fini."
* commit '3cd4b783fb7b0c0172934faef21792356fdf3385':
  Hide __libc_fini.
2014-06-05 09:47:59 +00:00
Dan Albert
6d9b463b72 am 60d57baf: am 76812041: Merge "Revert "Remove ftime from bionic LP64""
* commit '60d57baf5718f5d18dff4059b2f59f9d9b63dc0a':
  Revert "Remove ftime from bionic LP64"
2014-06-05 01:08:52 +00:00
Dan Albert
768120416b Merge "Revert "Remove ftime from bionic LP64"" 2014-06-05 00:50:56 +00:00
Dan Albert
0921204660 Revert "Remove ftime from bionic LP64"
Breaking some build... will look in to it later.

This reverts commit 26d6799bbe.

Change-Id: I35fa770221be3a181bd37c6c3dce1bf37a69a4a1
2014-06-05 00:50:43 +00:00
Dan Albert
8e89ed2e87 am 3d7fd883: am 428581fb: Merge "Remove ftime from bionic LP64"
* commit '3d7fd8836474497e2745e98df30e0fea6f4d4723':
  Remove ftime from bionic LP64
2014-06-05 00:01:53 +00:00
Dan Albert
428581fb45 Merge "Remove ftime from bionic LP64" 2014-06-04 23:42:27 +00:00
Elliott Hughes
31fee71b43 am a4edb723: am 37229f2a: Merge "Temporarily expose dlmalloc_usable_size."
* commit 'a4edb7235084cdf62149310fcb1653596f680948':
  Temporarily expose dlmalloc_usable_size.
2014-06-04 23:33:02 +00:00
Elliott Hughes
1f29665f15 Hide __libc_fini.
Bug: 11156955
Change-Id: Id5af3540c6ec4d9ef969d62a230144fe8bb76b0b
2014-06-04 16:29:37 -07:00
Dan Albert
26d6799bbe Remove ftime from bionic LP64
Bug: 13935372
Change-Id: I5dd31147143b23a090a3b75b846dc5354e599121
2014-06-04 16:25:24 -07:00
Elliott Hughes
67c437b231 Revert "Temporarily expose dlmalloc_usable_size."
This reverts commit 6403cc4870.

Change-Id: Id1ce4088be1e6c83271c6317eb3e5f7fc11c7b95
2014-06-04 23:14:48 +00:00
Elliott Hughes
6403cc4870 Temporarily expose dlmalloc_usable_size.
Bug: 15425694
Change-Id: I47e1ca598817359260c372fec8072e76886054f0
2014-06-04 16:08:17 -07:00
Elliott Hughes
c5a17834c4 am 02255f26: am 53e3bbab: Merge "Temporary fix for asan_malloc_linux.cc build failure."
* commit '02255f267448f88f16f3ddeaf5c701ab01a17c4b':
  Temporary fix for asan_malloc_linux.cc build failure.
2014-06-04 22:39:38 +00:00
Elliott Hughes
14442bb229 Temporary fix for asan_malloc_linux.cc build failure.
Bug: 15432753
Change-Id: I02a3a2c826e6d01e6809c51588a9670dcd179123
2014-06-04 15:20:46 -07:00
Elliott Hughes
aca22284fc am b27cb268: am 38732aa9: Merge "Fix debug malloc."
* commit 'b27cb268c0c1424c71d64b8a713983257d4de7ee':
  Fix debug malloc.
2014-06-04 21:49:25 +00:00
Dan Albert
ab86296461 am ea5c19c4: am 623dce3b: Merge "Removes wcswcs from bionic for LP64."
* commit 'ea5c19c4cf82eb97a0ee90d6e9c7dfe0c709e2fb':
  Removes wcswcs from bionic for LP64.
2014-06-04 21:33:35 +00:00
Elliott Hughes
38732aa9ea Merge "Fix debug malloc." 2014-06-04 21:10:55 +00:00
Elliott Hughes
8e52e8fe83 Fix debug malloc.
Previously the dynamically-loaded part of the debug malloc implementation
wanted to access hidden symbols in libc itself.

Bug: 15426546
Change-Id: I6a366ef626854d1af1d705ca24842817b1c02a19
2014-06-04 14:08:20 -07:00
Dan Albert
001f8f041b Removes wcswcs from bionic for LP64.
Bug: 13935372
Change-Id: I0deb15e769da4fa81bb65a87f3c86db5163a5796
2014-06-04 12:01:56 -07:00
Elliott Hughes
5406127ca0 am 8c5d3170: am e120cba3: Merge "Cherrypick upstream OpenBSD\'s vfwprintf.c revision 1.11."
* commit '8c5d3170411e00c8f0cc126d84e4b08e6a1223d1':
  Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
2014-06-04 17:32:11 +00:00
Dan Albert
bb87e9a823 am 4855a97e: am 452e0913: Merge "Adds functionality specified by uchar.h"
* commit '4855a97ed06500de7515e2984d9f44cae7bf756a':
  Adds functionality specified by uchar.h
2014-06-04 17:32:11 +00:00
Elliott Hughes
e120cba31d Merge "Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11." 2014-06-04 16:17:10 +00:00
Dan Albert
452e091300 Merge "Adds functionality specified by uchar.h" 2014-06-04 16:10:50 +00:00
Elliott Hughes
be8df2e744 Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
revision 1.11
date: 2014/06/04 07:45:25;  author: stsp;  state: Exp;  lines: +1 -7;  commitid:
 zJPRH5RUO224FmQu;
Remove assigned but unused local variables and macro from vfwprintf().
Found by Elliott @ google
ok mpi@

Change-Id: I716edc0c4d736a484a5317942de8e87bd8c6fd26
2014-06-04 09:00:25 -07:00
Dan Albert
7a7f9952c1 Adds functionality specified by uchar.h
mbrtoc32 and c32rtomb get their implementations from mbrtowc and wcrtomb. The
wc functions now simply call the c32 functions.

Bug: 14646575
Change-Id: I49d4b95fed0f9d790260c996c4d0f8bfd1686324
2014-06-04 08:39:24 -07:00
Elliott Hughes
27e3e3300c am 9a2aba17: am 38ed337c: Merge "Hide dlmalloc symbols."
* commit '9a2aba176a8b315207c728132591eea57f6b4d53':
  Hide dlmalloc symbols.
2014-06-04 03:51:18 +00:00
Elliott Hughes
38ed337c13 Merge "Hide dlmalloc symbols." 2014-06-04 03:30:37 +00:00
Elliott Hughes
9b5235d74e Hide dlmalloc symbols.
We need to leave dlmalloc_trim and dlmalloc_inspect_all exposed for
the VM, but if we're seriously looking at other malloc implementations,
that's something we're going to have to fix.

Bug: 11156955
Change-Id: If85156c280044f1616c09a3c50ba674aaf0e8d3a
2014-06-03 18:47:17 -07:00
Dan Albert
651dde33e4 am d90ded5a: am c3801894: Merge "Removes bcopy and bzero from bionic."
* commit 'd90ded5a911d5c37da49fb6179cf4ff5b9d48cb3':
  Removes bcopy and bzero from bionic.
2014-06-04 01:19:26 +00:00
Dan Albert
c380189410 Merge "Removes bcopy and bzero from bionic." 2014-06-04 01:00:40 +00:00
Dan Albert
ce9ce28e5d Removes bcopy and bzero from bionic.
These symbols are still defined for LP32 for binary compatibility, but
the declarations have been replaced with the POSIX recommended #defines.

Bug: 13935372
Change-Id: Ief7e6ca012db374588ba5839f11e8f3a13a20467
2014-06-03 17:22:07 -07:00
Elliott Hughes
ad5342a0c0 am 5bf90caa: am 3dbc2fe3: Merge "Work around "error: variable \'uio\' set but not used"."
* commit '5bf90caa78425c0053d35186b91a1c4936ccb149':
  Work around "error: variable 'uio' set but not used".
2014-06-04 00:12:10 +00:00
Elliott Hughes
b239d3fa27 am 85981760: am be15d16b: Merge "Turn on -Wunused and fix the mistakes it uncovers."
* commit '859817602d24d5c4868ed8b7d0cc69e5d3babfc6':
  Turn on -Wunused and fix the mistakes it uncovers.
2014-06-04 00:12:06 +00:00
Elliott Hughes
b082645ccb Work around "error: variable 'uio' set but not used".
I've sent the real fix upstream, and will merge that when they commit it.

Change-Id: I75e5cab87026f8990c585d364dd178753d727e2a
2014-06-03 16:39:58 -07:00
Elliott Hughes
430cf1a6c3 DO NOT MERGE fdprintf backward compatibility shim.
Fixes LP64 build.

Change-Id: Ic76005cd1f5a55344ea8ee3d070d25631d011037
2014-06-03 16:01:35 -07:00
Elliott Hughes
d286796fce Turn on -Wunused and fix the mistakes it uncovers.
Change-Id: I023d2d8b547fbc21d4124bb7510d42b06a0dc501
2014-06-03 15:22:34 -07:00
Paul Jensen
0d78bdaf65 Merge "Make host resolver call __connect() rather than connect() so mark isn't cleared." 2014-06-03 17:23:28 +00:00
Dan Albert
109c5a81d4 am 6e587086: am 2f9400b6: Merge "Use __libc_fatal() for failed malloc in new"
* commit '6e5870865e11f38ac9fcdf39c6097f1e39af9234':
  Use __libc_fatal() for failed malloc in new
2014-06-03 17:15:22 +00:00
Dan Albert
2f9400b679 Merge "Use __libc_fatal() for failed malloc in new" 2014-06-03 16:53:47 +00:00
Dan Albert
989725940e Use __libc_fatal() for failed malloc in new
This way we can print a useful message to the log isntead of just dying
mysteriously.

Change-Id: Ib660c2fd8ce8bb9aa0d0bb634ae08c645d3901e5
2014-06-02 18:48:53 -07:00
Elliott Hughes
4832a0961d DO NOT MERGE Fix lmp-preview-dev after bionic merge.
Other projects in lmp-preview-dev are out of date, and it's easier to patch
bionic than to fix all of them.

(cherry picked from commit a856c6f543)

Change-Id: Id8fbdf35eb55150579f85b7bdddb5d68d3012218
2014-06-02 15:27:21 -07:00
Elliott Hughes
87f0392320 am 016074f6: am 987bd5c6: am 2deef73f: Merge "Avoid a system call in \'gettid\'."
* commit '016074f6beec46fa2140e2cabd11ade488776402':
  Avoid a system call in 'gettid'.
2014-06-02 17:55:53 +00:00
Elliott Hughes
5d9a7ba0dc Avoid a system call in 'gettid'.
System calls can be pretty slow. This is mako, which has one of our
lowest latencies:

                       iterations      ns/op
  BM_unistd_getpid       10000000        209
  BM_unistd_gettid      200000000          8

Bug: 15297299 (kernel panic from too many gettid calls)
Bug: 15315766 (excessive gettid overhead in liblogd)
Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
2014-06-02 10:32:55 -07:00
Elliott Hughes
468c292262 am df2e70f3: am d3f2a204: am 7a5732bd: Merge "Add some missing __noreturn attributes."
* commit 'df2e70f39036cab8bcbf8c238f39b21f83b32d8d':
  Add some missing __noreturn attributes.
2014-05-30 23:07:32 +00:00
Elliott Hughes
6203e7b853 Add some missing __noreturn attributes.
This is more honest, and lets us remove a hack.

Change-Id: I309f064743ded5248573ccafc379f78d417db08d
2014-05-30 15:56:25 -07:00
Elliott Hughes
4a7cae7a45 am 8db7b4b5: am f306c414: am 3a3b27e0: Merge "x86: stop unwinding past __bionic_clone."
* commit '8db7b4b54ca28f6c80115c43a83323f562d275b7':
  x86: stop unwinding past __bionic_clone.
2014-05-30 21:50:51 +00:00
Elliott Hughes
ee9d5bdd95 x86: stop unwinding past __bionic_clone.
The apparent "previous" frame is on another thread's stack.

Bug: 14270816
Bug: 15195760
Change-Id: I884f370e116203c5fa3b05a75fb8f356537261c4
2014-05-30 11:15:32 -07:00
Paul Jensen
31ad03761d Make host resolver call __connect() rather than connect() so mark isn't cleared.
Calling connect() will erase the mark set by the host resolver code because the
explicitlySelected bit of the Fwmark isn't set.  It's by design that the
explicitlySelected bit isn't set as this facilitates falling through to other
routing rules if the selected network doesn't provide a route to the DNS server
as may be the case with VPNs.

Change-Id: I60ba7c754194ead97df3ac6a6c5b3db1f446dac8
2014-05-30 08:02:52 -04:00