Commit graph

7058 commits

Author SHA1 Message Date
Treehugger Robot
74669e99ce Merge "Add /vendor/xbin to root's path." 2016-06-08 01:06:49 +00:00
Elliott Hughes
f4840507b5 Preliminary cleanup of <sys/cdefs.h>.
We don't support anything other than Clang and GCC, and we don't support
GCC earlier than 4.9.

Move the various synonyms for __attribute__(__whatever__) together.

Fix a __STDC__VERSION__ (for __STDC_VERSION__) typo.

Drop support for BSD _ANSI_SOURCE and _C99_SOURCE; there's enough confusing
nonsense here already, and plenty of other ways to ask for obsolete standards.

There are plenty more problems here -- what I really want to do is rationalize
our treatment of __STDC_VERSION__ -- but let's get some of this easy stuff
out of the way first.

Bug: https://code.google.com/p/android/issues/detail?id=194631
Change-Id: I7526b9770fdc01f8a4667781b65e2fb08287b20b
2016-06-06 17:35:53 -07:00
Treehugger Robot
901cc14822 Merge "Just use libstdc++ for the cxa stuff inside bionic." 2016-06-06 18:04:54 +00:00
Josh Gao
99a84c8316 Remove __cachectl.
bionic doesn't have an implementation for this function, but neither
does the kernel. cachectl has existed in the kernel as a stub that
returns ENOSYS for over a decade.

Bug: http://b/28178111
Change-Id: Id35f85fd143c5ea0d45d04b1021893cf5c0c749d
2016-06-03 15:01:18 -07:00
Treehugger Robot
f21ca653b7 Merge "Fix __errordecl on clang." 2016-06-03 19:29:12 +00:00
Josh Gao
8ba4424a41 Fix __errordecl on clang.
__attribute__((__error__)) doesn't exist on clang.

Bug: http://b/28381737
Change-Id: I75f39308ecfd60164811958fa40c9b96c92fd329
2016-06-03 10:36:37 -07:00
Dimitry Ivanov
71e783d8a4 Remove __brk
The symbol is unused and deprecated

Bug: http://b/29005114
Change-Id: I5e99c8b029514e8b2405a1eec23ac8941374a8a4
2016-06-03 08:33:51 -07:00
Treehugger Robot
d23c37bc3f Merge changes I1bb1925a,Icd638673
* changes:
  versioner: introduce.
  Update header versions for NDK platform fixes.
2016-06-02 21:29:48 +00:00
Josh Gao
46b44160e9 Update header versions for NDK platform fixes.
Bug: http://b/28178111
Change-Id: Icd638673b409aa43a91490f77c6b4d79c9ea20d9
2016-06-02 13:40:35 -07:00
Colin Cross
8428fb03c8 Merge "Remove deprecated Android.mk files" 2016-06-02 16:31:40 +00:00
Treehugger Robot
e20730ca0b Merge "Remove declaration for __brk." 2016-06-02 02:25:59 +00:00
Josh Gao
6e9c1f61d8 Remove declaration for __brk.
Bug: http://b/28178111
Change-Id: I972789cd5da552000c32fd107b9df98330323d89
2016-06-01 18:21:06 -07:00
Erik Kline
9a29c3f241 Add /vendor/xbin to root's path.
Bug: 28850734
Change-Id: Ibfc5ae019bec2efe6d188bacdd7fb009178fc837
2016-05-30 12:06:11 +09:00
Elliott Hughes
816fab9538 Just use libstdc++ for the cxa stuff inside bionic.
We have an explicit link map now, so we don't need a separate copy of libstdc++
that's built with -fvisibility=hidden.

Bug: http://b/29009180
Change-Id: I2d794d62f52621e6ad258ca6d455f9bd3830d829
2016-05-27 17:57:46 -07:00
Treehugger Robot
676f6e3c7f Merge "Remove libstdc++ include files." 2016-05-27 23:36:18 +00:00
Elliott Hughes
f44b232d85 Remove libstdc++ include files.
We still need <new> for bionic, and to build libstdc++.

Change-Id: Ic7b26340576a5355007a06db9c1bec395be49ae1
2016-05-27 15:49:31 -07:00
Colin Cross
7510c33b61 Remove deprecated Android.mk files
These directories all have Android.bp files that are always used now,
delete the Android.mk files.

Change-Id: Ib0ba2d28bff88483b505426ba61606da314e03ab
2016-05-26 16:41:57 -07:00
Elliott Hughes
bdd8f896dd Improve diagnostics from the assembler __strcpy_chk routines.
Change-Id: Ib95b598f7f8338cc1a618c00232a4259dc4a6319
2016-05-26 16:38:34 -07:00
Treehugger Robot
a3c2df9378 Merge "Improve diagnostics from the assembler __strcat_chk routines." 2016-05-26 23:01:25 +00:00
Elliott Hughes
c75da09f4f Improve diagnostics from the assembler __strcat_chk routines.
Change-Id: I44cbe5389c66de6618e581a6e302eea22c39d6fb
2016-05-26 14:55:00 -07:00
Treehugger Robot
8c2467ae07 Merge "Don't use __u64/__u32 in <sys/user.h>." 2016-05-26 00:19:14 +00:00
Josh Gao
bb129214ad Don't use __u64/__u32 in <sys/user.h>.
The typedefs for __u64 and __u32 aren't in scope in this file, so
switch fields declared with these to use the matching underlying type.

Bug: http://b/28178111
Change-Id: Id4eec1f7dc81d77e78043227c15e621debe3a48a
2016-05-25 15:25:13 -07:00
Christopher Ferris
eab4803290 Update documentation for malloc debug.
Add a new document that describes the previous version of malloc debug.

Add a small update to the current documentation to indicate it only
applies to N and later.

Change-Id: Ief74c253ba79018777aa688bde7f5b35319fa4d4
2016-05-25 13:34:54 -07:00
Elliott Hughes
8963dd337e Make all rt_sigtimedwait signatures match.
There's no change to the generated stubs, because the script only cares
that this is a pointer type, not what it's a pointer to.

Change-Id: I766720965f0f3d201fc90677a076b26870485377
2016-05-23 11:20:19 -07:00
Christopher Ferris
82ef6a19cb Updated to v4.4.11 kernel headers.
Change-Id: I6b55a921670d32d7bfff3c304d8001058409d3f7
2016-05-19 17:03:14 -07:00
Colin Cross
5a22d3e13d Force clang for bionic
Bionic will only compile with clang, and Android.mk files force clang,
turn it on in Android.bp.

Change-Id: I9db06298adfeab4eeef031d88aa310776cad3af0
2016-05-18 14:06:22 -07:00
Elliott Hughes
5df5884743 Merge "Regenerate NOTICE files." 2016-05-17 03:10:29 +00:00
Elliott Hughes
ecffdeb0e2 Merge "Stop including <machine/cpu-features.h>." 2016-05-17 03:06:48 +00:00
Elliott Hughes
382bd666e2 Stop including <machine/cpu-features.h>.
We're not looking at __ARM_ARCH__, because we don't support ARMv6.

Bug: http://b/18556103
Change-Id: I91fe096af697dc842a57e97515312e3530743678
2016-05-16 17:52:40 -07:00
Elliott Hughes
882b8afedc Regenerate NOTICE files.
Also clean up some near-miss copyright headers in libm, and remove
some cruft in <grp.h>/<pwd.h> that the script can't automatically
ignore since we stripped all the tabs in those files.

Change-Id: I10796c54dda1ceba87822ae0de26b5d71b54972b
2016-05-16 17:46:00 -07:00
Colin Cross
79d0281456 Merge "Use Android.soong.mk to handle mixed Android.mk and Android.bp dirs" 2016-05-17 00:42:17 +00:00
Colin Cross
acf2c26bf6 Use Android.soong.mk to handle mixed Android.mk and Android.bp dirs
When building with soong Android.mk files are ignored in directories
that have Android.bp files.  Only parts of bionic have been converted to
Android.bp files, including some directories that have subdirectories
with Android.mk files.

Add Android.soong.mk files to include subdirectories to any directory
that has an Android.bp file but also has subdirectories with only
Android.mk files.

Change-Id: Ibd3c27d51c44f7a4b42dad0bc747e357b4ae34ca
2016-05-16 16:55:08 -07:00
Elliott Hughes
cb8ef17b07 Merge "Fix <resolv.h> and <netinet/tcp.h> so dnscap builds." 2016-05-16 21:59:50 +00:00
Elliott Hughes
f021061a23 Fix <resolv.h> and <netinet/tcp.h> so dnscap builds.
Some guy on the internet complained that dnscap doesn't build out of the box.
Now it does.

Bug: http://b/27839637
Change-Id: I8c4f22d3c3f8885a6fe06029d89ef68a15931027
2016-05-16 14:03:43 -07:00
Elliott Hughes
c6190a9839 We have the _r ether_ntoa/ether_aton functions too.
We've also had them since H, not L.

Change-Id: Iee7633ea97a0ee9a00bf7b62ead315acf02a3c8e
2016-05-16 13:24:31 -07:00
Elliott Hughes
f6324d540a Fix our *ether* headers mess.
Move everything to where it should be.

Along the way, we lose <net/ethertypes.h>. glibc only has a handful of these
types, and they're all in <net/ethernet.h>, not <net/ethertypes.h>. I've taken
the liberty of not including the AppleTalk ones, since it is 2016.

Also, <net/if_ether.h> should be <netinet/if_ether.h> (though with different
contents).

Bug: http://b/28519060
Change-Id: Ia41c3fc136fd3e6b008c8d08018e0629134ea6fc
2016-05-13 11:00:22 -07:00
Dan Willemsen
0c6570817f Update Android.bp to match Android.mk
* Remove --exclude-libs ldflags (e29e99c51)
* Mips strlen check was inverted
* ARM specific libc changes only apply to the shared library
* Reorder libjemalloc and malloc_common to match Make's ordering (for
  better binary diffing)

Change-Id: Ib41bd47565b1e8fadd285daa7b337cff1edd0808
2016-05-12 13:34:35 -07:00
Pierre Imai
6db7e5a10d Merge "Always update search domain paths." 2016-05-12 02:51:23 +00:00
Elliott Hughes
bab9d7954a Remove <net/if_types.h>.
Bug: http://b/28519060
Change-Id: I7481df528b281344879b4aac32551d8c40824195
2016-05-11 15:00:19 -07:00
Elliott Hughes
d0b173316a Merge "Remove various bits of header cruft." 2016-05-11 21:25:01 +00:00
Dimitry Ivanov
35c115c196 Merge "Remove linker-namespace functions from the header" 2016-05-11 21:14:41 +00:00
Pierre Imai
06e2202a4c Always update search domain paths.
_resolv_set_nameservers_for_net() so far did not update the search
paths, unless the servers changed as well.

BUG: 28437641
Change-Id: Id31f2d97c173e00357fb2ba95908afb4572c0fc1
2016-05-11 11:06:55 +09:00
Elliott Hughes
12f35419ce Remove various bits of header cruft.
Mostly BSD _KERNEL stuff.

Change-Id: Ic0a6914437d0c831a83588a435079d0c719fcbdf
2016-05-10 17:32:48 -07:00
Dimitry Ivanov
41fd29532b Remove linker-namespace functions from the header
They are intended for platform use only and we shouldn't have them
in the public header file.

Bug: http://b/28174921
Change-Id: Ib9b3d0fa9442cfa2e784a693ad567d1444d774e5
2016-05-09 18:15:41 -07:00
Elliott Hughes
e2f25831eb Remove declaration of pthread_cond_timedwait_relative_np.
It's been deprecated long enough, and nothing left in the tree (except
code that isn't even built) is still using it.

Bug: http://b/27918161
Change-Id: Ibf824c1063d49484037de5c03b98bec5bdd4dcf6
2016-05-09 13:29:26 -07:00
Elliott Hughes
d2f3ce9c89 Merge "Remove pthread_mutex_lock_timeout_np from <pthread.h>." 2016-05-09 20:15:50 +00:00
Elliott Hughes
0155995e8d Merge "Generalize the clone function slightly." 2016-05-09 20:14:50 +00:00
Elliott Hughes
3164ab733c Remove pthread_mutex_lock_timeout_np from <pthread.h>.
It's been deprecated long enough, and nothing left in the tree (except
code that isn't even built) is still using it.

Bug: http://b/27918161
Change-Id: I1786f5e2528a23c17b3f7298f4ba5fc7761a26c5
2016-05-06 17:46:48 -07:00
Elliott Hughes
e104a2edf3 Generalize the clone function slightly.
* Allow clone where both the child function and stack are null. It's
obviously wrong to ask to call a function without a stack, but it's not
necessarily wrong to supply no stack if you're also not supplying a
function.

* Reimplement fork in terms of the clone function, rather than using the
clone system call directly.

This is intended as a step towards enabling use of pid namespaces.

Change-Id: I03c89bd1dc540d8b4ed1c8fdf6644290744b9e91
2016-05-06 16:37:00 -07:00
Elliott Hughes
2adde7bef5 End all lists in check-symbols-glibc.py with a ,.
Change-Id: I85f591c51e32fa001e611a035e2e51305c837d22
2016-05-06 15:44:26 -07:00
Treehugger Robot
5ac45a2add Merge "Remove a duplicate declaration, improve check-symbols-glibc.py." 2016-05-06 22:42:11 +00:00
Elliott Hughes
21788265da Remove a duplicate declaration, improve check-symbols-glibc.py.
Change-Id: I97a98dfc8acaa93172386b4475487a05a35a9337
2016-05-06 14:43:50 -07:00
Dan Albert
e29e99c514 Remove --exclude-libs ldflags.
This is now done by default in the build system.

The comments say don't do this, but we have linker scripts that
protect the few symbols we have to actually keep now.

Bug: http://b/24166967
Change-Id: Iff1beeb0f54f80b23fb1561f37a39f208e0bf676
2016-05-06 13:18:59 -07:00
Treehugger Robot
98ac6f415f Merge "Use clang's nullability instead of nonnull." 2016-05-06 02:27:18 +00:00
Dan Albert
baa2a973bd Use clang's nullability instead of nonnull.
http://clang.llvm.org/docs/AttributeReference.html#nonnull

_Nonnull is similar to the nonnull attribute in that it will instruct
compilers to warn the user if it can prove that a null argument is
being passed. Unlike the nonnull attribute, this annotation indicated
that a value *should not* be null, not that it *cannot* be null, or
even that the behavior is undefined. The important distinction is that
the optimizer will perform surprising optimizations like the
following:

    void foo(void*) __attribute__(nonnull, 1);

    int bar(int* p) {
      foo(p);

      // The following null check will be elided because nonnull
      // attribute means that, since we call foo with p, p can be
      // assumed to not be null. Thus this will crash if we are called
      // with a null pointer.
      if (src != NULL) {
        return *p;
      }
      return 0;
    }

    int main() {
      return bar(NULL);
    }

Note that by doing this we are no longer attaching any sort of
attribute for GCC (GCC doesn't support attaching nonnull directly to a
parameter, only to the function and naming the arguments
positionally). This means we won't be getting a warning for this case
from GCC any more. People that listen to warnings tend to use clang
anyway, and we're quickly moving toward that as the default, so this
seems to be an acceptable tradeoff.

Change-Id: Ie05fe7cec2f19a082c1defb303f82bcf9241b88d
2016-05-05 17:11:54 -07:00
Elliott Hughes
5e2342f970 Merge "Remove <sys/atomics.h>." 2016-05-05 23:55:04 +00:00
Chih-hung Hsieh
9f0aab88a8 Merge "Fix google-explicit-constructor warnings." 2016-05-04 00:37:58 +00:00
Colin Cross
0f93237db7 Merge "Update strip property format" 2016-05-03 21:20:43 +00:00
Christopher Ferris
2ab69ccf10 Merge "Update documentation to work with gitiles." 2016-05-03 19:47:47 +00:00
Chih-Hung Hsieh
62e3a078aa Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: I84effbdfa1b9b39328a909b7f70fe17e7ee316c8
2016-05-03 12:08:05 -07:00
Elliott Hughes
9ee905f12f Merge "Move <machine/endian.h> somewhere more private." 2016-05-03 00:45:38 +00:00
Treehugger Robot
45d3cf9f0f Merge "Update Android.bp to match Android.mk" 2016-05-02 23:19:20 +00:00
Elliott Hughes
ed507636c0 Remove <sys/atomics.h>.
It's no longer used in the platform (including vendor code), and everyone
should be using <stdatomic.h> anyway.

Change-Id: Ic1ad743625ffb15b4837ff6ccb91dcd840d19ec2
2016-05-02 16:04:57 -07:00
Elliott Hughes
3d125175d7 Move <machine/endian.h> somewhere more private.
Bug: http://b/28519060
Change-Id: I1c7811f95f46c65d4152bcf509b6e048c45bc28b
2016-05-02 15:44:56 -07:00
Elliott Hughes
3338ee5257 Merge "Move glibc-syscalls.h into bits/." 2016-05-02 22:41:34 +00:00
Elliott Hughes
3fb1b37bba Merge "Remove <sys/utime.h>." 2016-05-02 21:35:14 +00:00
Elliott Hughes
d3b4166b5b Merge "Move the IEEE fp header out of the public headers." 2016-05-02 21:22:32 +00:00
Elliott Hughes
eb9b0a1819 Merge "Move nsswitch.h into libc/dns/include." 2016-05-02 21:11:30 +00:00
Elliott Hughes
af5afdba34 Merge "Remove <net/if_ieee1394.h>." 2016-05-02 21:11:10 +00:00
Elliott Hughes
5ab6f6c3bd Merge "Remove <sys/ioctl_compat.h>." 2016-05-02 21:07:13 +00:00
Elliott Hughes
e10ff49ec3 Remove <sys/utime.h>.
As far as I can tell, this is a Windows-ism.

Bug: http://b/28519060
Change-Id: I28ca39ba799aaae81695eff3ce57eacb326e941c
2016-05-02 13:13:49 -07:00
Elliott Hughes
d3f51a482f Merge "Remove unused <sys/socketcalls.h> header." 2016-05-02 20:03:53 +00:00
Elliott Hughes
64959d2b7f Remove <sys/ioctl_compat.h>.
This is all legacy BSD stuff (legacy even on BSD!) that's meaningless on Linux.

Bug: http://b/28519060
Change-Id: I92d317ede844ebd50b48368021fa2ad036e2b0c1
2016-05-02 12:53:00 -07:00
Elliott Hughes
8aabbd7f63 Move glibc-syscalls.h into bits/.
Bug: http://b/28519060
Change-Id: I0de1ba16b16eb7b780de89954d3fa45cca2f5295
2016-05-02 12:47:58 -07:00
Elliott Hughes
b0da5760dc Move the IEEE fp header out of the public headers.
Bug: http://b/28519060
Change-Id: I9f1a1a9ac1f22462bf86991b57c51824cb42eefd
2016-05-02 12:44:41 -07:00
Elliott Hughes
82140bed6a Remove <net/if_ieee1394.h>.
It's 2016.

Bug: http://b/28519060
Change-Id: Idbb2c40f37e57a87933b8b13b20e15035105e918
2016-05-02 12:35:26 -07:00
Elliott Hughes
42d752754e Move nsswitch.h into libc/dns/include.
Not a public header file except in NetBSD, where it came from. Even
OpenBSD doesn't have it.

Bug: http://b/28519060
Change-Id: Id5feec4a4e8010a9f4433e73b1bfa6f935d884b9
2016-05-02 12:24:58 -07:00
Josh Gao
583a4f8d35 Merge changes I25dca710,I85fdf927,I667fe53e,I46bf95ac
* changes:
  Remove nonexported _ns_flagdata from public header.
  Add platform specific version tags.
  Add __INTRODUCED_IN_FUTURE for unreleased APIs.
  Add versioning information to symbols.
2016-05-02 18:33:04 +00:00
Elliott Hughes
6bad319c5f Remove unused <sys/socketcalls.h> header.
These constants come from <linux/net.h> on Linux.

Change-Id: I546fadac2478771c2455298d776dbc4a20c73b17
2016-05-02 08:09:37 -07:00
Elliott Hughes
ec4671928c Merge "Fix various empty .h files in bionic." 2016-05-02 14:43:01 +00:00
Lorenzo Colitti
edfc5d7b74 Merge "Record the resolution start time on errors." 2016-05-02 11:28:42 +00:00
Pierre Imai
8b8611a0e6 Record the resolution start time on errors.
Also only record samples on the first try for a server.

BUG: 25731675

Change-Id: I10a68813c6636874e63aca1db661e63e1af72a2d
2016-05-02 17:39:19 +09:00
Elliott Hughes
6b3bec031f Fix various empty .h files in bionic.
Bug: http://b/28432688
Change-Id: I339f5221b9e66ce5983eb3685b9405e8d6f58808
2016-04-29 22:30:19 -07:00
Josh Gao
b089e468bd Remove nonexported _ns_flagdata from public header.
Bug: http://b/28178111
Change-Id: I25dca710964099c4e07bf694635db75a72b38508
2016-04-29 16:39:50 -07:00
Josh Gao
5a3d5cac64 Add __INTRODUCED_IN_{32,64}.
Some symbols appeared at different times between 32 and 64 bit. Add a
macro to represent this.

Bug: http://b/28178111
Change-Id: I0aa46d9da3c7301b60df0416bce252f0f37b7b36
2016-04-29 16:39:50 -07:00
Josh Gao
d51bc71294 Add platform specific version tags.
Some functions were added at different times on different platforms.
This should hopefully get most of them.

Bug: http://b/28178111
Change-Id: I85fdf92779a2f3277e9b537c6bfc7216790c607a
2016-04-29 16:39:50 -07:00
Josh Gao
34c599a8b0 Add __INTRODUCED_IN_FUTURE for unreleased APIs.
Future API levels aren't known (e.g. 25 could be a maintenance release
of N that doesn't contain any bionic updates), so use a placeholder
macro that we can find and replace with the actual API level before each
release.

Bug: http://b/28178111
Change-Id: I667fe53ea1ac49b64135170fc30d5dbe9df94e29
2016-04-29 16:39:50 -07:00
Josh Gao
14adff1cfa Add versioning information to symbols.
Bug: http://b/28178111
Change-Id: I46bf95accd819f4521afb1173d8badcc5e9df31c
2016-04-29 16:39:50 -07:00
Colin Cross
37f3632806 Update strip property format
Change-Id: Ic95655d25753b2c0f056a5660d42f582f90abe74
2016-04-29 14:06:14 -07:00
Colin Cross
ee84786bfc Update Android.bp to match Android.mk
Change-Id: I6b71d8ee91c550e2d37c88ce2ca088964639d433
2016-04-29 14:06:14 -07:00
Elliott Hughes
7e94d292b0 Remove __UNAVAILABLE.
We fixed the things we needed this for, and should never reintroduce a
similar mistake in future.

Change-Id: I74b447bcf22ea533f3c79db48b66a3c217d76c2f
2016-04-29 11:07:55 -07:00
Elliott Hughes
146cbacea0 Merge "Fix <wctype.h>." 2016-04-29 18:05:28 +00:00
Elliott Hughes
adc8d34137 Merge "Remove declaration of pthread_cond_timeout_np." 2016-04-29 15:11:59 +00:00
Neil Fuller
216c3007ed Merge "Update timezone data to 2016d" 2016-04-29 09:17:52 +00:00
Neil Fuller
418bdafb82 Merge "Update timezone data to 2016c" 2016-04-29 09:17:23 +00:00
Neil Fuller
f1b38527ea Merge "Update timezone data to 2016b" 2016-04-29 09:16:43 +00:00
Elliott Hughes
7ba106c784 Fix <wctype.h>.
* Fix the return type of towlower_l/towupper_l.
* Implement wctrans/wctrans_l/towctrans/towctrans_l.
* Move declarations that POSIX says are available from both <wchar.h> and
  <wctype.h> to <bits/wctype.h> and include from both POSIX headers.
* Write the missing tests.

Change-Id: I3221da5f3d7e8a2fb0a7619dc724de45f7b55398
2016-04-28 18:22:06 -07:00
Treehugger Robot
bd8773d19d Merge "Implement mblen(3)." 2016-04-29 00:43:26 +00:00
Elliott Hughes
6f6f9058fa Implement mblen(3).
Change-Id: I65948ea5b9ecd63f966ba767ad6db4a2effc4700
2016-04-28 16:41:29 -07:00
Treehugger Robot
1519a90834 Merge "Remove -fvisibility=hidden from dns code" 2016-04-28 19:50:48 +00:00