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
We no longer need it because version script controls
list of symbols we export.
This also fixes mips/mips64 builds.
Bug: http://b/24767418
Change-Id: I61c504665fc0349275384596d375155991743e05
It turns out that clang can emit code where the sp is saved in the r7
register on arm. Unfortunately, a lot of our syscalls overwrite that
value while the syscall is executing, so unwinding through that syscall
fails.
Update the syscall generation code to add unwinding information for
these uses.
Bug: 28411713
(cherry picked from commit 6e45d37dec)
Change-Id: Ib775effc44c4113735fe9032b0602b9d63e3e390
Add an __UNAVAILABLE macro, and use it for several functions which lack
implementations, but need to have visible declarations to be reexported
in the C++ standard library.
Bug: http://b/28178111
Change-Id: Ia4ae0207bbfcb7baa61821f0ef946257b019c0db
Bug: http://b/25291096
The latest clang-2812033 prebuilts have all the necessary cherry-picks
to fix the mips booting issues from the past.
Change-Id: Ib3b364daaa50ef55401e016b92419b64f02f03dc
Fix the resolver information returned by
android_net_res_stats_get_info_for_net,
erroneously included MAXDNSRCH empty results if no search path was set.
BUG: 25731675
Change-Id: I97ef5d2d47dc62ca403a3323c7f14902e47b29b6
Not efficient to iterate through given the large number of Android
ids (AID). Compile warning will result if you use these functions,
telling you as much. Not for general consumption, however for
example, some filesystem tests would like to see these to perform
all corners.
About 1/4 second for getpwent, and 1/8 second for getgrent to iterate
through all reserved Android aids.
Bug: 27999086
Change-Id: I7784273b7875c38e4954ae21d314f35e4bf8c2fc
Changes affecting future time stamps
America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
(Thanks to Alexander Krivenyshev for the heads-up.)
Asia/Magadan switches from +10 to +11 on 2016-04-24 at 02:00.
(Thanks to Alexander Krivenyshev and Matt Johnson.)
New zone Asia/Tomsk, split off from Asia/Novosibirsk. It covers
Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
at 02:00. (Thanks to Stepan Golosunov.)
Changes affecting past time stamps
New zone Europe/Kirov, split off from Europe/Volgograd. It covers
Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
1989-03-26 at 02:00, roughly a year after Europe/Volgograd made
the same change. (Thanks to Stepan Golosunov.)
Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00. (Thanks to Stepan
Golosunov.)
Many corrections to historical time in Kazakhstan from 1991
through 2005. (Thanks to Stepan Golosunov.) Replace Kazakhstan's
invented time zone abbreviations with numeric abbreviations.
Bug: 28240832
(cherry picked from commit f3158b94ab)
Change-Id: If3b7189b4c60d8dfd0859b6e009461324a6a5bb2
Changes affecting future time stamps
Azerbaijan no longer observes DST. (Thanks to Steffen Thorsen.)
Chile reverts from permanent to seasonal DST. (Thanks to Juan
Correa for the heads-up, and to Tim Parenti for corrections.)
Guess that future transitions are August's and May's second
Saturdays at 24:00 mainland time. Also, call the period from
2014-09-07 through 2016-05-14 daylight saving time instead of
standard time, as that seems more appropriate now.
Changes affecting past time stamps
Europe/Kaliningrad and Europe/Vilnius changed from +03/+04 to
+02/+03 on 1989-03-26, not 1991-03-31. Europe/Volgograd changed
from +04/+05 to +03/+04 on 1988-03-27, not 1989-03-26.
(Thanks to Stepan Golosunov.)
Bug: 27826144
(cherry picked from commit 28a63edc68)
Change-Id: I81d3c858eaae1329d16663df14c18ca3623f7cf8
Changes affecting future time stamps
New zones Europe/Astrakhan and Europe/Ulyanovsk for Astrakhan and
Ulyanovsk Oblasts, Russia, both of which will switch from +03 to +04 on
2016-03-27 at 02:00 local time. They need distinct zones since their
post-1970 histories disagree. New zone Asia/Barnaul for Altai Krai and
Altai Republic, Russia, which will switch from +06 to +07 on the same date
and local time. Also, Asia/Sakhalin moves from +10 to +11 on 2016-03-27
at 02:00. (Thanks to Alexander Krivenyshev for the heads-up, and to
Matt Johnson and Stepan Golosunov for followup.)
As a trial of a new system that needs less information to be made up,
the new zones use numeric time zone abbreviations like "+04"
instead of invented abbreviations like "ASTT".
Haiti will not observe DST in 2016. (Thanks to Jean Antoine via
Steffen Thorsen.)
Palestine's spring-forward transition on 2016-03-26 is at 01:00, not 00:00.
(Thanks to Hannah Kreitem.) Guess future transitions will be March's last
Saturday at 01:00, not March's last Friday at 24:00.
Changes affecting past time stamps
Europe/Chisinau observed DST during 1990, and switched from +04 to
+03 at 1990-05-06 02:00, instead of switching from +03 to +02.
(Thanks to Stepan Golosunov.)
1991 abbreviations in Europe/Samara should be SAMT/SAMST, not
KUYT/KUYST. (Thanks to Stepan Golosunov.)
The update produced (apparently benign) warnings from zic as suggested here:
http://mm.icann.org/pipermail/tz-announce/2016-March/000036.html
Bug: 27656428
(cherry picked from commit 4fc72e0230)
Change-Id: I3492fcacf2771d6cc194e4ff155a04c3817ae336
android_net_res_stats_get_info_for_net returns the current name servers, search
domains, parameters and stats for the given network ID.
android_net_res_stats_aggregate provides statistics such as errors counts from
the raw stats data reported by android_net_res_stats_get_info_for_net.
android_net_res_stats_get_usable_servers uses the data returned by
android_net_res_stats_aggregate to determine which of the servers are
considered valid or broken by the resolver.
BUG: 25731675
Change-Id: I6059b68e5e8b809027a4d3135f6081588bee8a7d
Instead of keeping a sentinel after nameservers[], nsaddrinfo[] and
nstats[], store the server count in the structure, freeing up memory and
eliminating the need to enumerate the server count every time
_resolv_is_nameservers_equal_locked() is invoked.
Also increase MAXNS from 3 to 4.
BUG: 28153323
Change-Id: I11a7257af695157c9e32019cd00c67b535b63c75
I changed the output from "pointer" to "allocation" for allocation
mismatches. I forgot to update the tests.
Bug: 28218530
Change-Id: I3278cb1dd17fb50ff7448c00e069c1af68ce5a57