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
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
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
These directories all have Android.bp files that are always used now,
delete the Android.mk files.
Change-Id: Ib0ba2d28bff88483b505426ba61606da314e03ab
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
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
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
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
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
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
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
* 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
_resolv_set_nameservers_for_net() so far did not update the search
paths, unless the servers changed as well.
BUG: 28437641
Change-Id: Id31f2d97c173e00357fb2ba95908afb4572c0fc1
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
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
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
* 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
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
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
It's no longer used in the platform (including vendor code), and everyone
should be using <stdatomic.h> anyway.
Change-Id: Ic1ad743625ffb15b4837ff6ccb91dcd840d19ec2
This is all legacy BSD stuff (legacy even on BSD!) that's meaningless on Linux.
Bug: http://b/28519060
Change-Id: I92d317ede844ebd50b48368021fa2ad036e2b0c1
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
* 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.
Some symbols appeared at different times between 32 and 64 bit. Add a
macro to represent this.
Bug: http://b/28178111
Change-Id: I0aa46d9da3c7301b60df0416bce252f0f37b7b36
Some functions were added at different times on different platforms.
This should hopefully get most of them.
Bug: http://b/28178111
Change-Id: I85fdf92779a2f3277e9b537c6bfc7216790c607a
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
* 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