Commit Graph

263 Commits

Author SHA1 Message Date
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
David 'Digit' Turner
15af16fdf2 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.

Change-Id: Icaf38205389d2b49f0e9235c07df752da01a0167
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
e0ff98803f ndk: android-9: Add missing <sys/eventfd.h> header
For some reason, the header was missing from previous NDK releases.
Note: the function symbols are properly listed in arch-$ARCH/symbols/libc.so.functions.txt

Change-Id: I72bf307ccaf55c9b8fc344f5bbfa7b44ba673d62
2012-01-11 11:29:10 +01:00
David 'Digit' Turner
98f56b100c ndk: disable logs in release builds of native_app_glue library.
This patch disables all the logs from the 'native_app_glue' helper
library (used to implement native activities with the NDK), unless
you're building a debug build.

Change-Id: Iaad9d7c48a392ec119704074ab76e131d7806adb
2012-01-05 16:41:09 +01:00
David 'Digit' Turner
904f6923b8 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.

Change-Id: Ife165d09dceffdcd768b69c072d253cac898419c
2011-11-22 11:18:44 +01:00
David 'Digit' Turner
25e3c216f2 ndk: ANativeActivity: Fix 'clazz' member documentation.
As discussed on android-ndk, the member is misnamed

Change-Id: I2a5a1c8dce327ddf9ab7a4d14f4e2fdf62808753
2011-11-09 13:13:43 +01:00
Glenn Kasten
e14b1a23af Native media sample app for NDK API level 14
Change-Id: I72de0406eefb7ccf1a39944e814aa7c240d8184b
2011-11-02 18:04:54 -07:00
David Turner
689885684d Merge "Add README.txt for missing example" 2011-10-20 04:01:23 -07:00
Glenn Kasten
ccdb9cb2b0 Update native-audio example app
Additions:
 - volume
 - stereo position
 - mute / solo
 - explicit pause / play / loop buttons
 - spinner for URI strings

Change-Id: I92f3a191f715567531d03998d4b80e32cc9aceed
2011-10-19 17:28:37 -07:00
Glenn Kasten
bd690d7cd2 Add README.txt for missing example
Change-Id: I88236a3953f6b62f8b3c6f80ecd5a94608c9296e
2011-10-19 15:15:56 -07:00
David Turner
207118ad6d Merge "Replace match_parent with fill_parent; Declare importGLInit() and importGLDeinit() regardless DISABLE_IMPORTGL (otherwise compiling in c++ may fail)" 2011-10-18 01:46:40 -07:00
David 'Digit' Turner
8ece910f60 ndk: Update OpenSLES platform files for API level 14
Change-Id: I029b7eea0db05613389e8cd22b0440a56c850d53
2011-10-14 02:29:28 +02:00
David 'Digit' Turner
3a195fe3c5 Merge "ndk: Add OpenMAX headers and symbols for API level 14" 2011-10-13 16:54:06 -07:00
David 'Digit' Turner
2c4b4c1a3d ndk: Add OpenMAX headers and symbols for API level 14
Change-Id: I61f6f255357781d1912e25bd43815fd34ff83d0e
2011-10-14 01:52:11 +02:00
David 'Digit' Turner
7761beeb56 ndk: <time.h> Add missing clock_settime()/clock_nanosleep() declarations
Both functions are part of the C library since Android 1.5 / API level 3
but were missing a declaration in <time.h>, so add then here

+ Fix first parameter from 'int' to 'clockid_t' for clock_getres()
  and clock_gettime()

Fixes http://code.google.com/p/android/issues/detail?id=20140

Change-Id: Ic2191d5eb54475c149b9a6b8f3ba55bc8ed4643f
2011-10-12 03:43:29 +02:00
David 'Digit' Turner
085e2b14d5 ndk: remove obsolete libthread_db.a binaries
We don't use these since NDK r5, since we now provide
customized versions of the library under
$NDK/sources/android/libthread_db

Change-Id: I2e3103b85c14e75a00ba9cece7a872d2156f5ef9
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
0d7f537fea ndk: Refresh EGL/GLES Khronos headers
This patch updates the Khronos headers with updated version.
This mostly brings definitions (constants and types) related to
a bunch of new extensions. Since each extension is optional and
must be actively probed at runtime by the client program, this
doesn't change the NDK ABI at all. Moreover, which extension is
available depends on the specific hardware, not the Android system
version.

+ Define GLchar and GLvoid and adjust function signatures to
  use them instead of 'char' and 'void'

List of new extensions supported:

GLES 1.x
--------
GL_OES_vertex_array_object
GL_OES_EGL_image_external
GL_APPLE_texture_2D_limited_npot
GL_EXT_blend_minmax
GL_EXT_discard_framebuffer
GL_EXT_multi_draw_arrays
GL_EXT_read_format_bgra
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_lod_bias
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_env_enhanced_fixed_function
GL_IMG_user_clip_plane
GL_IMG_multisampled_render_to_texture
GL_NV_fence
GL_QCOM_driver_control
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_perfmon_global_mode
GL_QCOM_writeonly_rendering
GL_QCOM_tiled_rendering

GLES 2.0
--------
GL_OES_element_index_uint
GL_OES_get_program_binary
GL_OES_mapbuffer
GL_OES_packed_depth_stencil
GL_OES_texture_3D
GL_OES_texture_float
GL_OES_texture_float_linear
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_vertex_array_object
GL_OES_EGL_image_external
GL_AMD_program_binary_Z400
GL_EXT_blend_minmax
GL_EXT_discard_framebuffer
GL_EXT_multi_draw_arrays
GL_EXT_read_format_bgra
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_compression_dxt1
GL_IMG_program_binary
GL_IMG_read_format
GL_IMG_shader_binary
GL_IMG_texture_compression_pvrtc
GL_IMG_multisampled_render_to_texture
GL_NV_coverage_sample
GL_NV_depth_nonlinear
GL_QCOM_extended_get
GL_QCOM_extended_get2
GL_QCOM_writeonly_rendering
GL_QCOM_tiled_rendering

EGL:
----
EGL_ANDROID_recordable
EGL_NV_system_time

Change-Id: I26ae2aeb499539017cc35d0271f13bcfbf6f8a65
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
c63ce7a143 ndk: remove obsolete <android/api-level.h> headers
These are now auto-generated by the gen-platforms.sh NDK script

Change-Id: I5a38e956b58a34c5db96e24f2a46bc1ca1554376
2011-10-12 03:07:48 +02:00
David 'Digit' Turner
4fee0994c3 ndk: Fix GB x86 definitions for libm.so
The previous header and implementation were incorrect and didn't produce
correct results. This has been fixed in the internal Gingerbread branch.

Technically, this could result in ABI breakage, but the chances are very
low, and there are no official x86 Gingerbread release yet.

Change-Id: I0b2d857399358775d1490b72a1b75baac362f839
2011-10-12 03:07:47 +02:00
David 'Digit' Turner
985433be6c ndk: Remove obsolete API level 11 platform files
Change-Id: I95b0952722e1312c46ef02912407b81ea8c1b198
2011-10-10 21:52:17 +02:00
David 'Digit' Turner
e872f4e101 ndk: Remove obsolete platform files
Remove the prebuilt system shared libraries and unified symbol files
from development/ndk. We don't need them anymore:

  - the unified symbol files are replaced by separate functions/variables
    symbol list, which were added in a previous commit, i.e.:

	libc.so.txt  --> libc.so.functions.txt
	                 libc.so.variables.txt

 - the shared libraries are now generated on the fly by the NDK
   gen-platforms.sh script, from the functions/variables symbol lists.

Note that we need to keep the static libraries and runtime objects,
they are required to build the cross-toolchains and target binaries.

Change-Id: Ifa0a7f2d741ed32b80216561ca3f17e67df06ce9
2011-10-10 21:52:17 +02:00
David 'Digit' Turner
02053eb7a1 ndk: separate functions and variables symbol lists
This change introduces separate symbol lists for functions
and variables of each NDK system shared library.

Note that we don't remove the unified symbol files yet. This
will be done later when we complete other changes under ndk/,
namely the ability to generate platforms trees containing shell
libraries generated directly from them.

These files were generated using the following:

  cd development/ndk
  for DIR in platforms/*/*/lib; do
    for ARCH in arm x86; do
      $NDK/build/tools/gen-system-symbols $DIR $DIR/../symbols
    done
  done

This means that the symbol lists were generated by parsing the
existing prebuilt shared libraries under platforms/ and extracting
their function and variable names.

Change-Id: Ie1e791d98260a7f0d8d2e9f71323a7ea448f2dd4
2011-10-10 21:52:09 +02:00
Andrew Hsieh
7a1175701b Replace match_parent with fill_parent; Declare importGLInit() and importGLDeinit() regardless DISABLE_IMPORTGL (otherwise compiling in c++ may fail)
Change-Id: I6ed8bcbfe6d0500f2f0564e3dd06e2b6aafa35ff
2011-09-01 13:34:05 +08:00
David 'Digit' Turner
aa109fa96d am 7e901892: am c40f3ba4: am 3ee119cd: Merge "ndk: update JNIEXPORT declaration in <jni.h>"
* commit '7e901892af103efd41a3967d67063df988c3ebd7':
  ndk: update JNIEXPORT declaration in <jni.h>
2011-08-24 09:27:58 -07:00
David 'Digit' Turner
7e901892af am c40f3ba4: am 3ee119cd: Merge "ndk: update JNIEXPORT declaration in <jni.h>"
* commit 'c40f3ba4c6dfb84a4918c8ec7c721d307fdad02b':
  ndk: update JNIEXPORT declaration in <jni.h>
2011-08-24 09:23:40 -07:00
David 'Digit' Turner
bb3784d646 ndk: update JNIEXPORT declaration in <jni.h>
This patch updates the definition of JNIEXPORT in <jni.h> to
use the "default" ELF visibility attribute for JNI_OnLoad and
any function that uses the macro for its definition.

This is handy when a developer wants to use hidden visibility
by default by using a compiler flag like -fvisibility=hidden
in its Android.mk or custom build script.

Change-Id: I95112932731216a9a4986820a1875edfb3f52e5b
2011-08-23 16:08:17 +02:00
David Turner
5647257e6e am 3374f8ad: am 254a7090: am 0f97bab8: Merge changes Ibee74a22,Ifef4dc98
* commit '3374f8ad2cd4fcff7ab40bd80672b8b380242c84':
  NDK: x86 header file has incorrect definition for ptrdiff_t
  Fix size_t definition in x86 NDK header file
2011-08-09 13:37:17 -07:00
David Turner
3374f8ad2c am 254a7090: am 0f97bab8: Merge changes Ibee74a22,Ifef4dc98
* commit '254a709075bc78250b28d8dc34e859821d6499b6':
  NDK: x86 header file has incorrect definition for ptrdiff_t
  Fix size_t definition in x86 NDK header file
2011-08-05 08:02:33 -07:00
Mark D Horn
f907f4f9d4 NDK: x86 header file has incorrect definition for ptrdiff_t
See Bug http://code.google.com/p/android/issues/detail?id=19042

Change-Id: Ibee74a22ca8cb1e62b7a6faff01291c6c7a56775
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2011-08-04 17:11:15 -07:00
Mark D Horn
36f0d56517 Fix size_t definition in x86 NDK header file
Bug: http://code.google.com/p/android/issues/detail?id=19011

The incorrect #define was being used which caused the incorrect
definition for size_t when the standalone toolchain is used.

Change-Id: Ifef4dc987c542a9c5d8bb43d84d3fe1431de9aa0
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2011-08-03 15:11:56 -07:00
David 'Digit' Turner
e8ceb3f0b6 am 16a7447e: am d681f257: am bb2c6132: am 718e8b89: Merge "ndk: arm: also update other CRT runtime objects."
* commit '16a7447e3f2ee49dc23729fb20a3077d37fd2440':
  ndk: arm: also update other CRT runtime objects.
2011-07-15 14:12:19 -07:00
David 'Digit' Turner
16a7447e3f am d681f257: am bb2c6132: am 718e8b89: Merge "ndk: arm: also update other CRT runtime objects."
* commit 'd681f257aa47dc643db5222796e9a2ce7ed42437':
  ndk: arm: also update other CRT runtime objects.
2011-07-15 11:21:55 -07:00
David 'Digit' Turner
26f4ec6044 am 6b44056d: am 6e837041: am 09d3d318: am c13e5c1c: Merge "ndk: Fix android-3/arch-arm crt{begin,end}_so.o"
* commit '6b44056dcffed6ac23140969b60257fdfd82b1ac':
  ndk: Fix android-3/arch-arm crt{begin,end}_so.o
2011-07-15 11:20:57 -07:00
David 'Digit' Turner
04a343244f am ecab2abe: am 0663014f: am 75266abb: am 0db3eb4a: Merge "ndk: Add crtbegin_so.o / crtend_so.o to android-3"
* commit 'ecab2abe5ed7aa2696aae08a7678a982ffcc9347':
  ndk: Add crtbegin_so.o / crtend_so.o to android-3
2011-07-15 11:20:54 -07:00
David 'Digit' Turner
6b44056dcf am 6e837041: am 09d3d318: am c13e5c1c: Merge "ndk: Fix android-3/arch-arm crt{begin,end}_so.o"
* commit '6e83704102ef91e3e8d217be2b8906a746c54d9a':
  ndk: Fix android-3/arch-arm crt{begin,end}_so.o
2011-07-15 10:47:20 -07:00
David 'Digit' Turner
ecab2abe5e am 0663014f: am 75266abb: am 0db3eb4a: Merge "ndk: Add crtbegin_so.o / crtend_so.o to android-3"
* commit '0663014fef1f9f7b44386a5f6fde97bd8fe9e452':
  ndk: Add crtbegin_so.o / crtend_so.o to android-3
2011-07-15 10:47:16 -07:00