Commit graph

16685 commits

Author SHA1 Message Date
Josh Gao
a588f905ab Remove fabs, fabsf, fabsl inlines from <math.h>.
These inline definitions appear to be a workaround for a compiler bug
that either never existed, or has been resolved since then.

Bug: http://b/28067717
Change-Id: Ic1cd0f26403f234a6ab1fa273a9dd23e7f9fee8f
2016-04-08 21:09:52 +00:00
Josh Gao
08794d43ad Merge changes Ife4692e4,I7304cc1d,If19653d0,I769ca792,I93625d19, ...
* changes:
  Move <sys/sysconf.h> to <bits/sysconf.h>.
  Remove mbstowcs from <wchar.h>.
  Extract getopt and friends to <bits/getopt.h>
  Remove declaration of unlinkat from <fcntl.h>.
  Extract ioctl to <bits/ioctl.h>.
  Extract fcntl to <bits/fcntl.h>.
  Extract strcasecmp and friends to <bits/strcasecmp.h>.
  Make <bits/lockf.h> compile standalone.
  Make <android/dlext.h> compile standalone.
  Make the network headers compile standalone.
  Remove duplicate declaration of mlock, munlock.
2016-04-08 17:59:24 +00:00
Josh Gao
8c8ef5965d Move <sys/sysconf.h> to <bits/sysconf.h>.
Also remove unneeded declaration of sysconf in <unistd.h>.

Bug: http://b/28067717
Change-Id: Ife4692e48ca97480e422db0686c61133e1d619aa
2016-04-07 18:02:00 -07:00
Josh Gao
752a82c9ed Remove mbstowcs from <wchar.h>.
Glibc doesn't export the function here, and adding a <bits/...> header
for this function seems unnecessary.

Bug: http://b/28067717
Change-Id: I7304cc1daca14585c85d5c783365c4a43779ff2c
2016-04-07 18:01:59 -07:00
Josh Gao
7449e599d8 Extract getopt and friends to <bits/getopt.h>
Bug: http://b/28067717
Change-Id: If19653d0da8b964c43768aa1051f9c926b3c6acb
2016-04-07 18:01:59 -07:00
Josh Gao
a6c85467dd Remove declaration of unlinkat from <fcntl.h>.
Glibc doesn't expose unlinkat in fcntl.h, this probably came about
because the man page for unlinkat mentions `#include <fcntl.h>` for the
AT_* constants that actually are defined there.

Bug: http://b/28067717
Change-Id: I769ca792a189bfea212b1d75096274acb0b7cfdb
2016-04-07 18:01:59 -07:00
Josh Gao
98e574c8de Extract ioctl to <bits/ioctl.h>.
Bug: http://b/28067717
Change-Id: I93625d19fa5a033ab22c650d536e98674f0a8d9d
2016-04-07 18:01:59 -07:00
Josh Gao
ee8d169997 Extract fcntl to <bits/fcntl.h>.
Bug: http://b/28067717
Change-Id: Id8c19056244660a6e0276a5614282af8d41fbe1e
2016-04-07 18:01:59 -07:00
Josh Gao
c3cec27ad7 Extract strcasecmp and friends to <bits/strcasecmp.h>.
Bug: http://b/28067717
Change-Id: I76bab098d4c35d07a7a108055c43c820087f9253
2016-04-07 18:01:59 -07:00
Josh Gao
0d8e141906 Make <bits/lockf.h> compile standalone.
Bug: http://b/28067717
Change-Id: Ida9f251ff23f9e32dcd0c38eb23b6a3bffea322c
2016-04-07 18:01:59 -07:00
Josh Gao
2675a9e343 Make <android/dlext.h> compile standalone.
Bug: http://b/28067717
Change-Id: If087e0c931c69bda34263ea8e0b2dc46d932b2af
2016-04-07 18:01:53 -07:00
Josh Gao
ef7c95b8ab Make the network headers compile standalone.
Bug: http://b/28067717
Change-Id: I0f69c6cba0eb0df2fe68f458ba5aa81fe8e6434c
2016-04-07 11:16:35 -07:00
Josh Gao
70856fb6ec Remove duplicate declaration of mlock, munlock.
Bug: http://b/28067717
Change-Id: I4fe5a4368e5112a5d6aed5de9549155d3352962a
2016-04-07 10:59:45 -07:00
Elliott Hughes
322d6cfb33 Merge "Add trivial no-op <nl_types.h>." 2016-04-07 15:49:02 +00:00
Elliott Hughes
6cfb84b97e Add trivial no-op <nl_types.h>.
Needed to build OpenMP.

Bug: http://b/27617302
Change-Id: Iac15c84ead6f5d5274cfdb2d6d4a4ec0072244bb
2016-04-06 17:22:44 -07:00
Elliott Hughes
5e843fb7c4 Merge "Teach our script to ignore more dead POSIX stuff." 2016-04-06 21:22:45 +00:00
Mark Salyzyn
8c1eb2dff2 Merge "fix oem_XXXX ids to incorporate both ranges" 2016-04-06 21:19:12 +00:00
Mark Salyzyn
8d387ee1ec fix oem_XXXX ids to incorporate both ranges
The XXXX now lines up to the underlying uid and has no offset.
Work with AID_OEM_RESERVED uids.

Test uses hard coded values to catch changes in the API expectations
that may occur in private/android_filesystem_config.h.

SideEffects: names change, some product dependencies.

Bug: 27999086
Change-Id: Ic2b4c36de74ae009a44e14711c75834293828207
2016-04-06 21:18:49 +00:00
Elliott Hughes
9deb01c5a6 Merge "Fix b64_pton." 2016-04-06 21:02:34 +00:00
Elliott Hughes
187d37d35a Teach our script to ignore more dead POSIX stuff.
Change-Id: Ic29451b7110ac35291125d427e1ae6fd334bdbd5
2016-04-06 13:29:22 -07:00
Elliott Hughes
26fda778f7 Fix b64_pton.
This was fixed upstream years ago. While we're here, let's switch to the
OpenBSD copy (because that's our majority upstream BSD, not because they
found and fixed this bug first).

Bug: http://b/28035006
Change-Id: I53dd915a8122bfd7a6d58f01f9902d1586a47e23
2016-04-06 12:08:45 -07:00
Elliott Hughes
37b23cbff5 Merge "Add <sys/quota.h>." 2016-04-06 18:08:34 +00:00
Elliott Hughes
eafad49bd6 Add <sys/quota.h>.
It turns out that at least the Nexus 9 kernel is built without CONFIG_QUOTA.
If we decide we're going to mandate quota functionality, I'm happy for us to
be a part of CTS that ensures that happens, but I don't want to be first, so
there's not much to test here other than "will it compile?". The strace
output looks right though.

Bug: http://b/27948821
Bug: http://b/27952303
Change-Id: If667195eee849ed17c8fa9110f6b02907fc8fc04
2016-04-06 11:06:09 -07:00
Elliott Hughes
733c92fa36 Merge "Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp." 2016-04-06 17:00:46 +00:00
Elliott Hughes
492c8723e3 Merge "Break up the rest of stubs.cpp." 2016-04-06 16:47:33 +00:00
Elliott Hughes
3735539fc3 Rename the <grp.h>/<pwd.h> tests to reflect that they're no longer in stubs.cpp.
Bug: http://b/27999086
Change-Id: I3255ad5861a705beeb9b462e22f79ae1e5a85a79
2016-04-06 09:04:17 -07:00
Elliott Hughes
e4510a2779 Break up the rest of stubs.cpp.
Bug: http://b/27999086
Change-Id: Ibcc2c5171d43ebd26b486642052738473f3b7714
2016-04-06 08:34:58 -07:00
Mark Salyzyn
af11ec2e92 Merge "bionic: split out getpwnam and friends" 2016-04-06 15:05:41 +00:00
Mark Salyzyn
b38347ad8b bionic: split out getpwnam and friends
- added grp_pwd.cpp containing POSIX passwd and group functions,
  colocated because they share with the Android ID (AID) roots.
- stubs.cpp contains all the truly empty functions (network and
  protocol accessors)

Bug: 27999086
Change-Id: I036f9e2dd246f48302cb7c97d23176fa24d19c33
2016-04-06 07:26:01 -07:00
Pierre Imai
a749dc91c5 Merge "Reduce the amount of logging in Bionic's resolver." 2016-04-06 03:01:51 +00:00
Pierre Imai
360800d829 Reduce the amount of logging in Bionic's resolver.
Change-Id: I250d9a352f1fa0cafef349d0e23f72a9dd8e399d
2016-04-06 11:25:30 +09:00
Dimitry Ivanov
c0e8b06467 Merge "Do not test ifunc on mips" 2016-04-06 00:38:23 +00:00
Dimitry Ivanov
0a2ab0203c Do not test ifunc on mips
This commit fixes mips build

Bug: http://b/28009632
Change-Id: I5c657b31947791aea4cc02a2fc4ede6d0ecde851
2016-04-05 17:37:45 -07:00
Dimitry Ivanov
66606ff84c Merge "linker: Add unit-test for sleb128_decoder" 2016-04-06 00:15:02 +00:00
Dimitry Ivanov
fa4aeed2c6 linker: Add unit-test for sleb128_decoder
Add missing test for sleb128_decoder. Also remove
dependency to static library because it exposes malloc/free
which interfere with libc.so malloc/free causing test to crash.

Change-Id: Iedd3268011df9f67ed58c0b58c71f34e30370b23
2016-04-05 16:42:17 -07:00
Elliott Hughes
d9bba70c3d Merge "Add sync_file_range to <fcntl.h>." 2016-04-05 23:38:38 +00:00
Elliott Hughes
7f72ad4d6c Add sync_file_range to <fcntl.h>.
Bug: http://b/27952303
Change-Id: Idadfacd657ed415abc11684b9471e4e24c2fbf05
2016-04-05 12:17:22 -07:00
Elliott Hughes
95ddb26256 Merge "Add missing prototype for readahead in <fcntl.h>." 2016-04-05 18:50:09 +00:00
Elliott Hughes
55147ada3c Add missing prototype for readahead in <fcntl.h>.
Change-Id: Icfe85e9cf95c657b495c4e9cd10dec50b0b8f6db
2016-04-05 11:06:02 -07:00
Elliott Hughes
c9291e1bb5 Merge "Add POSIX getsubopt(3)." 2016-04-05 18:03:56 +00:00
Elliott Hughes
7897405439 Merge "Add SysV signal handling" 2016-04-05 17:01:23 +00:00
Pierre Imai
14fc307518 Merge "Fix off-by-one error in res_cache.c" 2016-04-05 07:35:46 +00:00
Pierre Imai
03844d8cdb Fix off-by-one error in res_cache.c
Change-Id: I58264902c123b3bc0d392d17837aa537ca0a3ca2
2016-04-05 16:19:57 +09:00
Pierre Imai
ce3101f021 Merge "Ignore unreliable DNS servers." 2016-04-05 03:44:36 +00:00
Pierre Imai
6b3f0d65f2 Ignore unreliable DNS servers.
Collect statistics about DNS query success state and delay. Ignore
servers that have been tried at least five times and have a success rate
of < 0.25. Retry these servers once every 180s.

Bug: 25731675
Change-Id: I78e24f43e388dca82fb81835e1796f4c7dce8da3
2016-04-05 11:42:43 +09:00
Elliott Hughes
5b528c0832 Merge "Make it harder to use a broken legacy function by accident." 2016-04-05 00:36:08 +00:00
Elliott Hughes
df143f8576 Add POSIX getsubopt(3).
Bug: http://b/27952303
Change-Id: I8a816477545dadcbd5c055714e76263574446b6f
2016-04-04 17:34:04 -07:00
Yabin Cui
9a30714c87 Merge "Format code to calculate thread stack and signal stack." 2016-04-05 00:08:05 +00:00
Greg Hackmann
5375bf6398 Add SysV signal handling
Implement the legacy SysV signal handling functions sighold(),
sigignore(), sigpause(), sigrelse(), and sigset() in terms of the newer
POSIX signal APIs.  As of POSIX 2013 the SysV signal APIs are deprecated
but still required.

Change-Id: I4ca40e3d706605a7d1a30dc76c78b2b24586387d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-04-04 16:33:29 -07:00
Yabin Cui
ff624c2c17 Format code to calculate thread stack and signal stack.
The code to calculate thread stack and signal stack looks weird:
the thread stack size and signal stack size are related with
each other on 32-bit mode, but not on 64-bit mode. So change the
code to make the logic more resonable. This doesn't change anything
as we have defined SIGSTKSZ to 16K on arm64.

Bug: 28005110

Change-Id: I04d2488cfb96ee7e2d894d062c66cef950fec418
2016-04-04 16:19:39 -07:00