This fixes WCHAR_MIN / WCHAR_MAX to be signed / unsigned based on
the target ABI.
This only impacts ARM where wchar_t is really 'unsigned int'.
One can define _WCHAR_IS_ALWAYS_SIGNED to restore the old behaviour.
See http://b.android.com/55749
Change-Id: Idb63b7b11aecd3cfee37f5b6dd2eba78b308876f
This patch ensures that wchar_t is a 32-bit number when targetting
API level < 9 (i.e. Froyo or older).
You can restore the previous (and broken) behaviour by defining
_WCHAR_IS_8BIT at compile time. See http://b.android.com/57267
for more context.
BUG=57267
Change-Id: Ib334e8fe95a3f592d5d4bb157b0f123984133597
1. __set_errno is deprecated and subject to removal in future release
2. elf.h is seen to be included alone, causing compilation error due
to undefined uint32_t and uint64_t
Change-Id: I4ca348a8ba0689eb3880622dcf5c53be470c57e8
To be the same as bionic's. See
ec37237d69289e2bb9836bfa0d071ab958234d00
The new one also no longer undef offsetof and replaces it with
"((size_t) &((TYPE *)0)->MEMBER)" if __compiler_offsetof isn't
defined. The problem with the old behavior are that
1. __compiler_offsetof isn't defined in linux/compiler.h even though
all Android compilers support __builtin_offsetof
2. As as result, offsetof defined in stddef.h to use __builtin_offsetof
is undefined and replaced here. Problem is,
"((size_t) &((TYPE *)0)->MEMBER)" isn't considered a compile-time
constant, and fails some code expect offsetof to be.
Change-Id: I3ebb0de9e1d95305a0890a099360ff6936d24b2f
With --enable-libgomp, gcc/gcc-4.4.3/libiberty/configure line #2124 tries
to link a trivial program but fails w/o the presence of libc.so and libdl.so
and sets "gcc_no_link=yes" at line #2131. Confiugre later fails with
cryptic message reads "Link tests are not allowed after GCC_NO_EXECUTABLES."
See
https://android-review.googlesource.com/#/c/34491, 48617, and 48619
Change-Id: I6e761c5fb12f413dca04a26b39f27e9f026d75d3
The LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros. Move their declarations from
<pthread.h> to <limits.h> where they belong.
Change-Id: I597465b99893706ade82069238f60df73d8e236e
This is port of related CLs:
9d40326830c2bd407427889c554adeb915ee6b4a
f3cfcd869ded41d25c1f4f4e48e7c374a64f9583
Summary: By placing __PREINIT_ARRAY__, __INIT_ARRAY__, __FINI_ARRAY__
and __CTOR_LIST__ on stack, this change allows PIC w/o relying on text
relocations.
Change-Id: I02a1b496b16aba692f4f9fa998a71efd943689fd
Changed "jump __libc_init" to "call __libc_init" otherwise stack unwinding
past __libc_init may get wrong return address and crash the program or do
wield things. With "call", return address is pushed on stack and unwinding
stops correctly at _start. Note that __libc_init never returns, so this
fix wonʼt affect normal program execution. But just in case it "does"
return, jump to address 0 and halt.
Change-Id: Id194fb32adcbf89ae59939cee33c50b5bbdd36fe
This patch removes all prebuilt C runtime object files from
the ndk/platforms/ directory. We replace them with equivalent
assembly sources lifted from the following directories:
bionic/libc/private/ (for __dso_handle.S and __dso_handle_so.S)
bionic/libc/arch-$ARCH/ (for all others)
Note: This requires that your NDK's gen-platforms.sh script be
capable of rebuilding the object files from sources.
See https://android-review.googlesource.com/36822
The goal here is to make it much easier to update these files,
and track their changes relative to the content of bionic/lib.
For example to fix the following issues in the future:
Change-Id: If4c84e2584b0e58ca3585b034bb8a13a8add8ab9
http://code.google.com/p/android/issues/detail?id=26911http://code.google.com/p/android/issues/detail?id=23203
This patch improves the formatting of <pthread.h> as exposed by the NDK:
- change '#if __cplusplus' into '#ifdef __cplusplus'
- change C++-style comment into C-style comment
Change-Id: Ib093058e8d7a7554d8329a40e102cde11d065932
- Cleanup declaration of lseek64() to use off64_t instead of loff_t
- Cleanup declaration of prctl() to use variable number of arguments
The cleanups are performed to better match upstream.
Change-Id: I3c9420e328c3772bbb57dc9108dc879aa698a981
This patch fixes some formatting issues in <sys/cdefs.h>:
- change '#if __STDC_VERSION__ > xxx' into '#if defined(__STDC_VERSION__) && __STDC_VERSION > xxx'
- add __LIBC_HIDDEN__ definition (not technically required, but makes comparing the headers with upstream easier)
This fixes two minor issues with recent updates to the IPv6 related headers:
- add missing <linux/ipv6.h> kernel header
- avoid conflict in netinet/in6.h, the macro is already defined by <linux/in6.h>