Commit graph

6131 commits

Author SHA1 Message Date
Yabin Cui
784de4e50a Revert "Move use of __warnattr to __deprecated."
This reverts commit 4645c4f62d.

Change-Id: I6c1062d54a4e2c4f41ce7a403e4e7840e6339146
2015-02-17 23:54:40 +00:00
Yabin Cui
b5c2379687 Merge "Move use of __warnattr to __deprecated." 2015-02-17 23:10:31 +00:00
Yabin Cui
4645c4f62d Move use of __warnattr to __deprecated.
clang don't support warning attribute. Replacing warning attriubte with
deprecated attribute can achieve the same behavior whether compiled by
gcc or clang.

Bug: 19340053
Change-Id: I064432b81cf55212458edbc749eb72dc15a810fb
2015-02-17 14:14:45 -08:00
Yabin Cui
89dad68efb Merge "Change getgrent error declaration message to proper style." 2015-02-17 21:29:27 +00:00
Yabin Cui
62533de98e Change getgrent error declaration message to proper style.
Bug: 19340053
Change-Id: I9c47a2016f356d171a5f2082acb8391d81e019b2
2015-02-17 11:33:42 -08:00
Elliott Hughes
be6a44566a Fix sysconf for _SC_CHILD_MAX and _SC_OPEN_MAX.
Change-Id: I656f613166bd604f35b31e5ec042a5230c6b82b8
2015-02-17 09:55:58 -08:00
Elliott Hughes
fb48c68221 Merge "Fix memchr overflow." 2015-02-17 17:54:40 +00:00
Elliott Hughes
92b9c6ff3e POSIX says flock is in <sys/file.h>, not <unistd.h>.
Bug: 19392265
Change-Id: I14d0b56883f0354e13db04a1d140b8f60dae08d7
2015-02-17 09:08:24 -08:00
Neil Fuller
094a8ae078 Update tzdata to tzdata2015a
Time Zone Data v. 2015a (Released 2015-01-29)
http://www.iana.org/time-zones/repository/releases/tzdata2015a.tar.gz

Information from NEWS:

Release 2015a - 2015-01-29 22:35:20 -0800

  Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

Bug: 19212588
(cherry-picked from commit 700eb048fb)

Change-Id: I23d94982f634889ab9dcef28cf4a8853224bfd9c
2015-02-17 17:05:48 +00:00
Elliott Hughes
41ef902379 Fix memchr overflow.
The overflow's actually in the generic C implementation of memchr.

While I'm here, let's switch our generic memrchr to the OpenBSD version too.

Bug: https://code.google.com/p/android/issues/detail?id=147048
Change-Id: I296ae06a1ee196d2c77c95a22f11ee4d658962da
2015-02-14 13:21:22 -08:00
Yabin Cui
9d7f68ebfd am 4812bdf1: am 4181cc69: Merge "Declare getgrent/setgrent/endgrent as missing."
* commit '4812bdf1b160fb803dd86a393daf2ae725029c2e':
  Declare getgrent/setgrent/endgrent as missing.
2015-02-14 02:46:43 +00:00
Yabin Cui
4181cc691e Merge "Declare getgrent/setgrent/endgrent as missing." 2015-02-14 02:37:19 +00:00
Dmitriy Ivanov
39c9f7bc65 am 88117127: am b81a871c: Merge changes I88827aa0,Ib0b0987a
* commit '88117127defa6aeb26840ec8547486aefd5edd73':
  Fix: DT_DEBUG was acting as DT_REL on mips64
  Add missing SHT_LOOS/SHT_HIOS values
2015-02-14 00:49:33 +00:00
Dmitriy Ivanov
b81a871cbb Merge changes I88827aa0,Ib0b0987a
* changes:
  Fix: DT_DEBUG was acting as DT_REL on mips64
  Add missing SHT_LOOS/SHT_HIOS values
2015-02-14 00:38:04 +00:00
Dmitriy Ivanov
13ed3f0af1 Add missing SHT_LOOS/SHT_HIOS values
Change-Id: Ib0b0987a7e85af7863c6ef894263b5980e32344d
2015-02-13 16:34:38 -08:00
Colin Cross
15c60ccfb1 am d6a9f804: am 150403ca: Merge "Make .note.android.ident section type SH_NOTE"
* commit 'd6a9f804a9c95942bddc9afa243c339d72371008':
  Make .note.android.ident section type SH_NOTE
2015-02-13 20:29:34 +00:00
Yabin Cui
c9d09431b9 Declare getgrent/setgrent/endgrent as missing.
Bug: 19340053
Change-Id: I42bfeda95e6f262e2e74ab47336ea346c2de7e4a
2015-02-13 10:52:35 -08:00
Colin Cross
e09ab2cc2f Make .note.android.ident section type SH_NOTE
The .note.android.ident section is only used by GDB, which doesn't
care what section type the section is, but it would be convenient
for readelf -n to be able to find the section too.

The old way of getting the .note.android.ident section to be of type
SH_NOTE involved compiling from .c to .s using gcc, running sed to
change progbits to note, and then compiling from .s to .o using gcc.
Since crtbrand.c only contains a section containing data, a
crtbrand.S can be checked in that will compile on all platforms,
avoiding the need for sed.

Also add crtbrand.o to crtbegin_so.o so that libraries also get
the note, and to the crt workaround in arm libc.so.

Change-Id: Ica71942a6af4553b56978ceaa288b3f4c15ebfa2
2015-02-12 21:37:20 -08:00
Colin Cross
71721a31d0 am baf16422: am 362d6779: Merge "Remove no-op sed step when compiling crtbrand.o"
* commit 'baf164221b1356fe13091c2ca4b357da9a4e237c':
  Remove no-op sed step when compiling crtbrand.o
2015-02-12 18:26:53 +00:00
Colin Cross
24958ae4ef Remove no-op sed step when compiling crtbrand.o
crtbrand.c was compiled to a .s file, run through a sed script
to translate a %progbits to %note, and the compiled to .o.
However, when the sed command was copied from the original source
it was not updated to use the new name of the section (.note.ABI-tag
to .note.android.ident), so it didn't modify the file.  Since the
section has been generated with type %progbits instead of %note for
two years, just delete the whole sed step.

Change-Id: Id78582e9b43b628afec4eed22a088283132f0742
2015-02-11 17:40:45 -08:00
Duane Sand
b6d301f42d [MIPS] Fix setjmp signals
Include full 16-byte Mips sigset_t signal mask within jump buffer.
Call sigprocmask instead of sigblockmask/sigsetmask to get/set full signal mask.
Include sigsetjmp's savesigs arg inside jmp_buf, instead of following it.
Reserve room for future extensions.
Preserve historically-large mips32 _JBLEN size.
Eliminate redundancy: code setjmp and _setjmp as tail calls into sigsetjmp,
and make longjmp and _longjmp aliases of siglongjmp.

Change-Id: Ie79137cf059228c1a51344ebb20d3a9a40b4a252
2015-02-11 15:15:53 -08:00
Yabin Cui
8dc24ee55e am 3a31e697: am ee17e880: Merge "Define MAXHOSTNAMELEN explicitly in source files."
* commit '3a31e697ca3c1207bfec64b555bcff7b129348a3':
  Define MAXHOSTNAMELEN explicitly in source files.
2015-02-10 18:09:57 +00:00
Yabin Cui
ee17e88004 Merge "Define MAXHOSTNAMELEN explicitly in source files." 2015-02-10 17:51:33 +00:00
Yabin Cui
c9f8c07373 am fa592b2a: am e375ecaa: Merge "Switch pthread_cond_t to <stdatomic.h>."
* commit 'fa592b2a903a6e5110c6daf0959cc7211fc476d7':
  Switch pthread_cond_t to <stdatomic.h>.
2015-02-10 16:53:28 +00:00
Yabin Cui
88c0719f8f am 6a32443a: am a4fc89ba: Merge "Stop including <linux/param.h> in <sys/param.h>."
* commit '6a32443aa3e2544000314adf80d4e081d36d170d':
  Stop including <linux/param.h> in <sys/param.h>.
2015-02-10 16:51:48 +00:00
Narayan Kamath
1771006863 am e163cb28: am f69139e1: Merge "Remove stray log line."
* commit 'e163cb28b9b89f315000c1c480ee0cb2b3c26744':
  Remove stray log line.
2015-02-10 16:51:44 +00:00
Yabin Cui
2d8f9b5aea Define MAXHOSTNAMELEN explicitly in source files.
Bug: 19093777
Bug: 19092844
Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
2015-02-09 19:56:47 -08:00
Yabin Cui
e375ecaa39 Merge "Switch pthread_cond_t to <stdatomic.h>." 2015-02-10 00:10:45 +00:00
Yabin Cui
e5f816c017 Switch pthread_cond_t to <stdatomic.h>.
Bug: 17574458
Change-Id: Ic7f79861df4fe751cfa6c6b20b71123cc31e7114
2015-02-09 15:54:22 -08:00
Yabin Cui
a4fc89badf Merge "Stop including <linux/param.h> in <sys/param.h>." 2015-02-09 19:46:46 +00:00
Narayan Kamath
421608550d Remove stray log line.
Change-Id: Id948ae37a91dadd9d40e91de97f18774bdccfc78
2015-02-09 18:01:45 +00:00
Tao Bao
5690237c6f am 35947160: am bc64d1d1: Merge "Switch kernel header parsing to python libclang"
* commit '35947160f96931a6464a9425b04f79232b389ed0':
  Switch kernel header parsing to python libclang
2015-02-06 23:39:23 +00:00
Colin Cross
fa8a43e6df am 0ef78e38: am 44e88db1: Merge "Use LOCAL_C_INCLUDES instead of LOCAL_CFLAGS for include dirs"
* commit '0ef78e3840b3bfcc07a13d7ffa69dfdd8313e80c':
  Use LOCAL_C_INCLUDES instead of LOCAL_CFLAGS for include dirs
2015-02-06 23:31:35 +00:00
Tao Bao
bc64d1d1fd Merge "Switch kernel header parsing to python libclang" 2015-02-06 23:25:29 +00:00
Tao Bao
d7db594b8d Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang.

Bug: 18937958
Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
2015-02-06 14:48:41 -08:00
Colin Cross
44e88db185 Merge "Use LOCAL_C_INCLUDES instead of LOCAL_CFLAGS for include dirs" 2015-02-06 22:45:59 +00:00
Colin Cross
91b403cef6 Use LOCAL_C_INCLUDES instead of LOCAL_CFLAGS for include dirs
Change-Id: If61d6faae5d91c3bbe198e733e5922cd877ba353
2015-02-06 14:16:17 -08:00
Elliott Hughes
ec56d962ad am 87c44930: am 9dfb00c1: Merge "Use the libcxxabi __cxa_demangle."
* commit '87c44930486af960de27996d94b742f19399b82b':
  Use the libcxxabi __cxa_demangle.
2015-02-05 20:31:07 +00:00
Elliott Hughes
4aa6d06d7b am 1ec1bbda: am 9a9b6357: Merge "Apparently, logd does need the NULs."
* commit '1ec1bbda7f254266653a0db470f6e5d699a0cad1':
  Apparently, logd does need the NULs.
2015-02-05 20:31:06 +00:00
Elliott Hughes
9dfb00c1d4 Merge "Use the libcxxabi __cxa_demangle." 2015-02-05 20:21:35 +00:00
Elliott Hughes
6e54c3e519 Use the libcxxabi __cxa_demangle.
Bug: 18930951
Change-Id: If2ea3633ac6dfd4ec975c0f16bdf3dd58e05c614
2015-02-05 12:05:34 -08:00
Elliott Hughes
aba6f712d4 Apparently, logd does need the NULs.
Change-Id: I04b834e65c26c5821b952f78a0de7f92527cbdba
2015-02-05 12:02:04 -08:00
Colin Cross
08f6d7c9eb am 427d438d: am da2c0a70: Merge changes Ib87855e8,I4b46ae20,I66364a5c,Id3fcf680
* commit '427d438dd44bb79dad87d51ad60593872391e7a7':
  Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
  Fix typo in cpu variant makefile depenendency for arm64
  Remove libc_static_common_src_files
  Share LP32 makefile settings between arches
2015-02-05 18:47:07 +00:00
Colin Cross
da2c0a708e Merge changes Ib87855e8,I4b46ae20,I66364a5c,Id3fcf680
* changes:
  Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
  Fix typo in cpu variant makefile depenendency for arm64
  Remove libc_static_common_src_files
  Share LP32 makefile settings between arches
2015-02-05 01:57:28 +00:00
Colin Cross
5b869c0bbf Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
LOCAL_LDFLAGS_<arch> was being set for arm64, mips64, and x86_64.
Use LOCAL_LDFLAGS_64 instead.

Change-Id: Ib87855e8a7783f82461b707fffa7f1663e6be9c8
2015-02-04 17:40:29 -08:00
Colin Cross
a6b6ed5fe9 Fix typo in cpu variant makefile depenendency for arm64
cpu_variank_mk -> cpu_variant_mk

Change-Id: I4b46ae20de72ed2dc8820d62ac35ddc6b915a195
2015-02-04 17:38:27 -08:00
Colin Cross
7dc502d012 Remove libc_static_common_src_files
libc_static_common_src_files is never set after
c3f114037d, remove the remaining
references to it.

Change-Id: I66364a5c1b031ad69d608f6f44244049192944f6
2015-02-04 17:37:23 -08:00
Colin Cross
1742a32aea Share LP32 makefile settings between arches
Add <var>_32 to patch-up-arch-specific-flags, and move the LP32
cruft varaibles from the 32-bit arch specific makefiles into the
top level Android.mk.

Change-Id: Id3fcf6805d4af048c2524c94b1295416ebe7d057
2015-02-04 17:35:49 -08:00
Yabin Cui
5e52226f02 Stop including <linux/param.h> in <sys/param.h>.
Bug: 19092844
Change-Id: I1a4a0c84a196a187ea32e58491de744cf3c0f404
2015-02-04 14:59:58 -08:00
Neil Fuller
0abb17dd29 am 6d632af3: am 2151f09f: Merge "Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data."
* commit '6d632af3b04e505a88aa0b73f95a873dcbd472f7':
  Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data.
2015-02-04 16:45:04 +00:00
Fredrik Roubert
bdd8452472 Set INCLUDE_UNI_CORE_DATA=1 when rebuilding ICU4C time zone data.
This is now necessary to build .dat files that are useable for ICU4J as
well, and will need to be used for any future updates of the .dat file:

https://android.googlesource.com/platform/external/icu/+/6b52738

Change-Id: Ifa3a7469a66ab932db20876697e45814f0c5ddc3
2015-02-04 17:17:34 +01:00
Yabin Cui
5ace71de3f am dcf371f5: am 7e1b3d3e: Merge "Switch sem_t from bionic atomics to stdatomic.h."
* commit 'dcf371f5e7142e548b8f422bf45db14d15d86b62':
  Switch sem_t from bionic atomics to stdatomic.h.
2015-02-04 02:49:41 +00:00
Yabin Cui
7e1b3d3e68 Merge "Switch sem_t from bionic atomics to stdatomic.h." 2015-02-04 02:42:16 +00:00
Yabin Cui
a3d97da4c5 Switch sem_t from bionic atomics to stdatomic.h.
Bug: 17572887
Change-Id: If66851ba9b831cdd698b9f1303289bb14448bd03
2015-02-03 16:35:57 -08:00
Yabin Cui
70ad54d8c0 am 2d988187: am 11829be3: Merge "Add test about pthread_mutex_t owner tid limit."
* commit '2d988187712f52773b89421d139b266c8b58f769':
  Add test about pthread_mutex_t owner tid limit.
2015-02-03 22:40:46 +00:00
Yabin Cui
11829be3e1 Merge "Add test about pthread_mutex_t owner tid limit." 2015-02-03 22:28:56 +00:00
Nick Kralevich
3ce62609f2 am 72c3071d: am f00f484c: Merge "Ensure raw fchmod/fchmodat syscalls are hidden."
* commit '72c3071d548ee3bf3711abf13dce25042ccc3cea':
  Ensure raw fchmod/fchmodat syscalls are hidden.
2015-02-03 20:32:59 +00:00
Yabin Cui
140f3678f0 Add test about pthread_mutex_t owner tid limit.
Bug: 19216648
Change-Id: I7b12955bdcad31c13bf8ec2740ff88ba15223ec0
2015-02-03 12:20:46 -08:00
Nick Kralevich
00490ae3f3 Ensure raw fchmod/fchmodat syscalls are hidden.
In https://android-review.googlesource.com/#/c/127908/5/libc/SYSCALLS.TXT@116
Elliott said:

  for LP64 these will be hidden. for LP32 we were cowards and left
  them all public for compatibility (though i don't think we ever
  dremeled to see whether it was needed). we don't have an easy
  way to recognize additions, though, so we can't prevent adding
  new turds.

Add a mechanism to prevent the adding of new turds, and use that
mechanism on the fchmod/fchmodat system calls.

Bug: 19233951
Change-Id: I98f98345970b631a379f348df57858f9fc3d57c0
2015-02-03 12:10:30 -08:00
Neil Fuller
d3ef8fbdf7 am 700eb048: Update tzdata to tzdata2015a
* commit '700eb048fb6df8805245097d73a87384108fdf67':
  Update tzdata to tzdata2015a
2015-02-03 15:00:18 +00:00
Hans Boehm
da3a449043 am 0cddad0f: am d57bf449: Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>."
* commit '0cddad0fd17274575abe2e25484c909def51d7e3':
  Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
2015-02-03 02:53:31 +00:00
Hans Boehm
d57bf449fe Merge "Switch pthread_mutex_t from bionic atomics to <stdatomic.h>." 2015-02-03 02:42:53 +00:00
Elliott Hughes
ea31751e4b am aa916c8d: am c5999c1e: Merge "Clean up SEEK_SET definitions."
* commit 'aa916c8db85b01389b929f060f232b3e06448e79':
  Clean up SEEK_SET definitions.
2015-02-03 01:31:08 +00:00
Elliott Hughes
c5999c1e03 Merge "Clean up SEEK_SET definitions." 2015-02-03 01:21:17 +00:00
Yabin Cui
86fc96f733 Switch pthread_mutex_t from bionic atomics to <stdatomic.h>.
Bug: 17574456
Change-Id: I5ce3d3dc07e804e9ce55c42920f47531b56e04de
2015-02-02 15:00:01 -08:00
Nick Kralevich
4c8a50ba5d am 0cb8abc6: am d80ec661: Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support"
* commit '0cb8abc6207d7484ecbc9698064c1f24b9b668d5':
  Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
2015-02-02 22:10:53 +00:00
Nick Kralevich
d80ec66121 Merge "Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support" 2015-02-02 22:03:41 +00:00
Elliott Hughes
1ed337dbdf Clean up SEEK_SET definitions.
If we lose the #ifndef, the compiler will tell us if the definitions
of SEEK_SET and friends ever get out of sync.

Change-Id: I357cabec7c9cd451c604342344f210bba20fb6bc
2015-02-02 14:02:09 -08:00
Nick Kralevich
3cbc6c627f Add fchmodat(AT_SYMLINK_NOFOLLOW) and fchmod O_PATH support
Many libc functions have an option to not follow symbolic
links. This is useful to avoid security sensitive code
from inadvertantly following attacker supplied symlinks
and taking inappropriate action on files it shouldn't.
For example, open() has O_NOFOLLOW, chown() has
lchown(), stat() has lstat(), etc.

There is no such equivalent function for chmod(), such as lchmod().
To address this, POSIX introduced fchmodat(AT_SYMLINK_NOFOLLOW),
which is intended to provide a way to perform a chmod operation
which doesn't follow symlinks.

Currently, the Linux kernel doesn't implement AT_SYMLINK_NOFOLLOW.
In GLIBC, attempting to use the AT_SYMLINK_NOFOLLOW flag causes
fchmodat to return ENOTSUP. Details are in "man fchmodat".

Bionic currently differs from GLIBC in that AT_SYMLINK_NOFOLLOW
is silently ignored and treated as if the flag wasn't present.

This patch provides a userspace implementation of
AT_SYMLINK_NOFOLLOW for bionic. Using open(O_PATH | O_NOFOLLOW),
we can provide a way to atomically change the permissions on
files without worrying about race conditions.

As part of this change, we add support for fchmod on O_PATH
file descriptors, because it's relatively straight forward
and could be useful in the future.

The basic idea behind this implementation comes from
https://sourceware.org/bugzilla/show_bug.cgi?id=14578 , specifically
comment #10.

Change-Id: I1eba0cdb2c509d9193ceecf28f13118188a3cfa7
2015-02-02 13:17:17 -08:00
Elliott Hughes
671b7eb288 am 815fc9bc: am c57b5c50: Merge "Small logging cleanup."
* commit '815fc9bc9ecf96dd478c0800fdb9c4e9200320be':
  Small logging cleanup.
2015-02-02 20:54:27 +00:00
Elliott Hughes
42084a2653 Small logging cleanup.
Don't send the trailing NUL bytes to the logger, call strlen if we already
know the length, or cast more specifically than we need to.

Change-Id: I68c9388a22bddea49120a1022dda8db8991360c1
2015-02-02 12:24:46 -08:00
Elliott Hughes
2e02769aa1 am 5f7819d6: am 7f0f30c6: Merge "Fix clang build."
* commit '5f7819d6f1b2cb706d818e3083d45337e35d386b':
  Fix clang build.
2015-02-02 18:50:43 +00:00
Elliott Hughes
7f0f30c6e2 Merge "Fix clang build." 2015-02-02 18:23:28 +00:00
Elliott Hughes
30fbf5f44c Fix clang build.
Change-Id: I863137b5d35602267b4ef3a74399cf394c9994d6
2015-02-02 10:21:39 -08:00
Neil Fuller
575bceb281 am 0a302e01: am d514d9bb: Merge "Fixes to the update-tzdata.py tool"
* commit '0a302e0174da4432da4a6ad5ce126dc27e4a86de':
  Fixes to the update-tzdata.py tool
2015-02-02 18:03:11 +00:00
Elliott Hughes
5372b83eab am 20f2e4f7: am 5940f98a: Merge "Fortify poll and ppoll."
* commit '20f2e4f7ad9d9f816be13f6509e602d4344a018d':
  Fortify poll and ppoll.
2015-02-02 18:03:10 +00:00
Neil Fuller
d514d9bbae Merge "Fixes to the update-tzdata.py tool" 2015-02-02 17:52:48 +00:00
Neil Fuller
0662c3e5b3 Fixes to the update-tzdata.py tool
We build one too many times. Creating a missing directory
is sufficient.

The tz2icu needs some files in the CWD. Added symlinks.

Bug: 19230091
Change-Id: I58f9817af68b229f48139e56503f50a2b6dbb4fe
2015-02-02 17:42:41 +00:00
Elliott Hughes
4674e3899a Fortify poll and ppoll.
And remove the test for FD_ZERO fortification, which never made much
sense anyway.

Change-Id: Id1009c5298d461fa4722189e8ecaf22f0c529536
2015-02-02 09:15:19 -08:00
Neil Fuller
700eb048fb Update tzdata to tzdata2015a
Time Zone Data v. 2015a (Released 2015-01-29)
http://www.iana.org/time-zones/repository/releases/tzdata2015a.tar.gz

Information from NEWS:

Release 2015a - 2015-01-29 22:35:20 -0800

  Changes affecting future time stamps

    The Mexican state of Quintana Roo, represented by America/Cancun,
    will shift from Central Time with DST to Eastern Time without DST
    on 2015-02-01 at 02:00.  (Thanks to Steffen Thorsen and Gwillim Law.)

    Chile will not change clocks in April or thereafter; its new standard time
    will be its old daylight saving time.  This affects America/Santiago,
    Pacific/Easter, and Antarctica/Palmer.  (Thanks to Juan Correa.)

    New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
    (Thanks to Tim Parenti.)

  Changes affecting past time stamps

    Iceland observed DST in 1919 and 1921, and its 1939 fallback
    transition was Oct. 29, not Nov. 29.  Remove incorrect data from
    Shanks about time in Iceland between 1837 and 1908.

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
    and Asia/Muscat.

  Changes affecting code

    tzalloc now scrubs time zone abbreviations compatibly with the way
    that tzset always has, by replacing invalid bytes with '_' and by
    shortening too-long abbreviations.

    tzselect ports to POSIX awk implementations, no longer mishandles
    POSIX TZ settings when GNU awk is used, and reports POSIX TZ
    settings to the user.  (Thanks to Stefan Kuhn.)

  Changes affecting build procedure

    'make check' now checks for links to links in the data.
    One such link (for Africa/Asmera) has been fixed.
    (Thanks to Stephen Colebourne for pointing out the problem.)

  Changes affecting commentary

    The leapseconds file commentary now mentions the expiration date.
    (Problem reported by Martin Burnicki.)

    Update Mexican Library of Congress URL.

Bug: 19212588
Change-Id: Idc07ac862901500d4a1dbd0f4aadcfd0aa9d10b8
2015-02-02 11:32:10 +00:00
Elliott Hughes
9b96dd6b17 am d2d63740: am 21cdd22f: Merge "Include <malloc.h> for struct mallinfo."
* commit 'd2d63740b78459a414e293efdb16e7a9ac089d5c':
  Include <malloc.h> for struct mallinfo.
2015-01-31 07:49:25 +00:00
Elliott Hughes
a26423f22c am fd10c019: am 09c33824: Merge "Break two incorrect transitive includes."
* commit 'fd10c019fab50c06f391b6a765b0904ce477d3b7':
  Break two incorrect transitive includes.
2015-01-31 07:49:24 +00:00
Elliott Hughes
cb0e70389e Include <malloc.h> for struct mallinfo.
GCC doesn't seem to care, but clang does.

Change-Id: I9884820339a9e6f142862928c357f1a538184ae0
2015-01-30 20:33:31 -08:00
Elliott Hughes
09c3382433 Merge "Break two incorrect transitive includes." 2015-01-31 04:18:10 +00:00
Dan Albert
3c68e1946a am 18dd2f3b: am 94335cc8: Merge "Put back inline definitions if using an old API."
* commit '18dd2f3b918af8233dc63ad6efa780a26c8ae79c':
  Put back inline definitions if using an old API.
2015-01-30 21:16:35 +00:00
Elliott Hughes
0772f933a4 am 6cf2cf8b: am 542b94d9: Merge "Remove unused CONFIG_SECONDS."
* commit '6cf2cf8bf26b99b7318791c75cbccfd95893b04e':
  Remove unused CONFIG_SECONDS.
2015-01-30 21:16:34 +00:00
Dan Albert
94335cc8e2 Merge "Put back inline definitions if using an old API." 2015-01-30 17:18:49 +00:00
Elliott Hughes
4dcfccff8d Remove unused CONFIG_SECONDS.
Bug: https://code.google.com/p/android/issues/detail?id=65951
Change-Id: I8ae7057c68e16618de6dd06cf052426c6cad8a3d
2015-01-29 21:47:37 -08:00
Elliott Hughes
5038b19cef Break two incorrect transitive includes.
Change-Id: I95519caa5258cf5c6b8053f1c7e08ade2a824e49
2015-01-29 20:12:13 -08:00
Dan Albert
466dbe4444 Put back inline definitions if using an old API.
All these inlines were turned in to out of line definitions in L.
This brings us a step closer to being able to just use the current
bionic headers for the NDK, rather than having many old versions of
them.

Change-Id: Ie010bc727d78d3742abc577c70f6578db2e68625
2015-01-29 17:30:40 -08:00
Dan Albert
36aad393db am c9af0e9a: am cd1959b0: Merge "Add primitive CPPLINT.cfg."
* commit 'c9af0e9a2d215b60a128643b6bdddd671e33864b':
  Add primitive CPPLINT.cfg.
2015-01-29 22:06:28 +00:00
Dan Albert
cd1959b0c5 Merge "Add primitive CPPLINT.cfg." 2015-01-29 21:54:55 +00:00
Yabin Cui
f63ae0553e am 508d5579: am 782aa39f: Merge "Rewrite __cxa_guard.cpp with <stdatomic.h>."
* commit '508d5579cd0d3723662755ab418ac3085e9f30cd':
  Rewrite __cxa_guard.cpp with <stdatomic.h>.
2015-01-29 20:35:44 +00:00
Dan Albert
6ac4dd8ba9 Add primitive CPPLINT.cfg.
We'll add more things to this as we discover other warnings we don't
care about.

Change-Id: I408f688827cab0f74e055d8f1778069163663f0b
2015-01-29 11:41:59 -08:00
Yabin Cui
6a3ff01cd4 Rewrite __cxa_guard.cpp with <stdatomic.h>.
Bug: 19180923
Change-Id: If4912d01db43c72ef12f4b04270ddb5d76d09462
2015-01-29 11:19:15 -08:00
Elliott Hughes
dbfcf000c0 am e40b4eb3: am 7f17aea2: Merge "Add missing includes."
* commit 'e40b4eb35a6f8ae5c286f53abb920b452b7b6792':
  Add missing includes.
2015-01-29 03:33:42 +00:00
Elliott Hughes
05fc1d7050 Add missing includes.
Change-Id: Ibf549266a19a67eb9158d341a69dddfb654be669
2015-01-28 19:23:11 -08:00
Elliott Hughes
4f2e2a9d70 am 8661b092: am a9c3d056: Merge "Modify MIPS64 stat structure to match a generic one in AOSP."
* commit '8661b092fe24c6b56426e07c6f02f5d83daae172':
  Modify MIPS64 stat structure to match a generic one in AOSP.
2015-01-29 01:42:06 +00:00
Elliott Hughes
a9c3d0569f Merge "Modify MIPS64 stat structure to match a generic one in AOSP." 2015-01-29 01:31:59 +00:00
Raghu Gandham
86d2feef9f Modify MIPS64 stat structure to match a generic one in AOSP.
The kernel version of the stat structure is used during the syscalls. After the syscall,
the kernel stat structure is converted to match the generic one. Eventually we would like
the generic stat structure and related syscalls be added to MIPS64 kernel, removing the
thunks added to AOSP.

Change-Id: I7764e80278c1cc8254754c3531ec2dda7544a8ec
2015-01-28 16:12:17 -08:00
Yabin Cui
c6438cd4b0 am 3c95c887: am 9e82c4be: Merge "Switch pthread_once_t to stdatomic.h."
* commit '3c95c887820018cff06039e1dc35afe585e661c1':
  Switch pthread_once_t to stdatomic.h.
2015-01-28 21:27:32 +00:00
Yabin Cui
80e6d6d825 Switch pthread_once_t to stdatomic.h.
Bug: 17574610

Change-Id: I653f2aa4b5b38dbdaffe4a6c3deccfe6ad3b0e74
2015-01-27 19:49:12 -08:00
Elliott Hughes
63c74b2c22 am 6c55034a: am 86d98962: Merge "Fix mips build."
* commit '6c55034a1d24caa82cb7e5a6c0ca71e9697c0f12':
  Fix mips build.
2015-01-27 19:51:12 +00:00
Elliott Hughes
e6099098a5 Fix mips build.
Move various mips-only things into the arch-mips directory. As soon as mips
writes assembler replacements, we can remove these.

Change-Id: Ia7308559bc361f5c8df3e1d456b381865e060b93
2015-01-27 11:09:27 -08:00
Elliott Hughes
4bdc2a6105 am ca3396ef: am 192e169a: Merge "x86 has an assembler bcopy implementation."
* commit 'ca3396ef2d08777f83362c72939aed7cfd4f6edf':
  x86 has an assembler bcopy implementation.
2015-01-27 05:59:07 +00:00
Elliott Hughes
192e169a40 Merge "x86 has an assembler bcopy implementation." 2015-01-27 05:46:56 +00:00
Elliott Hughes
1edfd9e36a x86 has an assembler bcopy implementation.
Change-Id: I4ed7af3c5b104f86550120401f773150c460f37b
2015-01-26 21:45:56 -08:00
Elliott Hughes
0dadeb8134 am 2bb5664f: am 643a9be8: Merge "[Arm64] Fix overlapping fp fields in jmp_buf"
* commit '2bb5664f5e73221bbc14def1721bb541c901b277':
  [Arm64] Fix overlapping fp fields in jmp_buf
2015-01-27 05:05:56 +00:00
Elliott Hughes
5bf4a1729a am dedacf10: am 5c7964c5: Merge "Clean up <stdlib.h> slightly."
* commit 'dedacf109b35e74d76594c29560a09f4ef3eb94d':
  Clean up <stdlib.h> slightly.
2015-01-27 05:00:11 +00:00
Elliott Hughes
643a9be82e Merge "[Arm64] Fix overlapping fp fields in jmp_buf" 2015-01-27 04:56:20 +00:00
Elliott Hughes
5c7964c5f1 Merge "Clean up <stdlib.h> slightly." 2015-01-27 04:49:07 +00:00
Lorenzo Colitti
ecbeee61ed am 329db346: am f2d02c38: Merge "Make bionic compile even if resolver debugging is enabled."
* commit '329db346f54c629e0c9fcc98c21c19619a573e9b':
  Make bionic compile even if resolver debugging is enabled.
2015-01-27 04:14:09 +00:00
Lorenzo Colitti
f2d02c38fb Merge "Make bionic compile even if resolver debugging is enabled." 2015-01-27 04:02:42 +00:00
Duane Sand
dbaab26021 [Arm64] Fix overlapping fp fields in jmp_buf
Change-Id: I9be9f118108f3f6e2bb02a5b01e0420fbfd15d85
2015-01-26 16:20:05 -08:00
Elliott Hughes
76f8916b90 Clean up <stdlib.h> slightly.
Interestingly, this mostly involves cleaning up our implementation of
various <string.h> functions.

Change-Id: Ifaef49b5cb997134f7bc0cc31bdac844bdb9e089
2015-01-26 14:28:41 -08:00
Christopher Ferris
62c51518ab am a5af57d3: am 419ed122: Merge "Update kernel headers to v3.18.3."
* commit 'a5af57d3e6e8cccf32d0e84eb148b5f4b9db3552':
  Update kernel headers to v3.18.3.
2015-01-26 21:45:15 +00:00
Christopher Ferris
419ed122aa Merge "Update kernel headers to v3.18.3." 2015-01-26 21:27:52 +00:00
Elliott Hughes
46bed722eb am e3c350f8: am 247cfe03: Merge "Add <error.h>."
* commit 'e3c350f8c8a3be0637e4894639b14a3965a1b312':
  Add <error.h>.
2015-01-26 20:53:58 +00:00
Elliott Hughes
247cfe0382 Merge "Add <error.h>." 2015-01-26 20:38:46 +00:00
Elliott Hughes
b8a8cf0d1a Add <error.h>.
Bug: https://code.google.com/p/android/issues/detail?id=79170
Change-Id: Id91765fac45124545e2674a5b2c814707c1a448b
2015-01-26 11:57:11 -08:00
Christopher Ferris
82d7504cd7 Update kernel headers to v3.18.3.
Bug: 19127803
Change-Id: I67fa0832322ddd0032d909476047578be052bcf2
2015-01-26 10:57:07 -08:00
Lorenzo Colitti
616344d169 Make bionic compile even if resolver debugging is enabled.
The code now compiles with all combinations of DEBUG and
DEBUG_DATA except DEBUG_DATA=1, DEBUG=0, which is unsupported.

Change-Id: I9035a65c649df73092f1fc0864ae1cdd9a14aa3b
2015-01-26 16:05:27 +09:00
Dan Albert
7102d69ef1 am 2991f2a3: am 6eb5dc1d: Merge "Fix coverage build after adding clang coverage."
* commit '2991f2a3d92f54757c0e726a3dcaa103cd8fed9e':
  Fix coverage build after adding clang coverage.
2015-01-25 23:05:47 +00:00
Dan Albert
6eb5dc1d9c Merge "Fix coverage build after adding clang coverage." 2015-01-25 22:51:37 +00:00
Dan Albert
6e9e6ad3bf Fix coverage build after adding clang coverage.
Static libraries are painful. Details are in the comment. I'll try to
get prebuilts in to the tree so I can fix this on Monday. Until then,
this isn't actually a regression because we've not had coverage
available for this library until now anyway.

Bug: 17574078
Change-Id: I7505c8a94007203e15a6cf192caa06004849d7d9
2015-01-25 14:27:51 -08:00
Elliott Hughes
9e4827de12 am 7eed99da: am 66eeec8e: Merge "Reduce <stdlib.h> namespace pollution."
* commit '7eed99dad95003b8b40e6a1136bd83ac68dc54dc':
  Reduce <stdlib.h> namespace pollution.
2015-01-24 23:53:11 +00:00
Elliott Hughes
c5dc02a91e Reduce <stdlib.h> namespace pollution.
<stdlib.h> shouldn't drag in all of <string.h>.

Change-Id: I949172f7ff17e329e411e5054e50f79c13775444
2015-01-24 15:22:57 -08:00
Elliott Hughes
fe1709bdca am 12144696: am 62d20fb2: Merge "Reduce <signal.h> namespace pollution."
* commit '12144696ac9b53462fbfb0fb4f1a181e10df7437':
  Reduce <signal.h> namespace pollution.
2015-01-24 22:47:01 +00:00
Elliott Hughes
6466292a7e Reduce <signal.h> namespace pollution.
<signal.h> shouldn't drag in all of <string.h>.

Change-Id: I57aea36dad5e89ea2f9541c35594ca6225e532be
2015-01-24 14:18:16 -08:00
Elliott Hughes
cf936c1e43 am 61a80735: am 6e15edcc: Merge "Say "Bad file descriptor" rather than "Bad file number"."
* commit '61a8073565dd9870f4f93a96f91881955833757b':
  Say "Bad file descriptor" rather than "Bad file number".
2015-01-24 22:18:09 +00:00
Elliott Hughes
6e15edcca5 Merge "Say "Bad file descriptor" rather than "Bad file number"." 2015-01-24 22:08:20 +00:00
Elliott Hughes
d309877eee Say "Bad file descriptor" rather than "Bad file number".
This text is actually in POSIX (though it's not mandatory) and it's what glibc
says. Who says "file number" anyway?

Change-Id: Icc91ac24587c2bc692e0b97c19d32ac1bdda4ea7
2015-01-24 13:38:57 -08:00
Elliott Hughes
e5cfda5b5d am 94a4a173: am 59936a3b: Merge "Fix optimized fread."
* commit '94a4a173d24ce8feac5c49fb5ad209a836d41439':
  Fix optimized fread.
2015-01-24 21:38:15 +00:00
Elliott Hughes
e6bb5a2776 Fix optimized fread.
gcov does writes after reads on the same stream, but the bulk read optimization
was clobbering the FILE _flags, causing fwrite to fail.

Bug: 19129055
Change-Id: I9650cb7de4bb173a706b502406266ed0d2b654d7
2015-01-24 12:35:41 -08:00
Dan Albert
2e7715b29f am f908b21a: am ab58559a: Merge "Add a basic NDK compatibility library."
* commit 'f908b21a5cdb68184907ac6cb1475dfe771c28cf':
  Add a basic NDK compatibility library.
2015-01-23 00:54:53 +00:00
Dan Albert
ab58559a9c Merge "Add a basic NDK compatibility library." 2015-01-23 00:46:54 +00:00
Elliott Hughes
9455d3b7a0 am d4517fb3: am 53df4bfc: Merge "Use a more specific return type for app_id_from_name."
* commit 'd4517fb37ce5d306fa3d6f65e0fcfe949e7fd6fd':
  Use a more specific return type for app_id_from_name.
2015-01-22 20:26:36 +00:00
Elliott Hughes
c56af08c21 Use a more specific return type for app_id_from_name.
I suspect we can simplify this code, but I don't know enough about it
to get involved now.

Change-Id: I1c39761ae31beb70d41ffa6f0e396a4f17529d46
2015-01-22 11:02:59 -08:00
Dan Albert
9c3fd59b00 Add a basic NDK compatibility library.
We know we can safely statically link `libm`, since it doesn't have
any dependencies on the OS or the layout of a data type that has
changed between releases (like `pthread_t`).

We can safely statically link `libc_syscalls` because the user can
check for and handle `ENOSYS`.

Update `ndk_missing_symbols.py` to account for symbols that are in the
compatibility library.

Improve `symbols.py` to be able to pull symbols from a static library.

Change-Id: Ifb0ede1e8b4a8f0f33865d9fed72fb8b4d443fbc
2015-01-21 18:12:15 -08:00
Elliott Hughes
f7b64d0900 am 69838daa: am d1668a71: Merge "Turn on -Wold-style-cast and fix the errors."
* commit '69838daa8764eb4d008df679e961fb510a37687b':
  Turn on -Wold-style-cast and fix the errors.
2015-01-22 02:02:46 +00:00
Dan Albert
0855e923f6 am c673a2fe: am 4f11c59b: Merge "Add ndk_missing_symbols.py."
* commit 'c673a2fea9246665ff87d619c48e882800a0793d':
  Add ndk_missing_symbols.py.
2015-01-22 01:54:29 +00:00
Elliott Hughes
d1668a71df Merge "Turn on -Wold-style-cast and fix the errors." 2015-01-22 01:52:06 +00:00
Dan Albert
4f11c59b3f Merge "Add ndk_missing_symbols.py." 2015-01-22 01:25:57 +00:00
Elliott Hughes
8b5df3920f Turn on -Wold-style-cast and fix the errors.
A couple of dodgy cases where we cast away const, but otherwise pretty boring.

Change-Id: Ibc39ebd525377792b5911464be842121c20f03b9
2015-01-21 17:09:58 -08:00
Dan Albert
169eb66451 Add ndk_missing_symbols.py.
ndk_missing_symbols.py pulls libc.so and libm.so off a running device
or emulator and shows the list of symbols that are in the current
bionic that aren't available on the target.

Change-Id: Ia92c315a6a0ce2e5c33db0b62c8fab41c08a4c31
2015-01-21 17:09:50 -08:00
Elliott Hughes
0edffb85fa am a2e5d98b: am 2a8c929a: Merge "Implement __fsetlocking."
* commit 'a2e5d98b641bef4c5611f6aba5defff74abcad93':
  Implement __fsetlocking.
2015-01-22 00:13:10 +00:00
Elliott Hughes
8c4994bbc1 Implement __fsetlocking.
The old __isthreaded hack was never very useful on Android because all user
code runs in a VM where there are lots of threads running. But __fsetlocking
lets a caller say "I'll worry about the locking for this FILE*", which is
useful for the normal case where you don't share a FILE* between threads
so you don't need any locking.

Bug: 17154740
Bug: 18593728
Change-Id: I2a8dddc29d3edff39a3d7d793387f2253608a68d
2015-01-21 10:33:30 -08:00
Elliott Hughes
eb1ac69d45 am 45bdcf89: am f3743584: Merge "Fix signed/unsigned comparison that was upsetting clang."
* commit '45bdcf895b7f4cd6b4741fe33bc7a56d40fb220a':
  Fix signed/unsigned comparison that was upsetting clang.
2015-01-21 02:21:59 +00:00
Elliott Hughes
e574a70d1e am c4f1cfc9: am a779719d: Merge "Add TEMP_FAILURE_RETRY to stdio\'s low-level read/write functions."
* commit 'c4f1cfc9fc5ba053525cd155d50fae8b67df0392':
  Add TEMP_FAILURE_RETRY to stdio's low-level read/write functions.
2015-01-21 02:21:58 +00:00
Elliott Hughes
6428c625e8 am 7d196768: am 927d8be7: Merge "Fix build error when XLOG is enabled"
* commit '7d196768029f36b0e3fa57ba747ce58ef2b1c9d6':
  Fix build error when XLOG is enabled
2015-01-21 02:21:57 +00:00
Elliott Hughes
822fe55ea9 am 06645218: am c053a428: Merge "Optimized fread."
* commit '0664521893e88f2cd266306e707a832d9d1f94a2':
  Optimized fread.
2015-01-21 02:21:56 +00:00
Elliott Hughes
e69e6458cc Fix signed/unsigned comparison that was upsetting clang.
bionic/libc/stdio/fread.c:86:27: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Werror,-Wsign-compare]

Change-Id: Ia7e1e053e0cb13113e8f2eede820be013acbab82
2015-01-20 16:52:04 -08:00
Elliott Hughes
8885dcc779 Add TEMP_FAILURE_RETRY to stdio's low-level read/write functions.
This is correctness rather than performance, but found while investigating
performance.

Bug: 18593728
Change-Id: Idbdfed89d1931fcfae65db29d662108d4bbd9b65
2015-01-20 16:18:32 -08:00
Patrick Tjin
a6a0949b1d Fix build error when XLOG is enabled
(cherrypick of 79a49c9857f3949fc13373eeb179f27b6ecdca81.)

Change-Id: I7bb44fd1fe3ef2ddfc115247f328eccfceeb5352
Signed-off-by: Patrick Tjin <pattjin@google.com>
2015-01-20 16:12:45 -08:00
Elliott Hughes
75b99387dd Optimized fread.
This makes us competitive with glibc for fully-buffered and unbuffered reads,
except in single-threaded situations where glibc avoids locking, but since
we're never really single-threaded anyway, that isn't a priority.

Bug: 18593728
Change-Id: Ib776bfba422ccf46209581fc0dc54f3567645b8f
2015-01-20 15:59:17 -08:00
Yabin Cui
b8679a84df am afb488a3: am 6fac2f68: Merge "Fix possible leak in pthread_detach."
* commit 'afb488a3e91c7ac297b4f91e9985fd10c09d6f81':
  Fix possible leak in pthread_detach.
2015-01-15 19:47:35 +00:00
Yabin Cui
19e246dda6 Fix possible leak in pthread_detach.
If pthread_detach() is called while the thread is in pthread_exit(),
it takes the risk that no one can free the pthread_internal_t.
So I add PTHREAD_ATTR_FLAG_ZOMBIE to detect this, maybe very rare, but
both glibc and netbsd libpthread have similar function.

Change-Id: Iaa15f651903b8ca07aaa7bd4de46ff14a2f93835
2015-01-15 10:45:25 -08:00
Andres Morales
6dcbe94239 am 740ac6fe: am 2b15f54a: Merge "bionic: libc: Added path to root ramdisk build properties file."
* commit '740ac6fe7358ac73643189bbe1b7a5e7c76142f3':
  bionic: libc: Added path to root ramdisk build properties file.
2015-01-14 16:05:28 +00:00
Elliott Hughes
7d640183f2 am 5bff8a23: am d986f2e4: Merge "Sync with upstream OpenBSD stdio."
* commit '5bff8a23379ea4034d3112ad5725e91e4b801d5a':
  Sync with upstream OpenBSD stdio.
2015-01-14 12:07:23 +00:00
Andres Morales
9d9ebc5fc9 bionic: libc: Added path to root ramdisk build properties file.
Change-Id: Id850e4e5ef4e91cea7ad53f6858886daf660eeec
2015-01-13 18:07:23 -08:00
Elliott Hughes
01abeacded Sync with upstream OpenBSD stdio.
Mainly to get the __atexit_register_cleanup removals we suggested.

Change-Id: I58d40b8c5b8401bfb6bfffe8f3430ac0718af917
2015-01-13 17:19:21 -08:00
Yabin Cui
5631f47eb6 am 1217d9a3: am c80eb091: Merge "Clean up paths.h."
* commit '1217d9a3d13222f16978282d4488588bfe420233':
  Clean up paths.h.
2015-01-10 05:29:04 +00:00
Yabin Cui
3471fcbb6a Clean up paths.h.
Bug: 18905946
Change-Id: I02cd1ddd5c0b0af165685413bc1fb12ca6bf5f33
2015-01-09 20:04:04 -08:00
Dmitriy Ivanov
dde3d83a6f am 2e44e464: am 9c4783b1: Merge changes I713800ce,I1dea46c3
* commit '2e44e4649a5ebf00e7ab1bc5ff32f6bd79845347':
  Refactor soinfo::relocate
  Add ARM_IRELATIVE relocation
2015-01-09 23:55:42 +00:00
Dmitriy Ivanov
a137f53980 Add ARM_IRELATIVE relocation
Bug: 17399706
Change-Id: I1dea46c3a3c4572558e718283489c323794176c7
2015-01-08 22:22:27 -08:00
Elliott Hughes
857e112443 am e6594658: am 8623dc75: Merge "Fix freeaddrinfo(NULL)."
* commit 'e6594658f7d36172007a2573e345d6ae0d0ac58a':
  Fix freeaddrinfo(NULL).
2015-01-09 02:58:56 +00:00
Elliott Hughes
c62a4b5a7a Fix freeaddrinfo(NULL).
Bug: https://code.google.com/p/android/issues/detail?id=13228
Change-Id: I5e3b126d90d750a93ac0b8872198e50ba047e603
2015-01-08 17:28:46 -08:00
Yabin Cui
f4af806bb7 am 1ecafe3f: am 4c47fc4e: Merge "Make pthread stack size match real range."
* commit '1ecafe3feff42e9c7a171e6c865ae4a5df4f6284':
  Make pthread stack size match real range.
2015-01-08 23:07:22 +00:00
Yabin Cui
917d390510 Make pthread stack size match real range.
Bug: 18908062
Change-Id: I7037ac8273ebe54dd19b1561c7a376819049124c
2015-01-08 14:27:24 -08:00
Elliott Hughes
de97a518d7 am 6ed76e8c: am ac8f2810: Merge "_Unwind_Context is a struct."
* commit '6ed76e8c7d551ae8cf11de57a787169538370369':
  _Unwind_Context is a struct.
2015-01-07 03:15:06 +00:00
Elliott Hughes
ac8f281029 Merge "_Unwind_Context is a struct." 2015-01-07 02:59:26 +00:00
Elliott Hughes
30e59c4c69 _Unwind_Context is a struct.
Change-Id: Iff2c52dc630eb83b931a78fdebc4494d69462db7
2015-01-06 18:48:24 -08:00
Yabin Cui
023b5d1aa5 am 8e8daba1: am 8004f735: Merge "Remove PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK."
* commit '8e8daba18540fc7d5d11b6fb1d85234049086f29':
  Remove PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK.
2015-01-07 02:10:36 +00:00
Yabin Cui
8004f735f1 Merge "Remove PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK." 2015-01-07 01:28:40 +00:00
Yabin Cui
ba8dfc2669 Remove PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK.
Patch for https://android-review.googlesource.com/#/c/120844/.

Change-Id: Idca5ccd7b28e8f07f1d2d1b6e3bba6781b62f0e0
2015-01-06 17:11:23 -08:00
Elliott Hughes
d27ff239db am 9d8b7d1a: am d3de1dde: Merge "[MIPS64] Add correct mcontext_t for 64-bit MIPS"
* commit '9d8b7d1ac495b2cda848fd6a06088e5654b74ed6':
  [MIPS64] Add correct mcontext_t for 64-bit MIPS
2015-01-06 18:17:42 +00:00
Faraz Shahbazker
e247e1c89e [MIPS64] Add correct mcontext_t for 64-bit MIPS
Change-Id: I76d503860d0e1d937b6913bf2c1c6ebb531617da
2015-01-06 07:58:02 -08:00
Yabin Cui
473a0db7db am 745b236d: am 541b0b18: Merge "Reserve enough user request stack space in pthread_create."
* commit '745b236dc3bc935c1fb581c7f93c3464f2bb8216':
  Reserve enough user request stack space in pthread_create.
2015-01-02 22:48:06 +00:00
Yabin Cui
541b0b187d Merge "Reserve enough user request stack space in pthread_create." 2015-01-02 22:37:56 +00:00
Yabin Cui
6a7aaf4675 Reserve enough user request stack space in pthread_create.
Bug: 18830897
Change-Id: I1ba4aaeaf66a7ff99c5d82ad45469011171b0a3b
2015-01-02 14:33:48 -08:00
Elliott Hughes
db4fe34050 am 46987a94: am 9b6164ca: Merge "Remove bogus transitive includes."
* commit '46987a9490cfe8409ea73e94f36e7f0bb69e43de':
  Remove bogus transitive includes.
2014-12-30 12:21:08 +00:00
Elliott Hughes
40360b379c Remove bogus transitive includes.
<signal.h> shouldn't get you the contents of <errno.h>, and <fcntl.h>
shouldn't get you the contents of <unistd.h>.

Change-Id: I347499cd8671bfee98e6b8e875a97cab3a3655d3
2014-12-29 13:29:50 -08:00
Elliott Hughes
84715cbccb am 52a2df5f: am 0a552407: Merge "Ensure <fcntl.h> defines the S_* constants from <sys/stat.h>."
* commit '52a2df5f2ad445042b31ffef01d6a0fbf18d9a1a':
  Ensure <fcntl.h> defines the S_* constants from <sys/stat.h>.
2014-12-29 19:51:40 +00:00
Elliott Hughes
0a552407ad Merge "Ensure <fcntl.h> defines the S_* constants from <sys/stat.h>." 2014-12-29 19:40:45 +00:00
Elliott Hughes
64d8382394 Ensure <fcntl.h> defines the S_* constants from <sys/stat.h>.
POSIX says "The <fcntl.h> header shall define the symbolic constants for file
modes for use as values of mode_t as described in <sys/stat.h>".

Needed to build ToT strace.

Change-Id: Ia85a51ef6fd86a48084fe48ce24963000a937d37
2014-12-29 11:14:38 -08:00
Elliott Hughes
82e66a3d9d am cc107443: am 50e15a2e: Merge "Remove more BSD cruft from the public headers."
* commit 'cc1074431e46333671875345d4bb26b65fe96dd7':
  Remove more BSD cruft from the public headers.
2014-12-23 20:21:15 +00:00
Elliott Hughes
50e15a2ec7 Merge "Remove more BSD cruft from the public headers." 2014-12-23 20:14:52 +00:00
Elliott Hughes
77707a3d4f am d029db10: am ba09edcb: Merge "Fix nan output in the printf family."
* commit 'd029db10526c2091acfe940d7d008019a309c47c':
  Fix nan output in the printf family.
2014-12-21 06:30:39 +00:00
Elliott Hughes
ba09edcb41 Merge "Fix nan output in the printf family." 2014-12-21 02:54:06 +00:00
Elliott Hughes
1b18aff9ba Fix nan output in the printf family.
Bug: https://code.google.com/p/android/issues/detail?id=82452
Change-Id: I51f226c8b033de6e81baeea5e6db3de6ed196f73
2014-12-20 18:53:08 -08:00
Elliott Hughes
998f2d5a50 Remove more BSD cruft from the public headers.
Change-Id: I1e3097f745b526db448bf72fbc05fb2ba23929a0
2014-12-19 19:30:11 -08:00
Yabin Cui
598f86661d am e4d3161a: am 4c30fedf: Merge "Move gethtnamaddr.c to net/ subdirectory."
* commit 'e4d3161a84c0373d35f43f981559212a9ae44397':
  Move gethtnamaddr.c to net/ subdirectory.
2014-12-20 03:26:19 +00:00
Yabin Cui
a2177c6ccb Move gethtnamaddr.c to net/ subdirectory.
It may be the better place to stay.

Change-Id: I517cc2769f63e1873191768c4732907c14f2c60e
2014-12-19 17:29:04 -08:00
Yabin Cui
66870e1be5 am a62755ad: am 7e202e4e: Merge "Remove t->tls==NULL check in pthread_key_delete."
* commit 'a62755adba509a7cb295d1bc5f9d3447e3943c6a':
  Remove t->tls==NULL check in pthread_key_delete.
2014-12-20 00:51:30 +00:00
Yabin Cui
7e202e4eb1 Merge "Remove t->tls==NULL check in pthread_key_delete." 2014-12-20 00:44:41 +00:00
Yabin Cui
246bcb10b6 Remove t->tls==NULL check in pthread_key_delete.
Change-Id: I6c0c71d30fe9d5b888752a4204abd95d5149bb96
2014-12-19 16:31:03 -08:00
Yabin Cui
a15bd72cf0 am da2317ed: am cdc7ad11: Merge "Use mmap to create the pthread_internal_t"
* commit 'da2317edb36acdaa6a7bc49cef8deba2a42bfb15':
  Use mmap to create the pthread_internal_t
2014-12-20 00:19:25 +00:00
Yabin Cui
cdc7ad11e9 Merge "Use mmap to create the pthread_internal_t" 2014-12-20 00:10:38 +00:00
Yabin Cui
8cf1b30567 Use mmap to create the pthread_internal_t
Add name to mmaped regions.
Add pthread benchmark code.
Allocate pthread_internal_t on regular stack.

Bug: 16847284
Change-Id: Id60835163bb0d68092241f1a118015b5a8f85069
2014-12-19 16:05:29 -08:00
Yabin Cui
b695cb47c3 am be327941: am e28a1864: Merge "Support gethostbyname_r_ERANGE."
* commit 'be32794141e95ea5d65626bbf29be95b9d974d54':
  Support gethostbyname_r_ERANGE.
2014-12-19 23:02:51 +00:00
Yabin Cui
e28a186491 Merge "Support gethostbyname_r_ERANGE." 2014-12-19 22:53:26 +00:00
Yabin Cui
7069256495 Support gethostbyname_r_ERANGE.
Bug: 18802601
Change-Id: Iaa64921e96f91e330f1845c5399ee8aba39d9c10
2014-12-19 14:11:29 -08:00
Dimitry Ivanov
7544631ef6 am c692d3e5: am db314648: Merge "Add support for DT_MIPS_RLD_MAP2 tag."
* commit 'c692d3e50a3af788e9294769fca33e29eb91b139':
  Add support for DT_MIPS_RLD_MAP2 tag.
2014-12-19 21:26:04 +00:00
Raghu Gandham
688157295f Add support for DT_MIPS_RLD_MAP2 tag.
Position Independent Executables cannot communicate with GDB using DT_MIPS_RLD_TAG.
Hence a new tag DT_MIPS_RLD_MAP2 got introduced to fix the issue.

Change-Id: I77ce3faf1ef2e121003b804ecd291abb25cfbb56
Signed-off-by: Nikola Veljkovic<Nikola.Veljkovic@imgtec.com>
2014-12-19 11:13:11 -08:00
Elliott Hughes
a5359bb11a am c400e072: am 7eb9b6c5: Merge "Update bionic NOTICE files."
* commit 'c400e072db8dca8710298bf138c86e30c7b47991':
  Update bionic NOTICE files.
2014-12-19 03:52:15 +00:00
Elliott Hughes
6b2b5856d9 Update bionic NOTICE files.
Change-Id: Ic280872ef3137febd9d4a87d5c7662e264692071
2014-12-18 16:27:30 -08:00
Elliott Hughes
649386ae1a am a5193f2f: am c631bb21: Merge "Fix the types of some of the struct stat fields."
* commit 'a5193f2ffe39ff88f27ffb34a6967e023cb3daee':
  Fix the types of some of the struct stat fields.
2014-12-18 23:45:30 +00:00
Elliott Hughes
c631bb215e Merge "Fix the types of some of the struct stat fields." 2014-12-18 23:38:26 +00:00
Elliott Hughes
3801189b58 am 7cff30c7: am b7f0693a: Merge "Remove bogus #include <endian.h> from <sys/stat.h>."
* commit '7cff30c7c67454e5b0f97c0dcc6261c73ae664c8':
  Remove bogus #include <endian.h> from <sys/stat.h>.
2014-12-18 23:35:21 +00:00
Elliott Hughes
53544f5af6 am 7d4d2297: am 8597c2b3: Merge "Split the shared group data from the shared passwd data."
* commit '7d4d2297856106f132283c4e501b7210fc7b0bd8':
  Split the shared group data from the shared passwd data.
2014-12-18 23:35:20 +00:00
Elliott Hughes
28bba7b488 am e14086a8: am a9c940a6: Merge "Fix struct stat member types for x86-64."
* commit 'e14086a8fc137c9900ad895556710385fc423e10':
  Fix struct stat member types for x86-64.
2014-12-18 23:35:18 +00:00
Elliott Hughes
b7f0693aaa Merge "Remove bogus #include <endian.h> from <sys/stat.h>." 2014-12-18 23:24:26 +00:00
Elliott Hughes
9257c477ae Fix the types of some of the struct stat fields.
Bug: 17062519
Change-Id: I5207867939f3c2876bf6448e565fa4364aa7e4f0
2014-12-18 15:17:42 -08:00
Elliott Hughes
8597c2b3f2 Merge "Split the shared group data from the shared passwd data." 2014-12-18 23:12:45 +00:00
Elliott Hughes
0c92e8c3d1 Remove bogus #include <endian.h> from <sys/stat.h>.
Bug: 17062519
Change-Id: I3dc21ee8b90580f112c73c72aff5d3bec4778026
2014-12-18 15:10:19 -08:00
Elliott Hughes
1c52e6c926 Fix struct stat member types for x86-64.
Bug: 17062519
Change-Id: I93b1e8b1d4b6918ab7c3a985e2f7da277077375e
2014-12-18 15:03:33 -08:00
Elliott Hughes
7874f1d718 Split the shared group data from the shared passwd data.
Found by the toybox id(1) which calls both getpwuid(3) and getgrgid(3) before
looking at either result. The use of a shared buffer in this code meant that
even on a single thread, the data for any of the passwd functions would be
clobbered by the data for any of the group functions (or vice versa).

This might seem like an insufficient fix, but POSIX explicitly says (for
getpwnam) that the result "might be overwritten by a subsequent call to
getpwent(), getpwnam(), or getpwuid()" and likewise for other members of
that group, plus equivalent text for the group-related functions.

Change-Id: I2272f47e91f72e043fdaf7c169fa9f6978ff4370
2014-12-18 15:01:10 -08:00
Yabin Cui
858e239094 am 9a734138: am 370a3e57: Merge "Sync with upstream for gethnamaddr.c."
* commit '9a734138138fcde0a2f0935e86246b9d7ff0ccb1':
  Sync with upstream for gethnamaddr.c.
2014-12-18 21:49:52 +00:00
Yabin Cui
370a3e573d Merge "Sync with upstream for gethnamaddr.c." 2014-12-18 01:06:10 +00:00
Yabin Cui
58d33a51f3 Sync with upstream for gethnamaddr.c.
Bug: 18566967
Change-Id: I37e7410226b49eec67614e20b2c1d5e3e47817a5
2014-12-17 16:19:27 -08:00
Elliott Hughes
50b6dc34f1 am 48bc703a: am 3a50b65f: Merge "Fix <net/route.h>."
* commit '48bc703a3c30512f06f65f2660ed9d2841b0acce':
  Fix <net/route.h>.
2014-12-16 20:35:01 +00:00
Elliott Hughes
3a50b65fd1 Merge "Fix <net/route.h>." 2014-12-16 16:53:25 +00:00
Elliott Hughes
badd7e1a58 Fix <net/route.h>.
Previously it couldn't be included alone. Also add a header and include guard,
and fix its siblings' include guards.

Bug: https://code.google.com/p/android/issues/detail?id=82638
Change-Id: I32139a4bda0a6b015508a2319bf4e1a1453345f2
2014-12-15 18:47:14 -08:00
Elliott Hughes
63978deca9 am 7de05306: am 16ea2790: Merge "Move the generic arm memcmp.S into the generic directory."
* commit '7de05306c6f3b3077b025d5dd3eade2f125535d5':
  Move the generic arm memcmp.S into the generic directory.
2014-12-15 21:32:11 +00:00
Elliott Hughes
c45b108deb am a2bfb531: am ad01c983: Merge "Remove arm assembler not referenced from any makefile."
* commit 'a2bfb53107a7b770e9ad93287be5745271067786':
  Remove arm assembler not referenced from any makefile.
2014-12-15 19:27:20 +00:00
Elliott Hughes
1ef6ec40e1 Move the generic arm memcmp.S into the generic directory.
Change-Id: I48e4d14a0dcddbb246edbac6d0329619574ab44d
2014-12-15 11:06:34 -08:00
Elliott Hughes
f92cc30571 Remove arm assembler not referenced from any makefile.
I also suspect that libc/arch-arm/bionic/memcmp.S is supposed to like in the
generic directory these days, but this change just removes dead code.

Change-Id: I9072488df6e9b7261d79b6014914a0e937cb387b
2014-12-14 17:52:32 -08:00
Yabin Cui
bb3579f878 am 96cd50f2: am 0e32e39d: Merge "Fix pthread key num calculation."
* commit '96cd50f2fc33b0d342f1733894b06fd59a725519':
  Fix pthread key num calculation.
2014-12-13 03:03:51 +00:00
Yabin Cui
0e32e39df0 Merge "Fix pthread key num calculation." 2014-12-13 02:51:27 +00:00
Yabin Cui
6c238f2926 Fix pthread key num calculation.
Bug: 18723085
Change-Id: Iba2c834b350e4cdba0b2d771b221560a3e5df952
2014-12-12 17:00:08 -08:00
Elliott Hughes
1fc1c89810 am 7dc71bb9: am 732d65c1: Merge "[MIPS] Add sgidefs.h for mips64"
* commit '7dc71bb9d5f73dc2ffe6e070efe29e69b88c14a7':
  [MIPS] Add sgidefs.h for mips64
2014-12-13 00:41:40 +00:00
Elliott Hughes
732d65c1b1 Merge "[MIPS] Add sgidefs.h for mips64" 2014-12-13 00:28:57 +00:00
Duane Sand
50a3c6949b [MIPS] Add sgidefs.h for mips64
Sgidefs.h is needed by strace.
Replaced now-duplicate arch-mips64/include directory
by symlink to arch-mips/include.

Change-Id: I7808602cfa452eca3ffbdb94903f4c5bdb33efa3
2014-12-12 16:25:36 -08:00
Christopher Ferris
887a9a485c am 3b811c81: am 3115b34c: Merge "fix runtime issues for scripts"
* commit '3b811c814e4ebe6591992141040ba5997a12407a':
  fix runtime issues for scripts
2014-12-11 18:55:56 +00:00
Elliott Hughes
a70d54786f am 1dff030e: am e7b8bc4e: Merge "Clean up DNS proxying."
* commit '1dff030e6eb527eeb4e7ed163cf19641fdb3872b':
  Clean up DNS proxying.
2014-12-11 18:55:55 +00:00
Christopher Ferris
3115b34c92 Merge "fix runtime issues for scripts" 2014-12-11 18:32:00 +00:00
Elliott Hughes
9773fa3ffd Clean up DNS proxying.
Remove code duplication and fall back to trying directly if the proxy
isn't available. With this, tests still work if netd is dead (perhaps
because you've run "adb shell stop", or because you're running on the host).

Bug: 18547878
Change-Id: Ia4a9aa18b1fc79e09735107246989fa7fc6c8455
2014-12-10 17:14:02 -08:00
Christopher Ferris
4173ebb42a am ca5edfb2: am fec60529: Merge "Fix missing symbol for debug malloc."
* commit 'ca5edfb23ba45176d1e33fba6f38e7834ef33301':
  Fix missing symbol for debug malloc.
2014-12-10 20:45:10 +00:00
Christopher Ferris
fec605294e Merge "Fix missing symbol for debug malloc." 2014-12-10 20:33:52 +00:00
Elliott Hughes
1fd915b9c1 am fa465353: am a53c504e: Merge "Fix arm64 clone stack handling."
* commit 'fa46535316a514e1335836bf065c2deddab1c4f3':
  Fix arm64 clone stack handling.
2014-12-10 19:58:04 +00:00
Elliott Hughes
a53c504e0c Merge "Fix arm64 clone stack handling." 2014-12-10 19:45:48 +00:00
Yabin Cui
b9f67dc0f5 am 1eaf80d6: am 3337435e: Merge "Use machine/timespec.h to separate timespec definition."
* commit '1eaf80d6805352cb74a4ffb392da4bfd17f4caed':
  Use machine/timespec.h to separate timespec definition.
2014-12-10 19:42:15 +00:00
Yabin Cui
3337435ec8 Merge "Use machine/timespec.h to separate timespec definition." 2014-12-10 19:29:24 +00:00
Christopher Ferris
3f61f89b55 Fix missing symbol for debug malloc.
Bug: 18686270
Change-Id: I800a6f0940060218413df652d74aca91f6a339f8
2014-12-10 11:10:00 -08:00
Elliott Hughes
51f5d83237 Fix arm64 clone stack handling.
Make sure we adjust the stack pointer so a signal can't overwrite data.

Bug: 15195265
Change-Id: I5ab9469a82cb214c32f40a713268a1ab74a4c6fa
2014-12-10 11:08:47 -08:00
Elliott Hughes
114cee8c6e am 0eaa218c: am 0952a554: Merge "Use the stmdb instead of str to save the fn/arg"
* commit '0eaa218c2f567af3ed51ac7538ef9179a9318821':
  Use the stmdb instead of str to save the fn/arg
2014-12-10 19:07:36 +00:00
Elliott Hughes
0952a5540e Merge "Use the stmdb instead of str to save the fn/arg" 2014-12-10 18:53:48 +00:00
Jiangli Yuan
c3d1728583 Use the stmdb instead of str to save the fn/arg
Directly save data into stack without properly adjustment
   of stack point is dangous. For example, if a signal comes,
   kernel will put sigframe into userspace's stack, which
   will overwrite the saved data if sp is not adjusted properly.

Bug: 15195265
Change-Id: Iea0cadfd3b94d50cf40252ad52fe5950811b9192
Signed-off-by: Jiangli Yuan <a6808c@motorola.com>
2014-12-10 18:47:01 +00:00
Kyunam Jo
fa343e630d fix runtime issues for scripts
now, some script to update kernel-headers is not working.
because of wrong variable value and test codes.
so this issue is fixed.

Change-Id: Iffae9607858cc3c1c58fa24244be217b5a1ab06e
2014-12-10 07:53:07 +00:00
Yabin Cui
db49903732 Use machine/timespec.h to separate timespec definition.
Bug: 18627763
Change-Id: Ib1c406320f0ecc3705d19183a48f986cdf57c279
2014-12-10 06:36:11 +00:00