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
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
This is the preferred way of selecting config starting in
gingerbread, this procedure guarantees forward compatibility.
Change-Id: Iff55b545e722205bd029b92da33368129253b8a3
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
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
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.
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
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
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.
This is to reflect the simplification in prebuilt support.
1/ LOCAL_SRC_FILES is relative to LOCAL_PATH, like with other module types
2/ no need for LOCAL_PREBUILTS
Change-Id: If7302fe355cb25a446e31c20015098db75c00c02
Also the native-activity sample also has some very simple code showing
how to listen to the accelerometer.
Change-Id: I0629b8bc40cddd66233c1675cd5e8b42a9b722d8
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
Remove all duplicate platform files, i.e development/ndk/platforms/android-N now
only contains files that are introduced in API level 'N' and not found in level 'N-1'
(This makes it easier to manage independent platform release branches, and makes
platform additions trivial to examine and maintain).
Move samples that depends on features of API level 'N' into platforms/android-N/samples
+ update tests/run-all.sh accordingly
Change-Id: I04c4c67c6c674c1714d5812d461d0524a4f4cfd9
Make the "glue library" part of the NDK as an importable module,
this has several benefits:
- no need to distribute a binary here with no easy way to regenerate it
- no need to explicitely list -lthreaded_app in your LOCAL_LDLIBS
(this is handled automatically by the module import capability)
- allows easier native debugging of what's really happening.
Note that the header is renamed <threaded_native_app.h>
+ Modify the native-activity sample to use and import the new module
+ Start documenting usage in the header file. We probably need something
better, and will probably put it under development/ndk/docs/ at some
point.
After this patch, we should be able to get rid of the code under
framework/base/native/{include.glue}
Change-Id: I6e81d70a225a6ca006beabf6e8b42529e8f371b9
This shows direct drawing to an ANativeWindow's bits.
Update the NDK API, and fix a bug in the native-activity app where it
would hang while exiting.
Change-Id: I4fa98d083405eb0d1b22b10a73a2ef18d45fdb59
The native_activity sample is now built with the new threaded_app
glue code, removing all of the boiler-plate code from it. This
adds the glue code (header and .a) to the NDK.
Change-Id: I2a7be473811f22f948dcda3da8034dd0bd62049d
We now rely instead on the content of $NDK/sources/cxx-stl/system/include
that is automatically used if a module has C++ sources.
Change-Id: I4319d9260fcf9fb31c59c2f21ca64b536725d4f5