Commit Graph

489 Commits

Author SHA1 Message Date
Andrew Hsieh
28464f3b51 Check the presence of __STDC_VERSION__ in <sys/cdefs.h>
See http://code.google.com/p/android/issues/detail?id=14627
and bea05255de

Change-Id: Ie990b7c1df91adab631634e6b68454e4c5bab19d
2012-11-23 12:53:04 +08:00
Andrew Hsieh
279fe064b1 Refresh header byteswap.h and dirent.h
Sync with bionic.  No new APIs.

Change-Id: Ie1f71d1c56ce2d0574d8b743f205115d2fbc68b4
2012-11-21 14:17:01 +08:00
Andrew Hsieh
2eb9332422 Fix limits.h to include page.h which provides PAGE_SIZE
See 6331db3fd251ddc350913cc1e8a7941740c25f63 and
http://code.google.com/p/android/issues/detail?id=39983

Change-Id: I85083d754fe9b722efcb8ea73f17d88d505c90d1
2012-11-20 16:14:06 +08:00
Andrew Hsieh
18fc7183ea Fix return type of glGetAttribLocation and glGetUniformLocation
from int to GLint.

See:
   https://android-review.googlesource.com/#/c/46120
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetAttribLocation.xml
   http://www.khronos.org/opengles/sdk/docs/man/xhtml/glGetUniformLocation.xml

Change-Id: I57fa430be2987b41e31fb6b3bcefa5dfb58e63b9
2012-11-06 13:52:56 -08:00
Andrew Hsieh
1d35fba9bd Merge "ndk: Remove LONG_LONG_MIN/MAX hack from pthread.h" 2012-10-16 10:12:26 -07:00
David 'Digit' Turner
db5a5ada90 ndk: Remove LONG_LONG_MIN/MAX hack from pthread.h
The LONG_LONG_MIN, LONG_LONG_MAX and ULONG_LONG_MAX are
GLibc-specific macros. Move their declarations from
<pthread.h> to <limits.h> where they belong.

Change-Id: I597465b99893706ade82069238f60df73d8e236e
2012-10-16 09:49:10 +02:00
Andrew Hsieh
ed7dac09d8 Remove obsolete LOCAL_NDK_VERSION
Other than it's obsolete, it's outdated to use r4 (rather than the
most recently one)

Change-Id: I0a0dca663056a071a714d49a5d5bb77bd379c18a
2012-10-15 13:06:26 +08:00
Andrew Hsieh
d16812351b [ndk] Fixed sample SanAngeles to properly pause/resume
Previously re-launch of background SanAngeles app shows black or
freeze frame

Two fixes:
1. Not to reinitialize timer each time when DemoRenderer is created
2. Stop advancing internal clock when onPause(), and start when
   onResume()

Change-Id: I6bef9d7c462cd4d504e76099a4d28c8618043f46
2012-10-12 19:28:56 +08:00
Andrew Hsieh
24e005a234 am c7daea04: Merge "Replace __unused in linux/sysctl.h with __linux_unused"
* commit 'c7daea046b9f05fb07936bafd2f7436478781a2d':
  Replace __unused in linux/sysctl.h with __linux_unused
2012-09-26 15:48:00 -07:00
Andrew Hsieh
36ffaf5406 Replace __unused in linux/sysctl.h with __linux_unused
To avoid conflict with "#define __unused" in sys/cdefs.h

See
  https://android-review.googlesource.com/#/c/43479
  https://android-review.googlesource.com/#/c/43565

Change-Id: I6b8155570f4398b3ee8845d75bd231bca7f1d86f
2012-09-26 15:11:39 -07:00
Andrew Hsieh
47b1e0b6f7 am b07d7f6c: Merge "Update NDK headers"
* commit 'b07d7f6c25fe3ea99186c2cdb034449e75419518':
  Update NDK headers
2012-09-24 14:03:09 -07:00
Andrew Hsieh
c6427a73a2 Update NDK headers
Sync NDK headers with bionic's.  Most are new symbols.
The only big differences are in arch-mips/include/asm:

1) arch-mips/include/asm/unistd.h, see
   https://android-review.googlesource.com/#/c/40875
2) arch-mips/include/asm/*, see
   https://android-review.googlesource.com/#/c/43335
   https://android-review.googlesource.com/#/c/43440
   https://android-review.googlesource.com/#/c/43401

Change-Id: I8204f9b5f2f2c14a31dc28efc8a9d8c66cf73fe2
2012-09-24 12:31:43 -07:00
Andrew Hsieh
b034233afa am 3c901267: Merge "Update README.CRT.TXT"
* commit '3c901267609c17645999aa7a8ca95413ad528038':
  Update README.CRT.TXT
2012-09-24 09:28:50 -07:00
Andrew Hsieh
a0de803db8 Update README.CRT.TXT
Change-Id: I7d0ec48c09c47081c01c9366faf993317990b237
2012-09-21 18:50:16 -07:00
Andrew Hsieh
4102c6f241 am b833605a: Merge "Rewrite ARM crtbegin* as C files"
* commit 'b833605a2bf5c27ff57cf5508fc58bca351c2470':
  Rewrite ARM crtbegin* as C files
2012-09-06 18:30:03 -07:00
Andrew Hsieh
d0b834c7ad Rewrite ARM crtbegin* as C files
This is port of related CLs:
  9d40326830c2bd407427889c554adeb915ee6b4a
  f3cfcd869ded41d25c1f4f4e48e7c374a64f9583

Summary: By placing  __PREINIT_ARRAY__, __INIT_ARRAY__, __FINI_ARRAY__
and __CTOR_LIST__ on stack, this change allows PIC w/o relying on text
relocations.

Change-Id: I02a1b496b16aba692f4f9fa998a71efd943689fd
2012-09-06 15:27:56 +08:00
Andrew Hsieh
3bc200de51 am 9864b880: Merge "Replace deprecated APIs in NDK samples"
* commit '9864b8803782378159761424dee2270a12833872':
  Replace deprecated APIs in NDK samples
2012-08-30 08:23:48 -07:00
Andrew Hsieh
eb703bf543 Replace deprecated APIs in NDK samples
1. hello-gl2 from android-5 to android-7
2. native-activity from android-9 to android-10
3. native-audio from android-9 to android-10
4. native-plasma from android-9 to android-10

Related CL
  https://android-review.googlesource.com/#/c/42218, which
    adjusts android-10 to use android-9 header/lib

Related issue:
  http://code.google.com/p/android/issues/detail?id=20017

Change-Id: I49c4c0dd2cedb34522a9d196211ee96fce21b6c4
2012-08-30 13:02:53 +08:00
Andrew Hsieh
87485cd822 am fcc2452b: Merge "Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S."
* commit 'fcc2452b5102b412ba300243e0e9d26c827515cf':
  Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S.
2012-08-28 23:17:32 -07:00
Chao-Ying Fu
75f8d8217e Remove unused .ctors, .dtors, and .eh_frame in MIPS crt*_so.S.
Change-Id: I9b2d28c7c189d0f3a2ded694fadd0380cfd8e6e5
2012-08-28 13:21:42 -07:00
Andrew Hsieh
17f2af7e1f am a2b32b34: Merge "Update malloc.h"
* commit 'a2b32b34220a1bdea566502da1e3254c90f62f16':
  Update malloc.h
2012-08-22 01:19:57 -07:00
Andrew Hsieh
a2b32b3422 Merge "Update malloc.h" 2012-08-22 01:08:42 -07:00
Andrew Hsieh
bfb393846b am 143949da: Merge "Add a .note.android.ident section to Android ELF binaries"
* commit '143949daba4c1f040753a9456a5e8d7e505e5045':
  Add a .note.android.ident section to Android ELF binaries
2012-08-21 19:55:56 -07:00
Andrew Hsieh
fc638f96ae Add a .note.android.ident section to Android ELF binaries
See related CL:
  https://android-review.googlesource.com/#/c/37590

Change-Id: I1d5ab2f754731e9995061de560389c0efa121dea
2012-08-21 18:50:08 +08:00
Andrew Hsieh
ef423edc2c am e3cfaa6d: Merge "Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS"
* commit 'e3cfaa6d4251136ad6f3221d881ac12786169663':
  Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
2012-08-21 03:27:39 -07:00
Andrew Hsieh
58a4918b94 Update malloc.h
Remove functions never implemented in bionic from malloc.h

Related CLs:
  https://android-review.googlesource.com/#/c/41728
  https://android-review.googlesource.com/#/c/41731
  https://android-review.googlesource.com/#/c/41717

Change-Id: I06639071e3fb442e2389a932382a88a7318606b9
2012-08-21 18:18:00 +08:00
Andrew Hsieh
a5280d312d Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
Those are C funcitons

Change-Id: I8f481f29b278b8f28d9ce04635d0f04e9e148cb5
2012-08-21 10:41:51 +08:00
Andrew Hsieh
1148901643 am 7f26cea9: Merge "Update stdint.h; Refresh <arch>/include/machine/* stdint.h: https://android-review.googlesource.com/#/c/41714/ https://android-review.googlesource.com/#/c/40576/ <arch>/include/machine/*: to be consistent with bionic/libc/<arch
* commit '7f26cea9049c087b0552fb0f364ab6142a1ad227':
  Update stdint.h; Refresh <arch>/include/machine/*   stdint.h: https://android-review.googlesource.com/#/c/41714/             https://android-review.googlesource.com/#/c/40576/   <arch>/include/machine/*: to be consistent with      bionic/libc/<arch>/include/machine/*
2012-08-20 05:36:04 -07:00
Andrew Hsieh
bc95f91d24 am e33ad352: Merge "Remove linux-unistd.h"
* commit 'e33ad3528d23349a01113289272ffeff08106cf7':
  Remove linux-unistd.h
2012-08-20 05:36:02 -07:00
Andrew Hsieh
7305bb5363 am ed722f12: Merge "Replace link.h for mips with new version for all platforms"
* commit 'ed722f1242d330bd3fe29ff0793e4c616190ef2d':
  Replace link.h for mips with new version for all platforms
2012-08-20 05:36:01 -07:00
Andrew Hsieh
7f26cea904 Merge "Update stdint.h; Refresh <arch>/include/machine/* stdint.h: https://android-review.googlesource.com/#/c/41714/ https://android-review.googlesource.com/#/c/40576/ <arch>/include/machine/*: to be consistent with bionic/libc/<arch>/include/machine/*" 2012-08-20 05:22:01 -07:00
Andrew Hsieh
e33ad3528d Merge "Remove linux-unistd.h" 2012-08-20 05:21:26 -07:00
Andrew Hsieh
61a3e1462c Update stdint.h; Refresh <arch>/include/machine/*
stdint.h: https://android-review.googlesource.com/#/c/41714/
            https://android-review.googlesource.com/#/c/40576/
  <arch>/include/machine/*: to be consistent with
     bionic/libc/<arch>/include/machine/*

Change-Id: Ieeb44c3e864bf64c4cad4d3c9d94024a7b520181
2012-08-20 18:32:15 +08:00
Pavel Chupin
51d4794277 Replace link.h for mips with new version for all platforms
Update from bionic/libc/include/link.h
For details see https://android-review.googlesource.com/#/c/41705

Change-Id: Ib9e658aa0606584b148e951ad199dc12c2f563c2
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-08-20 10:48:23 +04:00
Andrew Hsieh
7de8e93107 Remove linux-unistd.h
Change-Id: I95cc89bfacb05d92da658fa533cb75ac65d397bf
2012-08-18 16:08:51 +08:00
Andrew Hsieh
1659906d5e Merge "Retire LOCAL_NDK_VERSION (DO NOT MERGE)" 2012-08-18 01:04:19 -07:00
Andrew Hsieh
8bb4fd7683 Update/Copy fenv.h
Update from bionic/libm/arm/fenv.h
Copy from bionic/libm/mips/fenv.h

Related issue:
  http://code.google.com/p/android/issues/detail?id=36229

Change-Id: I4cba9523ecc466720927798e461fc167d6d6df7c
2012-08-17 19:02:58 +08:00
Andrew Hsieh
b31b79830b Retire LOCAL_NDK_VERSION (DO NOT MERGE)
Change-Id: If37bcae0c5833f195e954a8bfbda6b8686b3705e
2012-08-17 07:17:31 +08:00
Andrew Hsieh
e395327a7c Add comments about why "call" instead of "jump" is used.
Related CL: https://android-review.googlesource.com/#/c/38651

Change-Id: I425e06f08fda90501a686c7e437d4e70fc1e4a1b
2012-07-25 15:39:00 -07:00
Andrew Hsieh
556182feb4 Fix SEGV when unwinding stack pasts __libc_init
Changed "jump __libc_init" to "call __libc_init" otherwise stack unwinding
past __libc_init may get wrong return address and crash the program or do
wield things.  With "call", return address is pushed on stack and unwinding
stops correctly at _start.  Note that __libc_init never returns, so this
fix wonʼt affect normal program execution.  But just in case it "does"
return, jump to address 0 and halt.

Change-Id: Id194fb32adcbf89ae59939cee33c50b5bbdd36fe
2012-06-28 14:28:21 -07:00
Andrew Hsieh
5e30a6ae14 ndk: Add crtbrand.c ; crtbegin_static.S includes "atexit.S" for x86/mips
"atexit" isn't defined in libc.a for x86/mips (unlike their arm's counterpart).
Include atexit.S otherwise app using atexit() may fail to link statically.

Also, add crtbegin.c to brand crtbegin_static/dynamic.c with .note.ABI-tag
section of given API level.  See $NDK/gen-platforms.sh

Change-Id: I2fdbb92119e3ca2da2c1ced6d77e63136ec35c34
2012-06-25 17:58:12 -07:00
Andrew Hsieh
62ef547786 ndk: Remove if_dl.h header
Remove AF_LINK and sockaddr_dl which are specpfic to BSD
(ie. doesn't exist in Linux)

Change-Id: I47fe4cdf76df14af99eaa17cfc366a65aee3f5ae
2012-06-12 10:38:00 +08:00
David 'Digit' Turner
5e7c4e6a57 ndk: Remove prebuilt C runtime objects. Add sources instead.
This patch removes all prebuilt C runtime object files from
the ndk/platforms/ directory. We replace them with equivalent
assembly sources lifted from the following directories:

  bionic/libc/private/      (for __dso_handle.S and __dso_handle_so.S)
  bionic/libc/arch-$ARCH/   (for all others)

Note: This requires that your NDK's gen-platforms.sh script be
      capable of rebuilding the object files from sources.
      See https://android-review.googlesource.com/36822

The goal here is to make it much easier to update these files,
and track their changes relative to the content of bionic/lib.
For example to fix the following issues in the future:

Change-Id: If4c84e2584b0e58ca3585b034bb8a13a8add8ab9
http://code.google.com/p/android/issues/detail?id=26911
http://code.google.com/p/android/issues/detail?id=23203
2012-05-31 10:58:57 +02:00
Raghu Gandham
ae9a5f960c [MIPS] Import signal.h from bionic. This version fixes the
warning emitted by the toolchain
2012-05-02 18:46:58 -07:00
Andrew Hsieh
d0e65433d0 Fixed compilation error #include <android/*h>
Fixed compilation error when header in #include <android/*h> is
included alone.

Fix for rect.h already exists in $ANDROID/frameworks/native/include/android

Change-Id: I7c49e044507581c5ad591f26f99cda6870b411c5
2012-04-20 15:50:10 +08:00
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