OSDN Git Service

android-x86/bionic.git
7 years agoDon't scan .swp files for copyright headers.
Elliott Hughes [Tue, 25 Oct 2016 00:34:42 +0000 (17:34 -0700)]
Don't scan .swp files for copyright headers.

These are binary files, so that's not a good idea.

Bug: N/A
Test: N/A
Change-Id: If5e98df4bbbbac8a15a953be043df7d05c2b409a

7 years agoMerge changes from topic 'ndk-headers-licenses'
Treehugger Robot [Thu, 20 Oct 2016 22:12:39 +0000 (22:12 +0000)]
Merge changes from topic 'ndk-headers-licenses'

* changes:
  Add license to ndk_headers modules.
  One NOTICE file to rule them all.

7 years agoMerge "Update our notice files as a pre-upload step."
Treehugger Robot [Thu, 20 Oct 2016 22:07:55 +0000 (22:07 +0000)]
Merge "Update our notice files as a pre-upload step."

7 years agoMerge "Add missing host ldlibs"
Colin Cross [Thu, 20 Oct 2016 20:26:09 +0000 (20:26 +0000)]
Merge "Add missing host ldlibs"

7 years agoMerge "Fix stdin/stdout/stderr for pre-M."
Treehugger Robot [Thu, 20 Oct 2016 19:34:56 +0000 (19:34 +0000)]
Merge "Fix stdin/stdout/stderr for pre-M."

7 years agoAdd license to ndk_headers modules.
Dan Albert [Thu, 20 Oct 2016 08:42:54 +0000 (01:42 -0700)]
Add license to ndk_headers modules.

Test: make ndk
Bug: None
Change-Id: I0e9a39def2be9cd81369843906f6d7c180d17045

7 years agoOne NOTICE file to rule them all.
Dan Albert [Thu, 20 Oct 2016 18:45:16 +0000 (11:45 -0700)]
One NOTICE file to rule them all.

Generate a single NOTICE file rather than one per library. All the
headers come from libc these days anyway.

Test: tools/update_notice.sh
Bug: None
Change-Id: I127da185fdabc2815042e19aea74c507ec108f46

7 years agoUpdate our notice files as a pre-upload step.
Dan Albert [Thu, 20 Oct 2016 17:34:47 +0000 (10:34 -0700)]
Update our notice files as a pre-upload step.

Also updates the license files, since apparently they're out of date.

Test: repo upload --cbr .
Bug: None
Change-Id: Ic8d855a7ee5185c4933da699292868e02ef79531

7 years agoAdd missing host ldlibs
Colin Cross [Thu, 20 Oct 2016 17:39:50 +0000 (10:39 -0700)]
Add missing host ldlibs

Host builds were compiling without -Wl,--no-undefined.  Add missing
host ldlibs so that -Wl,--no-undefined can be added again.

Test: m -j host
Bug: 32305815
Change-Id: I456098775ead2bddae3e61c7055b2bde3f6b38ff

7 years agoFix stdin/stdout/stderr for pre-M.
Dan Albert [Thu, 6 Oct 2016 22:46:45 +0000 (15:46 -0700)]
Fix stdin/stdout/stderr for pre-M.

This wasn't an array of pointers, it was an array of structs.
Unfortunately we need a complete type to index into the struct for
stdin/stdout/stderr, so add a phony struct that matches the size and
alignment of `struct __sFILE`. This property is guaranteed by the
static_asserts in libc/bionic/struct_file_test.cpp.

Test: mma
Bug: http://b/30465923
Change-Id: I8ce851dd64a261703bb44f9b5cd23b7caff4dd68

7 years agoMerge "Add regression test for http://b/31938693."
Elliott Hughes [Thu, 20 Oct 2016 16:30:05 +0000 (16:30 +0000)]
Merge "Add regression test for http://b/31938693."

7 years agoMerge "Add test for libraries with textrels"
Treehugger Robot [Thu, 20 Oct 2016 01:37:19 +0000 (01:37 +0000)]
Merge "Add test for libraries with textrels"

7 years agoAdd regression test for http://b/31938693.
Elliott Hughes [Wed, 19 Oct 2016 23:02:31 +0000 (16:02 -0700)]
Add regression test for http://b/31938693.

Bug: http://b/31938693
Bug: https://code.google.com/p/android/issues/detail?id=225132
Test: this is a test
Change-Id: I858962a1dcd56d555a4836a7bfbdf92d5c3042f6

7 years agoAdd test for libraries with textrels
Dimitry Ivanov [Wed, 19 Oct 2016 18:00:28 +0000 (11:00 -0700)]
Add test for libraries with textrels

Make sure android fails to load them.

Bug: http://b/30795430
Test: bionic-unit-tests --gtest_filter=dlfcn.dlopen_invalid*
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsBionicTestCases
Change-Id: Id0ebdf336b2f297007479ceb1bbccf778a7ca3f2

7 years agoMerge "Fix our _POSIX_* macros to declare barriers and spin locks."
Elliott Hughes [Wed, 19 Oct 2016 21:16:21 +0000 (21:16 +0000)]
Merge "Fix our _POSIX_* macros to declare barriers and spin locks."

7 years agoFix our _POSIX_* macros to declare barriers and spin locks.
Elliott Hughes [Wed, 19 Oct 2016 16:27:02 +0000 (09:27 -0700)]
Fix our _POSIX_* macros to declare barriers and spin locks.

We have these now.

Test: ran tests
Change-Id: Ie7b479061ecec19c8b35ea81e04debfd8323d94a

7 years agoMerge "Fix ifaddrs error handling."
Treehugger Robot [Fri, 14 Oct 2016 23:35:52 +0000 (23:35 +0000)]
Merge "Fix ifaddrs error handling."

7 years agoFix ifaddrs error handling.
Elliott Hughes [Fri, 14 Oct 2016 19:15:32 +0000 (12:15 -0700)]
Fix ifaddrs error handling.

An NLMSG_ERROR packet includes an errno value that we should use. Also report
failures to create a socket immediately, rather than falling through to the
send and reporting EBADF.

Bug: http://b/32145516
Bug: http://b/31038971
Test: bionic ifaddr tests on ryu (with broken kernel) and flounder
Change-Id: I84c480c5b75077eb90d40426a9d66d7bffbd3d51

7 years agoMerge "Remove unused build targets"
Treehugger Robot [Wed, 12 Oct 2016 23:46:40 +0000 (23:46 +0000)]
Merge "Remove unused build targets"

7 years agoRemove unused build targets
Dimitry Ivanov [Wed, 12 Oct 2016 21:06:18 +0000 (14:06 -0700)]
Remove unused build targets

Test: mm
Change-Id: I4eadc40411a31a0e5fa910b0054c19f0dea6c1e2

7 years agoMerge "Allocate all arc4random data on the same page."
Treehugger Robot [Tue, 11 Oct 2016 22:05:41 +0000 (22:05 +0000)]
Merge "Allocate all arc4random data on the same page."

7 years agoAllocate all arc4random data on the same page.
Elliott Hughes [Tue, 11 Oct 2016 19:58:40 +0000 (12:58 -0700)]
Allocate all arc4random data on the same page.

Saves one dirty page per process.

Test: bionic unit tests, reboot, manual check of /proc/*/maps
Change-Id: Ibbcafa955d60e43f4cb735fa484c6868aa357cd5

7 years agoMerge "Remove obsolete -std request."
Elliott Hughes [Tue, 11 Oct 2016 18:13:07 +0000 (18:13 +0000)]
Merge "Remove obsolete -std request."

7 years agoMerge "Migrate libstdc++ to ndk_library."
Treehugger Robot [Tue, 11 Oct 2016 06:01:17 +0000 (06:01 +0000)]
Merge "Migrate libstdc++ to ndk_library."

7 years agoMerge "Fix Mac build."
Elliott Hughes [Tue, 11 Oct 2016 03:50:26 +0000 (03:50 +0000)]
Merge "Fix Mac build."

7 years agoFix Mac build.
Elliott Hughes [Tue, 11 Oct 2016 01:34:27 +0000 (18:34 -0700)]
Fix Mac build.

Test: builds on Linux (I don't have a Mac)
Change-Id: I049e1d6420b0d169e727680da9c3d97e0b8aa3d2

7 years agoMerge changes I5667e991,I9d2a873e
Treehugger Robot [Tue, 11 Oct 2016 00:30:53 +0000 (00:30 +0000)]
Merge changes I5667e991,I9d2a873e

* changes:
  bionic-unit-tests: remove dependency on ANDROID_DATA
  bionic-unit-tests: Create symlinks in runtime

7 years agoMerge "Use STDERR_FILENO instead of opening /dev/stderr."
Treehugger Robot [Mon, 10 Oct 2016 21:19:05 +0000 (21:19 +0000)]
Merge "Use STDERR_FILENO instead of opening /dev/stderr."

7 years agobionic-unit-tests: remove dependency on ANDROID_DATA
Dimitry Ivanov [Wed, 21 Sep 2016 18:17:13 +0000 (11:17 -0700)]
bionic-unit-tests: remove dependency on ANDROID_DATA

Replace references to ANDROID_DATA enviroment variable with references
to g_testlib_root.

Bug: http://b/22182538
Test: build and run bionic-unit-tests --gtest_filter=dl*:Dl*
Test: make cts && cts-tradefed run singleCommand cts --skip-preconditions -m CtsBionicTestCases
Change-Id: I5667e991551cec55b9b664f2f0063039671ff34b

7 years agobionic-unit-tests: Create symlinks in runtime
Dimitry Ivanov [Mon, 19 Sep 2016 17:50:28 +0000 (10:50 -0700)]
bionic-unit-tests: Create symlinks in runtime

Instead of creating symlinks in build time and then relying
on usage of adb sync (adb push follows symlinks) - create
them in test run time.

Test: mm && run bionic-unit-tests --gtest_filter=dl*:Dl*
Bug: http://b/22182538
Change-Id: I9d2a873e3ba303533c14ba5e3b779e4a67925462

7 years agoMerge "Document a post-N dynamic linker change."
Treehugger Robot [Sat, 8 Oct 2016 20:41:27 +0000 (20:41 +0000)]
Merge "Document a post-N dynamic linker change."

7 years agoDocument a post-N dynamic linker change.
Elliott Hughes [Fri, 7 Oct 2016 22:59:58 +0000 (15:59 -0700)]
Document a post-N dynamic linker change.

Test: N/A
Change-Id: I37f3ccccd81c29a4ffe400fc2177bbe082195ade

7 years agoMerge "Turn the recent blog post into markdown docs."
Elliott Hughes [Fri, 7 Oct 2016 22:56:32 +0000 (22:56 +0000)]
Merge "Turn the recent blog post into markdown docs."

7 years agoUse STDERR_FILENO instead of opening /dev/stderr.
Josh Gao [Fri, 7 Oct 2016 20:21:03 +0000 (13:21 -0700)]
Use STDERR_FILENO instead of opening /dev/stderr.

/dev/stderr is a symlink to /proc/self/fd/2, so this only has different
behavior when we're out of file descriptors, or when STDERR_FILENO is in
a different state (it's not at the end, it's not writable, etc.).

Test: mma
Change-Id: Ie99688d810218eca8482ff060373e88c4e001824

7 years agoRemove obsolete -std request.
Elliott Hughes [Fri, 7 Oct 2016 17:43:30 +0000 (10:43 -0700)]
Remove obsolete -std request.

Bug: http://b/32019064
Test: builds
Change-Id: Id662a63f08054634721750d26e0dcd3c366ed2e6

7 years agoTurn the recent blog post into markdown docs.
Elliott Hughes [Wed, 5 Oct 2016 21:35:00 +0000 (14:35 -0700)]
Turn the recent blog post into markdown docs.

Originally http://android-developers.blogspot.com/2016/06/android-changes-for-ndk-developers.html

Test: N/A
Change-Id: I7ab75bcf9d518310fdf4e752929ba71c286fa242

7 years agoMigrate libstdc++ to ndk_library.
Dan Albert [Thu, 6 Oct 2016 22:50:41 +0000 (15:50 -0700)]
Migrate libstdc++ to ndk_library.

Test: make checkbuild
Bug: http://b/30465923
Change-Id: I3b75b4e7fa652c83846c5978f9908e8b32d43aa7

7 years agoMerge changes Ie6777e2b,Iaed834be
Dimitry Ivanov [Wed, 5 Oct 2016 16:20:44 +0000 (16:20 +0000)]
Merge changes Ie6777e2b,Iaed834be

* changes:
  Fix for default library path "/vendor/lib"
  Fix bionic-unit-tests

7 years agoFix for default library path "/vendor/lib"
neo.chae [Tue, 4 Oct 2016 02:00:27 +0000 (11:00 +0900)]
Fix for default library path "/vendor/lib"

Android N restrict which libraries C/C++ code
can link against at runtime.

If device has a vendor partition
then /system/vendor symlink to /vendor.
Otherwise /vendor symlink to /system/vendor.

But is_system_library() is only checking /vendor/lib.
It will return false for /system/vendor/lib path.
It is need to add a real path to default library path.

Similarily, default ld library path is already checking.
parse_LD_LIBRARY_PATH()->parse_path()->resolve_paths()

Test: build bionic and run bionic-unit-tests
Bug: http://b/31919547
Change-Id: Ie6777e2b02729948ce77a94de32343d40358bf2c
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
7 years agoFix bionic-unit-tests
Dimitry Ivanov [Wed, 5 Oct 2016 09:51:17 +0000 (02:51 -0700)]
Fix bionic-unit-tests

Fix rpath value for libraries after build system update

Bug: http://b/31221587
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*:*atexit*
Change-Id: Iaed834bef830fd0b252b5de82e27634bafc92d8b

7 years agoMerge "Add missing O_CLOEXEC and TEMP_FAILURE_RETRY to localtime.c."
Elliott Hughes [Tue, 4 Oct 2016 02:25:03 +0000 (02:25 +0000)]
Merge "Add missing O_CLOEXEC and TEMP_FAILURE_RETRY to localtime.c."

7 years agoAdd missing O_CLOEXEC and TEMP_FAILURE_RETRY to localtime.c.
Elliott Hughes [Mon, 3 Oct 2016 23:46:33 +0000 (16:46 -0700)]
Add missing O_CLOEXEC and TEMP_FAILURE_RETRY to localtime.c.

Follow-on change from http://b/31848040.

Test: *time* tests.
Change-Id: I3f1c9ce19b90f6f8c1ac6e0753e3fed0ff63c0b4

7 years agoMerge "Fix tzdata loading."
Elliott Hughes [Mon, 3 Oct 2016 23:35:34 +0000 (23:35 +0000)]
Merge "Fix tzdata loading."

7 years agoFix tzdata loading.
Elliott Hughes [Mon, 3 Oct 2016 19:29:30 +0000 (12:29 -0700)]
Fix tzdata loading.

Android uses one large file of tzdata, so the "read up to the maximum
possible length of a valid tzfile" code in upstream localtime.c is
broken: there is always data after the current tzfile (even the
last tzfile is followed by the zone.tab data). This patch passes the
exact length through to the read(2) call so we don't over-read, rather
than have to rewrite upstream code that measures back from the "end" of
the tzfile.

The old code failed the existing time.strftime_null_tm_zone test after
updating to tzdata2016g.

Bug: http://b/31848040
Test: time.strftime_null_tm_zone
Change-Id: Iee059b5a8c051bd4952cfd80f02b00d83e489d5e

7 years agoMerge "Update timezone data to 2016g."
Joachim Sauer [Mon, 3 Oct 2016 10:34:43 +0000 (10:34 +0000)]
Merge "Update timezone data to 2016g."

7 years agoUpdate timezone data to 2016g.
Joachim Sauer [Fri, 30 Sep 2016 15:36:51 +0000 (16:36 +0100)]
Update timezone data to 2016g.

The 2016g release of the tz code and data is available. It reflects the
following changes, which were either circulated on the tz mailing list
or are relatively minor technical or administrative changes:

  Changes to future time stamps

    Turkey switched from EET/EEST (+02/+03) to permanent +03,
    effective 2016-09-07.  (Thanks to Burak AYDIN.)  Use "+03" rather
    than an invented abbreviation for the new time.

    New leap second 2016-12-31 23:59:60 UTC as per IERS Bulletin C 52.
    (Thanks to Tim Parenti.)

  Changes to past time stamps

    For America/Los_Angeles, spring-forward transition times have been
    corrected from 02:00 to 02:01 in 1948, and from 02:00 to 01:00 in
    1950-1966.

    For zones using Soviet time on 1919-07-01, transitions to UT-based
    time were at 00:00 UT, not at 02:00 local time.  The affected
    zones are Europe/Kirov, Europe/Moscow, Europe/Samara, and
    Europe/Ulyanovsk.  (Thanks to Alexander Belopolsky.)

  Changes to past and future time zone abbreviations

    The Factory zone now uses the time zone abbreviation -00 instead
    of a long English-language string, as -00 is now the normal way to
    represent an undefined time zone.

    Several zones in Antarctica and the former Soviet Union, along
    with zones intended for ships at sea that cannot use POSIX TZ
    strings, now use numeric time zone abbreviations instead of
    invented or obsolete alphanumeric abbreviations.  The affected
    zones are Antarctica/Casey, Antarctica/Davis,
    Antarctica/DumontDUrville, Antarctica/Mawson, Antarctica/Rothera,
    Antarctica/Syowa, Antarctica/Troll, Antarctica/Vostok,
    Asia/Anadyr, Asia/Ashgabat, Asia/Baku, Asia/Bishkek, Asia/Chita,
    Asia/Dushanbe, Asia/Irkutsk, Asia/Kamchatka, Asia/Khandyga,
    Asia/Krasnoyarsk, Asia/Magadan, Asia/Omsk, Asia/Sakhalin,
    Asia/Samarkand, Asia/Srednekolymsk, Asia/Tashkent, Asia/Tbilisi,
    Asia/Ust-Nera, Asia/Vladivostok, Asia/Yakutsk, Asia/Yekaterinburg,
    Asia/Yerevan, Etc/GMT-14, Etc/GMT-13, Etc/GMT-12, Etc/GMT-11,
    Etc/GMT-10, Etc/GMT-9, Etc/GMT-8, Etc/GMT-7, Etc/GMT-6, Etc/GMT-5,
    Etc/GMT-4, Etc/GMT-3, Etc/GMT-2, Etc/GMT-1, Etc/GMT+1, Etc/GMT+2,
    Etc/GMT+3, Etc/GMT+4, Etc/GMT+5, Etc/GMT+6, Etc/GMT+7, Etc/GMT+8,
    Etc/GMT+9, Etc/GMT+10, Etc/GMT+11, Etc/GMT+12, Europe/Kaliningrad,
    Europe/Minsk, Europe/Samara, Europe/Volgograd, and
    Indian/Kerguelen.  For Europe/Moscow the invented abbreviation MSM
    was replaced by +05, whereas MSK and MSD were kept as they are not
    our invention and are widely used.

  Changes to zone names

    Rename Asia/Rangoon to Asia/Yangon, with a backward compatibility link.
    (Thanks to David Massoud.)

Test: Ran CTS modules CtsLibcoreTestCases and CtsBionicTestCases.
Bug: 31848040
Change-Id: I1e652ce2e428d44ba143e4ca9630fd2dc46087e4

7 years agoMerge "Fix mbsnrtowcs where `dst` is null."
Elliott Hughes [Fri, 30 Sep 2016 15:41:40 +0000 (15:41 +0000)]
Merge "Fix mbsnrtowcs where `dst` is null."

7 years agoMerge "Fix tests/run-on-host.sh for glibc."
Elliott Hughes [Fri, 30 Sep 2016 15:37:48 +0000 (15:37 +0000)]
Merge "Fix tests/run-on-host.sh for glibc."

7 years agoMerge "Update escaping in Android.bp files"
Treehugger Robot [Fri, 30 Sep 2016 04:17:57 +0000 (04:17 +0000)]
Merge "Update escaping in Android.bp files"

7 years agoFix mbsnrtowcs where `dst` is null.
Elliott Hughes [Fri, 30 Sep 2016 00:21:43 +0000 (17:21 -0700)]
Fix mbsnrtowcs where `dst` is null.

POSIX is its usual unintelligible self
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/mbsrtowcs.html),
but the ISO C11 standard (7.29.6.4.1 paragraph 2) is pretty clear: *src
should change if and only if dst is non-null.

Bug: https://code.google.com/p/android/issues/detail?id=166381
Test: bionic tests
Change-Id: Ibc631cfa5b1bf4a6f56963feba9f0eea27b07984

7 years agoFix tests/run-on-host.sh for glibc.
Elliott Hughes [Fri, 30 Sep 2016 00:17:15 +0000 (17:17 -0700)]
Fix tests/run-on-host.sh for glibc.

Test: tests/run-on-host.sh glibc
Change-Id: Idd5b2a72335ff0ca47f37c578f71cec8c9fb6ea0

7 years agoUpdate escaping in Android.bp files
Colin Cross [Thu, 29 Sep 2016 21:08:13 +0000 (14:08 -0700)]
Update escaping in Android.bp files

Strings like cflags in Android.bp files are parsed by blueprint,
written to build.ninja files, parsed by ninja, and then passed to
/bin/sh -c.  This had resulted in a combination of blueprint
(\"), ninja ($$), and shell (\$) escaping being necessary.

Soong has been updated to automatically handle ninja and shell
escaping, remove extra escaping from Android.bp files.

Bug: 31221587
Test: m -j
Change-Id: Ib58a51dee8d22296b69ec21768ba6a49dd60e980

7 years agoMerge "Update documentation."
Christopher Ferris [Thu, 29 Sep 2016 17:28:39 +0000 (17:28 +0000)]
Merge "Update documentation."

7 years agoMerge "Rename __pure, __pure2, and __purefunc."
Elliott Hughes [Thu, 29 Sep 2016 15:49:08 +0000 (15:49 +0000)]
Merge "Rename __pure, __pure2, and __purefunc."

7 years agoUpdate documentation.
Christopher Ferris [Wed, 28 Sep 2016 21:51:12 +0000 (14:51 -0700)]
Update documentation.

Fix the incorrect mention of when the zygote flag is set on a size.

Add information about how to use am dumpheap -n to dump the native
heap to a file.

Test: Documentation only change.

Change-Id: I82e810ee7ffffcf7506fb6fd9bcfdfb0465a48be

7 years agoRename __pure, __pure2, and __purefunc.
Elliott Hughes [Wed, 28 Sep 2016 19:29:52 +0000 (12:29 -0700)]
Rename __pure, __pure2, and __purefunc.

These names were pretty misleading (aka "backwards"), so switch to the
same obvious names glibc uses.

Test: build.
Change-Id: Ia98c9dbbccd0820386116562347654e84669034a

7 years agoMerge changes Idcbc544e,Ic7cfad1c
Josh Gao [Mon, 26 Sep 2016 21:53:01 +0000 (21:53 +0000)]
Merge changes Idcbc544e,Ic7cfad1c

* changes:
  Fix warnings (and errors) in static inline headers.
  Add versioner to preupload hook.

7 years agoMerge "Fix complex.csqrtf test and add a trivial sincosl test."
Treehugger Robot [Mon, 26 Sep 2016 18:34:55 +0000 (18:34 +0000)]
Merge "Fix complex.csqrtf test and add a trivial sincosl test."

7 years agoFix complex.csqrtf test and add a trivial sincosl test.
Elliott Hughes [Mon, 26 Sep 2016 16:35:04 +0000 (09:35 -0700)]
Fix complex.csqrtf test and add a trivial sincosl test.

sincos and sincosf are being tested more thoroughly with a table of data,
but there's nothing equivalent for sincosl.

Test: ran the tests, obviously.
Change-Id: I5b4b22b73cad9b0030549de2e2ed2a0e38648806

7 years agoFix warnings (and errors) in static inline headers.
Josh Gao [Fri, 23 Sep 2016 21:06:05 +0000 (14:06 -0700)]
Fix warnings (and errors) in static inline headers.

Bug: http://b/31676510
Change-Id: Idcbc544e498f7e6bbe99c2bf7dc557a5681e96c4
Test: preupload hook

7 years agoAdd versioner to preupload hook.
Josh Gao [Fri, 23 Sep 2016 00:28:12 +0000 (17:28 -0700)]
Add versioner to preupload hook.

Bug: http://b/31676510
Change-Id: Ic7cfad1cb214c9f711a985bace484a20db1a89b6
Test: submitted this patch, and it failed

7 years agoMerge changes Ic43d690d,Ifec6c320
Treehugger Robot [Thu, 22 Sep 2016 16:28:14 +0000 (16:28 +0000)]
Merge changes Ic43d690d,Ifec6c320

* changes:
  Add legacy inlines for locale aware APIs.
  Add strtof_l and strtod_l.

7 years agoAdd legacy inlines for locale aware APIs.
Dan Albert [Wed, 21 Sep 2016 08:16:13 +0000 (01:16 -0700)]
Add legacy inlines for locale aware APIs.

Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ic43d690dff3c6960d7826bd0b064640a3ea0e883

7 years agoAdd strtof_l and strtod_l.
Dan Albert [Wed, 21 Sep 2016 08:42:19 +0000 (01:42 -0700)]
Add strtof_l and strtod_l.

libc++ needs these now. Add shims to match the others.

Test: make checkbuild tests
Bug: http://b/31639993
Change-Id: Ifec6c32099145d8d3d1a5639a4809e5e9f553c33

7 years agoMerge "bionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE"
Nick Desaulniers [Wed, 21 Sep 2016 22:30:31 +0000 (22:30 +0000)]
Merge "bionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE"

7 years agoMerge "Remove remaining big-endian cruft."
Elliott Hughes [Wed, 21 Sep 2016 21:48:24 +0000 (21:48 +0000)]
Merge "Remove remaining big-endian cruft."

7 years agoMerge "Remove _KERNEL references from <machine/elf_machdep.h>."
Elliott Hughes [Wed, 21 Sep 2016 21:48:15 +0000 (21:48 +0000)]
Merge "Remove _KERNEL references from <machine/elf_machdep.h>."

7 years agobionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE
Nick Desaulniers [Tue, 19 Jul 2016 22:20:24 +0000 (15:20 -0700)]
bionic: tests: add test for fallocate FALLOC_FL_PUNCH_HOLE

Bug: 28760453
Change-Id: I1a58d19bf45eac5f930b0f649cf9b8c9046302f3

7 years agoMerge "Match _Nonnull between char and wchar_t funcs."
Treehugger Robot [Wed, 21 Sep 2016 15:39:33 +0000 (15:39 +0000)]
Merge "Match _Nonnull between char and wchar_t funcs."

7 years agoMerge "Add __ANDROID_API_FUTURE__."
Treehugger Robot [Wed, 21 Sep 2016 15:29:52 +0000 (15:29 +0000)]
Merge "Add __ANDROID_API_FUTURE__."

7 years agoMatch _Nonnull between char and wchar_t funcs.
Dan Albert [Wed, 21 Sep 2016 08:57:51 +0000 (01:57 -0700)]
Match _Nonnull between char and wchar_t funcs.

The char versions of these functions have `_Nonnull` on these
parameters. Match it in the wide char versions. strxfrm_l also has
`__restrict` on its pointer arguments, I believe we've decided that's
something that shouldn't be proliferated...

Test: make checkbuild tests
Bug: None
Change-Id: Ie533e1af92b2a7c9df657073dbc4c345abf72473

7 years agoAdd __ANDROID_API_FUTURE__.
Dan Albert [Wed, 21 Sep 2016 08:08:44 +0000 (01:08 -0700)]
Add __ANDROID_API_FUTURE__.

Needed for checking conditions like `__ANDROID_API__ <
__ANDROID_API_FUTURE__` for providing inlines for things that have
not yet been included in any release.

Test: make checkbuild tests
Bug: None
Change-Id: Ibcddac5a538ede020a8cb65fca03194475121966

7 years agoMerge "Fix some easy cases of __ANDROID__ versus __BIONIC__."
Elliott Hughes [Sat, 17 Sep 2016 16:40:59 +0000 (16:40 +0000)]
Merge "Fix some easy cases of __ANDROID__ versus __BIONIC__."

7 years agoRemove remaining big-endian cruft.
Elliott Hughes [Sat, 17 Sep 2016 01:53:01 +0000 (18:53 -0700)]
Remove remaining big-endian cruft.

We'd removed most of it already, but a few bits and pieces were still lying
around.

Change-Id: I572a23eb15b9670d8d0f95586eca99ab0bdb4a1b
Test: mm.

7 years agoRemove _KERNEL references from <machine/elf_machdep.h>.
Elliott Hughes [Sat, 17 Sep 2016 01:38:48 +0000 (18:38 -0700)]
Remove _KERNEL references from <machine/elf_machdep.h>.

Test: mm.
Change-Id: I9dff708dd05d4f9e52ccdfde96e096553c873054

7 years agoFix some easy cases of __ANDROID__ versus __BIONIC__.
Elliott Hughes [Sat, 17 Sep 2016 01:16:47 +0000 (18:16 -0700)]
Fix some easy cases of __ANDROID__ versus __BIONIC__.

We need to make a clearer distinction for bionic on the host. This patch
doesn't fully address things like "should host bionic try to talk to netd?"
for now, but is a step in the right direction.

Bug: http://b/31559095
Test: bionic tests.
Change-Id: I49812f8b75d9d78c4fd8a8ddf5df1201d63771d6

7 years agoMerge "Make static library for loader tests"
Treehugger Robot [Fri, 16 Sep 2016 16:14:48 +0000 (16:14 +0000)]
Merge "Make static library for loader tests"

7 years agoMerge changes Iada279ee,Ic6089895,Ie2241b19,Ib0610707
Treehugger Robot [Thu, 15 Sep 2016 23:40:11 +0000 (23:40 +0000)]
Merge changes Iada279ee,Ic6089895,Ie2241b19,Ib0610707

* changes:
  versioner: turn on -Wundef.
  Fix BYTE_ORDER check in <netinet/ip6.h>.
  Fix instances of '#if __i386__'.
  Fix instances of '#if __LP64__'.

7 years agoMake static library for loader tests
Dimitry Ivanov [Thu, 15 Sep 2016 23:25:31 +0000 (16:25 -0700)]
Make static library for loader tests

1. Extract bionic loader tests to static library in
order to link it to bionic cts tests.
2. Make libpagemap dependency static to reduce dependencies
on internal native libraries.

Bug: http://b/22182538
Test: run bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I5decd5893e6338c84b3ab23e1d65d70bd75ad880

7 years agoversioner: turn on -Wundef.
Josh Gao [Thu, 15 Sep 2016 21:16:15 +0000 (14:16 -0700)]
versioner: turn on -Wundef.

Poking around with -Wundef exposed a pretty horrifying bug, so we
should probably keep it turned on.

Bug: http://b/31496165
Change-Id: Iada279eec91ded0d59ff3841d5a3ce1a36e34c3a

7 years agoFix BYTE_ORDER check in <netinet/ip6.h>.
Josh Gao [Thu, 15 Sep 2016 20:57:19 +0000 (13:57 -0700)]
Fix BYTE_ORDER check in <netinet/ip6.h>.

Neither BYTE_ORDER nor BIG_ENDIAN were being defined anywhere, so they
were defaulting to zero, leading to BIG_ENDIAN values being used.

Bug: http://b/31496165
Change-Id: Ic6089895f39b86e7762bdb5b7d5b01feb0d2fd17

7 years agoFix instances of '#if __i386__'.
Josh Gao [Thu, 15 Sep 2016 20:56:37 +0000 (13:56 -0700)]
Fix instances of '#if __i386__'.

Triggers -Wundef, which is on in -Weverything.

Bug: http://b/31496165
Change-Id: Ie2241b19abd6257bebf68baa3ecc4de8066c722e

7 years agoFix instances of '#if __LP64__'.
Josh Gao [Thu, 15 Sep 2016 20:55:41 +0000 (13:55 -0700)]
Fix instances of '#if __LP64__'.

Triggers -Wundef, which is on in -Weverything.

Bug: http://b/31496165
Change-Id: Ib06107073f7dd1d584c19c222d0430da9d35630b

7 years agoMerge "Initialize main thread TLS before the global stack guard."
Josh Gao [Thu, 15 Sep 2016 19:28:56 +0000 (19:28 +0000)]
Merge "Initialize main thread TLS before the global stack guard."

7 years agoMerge "Fix memory leak in test util"
Kenny Root [Thu, 15 Sep 2016 19:12:46 +0000 (19:12 +0000)]
Merge "Fix memory leak in test util"

7 years agoMerge "Add missing uapi header module."
Treehugger Robot [Thu, 15 Sep 2016 05:36:51 +0000 (05:36 +0000)]
Merge "Add missing uapi header module."

7 years agoMerge "Make getpagesize inline static."
Treehugger Robot [Thu, 15 Sep 2016 03:34:30 +0000 (03:34 +0000)]
Merge "Make getpagesize inline static."

7 years agoFix memory leak in test util
Kenny Root [Thu, 15 Sep 2016 00:14:42 +0000 (17:14 -0700)]
Fix memory leak in test util

This shows up when you're doing make HOST_SANITIZE=address

Test: mmma bionic && out/host/linux-x86/bin/bionic_tests_zipalign (compare before and after)
Change-Id: Ia94790496327f3818d5fdb7b5ad07e14e60bcae1

7 years agoAdd missing uapi header module.
Dan Albert [Thu, 15 Sep 2016 00:15:48 +0000 (17:15 -0700)]
Add missing uapi header module.

Test: make checkbuild tests
Bug: http://b/30465923
Change-Id: I4000a9f7aa7ede03dfe799cea7c890bd5dcda575

7 years agoMake getpagesize inline static.
Dan Albert [Thu, 15 Sep 2016 00:10:26 +0000 (17:10 -0700)]
Make getpagesize inline static.

Needed to avoid multiple definition errors.

Test: make checkbuild tests
Bug: None
Change-Id: Ife83e89f5232e98d363e2b2edd7a353ed61c4836

7 years agoMerge "versioner: turn on -Wall -Wextra -Werror."
Josh Gao [Thu, 15 Sep 2016 00:03:40 +0000 (00:03 +0000)]
Merge "versioner: turn on -Wall -Wextra -Werror."

7 years agoMerge "Add modules for NDK headers and libraries."
Treehugger Robot [Wed, 14 Sep 2016 22:32:23 +0000 (22:32 +0000)]
Merge "Add modules for NDK headers and libraries."

7 years agoversioner: turn on -Wall -Wextra -Werror.
Josh Gao [Wed, 14 Sep 2016 21:21:56 +0000 (14:21 -0700)]
versioner: turn on -Wall -Wextra -Werror.

Change-Id: Ica47d0fa671934a1ea193869265de8986b012a58
Test: mma && versioner

7 years agoMerge "Expose some more function decls."
Treehugger Robot [Tue, 13 Sep 2016 23:24:41 +0000 (23:24 +0000)]
Merge "Expose some more function decls."

7 years agoMerge "linker: Refactoring step 3 of many"
Treehugger Robot [Tue, 13 Sep 2016 22:34:59 +0000 (22:34 +0000)]
Merge "linker: Refactoring step 3 of many"

7 years agoAdd modules for NDK headers and libraries.
Dan Albert [Tue, 28 Jun 2016 18:18:05 +0000 (11:18 -0700)]
Add modules for NDK headers and libraries.

Test: make checkbuild
Bug: http://b/27533932
Change-Id: I285e483ba9fb80cc3baf0d025c85344e5b79a08b

7 years agoExpose some more function decls.
Dan Albert [Tue, 13 Sep 2016 21:15:21 +0000 (14:15 -0700)]
Expose some more function decls.

Test: make checkbuild tests # for x86-eng this time
Bug: http://b/30465923
Change-Id: I98c5a8d09463e85ac22b05035c87edab04eaa200

7 years agolinker: Refactoring step 3 of many
Dimitry Ivanov [Fri, 9 Sep 2016 17:00:39 +0000 (10:00 -0700)]
linker: Refactoring step 3 of many

Extract linker executable specific code to linker_main.cpp;
this part of code does not have a place in libdl.a/so.

Bug: http://b/14998480
Bug: http://b/30706810
Test: mm && run bionic-unit-tests
Change-Id: I90f7475e93a919b0f9525da22928089ad35b8f6c

7 years agoMerge "Move test libraries under /data/nativetests"
Treehugger Robot [Fri, 9 Sep 2016 18:58:33 +0000 (18:58 +0000)]
Merge "Move test libraries under /data/nativetests"

7 years agoMerge "[mips64] Fix ipc syscalls"
Treehugger Robot [Fri, 9 Sep 2016 17:19:54 +0000 (17:19 +0000)]
Merge "[mips64] Fix ipc syscalls"