OSDN Git Service

android-x86/bionic.git
10 years agoFix build.
Sreeram Ramachandran [Tue, 13 May 2014 23:30:12 +0000 (16:30 -0700)]
Fix build.

Change-Id: I33293d8bc62cbb22e23a704c4242e7e9d3fce7c5

10 years agoMerge "Introduce netd_client, a dynamic library that talks to netd."
Sreeram Ramachandran [Tue, 13 May 2014 22:07:25 +0000 (22:07 +0000)]
Merge "Introduce netd_client, a dynamic library that talks to netd."

10 years agoIntroduce netd_client, a dynamic library that talks to netd.
Sreeram Ramachandran [Mon, 12 May 2014 18:19:16 +0000 (11:19 -0700)]
Introduce netd_client, a dynamic library that talks to netd.

The library exists outside bionic. It is dynamically loaded, to replace selected
standard socket syscalls with versions that talk to netd.

Change connect() to use the library if available.

(cherry picked from commit 3a6b627a14df8111b03e452f2df4b5f4938e0e49)

Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9

10 years agoMerge "Upgrade to tzdata2014c."
Elliott Hughes [Tue, 13 May 2014 18:27:30 +0000 (18:27 +0000)]
Merge "Upgrade to tzdata2014c."

10 years agoMerge "Consistently use #if defined(__BIONIC__) in tests."
Elliott Hughes [Tue, 13 May 2014 18:26:46 +0000 (18:26 +0000)]
Merge "Consistently use #if defined(__BIONIC__) in tests."

10 years agoUpgrade to tzdata2014c.
Elliott Hughes [Tue, 13 May 2014 18:23:18 +0000 (11:23 -0700)]
Upgrade to tzdata2014c.

From the release notes:

  Changes affecting near-future time stamps

    Egypt observes DST starting 2014-05-15 at 24:00.
    (Thanks to Ahmad El-Dardiry and Gunther Vermier.)
    Details have not been announced, except that DST will not be
    observed during Ramadan.  Guess that DST will stop during the same
    Ramadan dates as Morocco, and that Egypt's future spring and fall
    transitions will be the same as 2010 when it last observed DST,
    namely April's last Friday at 00:00 to September's last Thursday at
    23:00 standard time.  Also, guess that Ramadan transitions will be
    at 00:00 standard time.

Change-Id: I6a20cae02a314871acbd52cb90fcbebd37625810

10 years agoConsistently use #if defined(__BIONIC__) in tests.
Elliott Hughes [Tue, 13 May 2014 18:19:57 +0000 (11:19 -0700)]
Consistently use #if defined(__BIONIC__) in tests.

I've also switched some tests to be positive rather than negative,
because !defined is slightly harder to reason about and there are
only two cases: bionic and glibc.

Change-Id: I8d3ac40420ca5aead3e88c69cf293f267273c8ef

10 years agoMerge "Add getmntent_r to our collection of <mntent.h> compatibility stubs."
Elliott Hughes [Tue, 13 May 2014 18:14:48 +0000 (18:14 +0000)]
Merge "Add getmntent_r to our collection of <mntent.h> compatibility stubs."

10 years agoAdd getmntent_r to our collection of <mntent.h> compatibility stubs.
Elliott Hughes [Tue, 13 May 2014 17:44:07 +0000 (10:44 -0700)]
Add getmntent_r to our collection of <mntent.h> compatibility stubs.

This helps build 'external/flo' out of the box.

Bug: 14841211
Change-Id: I30dde77239cceaf1f5743163744eb3604d27a266

10 years agoMerge "Reduce stack usage of tmpfile(3)."
Elliott Hughes [Tue, 13 May 2014 17:32:47 +0000 (17:32 +0000)]
Merge "Reduce stack usage of tmpfile(3)."

10 years agoMerge "Use __LP64__ instead of __LP32__ in sched.h"
Calin Juravle [Tue, 13 May 2014 17:16:30 +0000 (17:16 +0000)]
Merge "Use __LP64__ instead of __LP32__ in sched.h"

10 years agoReduce stack usage of tmpfile(3).
Elliott Hughes [Tue, 13 May 2014 17:14:22 +0000 (10:14 -0700)]
Reduce stack usage of tmpfile(3).

Also ensure that none of our home-grown code uses more than 2KiB per frame.

Change-Id: I8987a17d72f4b7f082bb7fa25e137c8433664c14

10 years agoMerge "Refactor linker allocator"
Dmitriy Ivanov [Tue, 13 May 2014 15:49:18 +0000 (15:49 +0000)]
Merge "Refactor linker allocator"

10 years agoUse __LP64__ instead of __LP32__ in sched.h
Calin Juravle [Tue, 13 May 2014 15:01:43 +0000 (16:01 +0100)]
Use __LP64__ instead of __LP32__ in sched.h

Gcc defines only __LP64__ so testing __LP32__ will always be false.

Bug: 14881256
Change-Id: Ic63c1d562be09c3eb4b9e17c9e5ef2d9e404db80

10 years agoMerge "Undef private *_BODY defines after use"
Calin Juravle [Tue, 13 May 2014 10:31:06 +0000 (10:31 +0000)]
Merge "Undef private *_BODY defines after use"

10 years agoUndef private *_BODY defines after use
Calin Juravle [Tue, 13 May 2014 10:01:11 +0000 (11:01 +0100)]
Undef private *_BODY defines after use

Bug: 14865741
Change-Id: I1398f7b3f64e3c94f2714cede5b61205dfa78a24

10 years agoMerge "Add fpos_t tests."
Calin Juravle [Tue, 13 May 2014 09:37:07 +0000 (09:37 +0000)]
Merge "Add fpos_t tests."

10 years agoMerge "Support mb sequences across calls to mb*to*wcs* functions"
Calin Juravle [Tue, 13 May 2014 09:36:01 +0000 (09:36 +0000)]
Merge "Support mb sequences across calls to mb*to*wcs* functions"

10 years agoRefactor linker allocator
Dmitriy Ivanov [Mon, 5 May 2014 23:49:04 +0000 (16:49 -0700)]
Refactor linker allocator

Makes it reusable for different fixed sized and not very
big structures (<PAGE_SIZE).

Change-Id: Id5ec13fc6541b1935ef7fe3671c22b98685abbae

10 years agoMerge "Add 64-bit Silvermont-optimized string/memory functions."
Christopher Ferris [Tue, 13 May 2014 00:48:40 +0000 (00:48 +0000)]
Merge "Add 64-bit Silvermont-optimized string/memory functions."

10 years agoAdd 64-bit Silvermont-optimized string/memory functions.
Varvara Rainchik [Tue, 29 Apr 2014 13:44:56 +0000 (17:44 +0400)]
Add 64-bit Silvermont-optimized string/memory functions.

Add following functions:
bcopy, bzero, memcpy, memmove, memset, stpcpy, stpncpy, strcat, strcpy,
strlen, strncat, strncpy, memcmp, strcmp, strncmp.
Set all these functions as the default ones.

Change-Id: Ic66b250ad8c349a43d25e2d4dea075604f6df6ac
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
10 years agoMerge "Add 32-bit Silvermont-optimized string/memory functions."
Christopher Ferris [Tue, 13 May 2014 00:26:50 +0000 (00:26 +0000)]
Merge "Add 32-bit Silvermont-optimized string/memory functions."

10 years agoAdd fpos_t tests.
Calin Juravle [Thu, 8 May 2014 13:42:06 +0000 (14:42 +0100)]
Add fpos_t tests.

Bug: 13077905

Change-Id: I86bb0ee95660f69f9971231c6f828a3a067d1ac8

10 years agoSupport mb sequences across calls to mb*to*wcs* functions
Calin Juravle [Thu, 8 May 2014 13:38:35 +0000 (14:38 +0100)]
Support mb sequences across calls to mb*to*wcs* functions

Bug: 13077905
Change-Id: I5abdc7cc3c27c109b7900c94b112f18a95c35763

10 years agoMerge "Remove the useless indirection in mips' __set_tls."
Elliott Hughes [Mon, 12 May 2014 23:14:51 +0000 (23:14 +0000)]
Merge "Remove the useless indirection in mips' __set_tls."

10 years agoRemove the useless indirection in mips' __set_tls.
Elliott Hughes [Mon, 12 May 2014 23:11:06 +0000 (16:11 -0700)]
Remove the useless indirection in mips' __set_tls.

Change-Id: I12e9d6716c42ccbccc9a186441aca0736bb22d05

10 years agoMerge "Fix use-after-free errors in stdio_test."
Elliott Hughes [Mon, 12 May 2014 22:30:41 +0000 (22:30 +0000)]
Merge "Fix use-after-free errors in stdio_test."

10 years agoFix use-after-free errors in stdio_test.
Elliott Hughes [Mon, 12 May 2014 22:15:37 +0000 (15:15 -0700)]
Fix use-after-free errors in stdio_test.

fclose(3) frees the passed-in FILE*. We should close(2) the underlying fd,
not fclose(3) the stream, if we want to test what happens with a stream
we can't read from.

Bug: 14466691
Change-Id: I99fed5904b0266b9c6ae05d0b9cf2e926446c064

10 years agoAdd 32-bit Silvermont-optimized string/memory functions.
Varvara Rainchik [Thu, 24 Apr 2014 11:41:20 +0000 (15:41 +0400)]
Add 32-bit Silvermont-optimized string/memory functions.

Add following functions:
bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen,
strcpy, strncpy, stpcpy, stpncpy.
Create new directories inside arch-x86 to specify architecture: atom,
silvermont and generic (non atom or silvermont architectures are treated like generic).
Due to introducing optimized versions of stpcpy and stpncpy,
c-implementations of these functions are moved from
common for architectures makefile to arm and mips specific makefiles.

Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
10 years agoMerge "Cleanup: updated comments"
Dmitriy Ivanov [Mon, 12 May 2014 18:49:34 +0000 (18:49 +0000)]
Merge "Cleanup: updated comments"

10 years agoCleanup: updated comments
Dmitriy Ivanov [Mon, 12 May 2014 18:36:56 +0000 (11:36 -0700)]
Cleanup: updated comments

Bug: 14566672
Change-Id: I49ad28e3914b7d559db1e98542fee919db768f49

10 years agoMerge "Cleanup: remove AARCH/ARM_COPY relocation support"
Dmitriy Ivanov [Mon, 12 May 2014 17:21:35 +0000 (17:21 +0000)]
Merge "Cleanup: remove AARCH/ARM_COPY relocation support"

10 years agoCleanup: remove AARCH/ARM_COPY relocation support
Dmitriy Ivanov [Mon, 12 May 2014 16:06:14 +0000 (09:06 -0700)]
Cleanup: remove AARCH/ARM_COPY relocation support

They are only legal for ET_EXEC binaries and these are no
longer supported.

Bug: 14566672
Change-Id: I99e0ff47e8c572db474bc5e52df870a72269abb3

10 years agoMerge "Reserve space for the future in statvfs(64)"
Calin Juravle [Mon, 12 May 2014 09:59:57 +0000 (09:59 +0000)]
Merge "Reserve space for the future in statvfs(64)"

10 years agoReserve space for the future in statvfs(64)
Calin Juravle [Fri, 9 May 2014 21:28:09 +0000 (22:28 +0100)]
Reserve space for the future in statvfs(64)

The kernel struct has some spare space at the end too, and some extra
fields, so having a bit of flexibility in statvfs might be worthwhile.

Bug: 14681331
Bug: 12875898
Change-Id: I5b502c5dd9d2e3bb8f34804f83c02669cefce01e

10 years agoMerge "Align struct passwd definition with other variations of libc"
Calin Juravle [Mon, 12 May 2014 09:53:40 +0000 (09:53 +0000)]
Merge "Align struct passwd definition with other variations of libc"

10 years agoMerge "Bring in google3-style DISALLOW_* macros."
Elliott Hughes [Sat, 10 May 2014 03:32:28 +0000 (03:32 +0000)]
Merge "Bring in google3-style DISALLOW_* macros."

10 years agoBring in google3-style DISALLOW_* macros.
Elliott Hughes [Sat, 10 May 2014 02:12:08 +0000 (19:12 -0700)]
Bring in google3-style DISALLOW_* macros.

I've been meaning to do this for a very long time...

Change-Id: Ia8c16eee7c026c3c9505399948485fb778fb0152

10 years agoMerge "Align the child stack in clone(2)."
Elliott Hughes [Sat, 10 May 2014 00:38:50 +0000 (00:38 +0000)]
Merge "Align the child stack in clone(2)."

10 years agoAlign the child stack in clone(2).
Elliott Hughes [Fri, 9 May 2014 21:42:16 +0000 (14:42 -0700)]
Align the child stack in clone(2).

Also let clone(2) set the TLS for x86.

Also ensure we initialize the TLS before we clone(2) for all architectures.

Change-Id: Ie5fa4466e1c9ee116a281dfedef574c5ba60c0b5

10 years agoAlign struct passwd definition with other variations of libc
Calin Juravle [Fri, 9 May 2014 20:50:53 +0000 (21:50 +0100)]
Align struct passwd definition with other variations of libc

Add pg_gecos ("real name") field to struct passwd.

Bug: 14679430
Bug: 12875898
Change-Id: I833ec2c46f6a6259b7232a8e3f7942968ef0b50d

10 years agoMerge "Align arm64 stacks to 16 bytes in __bionic_clone."
Elliott Hughes [Fri, 9 May 2014 21:28:05 +0000 (21:28 +0000)]
Merge "Align arm64 stacks to 16 bytes in __bionic_clone."

10 years agoMerge "Use larger neon instructions for moving data."
Christopher Ferris [Fri, 9 May 2014 21:09:55 +0000 (21:09 +0000)]
Merge "Use larger neon instructions for moving data."

10 years agoAlign arm64 stacks to 16 bytes in __bionic_clone.
Elliott Hughes [Fri, 9 May 2014 19:16:20 +0000 (12:16 -0700)]
Align arm64 stacks to 16 bytes in __bionic_clone.

Also ensure that arm64/x86-64/x86 assembler uses local labels.
(There are are so many non-local labels in arm that fixing them
seems out of scope.)

Also synchronize the __bionic_clone.S comments.

Change-Id: I03b4f84780d996b54d6637a074638196bbb01cd4

10 years agoUse larger neon instructions for moving data.
Christopher Ferris [Fri, 2 May 2014 01:10:51 +0000 (18:10 -0700)]
Use larger neon instructions for moving data.

Included is a new target generic-neon that will use neon instructions
on 64 bit platforms where appropriate.

Change-Id: Iaf71b768780aa9240a24539cd87666ca9298e4c6

10 years agoMerge "Hide the __bionic_clone and __bionic_clone_entry implementation details."
Elliott Hughes [Fri, 9 May 2014 16:13:52 +0000 (16:13 +0000)]
Merge "Hide the __bionic_clone and __bionic_clone_entry implementation details."

10 years agoMerge "Declare sincos/sincosf/sincosl in <math.h>."
Elliott Hughes [Fri, 9 May 2014 04:33:31 +0000 (04:33 +0000)]
Merge "Declare sincos/sincosf/sincosl in <math.h>."

10 years agoDeclare sincos/sincosf/sincosl in <math.h>.
Elliott Hughes [Fri, 9 May 2014 04:19:12 +0000 (21:19 -0700)]
Declare sincos/sincosf/sincosl in <math.h>.

Change-Id: If7b98f98c7ab4d3d77d310be082bff64512d51a8

10 years agoHide the __bionic_clone and __bionic_clone_entry implementation details.
Elliott Hughes [Fri, 9 May 2014 02:00:23 +0000 (19:00 -0700)]
Hide the __bionic_clone and __bionic_clone_entry implementation details.

clone(2) is the public symbol.

Also switch a test from __bionic_clone to clone; testing public API
means the test now works on glibc too.

Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde

10 years agoMerge "Test dlopen with symlinked .so files"
Dmitriy Ivanov [Fri, 9 May 2014 00:52:07 +0000 (00:52 +0000)]
Merge "Test dlopen with symlinked .so files"

10 years agoMerge "wchar_test.cpp: fix error between comparison signed and unsigned integer"
Elliott Hughes [Thu, 8 May 2014 23:52:59 +0000 (23:52 +0000)]
Merge "wchar_test.cpp: fix error between comparison signed and unsigned integer"

10 years agoTest dlopen with symlinked .so files
Dmitriy Ivanov [Thu, 8 May 2014 19:27:25 +0000 (12:27 -0700)]
Test dlopen with symlinked .so files

Bug: 9741592
Change-Id: I68c59d6f4e690136395c3dc3de13f99ce38de528

10 years agoMerge "Remove support for non-PIE executables"
Dmitriy Ivanov [Thu, 8 May 2014 20:52:10 +0000 (20:52 +0000)]
Merge "Remove support for non-PIE executables"

10 years agoRemove support for non-PIE executables
Nick Kralevich [Wed, 7 May 2014 17:32:39 +0000 (10:32 -0700)]
Remove support for non-PIE executables

Don't support the dynamic linker loading ET_EXEC executables. Only
support ET_DYN executables.

Bug: 14566672
Change-Id: Ia1f2bfffe7ea867c1cd62e67d7fd637c60c0728d

10 years agowchar_test.cpp: fix error between comparison signed and unsigned integer
Yongqin Liu [Thu, 8 May 2014 15:21:01 +0000 (23:21 +0800)]
wchar_test.cpp: fix error between comparison signed and unsigned integer

when compile the cts package with aarch64 gcc4.9, will get following error:
bionic/tests/wchar_test.cpp:253:3: required from here
external/gtest/include/gtest/gtest.h:1448:16:
    error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

this change fix it by using static_cast<wchar_t> as suggested by Calin Juravle

Change-Id: I7fb9506e7b84b8a12b9d003458d4f0e78554c3cd
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
10 years agoMerge "Fix LOG_ID_CRASH build failure."
Elliott Hughes [Thu, 8 May 2014 00:13:26 +0000 (00:13 +0000)]
Merge "Fix LOG_ID_CRASH build failure."

10 years agoFix LOG_ID_CRASH build failure.
Elliott Hughes [Thu, 8 May 2014 00:12:40 +0000 (17:12 -0700)]
Fix LOG_ID_CRASH build failure.

Change-Id: I66517e30c568d7f36f6bf6b1e4507ecf14f01226

10 years agoMerge "Send bionic's fatal logging to the crash log."
Elliott Hughes [Wed, 7 May 2014 23:40:27 +0000 (23:40 +0000)]
Merge "Send bionic's fatal logging to the crash log."

10 years agoMerge "Add basic tests for fsync/fdatasync."
Elliott Hughes [Wed, 7 May 2014 23:40:10 +0000 (23:40 +0000)]
Merge "Add basic tests for fsync/fdatasync."

10 years agoSend bionic's fatal logging to the crash log.
Elliott Hughes [Wed, 7 May 2014 23:35:59 +0000 (16:35 -0700)]
Send bionic's fatal logging to the crash log.

Bug: 14159417
Change-Id: I7aa986fb8e11660035221f9bb4fe0bc40ac36c58

10 years agoAdd basic tests for fsync/fdatasync.
Elliott Hughes [Wed, 7 May 2014 21:30:33 +0000 (14:30 -0700)]
Add basic tests for fsync/fdatasync.

Bug: 14613980
Change-Id: Ie8002c2a1abae07295b7bdb33772764767c03d37

10 years agoMerge "Add missing test for atexit test suite."
Dmitriy Ivanov [Wed, 7 May 2014 20:49:00 +0000 (20:49 +0000)]
Merge "Add missing test for atexit test suite."

10 years agoMerge "Give bionic's __ANDROID_API__ a more reasonable value."
Elliott Hughes [Wed, 7 May 2014 19:58:20 +0000 (19:58 +0000)]
Merge "Give bionic's __ANDROID_API__ a more reasonable value."

10 years agoGive bionic's __ANDROID_API__ a more reasonable value.
Elliott Hughes [Wed, 7 May 2014 19:37:44 +0000 (12:37 -0700)]
Give bionic's __ANDROID_API__ a more reasonable value.

This matches what frameworks/base does with Build.VERSION and means that
bionic's version number will always sort >= than any released version.
This should prevent confusion in code that builds both against bionic
and the NDK.

(Note that <sys/cdefs.h> drags this in, so it's always in the namespace.)

Bug: 14613709
Change-Id: I91fb745920e848a6b20f2f5797c0a7d6cde6c032

10 years agoAdd missing test for atexit test suite.
Dmitriy Ivanov [Tue, 6 May 2014 02:52:13 +0000 (19:52 -0700)]
Add missing test for atexit test suite.

Change-Id: I3d14d7df1da53ccef534c106633593551ab6a7cb

10 years agoMerge "Fix bionic-unit-tests-glibc-run target"
Calin Juravle [Wed, 7 May 2014 18:31:11 +0000 (18:31 +0000)]
Merge "Fix bionic-unit-tests-glibc-run target"

10 years agoFix bionic-unit-tests-glibc-run target
Calin Juravle [Wed, 7 May 2014 18:06:30 +0000 (19:06 +0100)]
Fix bionic-unit-tests-glibc-run target

Configure multilib for bionic-unit-tests-glibc-run target (the path to
the host executable was already patched to support multilib build but
the multilib itself wasn't configured).

Change-Id: If533fbdb19bc737e543cf85a0787505458f24579

10 years agoMerge "Test that relro sharing actually saves memory."
Torne (Richard Coles) [Wed, 7 May 2014 15:25:44 +0000 (15:25 +0000)]
Merge "Test that relro sharing actually saves memory."

10 years agoMerge "Reserve some space in sem_t for the future."
Calin Juravle [Wed, 7 May 2014 14:04:31 +0000 (14:04 +0000)]
Merge "Reserve some space in sem_t for the future."

10 years agoMerge "Allow for better utmp logging."
Calin Juravle [Wed, 7 May 2014 14:04:21 +0000 (14:04 +0000)]
Merge "Allow for better utmp logging."

10 years agoMerge "Fix ino_t and suseconds_t"
Calin Juravle [Wed, 7 May 2014 14:04:11 +0000 (14:04 +0000)]
Merge "Fix ino_t and suseconds_t"

10 years agoMerge "Leave more space for extensions in pthread_rwlockattr_t"
Calin Juravle [Wed, 7 May 2014 14:04:00 +0000 (14:04 +0000)]
Merge "Leave more space for extensions in pthread_rwlockattr_t"

10 years agoMerge "Change the interface for fatal logging."
Elliott Hughes [Wed, 7 May 2014 04:04:27 +0000 (04:04 +0000)]
Merge "Change the interface for fatal logging."

10 years agoChange the interface for fatal logging.
Elliott Hughes [Wed, 7 May 2014 03:37:22 +0000 (20:37 -0700)]
Change the interface for fatal logging.

This more general interface lets liblog give us any fatal log message,
regardless of source. This means we can remove the special case for
LOG_ALWAYS_FATAL with a simpler scheme that automatically works for
the VM too.

Change-Id: Ia6dbf7c3dbabf223081bd5159294835d954bb067

10 years agoMerge "Fix a gethnamaddr.c warning that's already fixed upstream."
Elliott Hughes [Tue, 6 May 2014 20:42:10 +0000 (20:42 +0000)]
Merge "Fix a gethnamaddr.c warning that's already fixed upstream."

10 years agoMerge "Sync with upstream OpenBSD wcsftime.c."
Elliott Hughes [Tue, 6 May 2014 20:21:03 +0000 (20:21 +0000)]
Merge "Sync with upstream OpenBSD wcsftime.c."

10 years agoFix a gethnamaddr.c warning that's already fixed upstream.
Elliott Hughes [Tue, 6 May 2014 18:23:40 +0000 (11:23 -0700)]
Fix a gethnamaddr.c warning that's already fixed upstream.

We're still way out of sync, but this cleans up a tiny corner.

Change-Id: I51e76601785bf351d6418841b56e08a900a84d82

10 years agoSync with upstream OpenBSD wcsftime.c.
Elliott Hughes [Tue, 6 May 2014 18:12:34 +0000 (11:12 -0700)]
Sync with upstream OpenBSD wcsftime.c.

They removed the code nobody wants rather than fix the ""/L"" mixup.
Even better!

Change-Id: Ib4333acf5e90d69586805a218d2894c5dffcb82f

10 years agoFix ino_t and suseconds_t
Calin Juravle [Tue, 6 May 2014 13:37:56 +0000 (14:37 +0100)]
Fix ino_t and suseconds_t

Align ino_t and suseconds_t definitions with kernel
and OpenBSD upstream.

Bug: 14583346
Bug: 12875898
Change-Id: I0d97c6b4fc85b261472575290e6f6f2df1c8a36a

10 years agoMerge "Fix <math.h> to quieten most of our warnings."
Elliott Hughes [Tue, 6 May 2014 17:18:16 +0000 (17:18 +0000)]
Merge "Fix <math.h> to quieten most of our warnings."

10 years agoReserve some space in sem_t for the future.
Calin Juravle [Tue, 6 May 2014 15:24:27 +0000 (16:24 +0100)]
Reserve some space in sem_t for the future.

Reserve 12 more bytes in sem_t to give room for future implementation
improvements. This gets us to a 16 bytes sem_t. Glibc uses 32 bytes (16
actual use + 16 reserved), while OpenBSD has 16 bytes (out of which 4
are for padding).

Bug: 14587103
Bug: 12875898
Change-Id: Id835cc5abf874c651e6b5ad5b8f29c9d6ab08d5a

10 years agoAllow for better utmp logging.
Calin Juravle [Tue, 6 May 2014 14:36:02 +0000 (15:36 +0100)]
Allow for better utmp logging.

Increase (UT_NAMESIZE,UT_LINESIZE,UT_HOSTSIZE) to (32,32,256).

Nobody writes utmp on Android but it would be nice to be aligned
with others who use 32,32,256 (like glibc). If ever used it will produce
nicer logging. There is no consensus in BSDs for these values.

Bug: 14584341
Bug: 12875898

Change-Id: I94af10b982b8f9fcaea897c4cf968563f38403f9

10 years agoMerge "Add include guard to fileext.h"
Calin Juravle [Tue, 6 May 2014 13:47:18 +0000 (13:47 +0000)]
Merge "Add include guard to fileext.h"

10 years agoLeave more space for extensions in pthread_rwlockattr_t
Calin Juravle [Tue, 6 May 2014 12:39:47 +0000 (13:39 +0100)]
Leave more space for extensions in pthread_rwlockattr_t

Change pthread_rwlockattr_t from int to long. On LP64 this gives us more
room for extensibility since longs are 8 bytes. glibc also reserves 8
bytes for this.

Bug: 14582681
Bug: 12875898
Change-Id: I55d599be0fdbbf0cb55957ec0ea62ab042bdee94

10 years agoTest that relro sharing actually saves memory.
Torne (Richard Coles) [Fri, 2 May 2014 13:57:42 +0000 (14:57 +0100)]
Test that relro sharing actually saves memory.

Spawn 20 child processes, have them all load the library, and compare
the total PSS used in the case where we use dlopen() and the case where
we use android_dlopen_ext() with relro sharing. We assume we will save
at least 10% of the memory; in practise this example saves 40% or more
so this should be a reasonable threshold.

Bug: 14299541
Change-Id: Idccf6b8b0eb137abae2200f1ce68fb76b3cbdd75

10 years agoMerge "Handle empty relro segment or incorrectly sized file."
Torne (Richard Coles) [Tue, 6 May 2014 10:16:18 +0000 (10:16 +0000)]
Merge "Handle empty relro segment or incorrectly sized file."

10 years agoFix <math.h> to quieten most of our warnings.
Elliott Hughes [Tue, 6 May 2014 03:28:28 +0000 (20:28 -0700)]
Fix <math.h> to quieten most of our warnings.

I've reported the wcsftime bug upstream, but we really just want to use -D
to ensure the buggy code isn't built. (I've also brought our strftime a bit
closer to upstream now we have the right define.)

I don't think upstream is likely to fix all their sign-compare and
uninitialized warnings, so let's just silence them.

As for libm, again upstream isn't likely to fix all their warnings, and
silencing those made the ones that were our fault stand out. I've fixed
our <math.h> to fix the warnings caused by our lack of definitions for
the non-imprecise long-double functions. I checked the C99 standard, and
all these functions are there.

Change-Id: Iee8e1182c1db375058fb2c451eceb212bab47a37

10 years agoMerge "bionic: make epoll_event structure packed"
Elliott Hughes [Tue, 6 May 2014 02:50:39 +0000 (02:50 +0000)]
Merge "bionic: make epoll_event structure packed"

10 years agobionic: make epoll_event structure packed
Philip Hatcher [Tue, 25 Feb 2014 13:16:37 +0000 (14:16 +0100)]
bionic: make epoll_event structure packed

Description: In the kernel the epoll_event structure is packed
in 64 bit kernel builds to allow the structure to be more easily
compatible with 32 bit user space.  As a result, when user space
is 64-bit the structure must be packed as well.

Add unit test to show the ptr alignment issue.

Change-Id: I2c4848d5e38a357219091f350f9b6e3da05090da
Signed-off-by: Philip Hatcher <philip.hatcher@intel.com>
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Reviewed-by: Hazarika, Prodyut <prodyut.hazarika@intel.com>
Tested-by: Hazarika, Prodyut <prodyut.hazarika@intel.com>
10 years agoMerge "Remove the non-standard time64 stuff for LP64."
Elliott Hughes [Tue, 6 May 2014 01:53:53 +0000 (01:53 +0000)]
Merge "Remove the non-standard time64 stuff for LP64."

10 years agoRemove the non-standard time64 stuff for LP64.
Elliott Hughes [Tue, 6 May 2014 00:14:02 +0000 (17:14 -0700)]
Remove the non-standard time64 stuff for LP64.

We need a workaround in strftime as long as we still need to support
64-bit times on LP32.

Change-Id: I8ffb616f6312d4063fb9ea3c36b52653e8f4c5f8

10 years agoMerge "Update the NOTICE files and improve the script slightly."
Elliott Hughes [Mon, 5 May 2014 23:24:00 +0000 (23:24 +0000)]
Merge "Update the NOTICE files and improve the script slightly."

10 years agoUpdate the NOTICE files and improve the script slightly.
Elliott Hughes [Mon, 5 May 2014 21:58:17 +0000 (14:58 -0700)]
Update the NOTICE files and improve the script slightly.

Change-Id: Ia131634cd97ca9523e1b63dce41f66247cbaa311

10 years agoMerge "Sync with upstream OpenBSD."
Elliott Hughes [Mon, 5 May 2014 22:10:48 +0000 (22:10 +0000)]
Merge "Sync with upstream OpenBSD."

10 years agoSync with upstream OpenBSD.
Elliott Hughes [Mon, 5 May 2014 21:57:23 +0000 (14:57 -0700)]
Sync with upstream OpenBSD.

These trivial differences are are only current differences from upstream
OpenBSD.

Change-Id: Iddbee2c803911915a25e1da8b246e8403fa72daf

10 years agoMerge "Disable %n in printf and vfwprintf."
Elliott Hughes [Mon, 5 May 2014 21:49:22 +0000 (21:49 +0000)]
Merge "Disable %n in printf and vfwprintf."

10 years agoDisable %n in printf and vfwprintf.
Elliott Hughes [Sat, 3 May 2014 01:16:32 +0000 (18:16 -0700)]
Disable %n in printf and vfwprintf.

Bug: 14492135
Change-Id: If190bede29e5f68a65043ddbe8e878c660933d03

10 years agoMerge "Switch to current upstream OpenBSD wsetup.c."
Elliott Hughes [Mon, 5 May 2014 21:33:22 +0000 (21:33 +0000)]
Merge "Switch to current upstream OpenBSD wsetup.c."

10 years agoSwitch to current upstream OpenBSD wsetup.c.
Elliott Hughes [Sat, 3 May 2014 01:29:25 +0000 (18:29 -0700)]
Switch to current upstream OpenBSD wsetup.c.

Change-Id: I2c1123f3e1d3c4af7fd7bf354e763934a39b78c0

10 years agoMerge "Fixes for __cxa_finalize"
Dmitriy Ivanov [Mon, 5 May 2014 21:04:32 +0000 (21:04 +0000)]
Merge "Fixes for __cxa_finalize"