Commit Graph

168 Commits

Author SHA1 Message Date
Andrew Hsieh
e3699d2e9b am e00aea97: am 2128eb22: am 61e72dbc: Merge "ndk: Fix ipv6 related headers"
* commit 'e00aea9715d61fcf3816dbb0c9b9434081b317ef':
  ndk: Fix ipv6 related headers
2012-04-02 08:37:38 -07:00
Andrew Hsieh
c64973f7bc am 95b9de91: am 0480b898: am 26f8b539: Merge "ndk: minor update to <netinet/...> headers."
* commit '95b9de9149d78146c99e06d2e7c75b723a2c8899':
  ndk: minor update to <netinet/...> headers.
2012-04-02 08:00:29 -07:00
David 'Digit' Turner
f4e62ff4a3 ndk: Fix ipv6 related headers
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>
2012-04-02 16:04:42 +08:00
David 'Digit' Turner
6c32dacf97 ndk: Fix <sys/atomics.h> declarations.
The atomic operations exported by the platform's C library do not
provide full memory barriers. This can result in incorrect results
when NDK machine code linked against them runs on multi-core devices.

While the bug has been fixed in the platform, this NDK header change
ensures that any source code that includes <sys/atomics.h> will end
up using a correct implementation of these functions, based on the
corresponding GCC builtins.

These builtins always provide a full barrier and have reasonable
performance. Application developers who depend on <sys/atomics.h>
should recompile their unmodified sources against this version
of the NDK as soon as possible.
2012-04-02 15:59:46 +08:00
David 'Digit' Turner
5704b40d70 ndk: minor update to <netinet/...> headers.
This patch contains a minor update to the netinet headers from the C library.
Most of the changes come from later platform release, but can be safely back-ported
to previous API levels since they don't change the ABI:

- <netinet/icmp6.h>, <netinet/ip6.h>: new headers
- <netinet/in.h>: now always include <linux/ipv6.h> by default
- <netinet/in6.h>: add macros: IN6_IS_ADDR_ULA, IN6ADDR_LOOPBACK_INIT
- <netinet/ip.h>: add macro: IPTOS_MINCOST
- <net/if_ether.h>: always include <sys/types.h> by default.
2012-04-02 15:31:20 +08:00
David 'Digit' Turner
554c5eca78 ndk: libc: Add RLIM_RTTIME to <asm-generic/resource.h>
This is a back-port of a fix that was performed in 4.0.1 to all previous platforms.
2012-04-02 15:14:10 +08:00
David 'Digit' Turner
34c6c855bc ndk: arm: Update <asm/ptrace.h> and <asm/user.h>
This is a minor update to two ARM-specific kernel headers.

- <asm/ptrace.h>: Add two new constants
- <asm/user.h>: Add 'struct vfp_user' and 'struct vfp_user_exc'
2012-04-02 15:11:02 +08:00
Andrew Hsieh
a79e56e2f8 Fixed inconsistent minSdkVersion and target= in NDK samples
Also removed Dummy.java and auto-gen files
Inspired by http://code.google.com/p/android/issues/detail?id=20017
2012-04-02 15:00:03 +08:00
Andrew Hsieh
0523af7ca2 Fixed to #include correct 32-bit headers
Corrected for example <asm/io.h> to include io_32.h instead of io_64.h
(which is missing, BTW).

Copied from the results of commit (same title) in bionic.git:
126601dd3f5303b50033dcb88945d928aa764aa4
2012-04-02 14:35:36 +08:00
Andrew Hsieh
08f4a2848e am b7e584c9: am b002fa5f: am 2c950473: Merge "MIPS platform files for building the NDK"
* commit 'b7e584c94b23aab20377660eea7f9fd062321c7a':
  MIPS platform files for building the NDK
2012-03-30 22:35:22 -07:00
Andrew Hsieh
eb112748e2 am 844020ac: am 7512bce0: am 49513bb2: Merge "[MIPS] crt* Object files generated from .S files. The object files are generated with the assembler built from binutils-2.21"
* commit '844020ace77515e55a6dc7a09e17c1a90f4178ac':
  [MIPS] crt* Object files generated from .S files. The object files are generated with the assembler built from binutils-2.21
2012-03-30 22:35:21 -07:00
Andrew Hsieh
2c9504731b Merge "MIPS platform files for building the NDK" 2012-03-30 19:10:05 -07:00
Raghu Gandham
22d3d88a7a [MIPS] crt* Object files generated from .S files.
The object files are generated with the assembler
built from binutils-2.21
2012-03-30 18:27:51 -07:00
Chao-Ying Fu
718e73cf26 MIPS platform files for building the NDK
Change-Id: If19af75003aeb8872d23d7901f01c434bdc58a5f
2012-03-30 18:09:22 -07:00
Andrew Hsieh
cb69624158 am 9c8dbc67: am 0e8d9416: am 1a94764c: Merge "ndk: Add MIPS Platform files which contain C runtime headers and sources of crt* assembler files"
* commit '9c8dbc678008662dbcfc442650da099839b4bbe1':
  ndk: Add MIPS Platform files which contain C runtime headers and sources of crt* assembler files
2012-03-28 23:49:35 -07:00
Andrew Hsieh
84efd3564b Merge "Fixed to #include correct 32-bit headers" 2012-03-28 19:23:51 -07:00
Andrew Hsieh
1a94764ca2 Merge "ndk: Add MIPS Platform files which contain C runtime headers and sources of crt* assembler files" 2012-03-28 18:18:15 -07:00
Raghu Gandham
a8a0638b9e ndk: Add MIPS Platform files which contain C runtime headers
and sources of crt* assembler files

Change-Id: I10547e8b589d36a7937a0833d86d4406a232aa2c
Signed-off-by: Raghu Gandham <raghu@mips.com>
2012-03-27 15:45:08 -07:00
Andrew Hsieh
d3830daec2 am 314dea12: am 58f599f9: am 2038b5ac: am 799fada5: Merge "ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefin
* commit '314dea12dfec428d9e832ab10a52e75dea1a130e':
  ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)
2012-03-27 10:19:43 -07:00
Andrew Hsieh
4f02cbed4d am 5a0380a0: am 360a16af: am 47de63df: am 2e71de56: Merge "ndk: <signal.h>: include <asm/sigcontext.h>"
* commit '5a0380a06f93fd09864e3e45a760ec654763e443':
  ndk: <signal.h>: include <asm/sigcontext.h>
2012-03-27 10:19:42 -07:00
Andrew Hsieh
2038b5acc5 am 799fada5: Merge "ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)"
* commit '799fada598b048b02bf63c0eea9b6d676f9be142':
  ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)
2012-03-27 09:39:02 -07:00
Andrew Hsieh
47de63df5c am 2e71de56: Merge "ndk: <signal.h>: include <asm/sigcontext.h>"
* commit '2e71de568e54242952726e437fab92508353a33b':
  ndk: <signal.h>: include <asm/sigcontext.h>
2012-03-27 09:39:01 -07:00
Andrew Hsieh
799fada598 Merge "ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and INT_MIN. Without this fix, the following lines will fail when configuring gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)" 2012-03-27 04:33:53 -07:00
Andrew Hsieh
29539e93c9 Fixed to #include correct 32-bit headers
Corrected for example <asm/io.h> to include io_32.h instead of io_64.h
(which is missing, BTW).

Copied from the results of commit (same title) in bionic.git:
126601dd3f5303b50033dcb88945d928aa764aa4

Change-Id: I49547d5253459396bfc85012b1fd263ad5c7e9d0
2012-03-24 11:28:40 +08:00
Andrew Hsieh
f9e6097f2f Fixed inconsistent minSdkVersion and target= in NDK samples
Also removed Dummy.java and auto-gen files
Inspired by http://code.google.com/p/android/issues/detail?id=20017

Change-Id: I5a59c86b8b85c15eccca3b3157459b70a4815684
2012-03-20 14:37:17 +08:00
Raghu Gandham
c06e37eb51 ndk: Include limits.h in wchar.h as it contains the definitions for INT_MAX and
INT_MIN. Without this fix, the following lines will fail when configuring
gnu stdlibc++ library. (INT_MAX and INT_MIN are undefined.)

    #define  WCHAR_MAX   INT_MAX
    #define  WCHAR_MIN   INT_MIN

Change-Id: Ifa87cf011cf7068c48755fc9ce5c0d73e95ef2dc
Signed-off-by: Chao-Ying Fu <fu@mips.com>
2012-03-15 17:24:23 -07:00
David 'Digit' Turner
c65cfeb2b2 ndk: <signal.h>: include <asm/sigcontext.h>
This patch modifies <signal.h>, starting from API level 8,
to include <asm/sigcontext.h>.

It is required to be able to use <signal.h> on a MIPS
platform. See https://android-review.googlesource.com/32281

Change-Id: I720259541fa7e2a4d6a428eae9fd4882c5355c31
2012-03-13 13:49:02 +01:00
Jean-Baptiste Queru
61b8a98d74 am 077e4bb8: am 44039c68: am f987c05c: am 9ce69a5f: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"
* commit '077e4bb8827a0a055e8d3cf35428c98083b063ab':
  Make sure __u64 is defined even for strict ansi or -std=c99
2012-02-13 14:42:45 -08:00
Jean-Baptiste Queru
44039c689e am f987c05c: am 9ce69a5f: Merge "Make sure __u64 is defined even for strict ansi or -std=c99"
* commit 'f987c05c776918d121b7e2095a232e4854fde8a8':
  Make sure __u64 is defined even for strict ansi or -std=c99
2012-02-13 14:29:58 -08:00
Scott Main
e1b0a27c90 am 90d9ce81: am e4fd5043: am de797a2f: Merge "docs: fix minsdkversion for native activity sample" into ics-mr1
* commit '90d9ce81d0c35b282d48b77b8e7b8466bd758a7a':
  docs: fix minsdkversion for native activity sample
2012-02-09 12:20:44 -08:00
Scott Main
41b5bb95c3 docs: fix minsdkversion for native activity sample
Change-Id: I2d45207182f6a5b1743b574f7ab10251efd3a17a
2012-02-09 12:10:27 -08:00
Martin Storsjo
6dd4b91b32 Make sure __u64 is defined even for strict ansi or -std=c99
The x86 asm headers define __u64 regardless of __STRICT_ANSI__.
The linux/videodev2.h header requires __u64 to be defined, thus
this fixes compiling with -std=c99 when including the
linux/videodev2.h header.

In glibc, the asm/types.h header defines __u64 regardless of
__STRICT_ANSI__.

This commit copies the updated header from bionic into the ndk
platform headers.
2012-01-27 17:54:02 +02:00
David 'Digit' Turner
e42979c5cb ndk: Remove obsolete header and library files.
Change-Id: I1d18b1364c1aa90aebdc068eade6aa68e43f6f2f
2012-01-25 11:40:50 +01:00
David 'Digit' Turner
af4519e953 ndk: Fix ipv6 related headers
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>

Change-Id: Ibd0d44fd801affc6ca405e96982a73f9a630bdba
2012-01-11 17:36:09 +01:00
David 'Digit' Turner
e56aece818 ndk: API level 14: Add C library symbol files
Symbols for both arm and x86.

+ missing declarations for getpwnam_r and getpwuid_r which were implemented
  in Android 4.0.1. This didn't appear in previous comparison because the
  platform header always declare these in <pwd.h>, so it never changed
  when the functions were added. They appear in libc.so.functions.txt though.

The arm symbols are generated from the library files extracted from the
'yakju' platform build for 4.0.1 a.k.a. ITL41D.

The x86 symbols are generated by building the corresponding libraries
for the full_x86-eng product, using the same Bionic sources.

+ x86: Add missing symbols for "siglongjmp" and "sigsetjmp" which are not
  exported by the gingerbread version of full_x86-eng libc.so. This was
  checked with a fresh build of the product from the current gingerbread
  tree on the AOSP server. Probably a bug, but a minor one.

Change-Id: I41d3eb28cecc1989e1bec4a00ac236c4b262c2be
2012-01-11 15:55:11 +01:00
David 'Digit' Turner
c8357964fc ndk: API level 12: Add ARM libc symbol files
Extracted from the tervigon build for android-3.1_r1 a.k.a. HMJ37

Change-Id: Idd914b3a4879174f98569b3a9bbb6cf3d48ef221
2012-01-11 15:53:50 +01:00
David 'Digit' Turner
7d8f5ae269 ndk: API level 11: Add libc.so + libm.so symbol files
Only for arm, since oneycomb isn't supported on x86
(i.e. API levels 11 to 13).

Change-Id: I662400ed7e222ea070dd1f9f6681c21971b589e1

ndk: API level 11: Add libm.so symbols for ARM

Change-Id: I5688b57557ad7021d49f458e1b9519e8800d795e
2012-01-11 15:48:37 +01:00
David 'Digit' Turner
485ea2e3d2 ndk: <sys/stat.h>: Add utimensat() to API level 12
Change-Id: If7e0ac5890c3dd2288f2d7541f6f92cd695bff97
2012-01-11 11:29:11 +01:00
David 'Digit' Turner
a58e7602fe ndk: arm: Update <asm/ptrace.h> and <asm/user.h>
This is a minor update to two ARM-specific kernel headers.

- <asm/ptrace.h>: Add two new constants
- <asm/user.h>: Add 'struct vfp_user' and 'struct vfp_user_exc'

Change-Id: I25d31bb33a9102e3c74a169c28dce66211ced636
2012-01-11 11:29:11 +01:00
David 'Digit' Turner
21fc12da17 ndk: libc: Add RLIM_RTTIME to <asm-generic/resource.h>
This is a back-port of a fix that was performed in 4.0.1 to all previous platforms.

Change-Id: Ie4da3564913c22e815e37b1b000080b9bd06e3ad
2012-01-11 11:29:11 +01:00
David 'Digit' Turner
fe012f597f ndk: <dlfcn.h>: dladdr() takes a 'const void*' parameter, not 'void*'
This is a back-port to API level 8 of a non-ABI-breaking change of the declaration.

Change-Id: I4f573da12c9cbd908afb5b646f018033bbe82503
2012-01-11 11:29:11 +01:00
David 'Digit' Turner
8e2862730a ndk: <wchar.h>: Add wcscasecmp and wcsncasecmp for API level 11
Change-Id: Ibb399798b159405f4e059c823601d600a7953f0d
2012-01-11 11:29:11 +01:00
David 'Digit' Turner
47c55f4af2 ndk: <unistd.h>: Update for API level 11 + minor cleanup
- Add pread64(), pwrite64(), ftruncate64() for API level 11
- 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: Ic9e44c0ea3dc1202d3c3478bdb2b6006e83b08dc
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
bca6402398 ndk: <time.h>: Add new time functions to API level 11
This patch adds timegm(), timelocal(), time2posix() and posix2time()
to this standard library header.

Change-Id: Ic7b42eece8c11eb040d0522ed8b54d36b7404f9a
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
3970aef4d3 ndk: <stdlib.h>: Add mkdtemp() for API level 11
Change-Id: Ic51ba2fe06e2a62c8ca467e88cef9988c50849df
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
fed3dfbb08 ndk: <signal.h>: Increase _NSIG definition to 64
This is a minor update to this NDK header to better match the upstream definition.

Change-Id: I7b7e84b65f7a45d6395ba9831ee72ad120f989db
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
aa566ea256 ndk: <sched.h>: Add cpu_set_t and related functions to API level 11
Add the following definitions related to cpu affinity to <sched.h>:

- cpu_set_t and associated macros: CPU_ZERO, CPU_SET, CPU_CLR, CPU_ISSET, CPU_EQUAL,
  CPU_COUNT, CPU_AND, CPU_OR, CPU_XOR.

- sched_getcpu(), sched_getaffinity() and sched_setaffinity()

- define macros for dynamically-sized cpu_set_t variables, i.e.:
   CPU_ALLOC_SIZE, CPU_ALLOC, CPU_FREE, CPU_ZERO_S, CPU_SET_S, CPU_CLR_S,
   CPU_ISSET_S, CPU_EQUAL_S, CPU_COUNT_S

NOTE: You must define _GNU_SOURCE before including the header to get them.

Change-Id: I37338573c7af092118e7987420f6a930b6cc24b1
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
bea05255de ndk: <sys/cdefs.h> minor update
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)

Change-Id: I5fd13224181e2f757fb01cb99c93508c3a6d9e13
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
e4f252821e ndk: <pthread.h>: formatting + updates
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

It also adds pthread_atfork() for API level 11 (3.0)

Change-Id: Ie814208335ed102d4c178a4c373e6963e5dcc9dd
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
42dddab4d6 ndk: minor header update
<net/ethernet.h>: new header
<netdb.h>: add EAI_ADDRFAMILY definition

Change-Id: Ib29d28adcde6fdb5167d3b7b05913ef2eed22412
2012-01-11 11:29:10 +01:00