Commit Graph

687 Commits

Author SHA1 Message Date
Erik Kline
c278ecaba6 multinetwork API: NDK header
Bug: 19537384
Change-Id: Iead7a2da0a6f0ba99744ef1e434899fe5d42e824
2015-05-20 05:28:06 +09:00
Elliott Hughes
cdf349cf11 Add missing <stdlib.h> include to the native app glue.
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
2015-02-19 22:41:50 -08:00
Andrew Hsieh
c08fb7eb45 Fix mips64 struct stat64
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
2015-01-29 11:39:03 -08:00
Andrew Hsieh
acde2e0dea Merge "Drop clang version check for __builtin_isinf and __builtin_isnan" 2015-01-29 19:29:13 +00:00
Andrew Hsieh
6408fa86dc Merge "Refine libportable signal.h on mips." 2015-01-20 18:35:34 +00:00
Pen-Yung Yu
a06fa01ac6 Fixup typo and disable debug message
Change-Id: I646b9a52172c300072443eb8a605e1ebf6f840c6
2015-01-20 15:02:17 +08:00
Pen-Yung Yu
166f5daf4b Refine libportable signal.h on mips.
Change-Id: I02edeb28d4606f7706cbd9f933523483ae51abbb
2015-01-20 14:32:57 +08:00
Andrew Hsieh
3598d53b42 Drop clang version check for __builtin_isinf and __builtin_isnan
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
2015-01-16 14:24:04 -08:00
Martin Storsjo
2202e9414a Use define for drm property keys instead of defining as char pointers
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
2015-01-05 18:52:13 +02:00
WenHan Gu
d7120d4451 Header/symbol for unknown arch.
Change-Id: Ibdbc4cf5408958444ed7a83da6c8bbe478072c6d
2014-12-09 10:50:05 +08:00
Andrew Hsieh
6aff78a6ce misc header changes for r10d
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
2014-12-05 14:11:54 +08:00
Andrew Hsieh
b6f18dba42 Fix headers to be included alone
Change-Id: I7eb9a6ed51b938506d440b91e6b3d42daf817fd7
2014-11-17 09:54:27 +08:00
Andrew Hsieh
d3ab539366 Change sysconf(3) to return long
See bionic 60d84af1726225320b26683b726e5e735d9d76e8

BUG=18390956

Change-Id: I20c6aa48115610b35e1d59f9f37ce5abbe6ac2f7
2014-11-17 09:48:36 +08:00
Andrew Hsieh
f72859a145 Merge "Add posix_memalign to API16's libc.so, and to stdlib.h for API 16, 17, 18, 19" 2014-11-13 08:32:20 +00:00
Andrew Hsieh
add39dfea3 Cherry-pick: Only use <atomic> for C++11 and newer
See bionic 3ce0769aa5f9a991af1d167f730d987dd002253c
BUG=17736764

Change-Id: If63b6c8394f8574fd198fd24dfc42a3aaba865d5
2014-10-30 10:42:04 -07:00
Andrew Hsieh
21922de299 Add posix_memalign to API16's libc.so, and to stdlib.h for API 16, 17, 18, 19
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
2014-10-23 10:28:17 -07:00
Andrew Hsieh
d8338a7e26 Add asm/a.out.h to arm64/mips/mips64
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
2014-10-15 11:13:01 +08:00
Andrew Hsieh
c810b3ce7a Remove macros putc*/getc* from API<21 stdio.h to use
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
2014-10-15 11:09:47 +08:00
Andrew Hsieh
2437e141fe Change sample native-codec's minSDK to android-21
android-L is renamed as android-21 in both coming SDK and NDK

Change-Id: I57b0dbe4d6e8add178dadfa6306bfc40aad27206
2014-10-15 11:03:55 +08:00
Hans Boehm
1b2269becc Make memory_order_acquire visible in global namespace
We were missing that using directive when including <atomic>.

Bug:17736764

Change-Id: I93673dc60cca47195ff7bd651840c77255fb2d4a
2014-10-15 11:00:28 +08:00
Andrew Hsieh
da84168fb2 Rename android-L to android-21
Change-Id: I1e781b15a867cf6283756f35f2b5955c96637c39
2014-10-15 10:48:04 +08:00
Haruki Hasegawa
13af1d8c37 Add missing function prototypes in time.h
Add clock_settime() and clock_nanosleep() function
prototypes in time.h.

Change-Id: I0eb45e465b3b48b9d4f3a4a8109a6f2d9c4f8ce2
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
2014-10-15 10:42:24 +08:00
Andrew Hsieh
a045a37c35 Refresh android-L headers (WW40)
linux/input.h: e2d86feb7b6b0b02b5e826c5f8836a6e104e9b71
stdlib.h and wchar.h: 3c5037f1b3b747e79d17a5f717d9f9c365132d33
sys/ucontext.h: 8e4d371091e5738346f5c6ad395b8487c2a5ec67

Change-Id: I80ced5cf212ff7c19628be10ba871ce1e6222d51
2014-09-30 09:24:03 +08:00
Andrew Hsieh
ec2d5674a8 Merge "Bump up clang vesion accepting __builtin_isnan __attribute__((pcs("aapcs")))" 2014-09-29 01:20:12 +00:00
Andrew Hsieh
154cb25408 Merge "Add posix_memalign to libc.so for API 17,18,19" 2014-09-29 01:20:03 +00:00
Andrew Hsieh
c316a240c5 Merge "Added sys/ucontext.h and sys/user.h to all API levels." 2014-09-29 01:18:07 +00:00
Andrew Hsieh
70319d4de1 Add posix_memalign to libc.so for API 17,18,19
note that arch-x86 has it in 797351fd3b

Change-Id: I34c5d0b6887bdc7bd3411a837f90e6788bdf7ff4
2014-09-26 16:28:36 +08:00
Andrew Hsieh
3dbef8fe11 Bump up clang vesion accepting __builtin_isnan __attribute__((pcs("aapcs")))
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
2014-09-26 16:20:56 +08:00
Andrew Hsieh
9eac1b60d3 Added sys/ucontext.h and sys/user.h to all API levels.
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
2014-09-19 15:50:12 +00:00
Andrew Hsieh
eef4aba8b8 Merge "Add missing posix_memalign function in x86 libc.so.functions.txt. (See b.android.com/28834)" 2014-09-18 15:40:38 +00:00
Varvara Rainchik
797351fd3b Add missing posix_memalign function in x86 libc.so.functions.txt.
(See b.android.com/28834)

android-17,-18,-19
	posix_memalign

Change-Id: I9e0632f9fa8cabd17a66ded2dc6f3553261c4054
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-09-18 12:06:03 +04:00
WenHan Gu
e257b563df Bugfix for libportable to make compile happy.
Just a tricky issue.
WRAP(stat) -> stat_portable, However we have a struct naming stat_portable.
Let's just rename it.

Change-Id: If0a33661d9d23750d4af45158d1336bb71a08cab
2014-09-16 11:01:28 +08:00
Andrew Hsieh
3941c44f61 Merge "Add support for x86 to hello-neon sample" 2014-09-15 17:43:18 +00:00
Andrew Hsieh
a8c78c384e Merge "Refresh android-L headers/libs (WW37)" 2014-09-15 16:59:09 +00:00
Andrew Hsieh
0fd7f83fce Refresh android-L headers/libs (WW37)
Change-Id: Ibdb7bebe7a0f73e767b7c62d1f603679163e768c
2014-09-12 13:49:48 -07:00
Anton Konovalov
57c928aaba Add support for x86 to hello-neon sample
The sample hello-neon was updated to support x86 ABI.
This change is required:
https://android-review.googlesource.com/107511

Change-Id: Icc175afd6785cf454d168973582d7d85455624b5
Signed-off-by: Anton Konovalov <anton.konovalov@intel.com>
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-09-12 16:56:10 +04:00
WenHan Gu
bce5ab4f3f libportable to adapt L header functions.
Change-Id: Ie15c321ee3b1b21f264b12641bc064ee33dec418
2014-09-09 02:53:13 +00:00
Andrew Hsieh
65df8d683e Remove __signalfd4 from 32-bit ABIs; remove basename_r and dirname_r from 64-bit ABIs
Change-Id: Iee4bf016a0e929209143ec3fa79d542d34fd8917
2014-09-07 19:44:00 -07:00
Andrew Hsieh
d715bffe04 Merge "Fixed atexit()" 2014-09-08 02:37:17 +00:00
Andrew Hsieh
01a406c8ee Merge "Fix build with sensor.h" 2014-09-08 02:37:06 +00:00
Andrew Hsieh
c6d393c1b2 Fix build with sensor.h
include stdbool.h to define bool for sensor.h

Change-Id: Ic7f57f098f2114b255db0d89fae8c5d16d7c59de
2014-09-04 20:11:46 -07:00
Andrew Hsieh
2db7f63f99 Fixed atexit()
See b.android.com/66595

Change-Id: I1d4c3db424c7f839e48756359cc095a6b1028ace
2014-09-04 13:17:25 -07:00
Andrew Hsieh
83fb2f6940 ptrace(3) should be varargs
See bionic 98b088dce70a2625d5cfa1872e427af5f06bfd99

Change-Id: I9e1993aa41fb8309beb1d653d48c5aacad44e4cd
2014-09-04 13:11:20 -07:00
Andrew Hsieh
6c2d94dfcf Add __gnuc_va_list in stdio.h to stop gcc from generating include-fixed/stdio.h
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
2014-09-04 13:00:28 -07:00
Andrew Hsieh
09532ff646 Add back arc4random_stir for 32-bit android-L
See bionic 5dea47221a116aa87b0c286230c944ed6b629636

Change-Id: Id7342a4ea6e21764869d1809a0f75d435baf8ac2
2014-09-04 12:57:06 -07:00
Marco Nelissen
f6d2ae9279 Add required permission to sample code
Bug: 15014196
Change-Id: I0edf8320e9eaa02031d564735c17c016d7e14fda
2014-09-04 11:21:03 -07:00
Andrew Hsieh
61b90c04ed Merge "Refresh 64-bit headers/libs (WW36)" 2014-09-04 17:57:44 +00:00
Andrew Hsieh
3f53b6f2fe Refresh 64-bit headers/libs (WW36)
sync to lmp-dev/bionic 1e010d60397db706cd3d1c4d5701a2bced441aa8

Change-Id: Ieed39d41eb0655d7c8f027bd038be1753a9e56a6
2014-09-03 22:36:28 -07:00
Andrew Hsieh
c7f04c38a0 Update android-L/include/android
Added more constants, and 6 new sensor functions

Change-Id: I0b8a028ec948ba66074e949bc20435cb05845a80
2014-08-28 14:29:28 +08:00
Andrew Hsieh
348e340245 Merge "Refresh 64-bit headers/libs (WW31)" 2014-08-01 15:55:34 +00:00