On LP64, this could have caused the top bits of the pointer returned by
malloc to be lost because sizeof(int) != sizeof(void*).
Change-Id: I866a5071c1d359478d020d7fa4d466b53d52edab
Cherry pick bionic 86d2feef9f4df517dd5755b39b993bec0c3e1ea5 which
fixes struct stat64. This may look like breaking mips64 ABI, but mips64
support is stil work in progress post-L
Also see prebuilts/ndk e6639a4c0ba9296a19fd477154aace3585221d9d
Change-Id: Ia8859762191220b9d3127b37970f05594375ca40
This CL unconditionally removes the existance of __builtin_isinf and
__builtin_isnan from math.h for clang, because (unlike other math functions)
clang doesn't like those to be declared.
See LLVM bugzilla entry: http://llvm.org/bugs/show_bug.cgi?id=20958
The reason for decorating all math functions with __attribute__((pcs("aapcs")))
is to offer developers the ability to compile their code with hardfp and still
link Android's libm.so which follows softfp calling convention.
Before issue 20958 is fixed, those who want clang to compile their code with
hardfp in NDK has to go all the way hard, ie.
1) LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
Note that _NDK_MATH_NO_SOFTFP=1 remove __attribute__((pcs("aapcs"))) for all math functions
2) LOCAL_LDLIBS += -lm_hard # link libm_hard.a recompiled with -mhard-float instead of bionic libm.so
Change-Id: Ie2f95e73e58e1574e8cadbcab92a5209d94448e1
When defined as char pointers, every compilation unit that includes
the NdkMediaDrm.h header defines a new copy of the same global
variables - leading to linker errors due to multiple definitions
if more than one file includes it.
By using a define, they don't generate any symbols. The NdkMediaFormat.h
header uses extern const char* for a similar set of keys, but that
can't be added after the actual platform has shipped. The other
alternative would be to declare them as static const char*, which
wouldn't generate global symbols, but which could trigger warnings
about unused static symbols instead.
The same change has already been applied in frameworks/av in
https://android-review.googlesource.com/120303.
Change-Id: I14ca81d94309b7f437b3bc144920c48a8b3f0261
1. move sgidefs.h to libc/arch-mips.
See bionic 6e50cb454451916ced315680f6c13dc08cf3959a
2. change type of u_ar0 from "unsigned long" to "struct user_regs_struct*".
See bionic e03950fa0c5567edf70d011b856a027e03b1c0f7
3. sync fts.h, dlext.h, sys/user.h
4. remove ' from string.h
Change-Id: I2ba58b0df4c655f107ea086efbd0220de2b40e9a
posix_memalign is added to libc.so for API 17, 18, 19 but prototype
is missing from stdlib.h
Turns out API 16 supports posix_memalign too. Add it as well
See b.android.com/77861
Change-Id: I940cdc60af9f98490001d67bef32fee556a3ac51
The common header include/linux/a.out.h include asm/a.out.h, but
arm64/mips/mips64 don't have it. Add a placeholder before bionic
has it
Change-Id: I7084e0beabe86fec32987a89e66d6c094f1e8c22
Macros putc, getc and their unlock cousins use internal functions and
variables not necessarily available in future libc.so (*1). Remove macros
and use functions aleady exists in libc.so instead.
(*1) https://android-review.googlesource.com/#/c/110662/
Change-Id: I3faa2d74de40ef8376119b38f2a39d46ece47d07
Add clock_settime() and clock_nanosleep() function
prototypes in time.h.
Change-Id: I0eb45e465b3b48b9d4f3a4a8109a6f2d9c4f8ce2
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
Upstream clang3.6 still doesn't allow change of calling convension of
__builtin_isnan from the default to "softfp" (via __attribute__((pcs("aapcs"))))
as required by bionic libm.so for 32-bit ARM. Let's hope clang3.7
fix that. See upstream bug http://llvm.org/bugs/show_bug.cgi?id=20958
Change-Id: Ibdcc1783ffa7cf2f36e733983bd6d912ad38df70
Also
1. Header singal.h now includes <sys/ucontext.h>
2. asm/user.h include sys/user.h
3. change use of user_i387_struct to user_fpregs_struct
See bionic 26a8eb50a84e131d34d10d5d167d67e9995399bd
Change-Id: I9592e98b90d773ef5babb428a6a6ef208fe86327
Just a tricky issue.
WRAP(stat) -> stat_portable, However we have a struct naming stat_portable.
Let's just rename it.
Change-Id: If0a33661d9d23750d4af45158d1336bb71a08cab
When GCC is built bionic's stdio.h (among other headers) is fixed: __va_list
is replaced with __gnuc_va_list, and put in include-fixed/stdio.h,
unless stdio.h already contains __gnuc_va_list. When GCC is later
used bionic's stdio.h is never included.
The problem in the context of NDK is that all 32-bit Android toolchain
are built with android-9 header and expect to work with all API levels
sometime with sustantially different stdio.h.
This CL stops GCC from generating include-fixed/stdio.h by putting
__gnuc_va_list in it.
See bionic df85f50b and b.android.com/73728
Change-Id: I7a490496efbd491a0376608b9ae6e9e2dfc15fb3