Commit graph

3346 commits

Author SHA1 Message Date
Elliott Hughes
fb62558bb4 Merge "Define _POSIX_MONOTONIC_CLOCK and implement sysconf(_SC_MONOTONIC_CLOCK)." 2013-01-02 15:51:15 -08:00
Elliott Hughes
a55f63083f Define _POSIX_MONOTONIC_CLOCK and implement sysconf(_SC_MONOTONIC_CLOCK).
Bug: http://code.google.com/p/android/issues/detail?id=39680
Change-Id: I11cf10a66f9d305868a725f04f581099fb88bbfc
2013-01-02 14:23:43 -08:00
Elliott Hughes
918d776f7e Merge "Support System.loadLibrary for libraries with transitive dependencies." 2012-12-21 17:46:22 -08:00
Elliott Hughes
f6524f8bda Merge "Fix format_number." 2012-12-20 19:08:17 -08:00
Elliott Hughes
eababde214 Fix format_number.
I broke this the other day when silencing x86 gcc warnings.

Bug: 7904160
Change-Id: I8e60cc1f8cbaff95248c8738d84e515413d839e4
2012-12-20 19:00:48 -08:00
Elliott Hughes
cade4c36e7 Support System.loadLibrary for libraries with transitive dependencies.
Also fix the FLAG_ERROR annoyance --- it's not helpful to cache failures.

Bug: 7896159
Bug: http://code.google.com/p/android/issues/detail?id=34416
Bug: http://code.google.com/p/android/issues/detail?id=22143
Change-Id: I60f235edb4ea4756e1f7ce56f7739f18e8a50789
2012-12-20 14:42:14 -08:00
Elliott Hughes
4b58214205 Merge "Fix x86 dynamic linker build." 2012-12-18 18:16:09 -08:00
Elliott Hughes
45288c5ce3 Fix x86 dynamic linker build.
Change-Id: Ia9fc6342e3d409de86dcd187c7402e8ac2ae96c8
2012-12-18 18:13:19 -08:00
Elliott Hughes
a4ebdcf5bd Merge "Check for unknown flags passed to dlopen(3)." 2012-12-18 16:38:37 -08:00
Elliott Hughes
e66190d2a9 Check for unknown flags passed to dlopen(3).
Change-Id: I56f4aab0e5a1487bc32d2c4d231e8bd15c4ac8da
2012-12-18 15:57:55 -08:00
Elliott Hughes
4c4b08a32e Merge "Fix <endian.h> and <sys/endian.h>." 2012-12-11 17:18:58 -08:00
Elliott Hughes
4fa35d8ae8 Fix <endian.h> and <sys/endian.h>.
Previously we'd been relying on getting the machine-specific <endian.h>
instead of the top-level <endian.h>, and <sys/endian.h> was basically broken.
Now, with this patch and the previous patch we should have <endian.h>
and <sys/endian.h> behaving the same. This is basically how NetBSD's endian.h
works, and was probably how ours was originally intended to work.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I71de5a507e633de166013a658b5764df9e1aa09c
2012-12-11 16:17:33 -08:00
Elliott Hughes
0521ff8234 Merge "Use pthread_kill() in raise()" 2012-12-10 11:21:42 -08:00
Chris Dearman
d8a5a6f513 Use pthread_kill() in raise()
raise() should use pthread_kill() in a pthreads environment.
For bionic this means it should always be used.

Change-Id: Ic679272b664d2b8a7068b628fb83a9f7395c441f
2012-12-10 11:20:57 -08:00
Geremy Condra
6fcf1770e5 Merge "Added audit.h from the kernel." 2012-12-07 14:21:16 -08:00
Geremy Condra
03e1ebbdd6 Added audit.h from the kernel.
Just followed the recipe in I1ca996541d05b0d5927ab828a6ce49c09877ea01

Change-Id: I5713d9ce5ff62e310a694ecfbe21cad6577bcb4d
2012-12-07 14:13:23 -08:00
Nick Kralevich
c8354f501e Merge "FORTIFY_SOURCE: remove memcpy overlap checks" 2012-12-07 10:10:49 -08:00
Nick Kralevich
5787475390 FORTIFY_SOURCE: remove memcpy overlap checks
These checks haven't been as useful as I hoped, and it's
causing a false positive finding.  Remove the overlap
compile time checks.

Change-Id: I5d45dde10ae4663d728230d41fa904adf20acaea
2012-12-07 09:57:01 -08:00
Nick Kralevich
5dfdb70129 Merge "FORTIFY_SOURCE: fix up previous commit" 2012-12-06 14:48:24 -08:00
Nick Kralevich
8b6fea59ac FORTIFY_SOURCE: fix up previous commit
I forgot two files in 326ea5413d.

Change-Id: I30430f65bfafad4274193fc5b973959eac0791a7
2012-12-05 15:26:54 -08:00
Nick Kralevich
7a34ed2bb3 Merge "clean up FORTIFY_SOURCE handling." 2012-12-04 15:44:22 -08:00
Nick Kralevich
326ea5413d clean up FORTIFY_SOURCE handling.
Avoid duplicating huge chunks of code.

Change-Id: Id6145cdfce781c5ffba2abaaa79681d25a7ab28f
2012-12-04 15:27:30 -08:00
Nick Kralevich
db79e827eb Merge "FORTIFY_SOURCE: fortify strrchr" 2012-12-04 11:30:18 -08:00
Nick Kralevich
9a4d305340 FORTIFY_SOURCE: fortify strrchr
This change compliments 049e58369c

Change-Id: I27d015d70a520713c7472558a3c427f546d36ee4
2012-12-03 10:39:16 -08:00
Elliott Hughes
60fb68338b Merge "mmap: Remove madvise() workaround" 2012-12-03 09:13:20 -08:00
Elliott Hughes
46d64ed2e5 Merge "Add argument checking to sigemptyset(3) and friends." 2012-12-03 07:45:46 -08:00
Nick Kralevich
3acc908c79 Merge "FORTIFY_SOURCE: fortify strchr" 2012-11-30 16:50:59 -08:00
Elliott Hughes
da73f655fc Add argument checking to sigemptyset(3) and friends.
You could argue that this is hurting people smart enough to have manually
allocated a large-enough sigset_t, but those people are smart enough to
implement their own sigset functions too.

I wonder whether our least unpleasant way out of our self-inflicted 32-bit
cesspool is to have equivalents of _FILE_OFFSET_BITS such as _SIGSET_T_BITS,
so calling code could opt in? You'd have to be careful passing sigset_t
arguments between code compiled with different options.

Bug: 5828899
Change-Id: I0ae60ee8544835b069a2b20568f38ec142e0737b
2012-11-30 16:40:55 -08:00
Nick Kralevich
049e58369c FORTIFY_SOURCE: fortify strchr
Detect when strchr reads off the end of a buffer.

Change-Id: I0e952eedcff5c36d646a9c3bc4e1337b959224f2
2012-11-30 15:19:15 -08:00
Elliott Hughes
16c61f0885 Merge "Reduce the exposure of the __set_errno implementation detail." 2012-11-30 14:41:07 -08:00
Elliott Hughes
4a9e837840 Reduce the exposure of the __set_errno implementation detail.
Change-Id: I395e1b46a9491e34fc53e71853e932ea90b3d1cc
2012-11-30 12:05:18 -08:00
Elliott Hughes
97b70b2bda Merge "Replace .S version of x86 crtfiles with .c version" 2012-11-30 10:07:19 -08:00
Pavel Chupin
20c4a3a8ee Replace .S version of x86 crtfiles with .c version
This patch replaces .S versions of x86 crtfiles with .c which are much
easier to support. Some of the files are matching .c version of Arm
crtfiles. x86 files required some cleanup anyway and this cleanup actually
led to matching Arm files.

I didn't change anything to share the same crt*.c between x86 and Arm. I
prefer to keep them separate for a while in case any change is required
for one of the arch, but it's good thing to do in the following patches.

Change-Id: Ibcf033f8d15aa5b10c05c879fd4b79a64dfc70f3
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-11-30 17:41:25 +04:00
Elliott Hughes
07c0b73a7f Merge "Remove (near-)duplicate definitions of size_t and ssize_t." 2012-11-29 19:33:01 -08:00
Elliott Hughes
3975cec694 Remove (near-)duplicate definitions of size_t and ssize_t.
The near duplicates upset fussier compilers that insist that
typedefs be exactly the same, but the fix isn't to make all
copies identical...

Change-Id: Icfdace41726f36ec33c9ae919dbb5a54d3529cc9
2012-11-29 17:25:23 -08:00
Elliott Hughes
50e62e4051 Merge "Bug: __WINT_TYPE__ and wint_t reference to different types" 2012-11-29 15:51:57 -08:00
Elliott Hughes
99ea84b12d Merge "[MIPS] Fix the MIPS getsid system call" 2012-11-29 14:37:14 -08:00
Elliott Hughes
5d4b8421b3 Merge "Verify architecture neutral syscall numbers" 2012-11-29 14:34:19 -08:00
Elliott Hughes
7811422080 Merge "Define DEFFILEMODE and friends" 2012-11-29 14:31:19 -08:00
Chris Dearman
58aaaa730b [MIPS] Fix the MIPS getsid system call
Change-Id: I30a27941125bccb35d73a572a729ecf7dd555389
Signed-off-by: Chris Dearman <chris@mips.com>
2012-11-29 12:05:25 -08:00
Chris Dearman
285b02582b Verify architecture neutral syscall numbers
Also removed some dead code and fixed comment

Change-Id: I5d6a04b4af3d95e34368136cf2eeb3c9b6f99769
Signed-off-by: Chris Dearman <chris@mips.com>
2012-11-29 12:04:23 -08:00
Hakan Kvist
f27b7fb056 Define DEFFILEMODE and friends
Define the macros ACCESSPERMS, ALLPERMS and DEFFILEMODE.
These macros originates from BSD but has been available in glibc
for quite some time.

Change-Id: I429cd30aa4e73f53b153ee7740070cebba166c57
2012-11-29 11:53:33 -08:00
Elliott Hughes
dea13da340 Merge "Clean up _BYTE_ORDER definitions for better x86 portability." 2012-11-27 17:34:52 -08:00
Elliott Hughes
b15c58bb0f Clean up _BYTE_ORDER definitions for better x86 portability.
We'd manually hacked _BYTE_ORDER into the arm and mips "_types.h" headers,
but not into the x86 one. Judging by upstream, _BYTE_ORDER should be in
the "endian.h" headers instead, so let's uniformly do that.

I've also ironed out some of the other differences between the different
architectures' header files too.

Bug: http://code.google.com/p/android/issues/detail?id=39824
Change-Id: I19d3af7ffd74e1c02b1b6886aec0f0d11f44ab8d
2012-11-27 14:18:04 -08:00
Elliott Hughes
f2de6b0f6e Merge "Do not include '\0' when writing error messages to stderr" 2012-11-26 15:44:58 -08:00
Chris Dearman
20a24403bc Do not include '\0' when writing error messages to stderr
Change-Id: I6adc806c3920e5a4ae61ca55c40613fcf338b18c
Signed-off-by: Chris Dearman <chris@mips.com>
2012-11-26 15:43:17 -08:00
Elliott Hughes
429b05a1df Merge "Upgrade to tzdata2012j." 2012-11-26 14:52:07 -08:00
Elliott Hughes
5d2ef8724d Upgrade to tzdata2012j.
This reflects the following changes recently circulated on the tz mailing list:

  Libya moved to CET [2012-11-11], but with DST planned [2013].
  (Thanks to Even Scharning, Steffen Thorsen, and Tim Parenti.)

I also had to change the script to cope with:

  Signatures now have the extension .asc, not .sign, as that's more
  standard.  (Thanks to Phil Pennock.)

Change-Id: Ie9711c5c796b3c122daea9690929edcc3ddd32da
2012-11-26 14:51:39 -08:00
Sergey Melnikov
a437bff914 Bug: __WINT_TYPE__ and wint_t reference to different types
__WINT_TYPE__ type provided by gcc. It references to unsigned int
type for android and linux. Patch corrects wint_t typedef to
__WINT_TYPE__.

Signed-off-by: Sergey Melnikov <sergey.melnikov@intel.com>
Change-Id: Iabeb9fcb0b7bb303a8b220043e339126f125dd68
2012-11-26 12:01:58 +04:00
Nick Kralevich
635df850e5 mmap: Remove madvise() workaround
Remove mmap() calling madvise(MADV_MERGEABLE) added
in b8e1e9685e

Change-Id: I80dbf6afe750348964d83097f993ea6cb8a065d5
2012-11-19 11:46:33 -08:00