Commit Graph

220 Commits

Author SHA1 Message Date
David 'Digit' Turner
13e07e5c66 am 28eeece2: am 755d75f4: Merge "ndk: Add missing update arm C library for android-9 platform."
* commit '28eeece2152a6dd78bc630a6a0924ceb6921118a':
  ndk: Add missing update arm C library for android-9 platform.
2011-04-14 03:53:59 -07:00
David 'Digit' Turner
f76679f6ba ndk: Add missing update arm C library for android-9 platform.
The C library was updated in Gingerbread to support. The corresponding
headers were updated, but the change was missing an updated library,
used for proper linking of new functions (e.g. pthread_rwlock_init).

Fix for http://code.google.com/p/android/issues/detail?id=12990

For the record, this binary was simply pulled from an AVD created
with the standard SDK platform image for Gingerbread.

Change-Id: Ic30921582f143adfc4bcfe3f70a6293530fe0202
2011-04-14 11:44:04 +02:00
David 'Digit' Turner
773c80fdb1 am ffb13684: am 957b0ebe: am bfdff660: Merge "ndk: x86: Update libc.so and libstdc++.so"
* commit 'ffb13684024154fc98c27d32c40c090a4ea82e4e':
  ndk: x86: Update libc.so and libstdc++.so
2011-04-11 17:38:17 -07:00
David 'Digit' Turner
ffb1368402 am 957b0ebe: am bfdff660: Merge "ndk: x86: Update libc.so and libstdc++.so"
* commit '957b0ebeb15ec37059705558d10ab01505853738':
  ndk: x86: Update libc.so and libstdc++.so
2011-04-11 17:32:49 -07:00
David 'Digit' Turner
7e9db3d22b ndk: x86: Update libc.so and libstdc++.so
This patch updates the system C and C++ libraries used for
the x86 ABI. We remove the old binary targetting API level 5
(Eclair) since we don't support x86 on it anyway, and put new ones
generated from the AOSP tree with the full_x86-eng build product.

This is necessary to be able to prebuild STLport binaries for
the x86 NDK.

The binaries corresponding to the AOSP platform/bionic.git tree
using the following SHA-1, when building full_x86-eng:

    4c090434a4fcffb3a8bb7ebee7cc6e52befceeae

Change-Id: I63c71554c655f18a6a6f9135074792a8681098bb
2011-04-07 17:22:28 +02:00
David 'Digit' Turner
360270d5e9 am 5aaf5c28: am 282bd952: am 9dacf7ee: Merge "Fix two incorrect <android/input.h> function declarations."
* commit '5aaf5c288c34853725a3bed4d369d25108073101':
  Fix two incorrect <android/input.h> function declarations.
2011-03-21 07:51:41 -07:00
David 'Digit' Turner
5aaf5c288c am 282bd952: am 9dacf7ee: Merge "Fix two incorrect <android/input.h> function declarations."
* commit '282bd952be2e15391d7e33fa0a9ffab378d374ca':
  Fix two incorrect <android/input.h> function declarations.
2011-03-21 07:44:29 -07:00
David 'Digit' Turner
9d0136004f Fix two incorrect <android/input.h> function declarations.
The <android/input.h> header file provided with the NDK contained
two invalid function declarations. This patch fixes them.

Note that this breaks the API, but fixes the ABI (which was previously
broken). It is likely that any application developer that tried to use
these function had problems with them anyway.

Another patch to ndk.git will add a note to the changelog and to
the documentation to explain the issue.

+ Fix some documentation typos.

Change-Id: I0f4517458257ff3242127de9f9099f39948c0a56
2011-03-21 13:57:12 +01:00
David 'Digit' Turner
64afc658c5 am a7414978: am 799afe8a: am c5db1533: Merge "Fix pwrite() declaration in NDK platform headers."
* commit 'a74149786dd7ea48b257337d6c22e19f52a30b45':
  Fix pwrite() declaration in NDK platform headers.
2011-03-15 12:57:23 -07:00
David 'Digit' Turner
a74149786d am 799afe8a: am c5db1533: Merge "Fix pwrite() declaration in NDK platform headers."
* commit '799afe8aa310cdb5604f15662a1964a647725c2e':
  Fix pwrite() declaration in NDK platform headers.
2011-03-15 12:52:49 -07:00
David 'Digit' Turner
9ad28785ba Fix pwrite() declaration in NDK platform headers.
The corresponding fix is already in the Bionic libc source tree.

See http://code.google.com/p/android/issues/detail?id=8908

Change-Id: Id1329f996cd6708e46f48d33d998b8b3d26bf5d7
2011-03-15 16:30:35 +01:00
Iliyan Malchev
1dcd97644a development: remove LOCAL_PRELINK_MODULE
Change-Id: I6ae5c92aba05c3991bda260c264de835244f7f3e
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-14 14:24:21 -07:00
David 'Digit' Turner
b2c8dbeafb am 5ac5e8d7: Merge "ndk: Fix stdint.h definitions for C++"
* commit '5ac5e8d7b5c4707190d367c827a7562b08c8e50d':
  ndk: Fix stdint.h definitions for C++
2011-03-14 10:53:18 -07:00
David 'Digit' Turner
c7d8870875 ndk: Fix stdint.h definitions for C++
Fix the stdint.h header for C++ inclusion. The limit and constant related macros
should only be defined if __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are
defined, respectively.

Change-Id: I85b00ed857f40b9c17d530f1405f0f098c5f10f3
2011-03-11 14:42:12 +01:00
David 'Digit' Turner
c15487127a am 9e17cec2: Merge "ndk: Fixes PTHREAD_RWLOCK_INITIALIZER definition."
* commit '9e17cec235cbcd3832722a975e9215bf23b6a9ea':
  ndk: Fixes PTHREAD_RWLOCK_INITIALIZER definition.
2011-03-10 01:55:28 -08:00
David 'Digit' Turner
114db2a1c4 ndk: Fixes PTHREAD_RWLOCK_INITIALIZER definition.
This is a fix for http://code.google.com/p/android/issues/detail?id=15306

Also see https://review.source.android.com//#change,21699 for the corresponding
fix in the C library headers.

Change-Id: I1c46ee9fc7eb120a98f47719a0407b81001f5ac0
2011-03-10 10:24:52 +01:00
David Turner
a7a4a16d5e am 0b80c5e8: am d2454506: Merge "Move files to proper location in development/ndk/platforms"
* commit '0b80c5e83c057c42d3e3699593d89525c01a4096':
  Line Wrapping General settings Set "Never join already wrapped lines" to true.
  Move files to proper location in development/ndk/platforms
  Blank Lines within class declarations Set "Before field declarations" value to 0.
2011-02-28 10:07:16 -08:00
David Turner
0b80c5e83c am d2454506: Merge "Move files to proper location in development/ndk/platforms"
* commit 'd24545065acbacc7e9f1482f08013a4046640ad7':
  Move files to proper location in development/ndk/platforms
2011-02-28 09:13:43 -08:00
David 'Digit' Turner
aa27646057 ndk: Add headers and libraries for API level 11 (Honeycomb)
HC added the following:

- <android/asset_manager.h>: new functions to deal with 64-bit file offsets/sizes.

- <android/input.h>: new AMETA_XXX constants

- <android/keycodes.h>: new AKEYCODE_XXX constants

- <android/native_activity.h>: Added obbPath to the ANativeActivity structure.
  Note that this doesn't break the ABI because the structure is always
  allocated by the system.

Change-Id: I61a03d7b8a839318e5f0d8074d2272ba874219b7
2011-02-09 23:16:46 +01:00
Bruce Beare
a9b5a9d315 Move files to proper location in development/ndk/platforms
Change-Id: I1b001e7b8c878bfc7213556f19c6812d64d46ef3
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2011-02-09 08:58:48 -08:00
David 'Digit' Turner
cbc7f69548 ndk: Replace 'asm' with '__asm__' in <asm/byteorder.h>
See https://review.source.android.com/#change,20076 for details.
Essentially this is to allow compilation with -std=c99

Change-Id: I4c830c38b2615352765ee40773c5aa701e5d2b68
2011-01-05 23:08:29 +01:00
Martin Storsjo
80736a1bca Use __asm__ instead of asm in public libc headers
If compiling userland code with -std=c99, the current header produces an
error. The content of this header originally is a kernel internal header,
where asm() is acceptable. In a header visible to userland, this should be
__asm__ instead.

This change is done for all newly extracted headers by the extraction
script, by https://review.source.android.com/19406, which was recently
merged.

Change-Id: I69332124a56577673a14e84cd7d9a4462c307724
2010-12-28 21:47:03 +01:00
David 'Digit' Turner
9ddaf219fa Add missing declarations to <netinet/in.h>
These are required to properly build the Boost libraries with the
Android NDK.

Change-Id: Ice272f24b359ffce19838f5500641c4fcda8e57f
2010-12-14 14:42:52 +01:00
David 'Digit' Turner
90887627f1 ndk: Update headers and libraries for API level 9
Change-Id: I39eded0065145803b51b22cdc18abef43abe426c
2010-12-10 17:16:24 +01:00
David 'Digit' Turner
1e7011fcd5 ndk: Add auto-generated <android/api-level.h>
See ndk.git/build/tools/dev-generate-api-levels.sh

Change-Id: Id64e565e7da6bf23f4bfa0fca52a06dbfe843c37
2010-11-22 22:38:57 +01:00
Glenn Kasten
809ec924d2 Native audio example
Change-Id: Ia48597d3e94d178ec95a396c545e4a95de7c88f8
2010-11-05 17:38:11 -07:00
David 'Digit' Turner
186ce6d543 Merge "NDK: Last cleanup of the platform headers" into gingerbread 2010-11-04 04:09:48 -07:00
David 'Digit' Turner
3c7c38b2bb NDK: Last cleanup of the platform headers
- fix a declaration omission in 3/<grp.h>
- add missing 8/<err.h>
- simplify 8/<stdio.h>
- update 9/ headers to the latest Bionic versions
- fix a typo in android_native_app_glue.h
- use __BEGIN_DECLS .. __END_DECLS whenever possible.
- remove C++-style comments from headers

Change-Id: I58b98b3973cde494436206194ba33416a11ca8ee
2010-11-04 04:07:16 -07:00
David 'Digit' Turner
cc5809bf2f Merge "ndk: Use __ANDROID__ instead of ANDROID." into gingerbread 2010-11-04 04:06:31 -07:00
David Turner
fc187b1e3a Merge "update native_window.h ndk header" into gingerbread 2010-11-02 01:49:47 -07:00
Mathias Agopian
3323f5912c update native_window.h ndk header
Change-Id: I70178a1ddd94279a102c2d25d2ce0459cec9d13a
2010-11-01 14:30:30 -07:00
David 'Digit' Turner
a99a3ff2b2 ndk: Use __ANDROID__ instead of ANDROID.
The platform headers use the ANDROID macro as a platform test.
This macro is set by the NDK build script explicitely, but it
is better to use __ANDROID__, which is also set by our toolchain
as a compiler prebuilt macro.

This allows usage of these headers with our standalone toolchain.

Change-Id: I431c54e29e502bb9da7a52ef7a58a6341211b4db
2010-10-30 20:41:23 -07:00
David 'Digit' Turner
10795d840b Declare localeconv() in <locale.h>
The function is not implemented by our C library, but it is not
possible to build GNU libstdc++-v3 if the declaration is not part
of this header.

Change-Id: Iff6fa63465dde0d4e38c0f91709475bb35b31af9
2010-10-28 17:39:11 -07:00
Mathias Agopian
793509c983 Greatly simplify sample code by using EGL_NATIVE_VISUAL_ID.
This is the preferred way of selecting config starting in
gingerbread, this procedure guarantees forward compatibility.

Change-Id: Iff55b545e722205bd029b92da33368129253b8a3
2010-10-25 18:03:55 -07:00
Mathias Agopian
f0c011224a simplify a bit the native-activity sample code
there is no reason to set a depth buffer. this is somewhat confusing.
also, it's better to always specify EGL_SURFACE_TYPE.

Change-Id: Ieff499b0b69a3812773cf3fe08b8bf1ca57a82d9
2010-10-25 17:59:06 -07:00
Dianne Hackborn
a77c1bdd4a Work on issue #3126018: No way to specify NativeActivity's native method
Update the header file to match the platform change.

Also add an Android.mk so I can actually build this sample when I want to.

Change-Id: I30c3c43fba7c233c59005d916888a46dc7049651
2010-10-25 17:01:49 -07:00
Dianne Hackborn
c2d70d2a98 Update native headers/library to match current platform.
Change-Id: I40ef2fa924881b9653fcddcd09c14455ac1ef37e
2010-10-21 21:09:47 -07:00
Dianne Hackborn
834eb602eb Fix bug in native activity demo.
Can't get surface size until after it is made current.

Change-Id: I34847775bde680d05767b6b4cfa8e547eb56aa6d
2010-10-19 18:36:53 -07:00
Xavier Ducrohet
0574dc4cfd Dummy java file in native-only apps is not needed anymore.
The tools r8 ant script can handle not having any Java file
at all.

Change-Id: Id14a4a434deb188a5aa1580378fcd1a6445b6e83
2010-10-13 15:34:37 -07:00
David 'Digit' Turner
2e9b39e457 Merge "ndk: Add missing OpenSLES headers and libraries." into gingerbread 2010-10-12 10:31:53 -07:00
David 'Digit' Turner
51bcfb7110 ndk: Add missing OpenSLES headers and libraries.
Change-Id: I5444f8701a2b8ad8e99fffc6906bad1bf101530f
2010-10-12 18:29:00 +02:00
David 'Digit' Turner
3c72deb3f4 Merge "ndk: remove undefined symbols from system headers" into gingerbread 2010-10-11 06:02:15 -07:00
Jeff Brown
028c403286 Merge "Update NDK with recent changes." into gingerbread 2010-10-08 12:45:05 -07:00
David 'Digit' Turner
7c2ba504e9 ndk: remove undefined symbols from system headers
This change removes the declaration of functions that are not
implemented by our various versions of our C library.

The corresponding declarations are moved inside #if 0 .. #endif
blocks (so it becomes easy to remember that they are missing)

Also refresh the headers a little (i.e. adding a few missing decl
and macros, remove C++ comments, etc)

See http://code.google.com/p/android/issues/detail?id=7807

Change-Id: I4ae1b1f3a181419eee2004c41b54768cc15e896f
NOTE: The missing decl are still there but encased in #if 0 .. #endif
      blocks (to make it easier to implement them later). There are
      a few exceptions in order to build STLport and libstdc++-v3
      properly.
2010-10-08 17:07:39 +02:00
Jeff Brown
3ec1cec3b7 Update NDK with recent changes.
Includes bitmap.h which was missing from v9 but was previously in v8.
Also includes new obb stuff and other things that have gotten out of sync.

Change-Id: I6cf9ccdbc9d3271a34a1cf8a1de78aa8a1757276
2010-10-07 14:38:12 -07:00
David 'Digit' Turner
7c5623becb ndk: Update platform system libraries.
This change updates various system libraries to reflect changes that
happened during distinct platform releases. All details are in the
file bionic/libc/docs/CHANGES.TXT, but the summary is:

API level 5:
    pthread.h:
        pthread_mutex_lock_timeout_np()
        pthread_cond_timedwait_monotonic_np()
        pthread_cond_timedwait_relative_np()

API level 8:
    pthread.h:
        pthread_condattr_init()
        pthread_condattr_destroy()
        pthread_condattr_setpshared()
        pthread_condattr_getpshared()

    dlfcn.h:
        dladdr()

    sched.h:
        clone()

    signal.h:
        killpg()

    stdio.h:
        fdprintf()
        vfdprintf()

    unistd.h:
        getusershell()
        setusershell()
        endusershell()

    wchar.h:
        mbstowcs()
        wcstombs()

    time.h:
        timezone
        daylight

    plus symbols from new headers: <fts.h>, <regex.h>, <err.h>, <warn.h>

Change-Id: I7ff1ffa2cb37b71473b1d137c7799f17d644ab63
2010-10-07 11:17:39 +02:00
David 'Digit' Turner
7012117d4a Unify NDK platform headers.
This commit removes duplication of system headers per platform, i.e. remove
copies of common headers like <stdlib.h> from arch-arm/usr/include and arch-x86/usr/include
and move them to a common include directory. More specifically:

- common headers:        android-N/arch-A/usr/include --> android-N/include
- arch-specific headers: android-N/arch-A/usr-include --> android-N/arch-A/include
- arch-specific libs:    android-N/arch-A/usr/lib     --> android-N/arch-A/lib

Change-Id: Ifdba5038d108901931f3e3a7c14ebe6270d2d276

NOTE: This also contains careful separation of API-level-specific headers.
      For example, platforms/android-5/include/pthread.h contains new function
      declarations that are not available when using platforms/android-3/include/pthread.h

NOTE: The NDK's build-platforms.sh script has been updated to understand the new
      layout. This change in develeopment/ndk does not change the layout of
      platform files under $NDK/platforms after build-platforms.sh is called.
2010-09-22 18:04:36 +02:00
Jeff Brown
9f44e97108 Update NDK headers and samples to sync up with looper API changes.
Change-Id: I7082603bf280888be90dc4df687521aaae9b1d02
2010-09-14 02:02:15 -07:00
Dianne Hackborn
d3d58cf7d3 Update to follow ALooper ident change.
Also the native-activity sample also has some very simple code showing
how to listen to the accelerometer.

Change-Id: I0629b8bc40cddd66233c1675cd5e8b42a9b722d8
2010-09-07 15:47:35 -07:00
Dianne Hackborn
79b946e8f2 Some native activity sample code cleanup.
Update to include newest headers and library, tweak glue code to
work better with state saving and add support for config changes.

Change-Id: I4d27bd4a0f542f217efaec86cf4f219aca020426
2010-08-11 00:31:37 -07:00