Commit Graph

424 Commits

Author SHA1 Message Date
Andrew Hsieh
dab6072046 Refresh development/ndk/platforms/android-9/arch-x86/include/machine
Apply changes in bionic/libc/arch-x86/include/machine to
development/ndk/platforms/android-9/arch-x86/include/machine:

   commit 5fbf2e09921723cfdea75e83c1fac2080f0ad564

Change-Id: Ie0fe711ae4c866d9c1300430d5e9613ccb82da22
2012-04-06 13:29:08 +08:00
David 'Digit' Turner
16c0f25354 ndk: ANativeActivity: Fix 'clazz' member documentation.
As discussed on android-ndk, the member is misnamed

Change-Id: I2a5a1c8dce327ddf9ab7a4d14f4e2fdf62808753
2012-04-03 19:30:08 +08:00
Andrew Hsieh
3f59495d17 Remove auto-gen project.properties
It's auto-gen by tool from default.properties in the same dir, etc.

Change-Id: I081ecb809699d42b707218b08e61b97fc9a51f1a
2012-04-02 18:32:04 +08:00
David 'Digit' Turner
b2f20362ac 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.
2012-04-02 18:15:50 +08:00
Glenn Kasten
00038deedc Native media sample app for NDK API level 14 2012-04-02 18:08:03 +08:00
David 'Digit' Turner
e43487b854 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
2012-04-02 18:05:57 +08:00
David 'Digit' Turner
ef0d31ec73 ndk: <signal.h>: Increase _NSIG definition to 64
This is a minor update to this NDK header to better match the upstream definition.
2012-04-02 18:03:00 +08:00
David 'Digit' Turner
015d0543d2 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

Change-Id: Ib093058e8d7a7554d8329a40e102cde11d065932
2012-04-02 17:59:26 +08:00
David 'Digit' Turner
002d5366b6 ndk: <unistd.h>: minor cleanup
- 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
2012-04-02 17:54:27 +08:00
David 'Digit' Turner
3da072d28f 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)
2012-04-02 17:41:16 +08:00
David 'Digit' Turner
1fe0de682b ndk: minor header update
<net/ethernet.h>: new header
<netdb.h>: add EAI_ADDRFAMILY definition
2012-04-02 16:07:07 +08: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
David 'Digit' Turner
e938d97d6b 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.
2012-04-02 15:06:11 +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
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
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
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
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
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
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 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