summaryrefslogtreecommitdiffstats
path: root/9/platforms/android-14/arch-x86/usr/include
diff options
context:
space:
mode:
Diffstat (limited to '9/platforms/android-14/arch-x86/usr/include')
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/KHR/khrplatform.h3
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h41
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/configuration.h42
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/input.h240
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/keycodes.h96
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/looper.h3
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_activity.h7
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_window.h11
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h8
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/rect.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/sensor.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/tts.h313
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/inttypes.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/jni.h70
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/math.h457
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/netinet/tcp.h18
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/poll.h3
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/pthread.h4
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/stdint.h11
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/stdlib.h9
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/sys/_wchar_limits.h108
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/sys/cdefs.h27
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/sys/stat.h4
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/sys/vfs.h46
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/time.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/wchar.h15
27 files changed, 1205 insertions, 341 deletions
diff --git a/9/platforms/android-14/arch-x86/usr/include/KHR/khrplatform.h b/9/platforms/android-14/arch-x86/usr/include/KHR/khrplatform.h
index 75bc551..2bca446 100644
--- a/9/platforms/android-14/arch-x86/usr/include/KHR/khrplatform.h
+++ b/9/platforms/android-14/arch-x86/usr/include/KHR/khrplatform.h
@@ -92,7 +92,8 @@
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
-# define KHRONOS_APICALL __attribute__((visibility("default")))
+# include <sys/cdefs.h>
+# define KHRONOS_APICALL __attribute__((visibility("default"))) __NDK_FPABI__
#else
# define KHRONOS_APICALL
#endif
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h b/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
index 57dd7cb..f5df46b 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
@@ -18,8 +18,6 @@
#ifndef ANDROID_ASSET_MANAGER_H
#define ANDROID_ASSET_MANAGER_H
-#include <sys/types.h>
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -96,6 +94,17 @@ int AAsset_read(AAsset* asset, void* buf, size_t count);
off_t AAsset_seek(AAsset* asset, off_t offset, int whence);
/**
+ * Seek to the specified offset within the asset data. 'whence' uses the
+ * same constants as lseek()/fseek().
+ *
+ * Uses 64-bit data type for large files as opposed to the 32-bit type used
+ * by AAsset_seek.
+ *
+ * Returns the new position on success, or (off64_t) -1 on error.
+ */
+off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence);
+
+/**
* Close the asset, freeing all associated resources.
*/
void AAsset_close(AAsset* asset);
@@ -113,12 +122,27 @@ const void* AAsset_getBuffer(AAsset* asset);
off_t AAsset_getLength(AAsset* asset);
/**
+ * Report the total size of the asset data. Reports the size using a 64-bit
+ * number insted of 32-bit as AAsset_getLength.
+ */
+off64_t AAsset_getLength64(AAsset* asset);
+
+/**
* Report the total amount of asset data that can be read from the current position.
*/
off_t AAsset_getRemainingLength(AAsset* asset);
/**
- * Open a new file descriptor that can be used to read the asset data.
+ * Report the total amount of asset data that can be read from the current position.
+ *
+ * Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does.
+ */
+off64_t AAsset_getRemainingLength64(AAsset* asset);
+
+/**
+ * Open a new file descriptor that can be used to read the asset data. If the
+ * start or length cannot be represented by a 32-bit number, it will be
+ * truncated. If the file is large, use AAsset_openFileDescriptor64 instead.
*
* Returns < 0 if direct fd access is not possible (for example, if the asset is
* compressed).
@@ -126,6 +150,17 @@ off_t AAsset_getRemainingLength(AAsset* asset);
int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
/**
+ * Open a new file descriptor that can be used to read the asset data.
+ *
+ * Uses a 64-bit number for the offset and length instead of 32-bit instead of
+ * as AAsset_openFileDescriptor does.
+ *
+ * Returns < 0 if direct fd access is not possible (for example, if the asset is
+ * compressed).
+ */
+int AAsset_openFileDescriptor64(AAsset* asset, off64_t* outStart, off64_t* outLength);
+
+/**
* Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
* mmapped).
*/
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/configuration.h b/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
index 99e8f97..2444c4b 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
@@ -40,6 +40,7 @@ enum {
ACONFIGURATION_DENSITY_DEFAULT = 0,
ACONFIGURATION_DENSITY_LOW = 120,
ACONFIGURATION_DENSITY_MEDIUM = 160,
+ ACONFIGURATION_DENSITY_TV = 213,
ACONFIGURATION_DENSITY_HIGH = 240,
ACONFIGURATION_DENSITY_NONE = 0xffff,
@@ -77,11 +78,18 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
+ ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2,
+ ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000,
+
+ ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000,
+
+ ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000,
+
ACONFIGURATION_MCC = 0x0001,
ACONFIGURATION_MNC = 0x0002,
ACONFIGURATION_LOCALE = 0x0004,
@@ -95,6 +103,7 @@ enum {
ACONFIGURATION_VERSION = 0x0400,
ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
ACONFIGURATION_UI_MODE = 0x1000,
+ ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
};
/**
@@ -286,6 +295,39 @@ int32_t AConfiguration_getUiModeNight(AConfiguration* config);
void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight);
/**
+ * Return the current configuration screen width in dp units, or
+ * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set.
+ */
+int32_t AConfiguration_getScreenWidthDp(AConfiguration* config);
+
+/**
+ * Set the configuration's current screen width in dp units.
+ */
+void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value);
+
+/**
+ * Return the current configuration screen height in dp units, or
+ * ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set.
+ */
+int32_t AConfiguration_getScreenHeightDp(AConfiguration* config);
+
+/**
+ * Set the configuration's current screen width in dp units.
+ */
+void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value);
+
+/**
+ * Return the configuration's smallest screen width in dp units, or
+ * ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set.
+ */
+int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config);
+
+/**
+ * Set the configuration's smallest screen width in dp units.
+ */
+void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value);
+
+/**
* Perform a diff between two configurations. Returns a bit mask of
* ACONFIGURATION_* constants, each bit set meaning that configuration element
* is different between them.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/input.h b/9/platforms/android-14/arch-x86/usr/include/android/input.h
index b9dffad..ac7bcc0 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/input.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/input.h
@@ -93,7 +93,37 @@ enum {
AMETA_SHIFT_RIGHT_ON = 0x80,
/* This mask is used to check whether the SYM meta key is pressed. */
- AMETA_SYM_ON = 0x04
+ AMETA_SYM_ON = 0x04,
+
+ /* This mask is used to check whether the FUNCTION meta key is pressed. */
+ AMETA_FUNCTION_ON = 0x08,
+
+ /* This mask is used to check whether one of the CTRL meta keys is pressed. */
+ AMETA_CTRL_ON = 0x1000,
+
+ /* This mask is used to check whether the left CTRL meta key is pressed. */
+ AMETA_CTRL_LEFT_ON = 0x2000,
+
+ /* This mask is used to check whether the right CTRL meta key is pressed. */
+ AMETA_CTRL_RIGHT_ON = 0x4000,
+
+ /* This mask is used to check whether one of the META meta keys is pressed. */
+ AMETA_META_ON = 0x10000,
+
+ /* This mask is used to check whether the left META meta key is pressed. */
+ AMETA_META_LEFT_ON = 0x20000,
+
+ /* This mask is used to check whether the right META meta key is pressed. */
+ AMETA_META_RIGHT_ON = 0x40000,
+
+ /* This mask is used to check whether the CAPS LOCK meta key is on. */
+ AMETA_CAPS_LOCK_ON = 0x100000,
+
+ /* This mask is used to check whether the NUM LOCK meta key is on. */
+ AMETA_NUM_LOCK_ON = 0x200000,
+
+ /* This mask is used to check whether the SCROLL LOCK meta key is on. */
+ AMETA_SCROLL_LOCK_ON = 0x400000,
};
/*
@@ -185,7 +215,15 @@ enum {
* tracked from its initial down. That is, somebody requested that tracking
* started on the key down and a long press has not caused
* the tracking to be canceled. */
- AKEY_EVENT_FLAG_TRACKING = 0x200
+ AKEY_EVENT_FLAG_TRACKING = 0x200,
+
+ /* Set when a key event has been synthesized to implement default behavior
+ * for an event that the application did not handle.
+ * Fallback key events are generated by unhandled trackball motions
+ * (to emulate a directional keypad) and by certain unhandled key presses
+ * that are declared in the key map (such as special function numeric keypad
+ * keys when numlock is off). */
+ AKEY_EVENT_FLAG_FALLBACK = 0x400,
};
/*
@@ -243,7 +281,30 @@ enum {
/* A non-primary pointer has gone up.
* The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
*/
- AMOTION_EVENT_ACTION_POINTER_UP = 6
+ AMOTION_EVENT_ACTION_POINTER_UP = 6,
+
+ /* A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE).
+ * The motion contains the most recent point, as well as any intermediate points since
+ * the last hover move event.
+ */
+ AMOTION_EVENT_ACTION_HOVER_MOVE = 7,
+
+ /* The motion event contains relative vertical and/or horizontal scroll offsets.
+ * Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL
+ * and AMOTION_EVENT_AXIS_HSCROLL.
+ * The pointer may or may not be down when this event is dispatched.
+ * This action is always delivered to the winder under the pointer, which
+ * may not be the window currently touched.
+ */
+ AMOTION_EVENT_ACTION_SCROLL = 8,
+
+ /* The pointer is not down but has entered the boundaries of a window or view.
+ */
+ AMOTION_EVENT_ACTION_HOVER_ENTER = 9,
+
+ /* The pointer is not down but has exited the boundaries of a window or view.
+ */
+ AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
};
/*
@@ -283,6 +344,82 @@ enum {
};
/*
+ * Constants that identify each individual axis of a motion event.
+ * Refer to the documentation on the MotionEvent class for descriptions of each axis.
+ */
+enum {
+ AMOTION_EVENT_AXIS_X = 0,
+ AMOTION_EVENT_AXIS_Y = 1,
+ AMOTION_EVENT_AXIS_PRESSURE = 2,
+ AMOTION_EVENT_AXIS_SIZE = 3,
+ AMOTION_EVENT_AXIS_TOUCH_MAJOR = 4,
+ AMOTION_EVENT_AXIS_TOUCH_MINOR = 5,
+ AMOTION_EVENT_AXIS_TOOL_MAJOR = 6,
+ AMOTION_EVENT_AXIS_TOOL_MINOR = 7,
+ AMOTION_EVENT_AXIS_ORIENTATION = 8,
+ AMOTION_EVENT_AXIS_VSCROLL = 9,
+ AMOTION_EVENT_AXIS_HSCROLL = 10,
+ AMOTION_EVENT_AXIS_Z = 11,
+ AMOTION_EVENT_AXIS_RX = 12,
+ AMOTION_EVENT_AXIS_RY = 13,
+ AMOTION_EVENT_AXIS_RZ = 14,
+ AMOTION_EVENT_AXIS_HAT_X = 15,
+ AMOTION_EVENT_AXIS_HAT_Y = 16,
+ AMOTION_EVENT_AXIS_LTRIGGER = 17,
+ AMOTION_EVENT_AXIS_RTRIGGER = 18,
+ AMOTION_EVENT_AXIS_THROTTLE = 19,
+ AMOTION_EVENT_AXIS_RUDDER = 20,
+ AMOTION_EVENT_AXIS_WHEEL = 21,
+ AMOTION_EVENT_AXIS_GAS = 22,
+ AMOTION_EVENT_AXIS_BRAKE = 23,
+ AMOTION_EVENT_AXIS_DISTANCE = 24,
+ AMOTION_EVENT_AXIS_TILT = 25,
+ AMOTION_EVENT_AXIS_GENERIC_1 = 32,
+ AMOTION_EVENT_AXIS_GENERIC_2 = 33,
+ AMOTION_EVENT_AXIS_GENERIC_3 = 34,
+ AMOTION_EVENT_AXIS_GENERIC_4 = 35,
+ AMOTION_EVENT_AXIS_GENERIC_5 = 36,
+ AMOTION_EVENT_AXIS_GENERIC_6 = 37,
+ AMOTION_EVENT_AXIS_GENERIC_7 = 38,
+ AMOTION_EVENT_AXIS_GENERIC_8 = 39,
+ AMOTION_EVENT_AXIS_GENERIC_9 = 40,
+ AMOTION_EVENT_AXIS_GENERIC_10 = 41,
+ AMOTION_EVENT_AXIS_GENERIC_11 = 42,
+ AMOTION_EVENT_AXIS_GENERIC_12 = 43,
+ AMOTION_EVENT_AXIS_GENERIC_13 = 44,
+ AMOTION_EVENT_AXIS_GENERIC_14 = 45,
+ AMOTION_EVENT_AXIS_GENERIC_15 = 46,
+ AMOTION_EVENT_AXIS_GENERIC_16 = 47,
+
+ // NOTE: If you add a new axis here you must also add it to several other files.
+ // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
+};
+
+/*
+ * Constants that identify buttons that are associated with motion events.
+ * Refer to the documentation on the MotionEvent class for descriptions of each button.
+ */
+enum {
+ AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,
+ AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,
+ AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
+ AMOTION_EVENT_BUTTON_BACK = 1 << 3,
+ AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
+};
+
+/*
+ * Constants that identify tool types.
+ * Refer to the documentation on the MotionEvent class for descriptions of each tool type.
+ */
+enum {
+ AMOTION_EVENT_TOOL_TYPE_UNKNOWN = 0,
+ AMOTION_EVENT_TOOL_TYPE_FINGER = 1,
+ AMOTION_EVENT_TOOL_TYPE_STYLUS = 2,
+ AMOTION_EVENT_TOOL_TYPE_MOUSE = 3,
+ AMOTION_EVENT_TOOL_TYPE_ERASER = 4,
+};
+
+/*
* Input sources.
*
* Refer to the documentation on android.view.InputDevice for more details about input sources
@@ -295,6 +432,7 @@ enum {
AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
+ AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
};
enum {
@@ -302,10 +440,13 @@ enum {
AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
+ AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
AINPUT_SOURCE_ANY = 0xffffff00,
};
@@ -327,18 +468,20 @@ enum {
*
* Refer to the documentation on android.view.InputDevice for more details about input sources
* and their correct interpretation.
+ *
+ * DEPRECATION NOTICE: These constants are deprecated. Use AMOTION_EVENT_AXIS_* constants instead.
*/
enum {
- AINPUT_MOTION_RANGE_X = 0,
- AINPUT_MOTION_RANGE_Y = 1,
- AINPUT_MOTION_RANGE_PRESSURE = 2,
- AINPUT_MOTION_RANGE_SIZE = 3,
- AINPUT_MOTION_RANGE_TOUCH_MAJOR = 4,
- AINPUT_MOTION_RANGE_TOUCH_MINOR = 5,
- AINPUT_MOTION_RANGE_TOOL_MAJOR = 6,
- AINPUT_MOTION_RANGE_TOOL_MINOR = 7,
- AINPUT_MOTION_RANGE_ORIENTATION = 8,
-};
+ AINPUT_MOTION_RANGE_X = AMOTION_EVENT_AXIS_X,
+ AINPUT_MOTION_RANGE_Y = AMOTION_EVENT_AXIS_Y,
+ AINPUT_MOTION_RANGE_PRESSURE = AMOTION_EVENT_AXIS_PRESSURE,
+ AINPUT_MOTION_RANGE_SIZE = AMOTION_EVENT_AXIS_SIZE,
+ AINPUT_MOTION_RANGE_TOUCH_MAJOR = AMOTION_EVENT_AXIS_TOUCH_MAJOR,
+ AINPUT_MOTION_RANGE_TOUCH_MINOR = AMOTION_EVENT_AXIS_TOUCH_MINOR,
+ AINPUT_MOTION_RANGE_TOOL_MAJOR = AMOTION_EVENT_AXIS_TOOL_MAJOR,
+ AINPUT_MOTION_RANGE_TOOL_MINOR = AMOTION_EVENT_AXIS_TOOL_MINOR,
+ AINPUT_MOTION_RANGE_ORIENTATION = AMOTION_EVENT_AXIS_ORIENTATION,
+} __attribute__ ((deprecated));
/*
@@ -416,6 +559,9 @@ int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
* event was generated. */
int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
+/* Get the button state of all buttons that are pressed. */
+int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event);
+
/* Get a bitfield indicating which edges, if any, were touched by this motion event.
* For touch events, clients can use this to determine if the user's finger was
* touching the edge of the display. */
@@ -433,61 +579,66 @@ int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
* For touch events on the screen, this is the delta that was added to the raw
* screen coordinates to adjust for the absolute position of the containing windows
* and views. */
-float AMotionEvent_getXOffset(const AInputEvent* motion_event);
+float AMotionEvent_getXOffset(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the Y coordinates being reported.
* For touch events on the screen, this is the delta that was added to the raw
* screen coordinates to adjust for the absolute position of the containing windows
* and views. */
-float AMotionEvent_getYOffset(const AInputEvent* motion_event);
+float AMotionEvent_getYOffset(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the X coordinates being reported.
* You can multiply this number with an X coordinate sample to find the
* actual hardware value of the X coordinate. */
-float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the Y coordinates being reported.
* You can multiply this number with a Y coordinate sample to find the
* actual hardware value of the Y coordinate. */
-float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the number of pointers of data contained in this event.
* Always >= 1. */
size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
/* Get the pointer identifier associated with a particular pointer
- * data index is this event. The identifier tells you the actual pointer
+ * data index in this event. The identifier tells you the actual pointer
* number associated with the data, accounting for individual pointers
* going up and down since the start of the current gesture. */
int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
+/* Get the tool type of a pointer for the given pointer index.
+ * The tool type indicates the type of tool used to make contact such as a
+ * finger or stylus, if known. */
+int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index);
+
/* Get the original raw X coordinate of this event.
* For touch events on the screen, this is the original location of the event
* on the screen, before it had been adjusted for the containing window
* and views. */
-float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the original raw X coordinate of this event.
* For touch events on the screen, this is the original location of the event
* on the screen, before it had been adjusted for the containing window
* and views. */
-float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current X coordinate of this event for the given pointer index.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
-float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current Y coordinate of this event for the given pointer index.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
-float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current pressure of this event for the given pointer index.
* The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
* although values higher than 1 may be generated depending on the calibration of
* the input device. */
-float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current scaled value of the approximate size for the given pointer index.
* This represents some approximation of the area of the screen being
@@ -495,27 +646,27 @@ float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_i
* touch is normalized with the device specific range of values
* and scaled to a value between 0 and 1. The value of size can be used to
* determine fat touch events. */
-float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the major axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index. */
-float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the minor axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index. */
-float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the major axis of an ellipse that describes the size
* of the approaching tool for the given pointer index.
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
-float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the minor axis of an ellipse that describes the size
* of the approaching tool for the given pointer index.
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
-float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current orientation of the touch area and tool area in radians clockwise from
* vertical for the given pointer index.
@@ -525,7 +676,11 @@ float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_
* indicates that the major axis of contact is oriented to the left.
* The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
* (finger pointing fully right). */
-float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
+
+/* Get the value of the request axis for the given pointer index. */
+float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
+ int32_t axis, size_t pointer_index) __NDK_FPABI__;
/* Get the number of historical points in this event. These are movements that
* have occurred between this event and the previous event. This only applies
@@ -546,7 +701,7 @@ int64_t AMotionEvent_getHistoricalEventTime(const AInputEvent* motion_event,
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical raw Y coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
@@ -556,21 +711,21 @@ float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t poi
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical X coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalX(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical Y coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical pressure of this event for the given pointer index that
* occurred between this event and the previous motion event.
@@ -578,7 +733,7 @@ float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointe
* although values higher than 1 may be generated depending on the calibration of
* the input device. */
float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the current scaled value of the approximate size for the given pointer index that
* occurred between this event and the previous motion event.
@@ -588,19 +743,19 @@ float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t
* and scaled to a value between 0 and 1. The value of size can be used to
* determine fat touch events. */
float AMotionEvent_getHistoricalSize(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the major axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index that
* occurred between this event and the previous motion event. */
float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the minor axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index that
* occurred between this event and the previous motion event. */
float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the major axis of an ellipse that describes the size
* of the approaching tool for the given pointer index that
@@ -608,7 +763,7 @@ float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the minor axis of an ellipse that describes the size
* of the approaching tool for the given pointer index that
@@ -616,7 +771,7 @@ float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical orientation of the touch area and tool area in radians clockwise from
* vertical for the given pointer index that
@@ -628,7 +783,12 @@ float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_
* The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
* (finger pointing fully right). */
float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
+
+/* Get the historical value of the request axis for the given pointer index
+ * that occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event,
+ int32_t axis, size_t pointer_index, size_t history_index) __NDK_FPABI__;
/*
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h b/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
index 496eccc..5d49775 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
@@ -154,6 +154,102 @@ enum {
AKEYCODE_BUTTON_START = 108,
AKEYCODE_BUTTON_SELECT = 109,
AKEYCODE_BUTTON_MODE = 110,
+ AKEYCODE_ESCAPE = 111,
+ AKEYCODE_FORWARD_DEL = 112,
+ AKEYCODE_CTRL_LEFT = 113,
+ AKEYCODE_CTRL_RIGHT = 114,
+ AKEYCODE_CAPS_LOCK = 115,
+ AKEYCODE_SCROLL_LOCK = 116,
+ AKEYCODE_META_LEFT = 117,
+ AKEYCODE_META_RIGHT = 118,
+ AKEYCODE_FUNCTION = 119,
+ AKEYCODE_SYSRQ = 120,
+ AKEYCODE_BREAK = 121,
+ AKEYCODE_MOVE_HOME = 122,
+ AKEYCODE_MOVE_END = 123,
+ AKEYCODE_INSERT = 124,
+ AKEYCODE_FORWARD = 125,
+ AKEYCODE_MEDIA_PLAY = 126,
+ AKEYCODE_MEDIA_PAUSE = 127,
+ AKEYCODE_MEDIA_CLOSE = 128,
+ AKEYCODE_MEDIA_EJECT = 129,
+ AKEYCODE_MEDIA_RECORD = 130,
+ AKEYCODE_F1 = 131,
+ AKEYCODE_F2 = 132,
+ AKEYCODE_F3 = 133,
+ AKEYCODE_F4 = 134,
+ AKEYCODE_F5 = 135,
+ AKEYCODE_F6 = 136,
+ AKEYCODE_F7 = 137,
+ AKEYCODE_F8 = 138,
+ AKEYCODE_F9 = 139,
+ AKEYCODE_F10 = 140,
+ AKEYCODE_F11 = 141,
+ AKEYCODE_F12 = 142,
+ AKEYCODE_NUM_LOCK = 143,
+ AKEYCODE_NUMPAD_0 = 144,
+ AKEYCODE_NUMPAD_1 = 145,
+ AKEYCODE_NUMPAD_2 = 146,
+ AKEYCODE_NUMPAD_3 = 147,
+ AKEYCODE_NUMPAD_4 = 148,
+ AKEYCODE_NUMPAD_5 = 149,
+ AKEYCODE_NUMPAD_6 = 150,
+ AKEYCODE_NUMPAD_7 = 151,
+ AKEYCODE_NUMPAD_8 = 152,
+ AKEYCODE_NUMPAD_9 = 153,
+ AKEYCODE_NUMPAD_DIVIDE = 154,
+ AKEYCODE_NUMPAD_MULTIPLY = 155,
+ AKEYCODE_NUMPAD_SUBTRACT = 156,
+ AKEYCODE_NUMPAD_ADD = 157,
+ AKEYCODE_NUMPAD_DOT = 158,
+ AKEYCODE_NUMPAD_COMMA = 159,
+ AKEYCODE_NUMPAD_ENTER = 160,
+ AKEYCODE_NUMPAD_EQUALS = 161,
+ AKEYCODE_NUMPAD_LEFT_PAREN = 162,
+ AKEYCODE_NUMPAD_RIGHT_PAREN = 163,
+ AKEYCODE_VOLUME_MUTE = 164,
+ AKEYCODE_INFO = 165,
+ AKEYCODE_CHANNEL_UP = 166,
+ AKEYCODE_CHANNEL_DOWN = 167,
+ AKEYCODE_ZOOM_IN = 168,
+ AKEYCODE_ZOOM_OUT = 169,
+ AKEYCODE_TV = 170,
+ AKEYCODE_WINDOW = 171,
+ AKEYCODE_GUIDE = 172,
+ AKEYCODE_DVR = 173,
+ AKEYCODE_BOOKMARK = 174,
+ AKEYCODE_CAPTIONS = 175,
+ AKEYCODE_SETTINGS = 176,
+ AKEYCODE_TV_POWER = 177,
+ AKEYCODE_TV_INPUT = 178,
+ AKEYCODE_STB_POWER = 179,
+ AKEYCODE_STB_INPUT = 180,
+ AKEYCODE_AVR_POWER = 181,
+ AKEYCODE_AVR_INPUT = 182,
+ AKEYCODE_PROG_RED = 183,
+ AKEYCODE_PROG_GREEN = 184,
+ AKEYCODE_PROG_YELLOW = 185,
+ AKEYCODE_PROG_BLUE = 186,
+ AKEYCODE_APP_SWITCH = 187,
+ AKEYCODE_BUTTON_1 = 188,
+ AKEYCODE_BUTTON_2 = 189,
+ AKEYCODE_BUTTON_3 = 190,
+ AKEYCODE_BUTTON_4 = 191,
+ AKEYCODE_BUTTON_5 = 192,
+ AKEYCODE_BUTTON_6 = 193,
+ AKEYCODE_BUTTON_7 = 194,
+ AKEYCODE_BUTTON_8 = 195,
+ AKEYCODE_BUTTON_9 = 196,
+ AKEYCODE_BUTTON_10 = 197,
+ AKEYCODE_BUTTON_11 = 198,
+ AKEYCODE_BUTTON_12 = 199,
+ AKEYCODE_BUTTON_13 = 200,
+ AKEYCODE_BUTTON_14 = 201,
+ AKEYCODE_BUTTON_15 = 202,
+ AKEYCODE_BUTTON_16 = 203,
+ AKEYCODE_LANGUAGE_SWITCH = 204,
+ AKEYCODE_MANNER_MODE = 205,
+ AKEYCODE_3D_MODE = 206,
// NOTE: If you add a new keycode here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/looper.h b/9/platforms/android-14/arch-x86/usr/include/android/looper.h
index a9d8426..24e3967 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/looper.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/looper.h
@@ -148,7 +148,8 @@ enum {
/**
* For callback-based event loops, this is the prototype of the function
- * that is called. It is given the file descriptor it is associated with,
+ * that is called when a file descriptor event occurs.
+ * It is given the file descriptor it is associated with,
* a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT),
* and the data pointer that was originally supplied.
*
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h b/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
index 52997bf..bc70f88 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
@@ -98,6 +98,13 @@ typedef struct ANativeActivity {
* uses this to access binary assets bundled inside its own .apk file.
*/
AAssetManager* assetManager;
+
+ /**
+ * Available starting with Honeycomb: path to the directory containing
+ * the application's OBB files (if any). If the app doesn't have any
+ * OBB files, this directory may not exist.
+ */
+ const char* obbPath;
} ANativeActivity;
/**
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_window.h b/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
index f3d7550..2f4f2d3 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
@@ -95,11 +95,20 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window);
*
* For all of these parameters, if 0 is supplied then the window's base
* value will come back in force.
+ *
+ * width and height must be either both zero or both non-zero.
+ *
*/
-int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format);
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window,
+ int32_t width, int32_t height, int32_t format);
/**
* Lock the window's next drawing surface for writing.
+ * inOutDirtyBounds is used as an in/out parameter, upon entering the
+ * function, it contains the dirty region, that is, the region the caller
+ * intends to redraw. When the function returns, inOutDirtyBounds is updated
+ * with the actual area the caller needs to redraw -- this region is often
+ * extended by ANativeWindow_lock.
*/
int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
ARect* inOutDirtyBounds);
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h b/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
index b9e72ef..408c263 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
@@ -33,6 +33,14 @@ extern "C" {
*/
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
+/**
+ * Return the ANativeWindow associated with a Java SurfaceTexture object,
+ * for interacting with it through native code. This acquires a reference
+ * on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
+ * when done with it so that it doesn't leak.
+ */
+ANativeWindow* ANativeWindow_fromSurfaceTexture(JNIEnv* env, jobject surfaceTexture);
+
#ifdef __cplusplus
};
#endif
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/rect.h b/9/platforms/android-14/arch-x86/usr/include/android/rect.h
index bcd42a9..64d487d 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/rect.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/rect.h
@@ -18,8 +18,6 @@
#ifndef ANDROID_RECT_H
#define ANDROID_RECT_H
-#include <stdint.h>
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/sensor.h b/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
index f163f18..e6a63c2 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
@@ -239,7 +239,7 @@ int ASensor_getType(ASensor const* sensor);
/*
* Returns this sensors's resolution
*/
-float ASensor_getResolution(ASensor const* sensor);
+float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
/*
* Returns the minimum delay allowed between events in microseconds.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/tts.h b/9/platforms/android-14/arch-x86/usr/include/android/tts.h
new file mode 100644
index 0000000..fb15108
--- /dev/null
+++ b/9/platforms/android-14/arch-x86/usr/include/android/tts.h
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef ANDROID_TTS_H
+#define ANDROID_TTS_H
+
+// This header defines the interface used by the Android platform
+// to access Text-To-Speech functionality in shared libraries that implement
+// speech synthesis and the management of resources associated with the
+// synthesis.
+
+// The shared library must contain a function named "android_getTtsEngine"
+// that returns an 'android_tts_engine_t' instance.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ANDROID_TTS_ENGINE_PROPERTY_CONFIG "engineConfig"
+#define ANDROID_TTS_ENGINE_PROPERTY_PITCH "pitch"
+#define ANDROID_TTS_ENGINE_PROPERTY_RATE "rate"
+#define ANDROID_TTS_ENGINE_PROPERTY_VOLUME "volume"
+
+typedef enum {
+ ANDROID_TTS_SUCCESS = 0,
+ ANDROID_TTS_FAILURE = -1,
+ ANDROID_TTS_FEATURE_UNSUPPORTED = -2,
+ ANDROID_TTS_VALUE_INVALID = -3,
+ ANDROID_TTS_PROPERTY_UNSUPPORTED = -4,
+ ANDROID_TTS_PROPERTY_SIZE_TOO_SMALL = -5,
+ ANDROID_TTS_MISSING_RESOURCES = -6
+} android_tts_result_t;
+
+typedef enum {
+ ANDROID_TTS_LANG_COUNTRY_VAR_AVAILABLE = 2,
+ ANDROID_TTS_LANG_COUNTRY_AVAILABLE = 1,
+ ANDROID_TTS_LANG_AVAILABLE = 0,
+ ANDROID_TTS_LANG_MISSING_DATA = -1,
+ ANDROID_TTS_LANG_NOT_SUPPORTED = -2
+} android_tts_support_result_t;
+
+typedef enum {
+ ANDROID_TTS_SYNTH_DONE = 0,
+ ANDROID_TTS_SYNTH_PENDING = 1
+} android_tts_synth_status_t;
+
+typedef enum {
+ ANDROID_TTS_CALLBACK_HALT = 0,
+ ANDROID_TTS_CALLBACK_CONTINUE = 1
+} android_tts_callback_status_t;
+
+// Supported audio formats
+typedef enum {
+ ANDROID_TTS_AUDIO_FORMAT_INVALID = -1,
+ ANDROID_TTS_AUDIO_FORMAT_DEFAULT = 0,
+ ANDROID_TTS_AUDIO_FORMAT_PCM_16_BIT = 1,
+ ANDROID_TTS_AUDIO_FORMAT_PCM_8_BIT = 2,
+} android_tts_audio_format_t;
+
+
+/* An android_tts_engine_t object can be anything, but must have,
+ * as its first field, a pointer to a table of functions.
+ *
+ * See the full definition of struct android_tts_engine_t_funcs_t
+ * below for details.
+ */
+typedef struct android_tts_engine_funcs_t android_tts_engine_funcs_t;
+
+typedef struct {
+ android_tts_engine_funcs_t *funcs;
+} android_tts_engine_t;
+
+/* This function must be located in the TTS Engine shared library
+ * and must return the address of an android_tts_engine_t library.
+ */
+extern android_tts_engine_t *android_getTtsEngine();
+
+/* Including the old version for legacy support (Froyo compatibility).
+ * This should return the same thing as android_getTtsEngine.
+ */
+extern "C" android_tts_engine_t *getTtsEngine();
+
+// A callback type used to notify the framework of new synthetized
+// audio samples, status will be SYNTH_DONE for the last sample of
+// the last request, of SYNTH_PENDING otherwise.
+//
+// This is passed by the framework to the engine through the
+// 'engine_init' function (see below).
+//
+// The callback for synthesis completed takes:
+// @param [inout] void *& - The userdata pointer set in the original
+// synth call
+// @param [in] uint32_t - Track sampling rate in Hz
+// @param [in] uint32_t - The audio format
+// @param [in] int - The number of channels
+// @param [inout] int8_t *& - A buffer of audio data only valid during the
+// execution of the callback
+// @param [inout] size_t & - The size of the buffer
+// @param [in] tts_synth_status - indicate whether the synthesis is done, or
+// if more data is to be synthesized.
+// @return TTS_CALLBACK_HALT to indicate the synthesis must stop,
+// TTS_CALLBACK_CONTINUE to indicate the synthesis must continue if
+// there is more data to produce.
+typedef android_tts_callback_status_t (*android_tts_synth_cb_t)
+ (void **pUserData,
+ uint32_t trackSamplingHz,
+ android_tts_audio_format_t audioFormat,
+ int channelCount,
+ int8_t **pAudioBuffer,
+ size_t *pBufferSize,
+ android_tts_synth_status_t status);
+
+
+// The table of function pointers that the android_tts_engine_t must point to.
+// Note that each of these functions will take a handle to the engine itself
+// as their first parameter.
+//
+
+struct android_tts_engine_funcs_t {
+ // reserved fields, ignored by the framework
+ // they must be placed here to ensure binary compatibility
+ // of legacy binary plugins.
+ void *reserved[2];
+
+ // Initialize the TTS engine and returns whether initialization succeeded.
+ // @param synthDoneCBPtr synthesis callback function pointer
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*init)
+ (void *engine,
+ android_tts_synth_cb_t synthDonePtr,
+ const char *engineConfig);
+
+ // Shut down the TTS engine and releases all associated resources.
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*shutdown)
+ (void *engine);
+
+ // Interrupt synthesis and flushes any synthesized data that hasn't been
+ // output yet. This will block until callbacks underway are completed.
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*stop)
+ (void *engine);
+
+ // Returns the level of support for the language, country and variant.
+ // @return TTS_LANG_COUNTRY_VAR_AVAILABLE if the language, country and variant are supported,
+ // and the corresponding resources are correctly installed
+ // TTS_LANG_COUNTRY_AVAILABLE if the language and country are supported and the
+ // corresponding resources are correctly installed, but there is no match for
+ // the specified variant
+ // TTS_LANG_AVAILABLE if the language is supported and the
+ // corresponding resources are correctly installed, but there is no match for
+ // the specified country and variant
+ // TTS_LANG_MISSING_DATA if the required resources to provide any level of support
+ // for the language are not correctly installed
+ // TTS_LANG_NOT_SUPPORTED if the language is not supported by the TTS engine.
+ android_tts_support_result_t (*isLanguageAvailable)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Load the resources associated with the specified language. The loaded
+ // language will only be used once a call to setLanguage() with the same
+ // language value is issued. Language and country values are coded according to the ISO three
+ // letter codes for languages and countries, as can be retrieved from a java.util.Locale
+ // instance. The variant value is encoded as the variant string retrieved from a
+ // java.util.Locale instance built with that variant data.
+ // @param lang pointer to the ISO three letter code for the language
+ // @param country pointer to the ISO three letter code for the country
+ // @param variant pointer to the variant code
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*loadLanguage)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Load the resources associated with the specified language, country and Locale variant.
+ // The loaded language will only be used once a call to setLanguageFromLocale() with the same
+ // language value is issued. Language and country values are coded according to the ISO three
+ // letter codes for languages and countries, as can be retrieved from a java.util.Locale
+ // instance. The variant value is encoded as the variant string retrieved from a
+ // java.util.Locale instance built with that variant data.
+ // @param lang pointer to the ISO three letter code for the language
+ // @param country pointer to the ISO three letter code for the country
+ // @param variant pointer to the variant code
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*setLanguage)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Retrieve the currently set language, country and variant, or empty strings if none of
+ // parameters have been set. Language and country are represented by their 3-letter ISO code
+ // @param[out] pointer to the retrieved 3-letter code language value
+ // @param[out] pointer to the retrieved 3-letter code country value
+ // @param[out] pointer to the retrieved variant value
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*getLanguage)
+ (void *engine,
+ char *language,
+ char *country,
+ char *variant);
+
+ // Notifies the engine what audio parameters should be used for the synthesis.
+ // This is meant to be used as a hint, the engine implementation will set the output values
+ // to those of the synthesis format, based on a given hint.
+ // @param[inout] encoding in: the desired audio sample format
+ // out: the format used by the TTS engine
+ // @param[inout] rate in: the desired audio sample rate
+ // out: the sample rate used by the TTS engine
+ // @param[inout] channels in: the desired number of audio channels
+ // out: the number of channels used by the TTS engine
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*setAudioFormat)
+ (void *engine,
+ android_tts_audio_format_t* pEncoding,
+ uint32_t* pRate,
+ int* pChannels);
+
+ // Set a property for the the TTS engine
+ // "size" is the maximum size of "value" for properties "property"
+ // @param property pointer to the property name
+ // @param value pointer to the property value
+ // @param size maximum size required to store this type of property
+ // @return TTS_PROPERTY_UNSUPPORTED, or TTS_SUCCESS, or TTS_FAILURE,
+ // or TTS_VALUE_INVALID
+ android_tts_result_t (*setProperty)
+ (void *engine,
+ const char *property,
+ const char *value,
+ const size_t size);
+
+ // Retrieve a property from the TTS engine
+ // @param property pointer to the property name
+ // @param[out] value pointer to the retrieved language value
+ // @param[inout] iosize in: stores the size available to store the
+ // property value.
+ // out: stores the size required to hold the language
+ // value if getLanguage() returned
+ // TTS_PROPERTY_SIZE_TOO_SMALL, unchanged otherwise
+ // @return TTS_PROPERTY_UNSUPPORTED, or TTS_SUCCESS,
+ // or TTS_PROPERTY_SIZE_TOO_SMALL
+ android_tts_result_t (*getProperty)
+ (void *engine,
+ const char *property,
+ char *value,
+ size_t *iosize);
+
+ // Synthesize the text.
+ // As the synthesis is performed, the engine invokes the callback to notify
+ // the TTS framework that it has filled the given buffer, and indicates how
+ // many bytes it wrote. The callback is called repeatedly until the engine
+ // has generated all the audio data corresponding to the text.
+ // Note about the format of the input: the text parameter may use the
+ // following elements
+ // and their respective attributes as defined in the SSML 1.0 specification:
+ // * lang
+ // * say-as:
+ // o interpret-as
+ // * phoneme
+ // * voice:
+ // o gender,
+ // o age,
+ // o variant,
+ // o name
+ // * emphasis
+ // * break:
+ // o strength,
+ // o time
+ // * prosody:
+ // o pitch,
+ // o contour,
+ // o range,
+ // o rate,
+ // o duration,
+ // o volume
+ // * mark
+ // Differences between this text format and SSML are:
+ // * full SSML documents are not supported
+ // * namespaces are not supported
+ // Text is coded in UTF-8.
+ // @param text the UTF-8 text to synthesize
+ // @param userdata pointer to be returned when the call is invoked
+ // @param buffer the location where the synthesized data must be written
+ // @param bufferSize the number of bytes that can be written in buffer
+ // @return TTS_SUCCESS or TTS_FAILURE
+ android_tts_result_t (*synthesizeText)
+ (void *engine,
+ const char *text,
+ int8_t *buffer,
+ size_t bufferSize,
+ void *userdata);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ANDROID_TTS_H */
diff --git a/9/platforms/android-14/arch-x86/usr/include/inttypes.h b/9/platforms/android-14/arch-x86/usr/include/inttypes.h
index 73b22db..62e12c6 100644
--- a/9/platforms/android-14/arch-x86/usr/include/inttypes.h
+++ b/9/platforms/android-14/arch-x86/usr/include/inttypes.h
@@ -249,8 +249,6 @@ typedef struct {
} imaxdiv_t;
__BEGIN_DECLS
-intmax_t imaxabs(intmax_t);
-imaxdiv_t imaxdiv(intmax_t, intmax_t);
intmax_t strtoimax(const char *, char **, int);
uintmax_t strtoumax(const char *, char **, int);
diff --git a/9/platforms/android-14/arch-x86/usr/include/jni.h b/9/platforms/android-14/arch-x86/usr/include/jni.h
index 495902c..21ad370 100644
--- a/9/platforms/android-14/arch-x86/usr/include/jni.h
+++ b/9/platforms/android-14/arch-x86/usr/include/jni.h
@@ -24,6 +24,7 @@
#ifndef JNI_H_
#define JNI_H_
+#include <sys/cdefs.h>
#include <stdarg.h>
/*
@@ -231,12 +232,12 @@ struct JNINativeInterface {
jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...);
jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list);
jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
- jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...);
- jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list);
- jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
- jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...);
- jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list);
- jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__;
+ jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__;
+ jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__;
+ jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__;
+ jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__;
+ jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__;
void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...);
void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list);
void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
@@ -284,17 +285,17 @@ struct JNINativeInterface {
jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass,
jmethodID, jvalue*);
jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass,
- jmethodID, ...);
+ jmethodID, ...) __NDK_FPABI__;
jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass,
- jmethodID, va_list);
+ jmethodID, va_list) __NDK_FPABI__;
jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass,
- jmethodID, jvalue*);
+ jmethodID, jvalue*) __NDK_FPABI__;
jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass,
- jmethodID, ...);
+ jmethodID, ...) __NDK_FPABI__;
jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass,
- jmethodID, va_list);
+ jmethodID, va_list) __NDK_FPABI__;
jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass,
- jmethodID, jvalue*);
+ jmethodID, jvalue*) __NDK_FPABI__;
void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass,
jmethodID, ...);
void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass,
@@ -311,8 +312,8 @@ struct JNINativeInterface {
jshort (*GetShortField)(JNIEnv*, jobject, jfieldID);
jint (*GetIntField)(JNIEnv*, jobject, jfieldID);
jlong (*GetLongField)(JNIEnv*, jobject, jfieldID);
- jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID);
- jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID);
+ jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__;
+ jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__;
void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject);
void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean);
@@ -321,8 +322,8 @@ struct JNINativeInterface {
void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort);
void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint);
void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong);
- void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat);
- void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble);
+ void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat) __NDK_FPABI__;
+ void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble) __NDK_FPABI__;
jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*);
@@ -349,12 +350,12 @@ struct JNINativeInterface {
jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...);
jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list);
jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
- jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...);
- jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list);
- jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
- jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...);
- jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list);
- jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__;
+ jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__;
+ jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__;
+ jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__;
+ jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__;
+ jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__;
void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...);
void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);
void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
@@ -369,8 +370,8 @@ struct JNINativeInterface {
jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID);
jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID);
jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID);
- jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID);
- jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID);
+ jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__;
+ jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__;
void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject);
void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean);
@@ -379,8 +380,8 @@ struct JNINativeInterface {
void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort);
void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint);
void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong);
- void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat);
- void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble);
+ void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat) __NDK_FPABI__;
+ void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble) __NDK_FPABI__;
jstring (*NewString)(JNIEnv*, const jchar*, jsize);
jsize (*GetStringLength)(JNIEnv*, jstring);
@@ -605,6 +606,7 @@ struct _JNIEnv {
{ return functions->GetMethodID(this, clazz, name, sig); }
#define CALL_TYPE_METHOD(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...) \
{ \
_jtype result; \
@@ -616,10 +618,12 @@ struct _JNIEnv {
return result; \
}
#define CALL_TYPE_METHODV(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype Call##_jname##MethodV(jobject obj, jmethodID methodID, \
va_list args) \
{ return functions->Call##_jname##MethodV(this, obj, methodID, args); }
#define CALL_TYPE_METHODA(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype Call##_jname##MethodA(jobject obj, jmethodID methodID, \
jvalue* args) \
{ return functions->Call##_jname##MethodA(this, obj, methodID, args); }
@@ -652,6 +656,7 @@ struct _JNIEnv {
{ functions->CallVoidMethodA(this, obj, methodID, args); }
#define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz, \
jmethodID methodID, ...) \
{ \
@@ -664,11 +669,13 @@ struct _JNIEnv {
return result; \
}
#define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz, \
jmethodID methodID, va_list args) \
{ return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz, \
methodID, args); }
#define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz, \
jmethodID methodID, jvalue* args) \
{ return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz, \
@@ -721,8 +728,10 @@ struct _JNIEnv {
{ return functions->GetIntField(this, obj, fieldID); }
jlong GetLongField(jobject obj, jfieldID fieldID)
{ return functions->GetLongField(this, obj, fieldID); }
+ __NDK_FPABI__
jfloat GetFloatField(jobject obj, jfieldID fieldID)
{ return functions->GetFloatField(this, obj, fieldID); }
+ __NDK_FPABI__
jdouble GetDoubleField(jobject obj, jfieldID fieldID)
{ return functions->GetDoubleField(this, obj, fieldID); }
@@ -740,8 +749,10 @@ struct _JNIEnv {
{ functions->SetIntField(this, obj, fieldID, value); }
void SetLongField(jobject obj, jfieldID fieldID, jlong value)
{ functions->SetLongField(this, obj, fieldID, value); }
+ __NDK_FPABI__
void SetFloatField(jobject obj, jfieldID fieldID, jfloat value)
{ functions->SetFloatField(this, obj, fieldID, value); }
+ __NDK_FPABI__
void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value)
{ functions->SetDoubleField(this, obj, fieldID, value); }
@@ -749,6 +760,7 @@ struct _JNIEnv {
{ return functions->GetStaticMethodID(this, clazz, name, sig); }
#define CALL_STATIC_TYPE_METHOD(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID, \
...) \
{ \
@@ -761,11 +773,13 @@ struct _JNIEnv {
return result; \
}
#define CALL_STATIC_TYPE_METHODV(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID, \
va_list args) \
{ return functions->CallStatic##_jname##MethodV(this, clazz, methodID, \
args); }
#define CALL_STATIC_TYPE_METHODA(_jtype, _jname) \
+ __NDK_FPABI__ \
_jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID, \
jvalue* args) \
{ return functions->CallStatic##_jname##MethodA(this, clazz, methodID, \
@@ -815,8 +829,10 @@ struct _JNIEnv {
{ return functions->GetStaticIntField(this, clazz, fieldID); }
jlong GetStaticLongField(jclass clazz, jfieldID fieldID)
{ return functions->GetStaticLongField(this, clazz, fieldID); }
+ __NDK_FPABI__
jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID)
{ return functions->GetStaticFloatField(this, clazz, fieldID); }
+ __NDK_FPABI__
jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID)
{ return functions->GetStaticDoubleField(this, clazz, fieldID); }
@@ -834,8 +850,10 @@ struct _JNIEnv {
{ functions->SetStaticIntField(this, clazz, fieldID, value); }
void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value)
{ functions->SetStaticLongField(this, clazz, fieldID, value); }
+ __NDK_FPABI__
void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value)
{ functions->SetStaticFloatField(this, clazz, fieldID, value); }
+ __NDK_FPABI__
void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value)
{ functions->SetStaticDoubleField(this, clazz, fieldID, value); }
diff --git a/9/platforms/android-14/arch-x86/usr/include/math.h b/9/platforms/android-14/arch-x86/usr/include/math.h
index 3b5660f..e46cf46 100644
--- a/9/platforms/android-14/arch-x86/usr/include/math.h
+++ b/9/platforms/android-14/arch-x86/usr/include/math.h
@@ -183,219 +183,222 @@ __BEGIN_DECLS
/*
* ANSI/POSIX
*/
-int __fpclassifyd(double) __pure2;
-int __fpclassifyf(float) __pure2;
-int __fpclassifyl(long double) __pure2;
-int __isfinitef(float) __pure2;
-int __isfinite(double) __pure2;
-int __isfinitel(long double) __pure2;
-int __isinff(float) __pure2;
-int __isinf(double) __pure2;
-int __isinfl(long double) __pure2;
-int __isnanl(long double) __pure2;
-int __isnormalf(float) __pure2;
-int __isnormal(double) __pure2;
-int __isnormall(long double) __pure2;
-int __signbit(double) __pure2;
-int __signbitf(float) __pure2;
-int __signbitl(long double) __pure2;
-
-double acos(double);
-double asin(double);
-double atan(double);
-double atan2(double, double);
-double cos(double);
-double sin(double);
-double tan(double);
-
-double cosh(double);
-double sinh(double);
-double tanh(double);
-
-double exp(double);
-double frexp(double, int *); /* fundamentally !__pure2 */
-double ldexp(double, int);
-double log(double);
-double log10(double);
-double modf(double, double *); /* fundamentally !__pure2 */
-
-double pow(double, double);
-double sqrt(double);
-
-double ceil(double);
-double fabs(double) __pure2;
-double floor(double);
-double fmod(double, double);
+int __fpclassifyd(double) __NDK_FPABI_MATH__ __pure2;
+int __fpclassifyf(float) __NDK_FPABI_MATH__ __pure2;
+int __fpclassifyl(long double) __NDK_FPABI_MATH__ __pure2;
+int __isfinitef(float) __NDK_FPABI_MATH__ __pure2;
+int __isfinite(double) __NDK_FPABI_MATH__ __pure2;
+int __isfinitel(long double) __NDK_FPABI_MATH__ __pure2;
+int __isinff(float) __NDK_FPABI_MATH__ __pure2;
+int __isinf(double) __NDK_FPABI_MATH__ __pure2;
+int __isinfl(long double) __NDK_FPABI_MATH__ __pure2;
+int __isnanl(long double) __NDK_FPABI_MATH__ __pure2;
+int __isnormalf(float) __NDK_FPABI_MATH__ __pure2;
+int __isnormal(double) __NDK_FPABI_MATH__ __pure2;
+int __isnormall(long double) __NDK_FPABI_MATH__ __pure2;
+int __signbit(double) __NDK_FPABI_MATH__ __pure2;
+int __signbitf(float) __NDK_FPABI_MATH__ __pure2;
+int __signbitl(long double) __NDK_FPABI_MATH__ __pure2;
+
+double acos(double) __NDK_FPABI_MATH__;
+double asin(double) __NDK_FPABI_MATH__;
+double atan(double) __NDK_FPABI_MATH__;
+double atan2(double, double) __NDK_FPABI_MATH__;
+double cos(double) __NDK_FPABI_MATH__;
+double sin(double) __NDK_FPABI_MATH__;
+double tan(double) __NDK_FPABI_MATH__;
+
+double cosh(double) __NDK_FPABI_MATH__;
+double sinh(double) __NDK_FPABI_MATH__;
+double tanh(double) __NDK_FPABI_MATH__;
+
+double exp(double) __NDK_FPABI_MATH__;
+double frexp(double, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
+double ldexp(double, int) __NDK_FPABI_MATH__;
+double log(double) __NDK_FPABI_MATH__;
+double log10(double) __NDK_FPABI_MATH__;
+double modf(double, double *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
+
+double pow(double, double) __NDK_FPABI_MATH__;
+double sqrt(double) __NDK_FPABI_MATH__;
+
+double ceil(double) __NDK_FPABI_MATH__;
+double fabs(double) __NDK_FPABI_MATH__ __pure2;
+double floor(double) __NDK_FPABI_MATH__;
+double fmod(double, double) __NDK_FPABI_MATH__;
/*
* These functions are not in C90.
*/
/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
-double acosh(double);
-double asinh(double);
-double atanh(double);
-double cbrt(double);
-double erf(double);
-double erfc(double);
-double exp2(double);
-double expm1(double);
-double fma(double, double, double);
-double hypot(double, double);
-int ilogb(double) __pure2;
-/* int (isinf)(double) __pure2; */
-int (isnan)(double) __pure2;
-double lgamma(double);
-long long llrint(double);
-long long llround(double);
-double log1p(double);
-double logb(double);
-long lrint(double);
-long lround(double);
-double nextafter(double, double);
-double remainder(double, double);
-double remquo(double, double, int *);
-double rint(double);
+double acosh(double) __NDK_FPABI_MATH__;
+double asinh(double) __NDK_FPABI_MATH__;
+double atanh(double) __NDK_FPABI_MATH__;
+double cbrt(double) __NDK_FPABI_MATH__;
+double erf(double) __NDK_FPABI_MATH__;
+double erfc(double) __NDK_FPABI_MATH__;
+double exp2(double) __NDK_FPABI_MATH__;
+double expm1(double) __NDK_FPABI_MATH__;
+double fma(double, double, double) __NDK_FPABI_MATH__;
+double hypot(double, double) __NDK_FPABI_MATH__;
+int ilogb(double) __NDK_FPABI_MATH__ __pure2;
+/* int (isinf)(double) __NDK_FPABI_MATH__ __pure2; */
+int (isnan)(double) __NDK_FPABI_MATH__ __pure2;
+double lgamma(double) __NDK_FPABI_MATH__;
+long long llrint(double) __NDK_FPABI_MATH__;
+long long llround(double) __NDK_FPABI_MATH__;
+double log1p(double) __NDK_FPABI_MATH__;
+double logb(double) __NDK_FPABI_MATH__;
+long lrint(double) __NDK_FPABI_MATH__;
+long lround(double) __NDK_FPABI_MATH__;
+double nan(const char *) __NDK_FPABI_MATH__ __pure2;
+double nextafter(double, double) __NDK_FPABI_MATH__;
+double remainder(double, double) __NDK_FPABI_MATH__;
+double remquo(double, double, int *) __NDK_FPABI_MATH__;
+double rint(double) __NDK_FPABI_MATH__;
/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
/* #if __BSD_VISIBLE || __XSI_VISIBLE */
-double j0(double);
-double j1(double);
-double jn(int, double);
-double scalb(double, double);
-double y0(double);
-double y1(double);
-double yn(int, double);
+double j0(double) __NDK_FPABI_MATH__;
+double j1(double) __NDK_FPABI_MATH__;
+double jn(int, double) __NDK_FPABI_MATH__;
+double scalb(double, double) __NDK_FPABI_MATH__;
+double y0(double) __NDK_FPABI_MATH__;
+double y1(double) __NDK_FPABI_MATH__;
+double yn(int, double) __NDK_FPABI_MATH__;
/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
-double gamma(double);
+double gamma(double) __NDK_FPABI_MATH__;
/* #endif */
/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
-double copysign(double, double) __pure2;
-double fdim(double, double);
-double fmax(double, double) __pure2;
-double fmin(double, double) __pure2;
-double nearbyint(double);
-double round(double);
-double scalbln(double, long);
-double scalbn(double, int);
-double tgamma(double);
-double trunc(double);
+double copysign(double, double) __NDK_FPABI_MATH__ __pure2;
+double fdim(double, double) __NDK_FPABI_MATH__;
+double fmax(double, double) __NDK_FPABI_MATH__ __pure2;
+double fmin(double, double) __NDK_FPABI_MATH__ __pure2;
+double nearbyint(double) __NDK_FPABI_MATH__;
+double round(double) __NDK_FPABI_MATH__;
+double scalbln(double, long) __NDK_FPABI_MATH__;
+double scalbn(double, int) __NDK_FPABI_MATH__;
+double tgamma(double) __NDK_FPABI_MATH__;
+double trunc(double) __NDK_FPABI_MATH__;
/* #endif */
/*
* BSD math library entry points
*/
/* #if __BSD_VISIBLE */
-double drem(double, double);
-int finite(double) __pure2;
-int isnanf(float) __pure2;
+double drem(double, double) __NDK_FPABI_MATH__;
+int finite(double) __NDK_FPABI_MATH__ __pure2;
+int isnanf(float) __NDK_FPABI_MATH__ __pure2;
/*
* Reentrant version of gamma & lgamma; passes signgam back by reference
* as the second argument; user must allocate space for signgam.
*/
-double gamma_r(double, int *);
-double lgamma_r(double, int *);
+double gamma_r(double, int *) __NDK_FPABI_MATH__;
+double lgamma_r(double, int *) __NDK_FPABI_MATH__;
/*
* IEEE Test Vector
*/
-double significand(double);
+double significand(double) __NDK_FPABI_MATH__;
/* #endif */ /* __BSD_VISIBLE */
/* float versions of ANSI/POSIX functions */
/*#if __ISO_C_VISIBLE >= 1999 */
-float acosf(float);
-float asinf(float);
-float atanf(float);
-float atan2f(float, float);
-float cosf(float);
-float sinf(float);
-float tanf(float);
-
-float coshf(float);
-float sinhf(float);
-float tanhf(float);
-
-float exp2f(float);
-float expf(float);
-float expm1f(float);
-float frexpf(float, int *); /* fundamentally !__pure2 */
-int ilogbf(float) __pure2;
-float ldexpf(float, int);
-float log10f(float);
-float log1pf(float);
-float logf(float);
-float modff(float, float *); /* fundamentally !__pure2 */
-
-float powf(float, float);
-float sqrtf(float);
-
-float ceilf(float);
-float fabsf(float) __pure2;
-float floorf(float);
-float fmodf(float, float);
-float roundf(float);
-
-float erff(float);
-float erfcf(float);
-float hypotf(float, float);
-float lgammaf(float);
-
-float acoshf(float);
-float asinhf(float);
-float atanhf(float);
-float cbrtf(float);
-float logbf(float);
-float copysignf(float, float) __pure2;
-long long llrintf(float);
-long long llroundf(float);
-long lrintf(float);
-long lroundf(float);
-float nearbyintf(float);
-float nextafterf(float, float);
-float remainderf(float, float);
-float remquof(float, float, int *);
-float rintf(float);
-float scalblnf(float, long);
-float scalbnf(float, int);
-float truncf(float);
-
-float fdimf(float, float);
-float fmaf(float, float, float);
-float fmaxf(float, float) __pure2;
-float fminf(float, float) __pure2;
+float acosf(float) __NDK_FPABI_MATH__;
+float asinf(float) __NDK_FPABI_MATH__;
+float atanf(float) __NDK_FPABI_MATH__;
+float atan2f(float, float) __NDK_FPABI_MATH__;
+float cosf(float) __NDK_FPABI_MATH__;
+float sinf(float) __NDK_FPABI_MATH__;
+float tanf(float) __NDK_FPABI_MATH__;
+
+float coshf(float) __NDK_FPABI_MATH__;
+float sinhf(float) __NDK_FPABI_MATH__;
+float tanhf(float) __NDK_FPABI_MATH__;
+
+float exp2f(float) __NDK_FPABI_MATH__;
+float expf(float) __NDK_FPABI_MATH__;
+float expm1f(float) __NDK_FPABI_MATH__;
+float frexpf(float, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
+int ilogbf(float) __NDK_FPABI_MATH__ __pure2;
+float ldexpf(float, int) __NDK_FPABI_MATH__;
+float log10f(float) __NDK_FPABI_MATH__;
+float log1pf(float) __NDK_FPABI_MATH__;
+float logf(float) __NDK_FPABI_MATH__;
+float modff(float, float *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
+
+float powf(float, float) __NDK_FPABI_MATH__;
+float sqrtf(float) __NDK_FPABI_MATH__;
+
+float ceilf(float) __NDK_FPABI_MATH__;
+float fabsf(float) __NDK_FPABI_MATH__ __pure2;
+float floorf(float) __NDK_FPABI_MATH__;
+float fmodf(float, float) __NDK_FPABI_MATH__;
+float roundf(float) __NDK_FPABI_MATH__;
+
+float erff(float) __NDK_FPABI_MATH__;
+float erfcf(float) __NDK_FPABI_MATH__;
+float hypotf(float, float) __NDK_FPABI_MATH__;
+float lgammaf(float) __NDK_FPABI_MATH__;
+float tgammaf(float) __NDK_FPABI_MATH__;
+
+float acoshf(float) __NDK_FPABI_MATH__;
+float asinhf(float) __NDK_FPABI_MATH__;
+float atanhf(float) __NDK_FPABI_MATH__;
+float cbrtf(float) __NDK_FPABI_MATH__;
+float logbf(float) __NDK_FPABI_MATH__;
+float copysignf(float, float) __NDK_FPABI_MATH__ __pure2;
+long long llrintf(float) __NDK_FPABI_MATH__;
+long long llroundf(float) __NDK_FPABI_MATH__;
+long lrintf(float) __NDK_FPABI_MATH__;
+long lroundf(float) __NDK_FPABI_MATH__;
+float nanf(const char *) __NDK_FPABI_MATH__ __pure2;
+float nearbyintf(float) __NDK_FPABI_MATH__;
+float nextafterf(float, float) __NDK_FPABI_MATH__;
+float remainderf(float, float) __NDK_FPABI_MATH__;
+float remquof(float, float, int *) __NDK_FPABI_MATH__;
+float rintf(float) __NDK_FPABI_MATH__;
+float scalblnf(float, long) __NDK_FPABI_MATH__;
+float scalbnf(float, int) __NDK_FPABI_MATH__;
+float truncf(float) __NDK_FPABI_MATH__;
+
+float fdimf(float, float) __NDK_FPABI_MATH__;
+float fmaf(float, float, float) __NDK_FPABI_MATH__;
+float fmaxf(float, float) __NDK_FPABI_MATH__ __pure2;
+float fminf(float, float) __NDK_FPABI_MATH__ __pure2;
/* #endif */
/*
* float versions of BSD math library entry points
*/
/* #if __BSD_VISIBLE */
-float dremf(float, float);
-int finitef(float) __pure2;
-float gammaf(float);
-float j0f(float);
-float j1f(float);
-float jnf(int, float);
-float scalbf(float, float);
-float y0f(float);
-float y1f(float);
-float ynf(int, float);
+float dremf(float, float) __NDK_FPABI_MATH__;
+int finitef(float) __NDK_FPABI_MATH__ __pure2;
+float gammaf(float) __NDK_FPABI_MATH__;
+float j0f(float) __NDK_FPABI_MATH__;
+float j1f(float) __NDK_FPABI_MATH__;
+float jnf(int, float) __NDK_FPABI_MATH__;
+float scalbf(float, float) __NDK_FPABI_MATH__;
+float y0f(float) __NDK_FPABI_MATH__;
+float y1f(float) __NDK_FPABI_MATH__;
+float ynf(int, float) __NDK_FPABI_MATH__;
/*
* Float versions of reentrant version of gamma & lgamma; passes
* signgam back by reference as the second argument; user must
* allocate space for signgam.
*/
-float gammaf_r(float, int *);
-float lgammaf_r(float, int *);
+float gammaf_r(float, int *) __NDK_FPABI_MATH__;
+float lgammaf_r(float, int *) __NDK_FPABI_MATH__;
/*
* float version of IEEE Test Vector
*/
-float significandf(float);
+float significandf(float) __NDK_FPABI_MATH__;
/* #endif */ /* __BSD_VISIBLE */
/*
@@ -403,88 +406,90 @@ float significandf(float);
*/
/* #if __ISO_C_VISIBLE >= 1999 */
#if 0
-long double acoshl(long double);
-long double acosl(long double);
-long double asinhl(long double);
-long double asinl(long double);
-long double atan2l(long double, long double);
-long double atanhl(long double);
-long double atanl(long double);
-long double cbrtl(long double);
+long double acoshl(long double) __NDK_FPABI_MATH__;
+long double acosl(long double) __NDK_FPABI_MATH__;
+long double asinhl(long double) __NDK_FPABI_MATH__;
+long double asinl(long double) __NDK_FPABI_MATH__;
+long double atan2l(long double, long double) __NDK_FPABI_MATH__;
+long double atanhl(long double) __NDK_FPABI_MATH__;
+long double atanl(long double) __NDK_FPABI_MATH__;
+long double cbrtl(long double) __NDK_FPABI_MATH__;
#endif
-long double ceill(long double);
-long double copysignl(long double, long double) __pure2;
+long double ceill(long double) __NDK_FPABI_MATH__;
+long double copysignl(long double, long double) __NDK_FPABI_MATH__ __pure2;
#if 0
-long double coshl(long double);
-long double cosl(long double);
-long double erfcl(long double);
-long double erfl(long double);
-long double exp2l(long double);
-long double expl(long double);
-long double expm1l(long double);
+long double coshl(long double) __NDK_FPABI_MATH__;
+long double cosl(long double) __NDK_FPABI_MATH__;
+long double erfcl(long double) __NDK_FPABI_MATH__;
+long double erfl(long double) __NDK_FPABI_MATH__;
+long double exp2l(long double) __NDK_FPABI_MATH__;
+long double expl(long double) __NDK_FPABI_MATH__;
+long double expm1l(long double) __NDK_FPABI_MATH__;
#endif
-long double fabsl(long double) __pure2;
-long double fdiml(long double, long double);
-long double floorl(long double);
-long double fmal(long double, long double, long double);
-long double fmaxl(long double, long double) __pure2;
-long double fminl(long double, long double) __pure2;
+long double fabsl(long double) __NDK_FPABI_MATH__ __pure2;
+long double fdiml(long double, long double) __NDK_FPABI_MATH__;
+long double floorl(long double) __NDK_FPABI_MATH__;
+long double fmal(long double, long double, long double) __NDK_FPABI_MATH__;
+long double fmaxl(long double, long double) __NDK_FPABI_MATH__ __pure2;
+long double fminl(long double, long double) __NDK_FPABI_MATH__ __pure2;
#if 0
-long double fmodl(long double, long double);
+long double fmodl(long double, long double) __NDK_FPABI_MATH__;
#endif
-long double frexpl(long double value, int *); /* fundamentally !__pure2 */
+long double frexpl(long double value, int *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
#if 0
-long double hypotl(long double, long double);
+long double hypotl(long double, long double) __NDK_FPABI_MATH__;
#endif
-int ilogbl(long double) __pure2;
-long double ldexpl(long double, int);
+int ilogbl(long double) __NDK_FPABI_MATH__ __pure2;
+long double ldexpl(long double, int) __NDK_FPABI_MATH__;
#if 0
-long double lgammal(long double);
-long long llrintl(long double);
+long double lgammal(long double) __NDK_FPABI_MATH__;
+long long llrintl(long double) __NDK_FPABI_MATH__;
#endif
-long long llroundl(long double);
+long long llroundl(long double) __NDK_FPABI_MATH__;
#if 0
-long double log10l(long double);
-long double log1pl(long double);
-long double log2l(long double);
-long double logbl(long double);
-long double logl(long double);
-long lrintl(long double);
+long double log10l(long double) __NDK_FPABI_MATH__;
+long double log1pl(long double) __NDK_FPABI_MATH__;
+long double log2l(long double) __NDK_FPABI_MATH__;
+long double logbl(long double) __NDK_FPABI_MATH__;
+long double logl(long double) __NDK_FPABI_MATH__;
+long lrintl(long double) __NDK_FPABI_MATH__;
#endif
-long lroundl(long double);
+long lroundl(long double) __NDK_FPABI_MATH__;
#if 0
-long double modfl(long double, long double *); /* fundamentally !__pure2 */
-long double nanl(const char *) __pure2;
-long double nearbyintl(long double);
+long double modfl(long double, long double *) __NDK_FPABI_MATH__; /* fundamentally !__pure2 */
#endif
-long double nextafterl(long double, long double);
-double nexttoward(double, long double);
-float nexttowardf(float, long double);
-long double nexttowardl(long double, long double);
+long double nanl(const char *) __NDK_FPABI_MATH__ __pure2;
#if 0
-long double powl(long double, long double);
-long double remainderl(long double, long double);
-long double remquol(long double, long double, int *);
-long double rintl(long double);
+long double nearbyintl(long double) __NDK_FPABI_MATH__;
#endif
-long double roundl(long double);
-long double scalblnl(long double, long);
-long double scalbnl(long double, int);
+long double nextafterl(long double, long double) __NDK_FPABI_MATH__;
+double nexttoward(double, long double) __NDK_FPABI_MATH__;
+float nexttowardf(float, long double) __NDK_FPABI_MATH__;
+long double nexttowardl(long double, long double) __NDK_FPABI_MATH__;
#if 0
-long double sinhl(long double);
-long double sinl(long double);
-long double sqrtl(long double);
-long double tanhl(long double);
-long double tanl(long double);
-long double tgammal(long double);
+long double powl(long double, long double) __NDK_FPABI_MATH__;
+long double remainderl(long double, long double) __NDK_FPABI_MATH__;
+long double remquol(long double, long double, int *) __NDK_FPABI_MATH__;
+long double rintl(long double) __NDK_FPABI_MATH__;
#endif
-long double truncl(long double);
+long double roundl(long double) __NDK_FPABI_MATH__;
+long double scalblnl(long double, long) __NDK_FPABI_MATH__;
+long double scalbnl(long double, int) __NDK_FPABI_MATH__;
+#if 0
+long double sinhl(long double) __NDK_FPABI_MATH__;
+long double sinl(long double) __NDK_FPABI_MATH__;
+long double sqrtl(long double) __NDK_FPABI_MATH__;
+long double tanhl(long double) __NDK_FPABI_MATH__;
+long double tanl(long double) __NDK_FPABI_MATH__;
+long double tgammal(long double) __NDK_FPABI_MATH__;
+#endif
+long double truncl(long double) __NDK_FPABI_MATH__;
/* BIONIC: GLibc compatibility - required by the ARM toolchain */
#ifdef _GNU_SOURCE
-void sincos(double x, double *sin, double *cos);
-void sincosf(float x, float *sin, float *cos);
-void sincosl(long double x, long double *sin, long double *cos);
+void sincos(double x, double *sin, double *cos) __NDK_FPABI_MATH__;
+void sincosf(float x, float *sin, float *cos) __NDK_FPABI_MATH__;
+void sincosl(long double x, long double *sin, long double *cos) __NDK_FPABI_MATH__;
#endif
/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
diff --git a/9/platforms/android-14/arch-x86/usr/include/netinet/tcp.h b/9/platforms/android-14/arch-x86/usr/include/netinet/tcp.h
index 9adf904..bc52249 100644
--- a/9/platforms/android-14/arch-x86/usr/include/netinet/tcp.h
+++ b/9/platforms/android-14/arch-x86/usr/include/netinet/tcp.h
@@ -31,4 +31,22 @@
#include <endian.h> /* Include *before* linux/tcp.h */
#include <linux/tcp.h>
+__BEGIN_DECLS
+
+enum {
+ TCP_ESTABLISHED = 1,
+ TCP_SYN_SENT,
+ TCP_SYN_RECV,
+ TCP_FIN_WAIT1,
+ TCP_FIN_WAIT2,
+ TCP_TIME_WAIT,
+ TCP_CLOSE,
+ TCP_CLOSE_WAIT,
+ TCP_LAST_ACK,
+ TCP_LISTEN,
+ TCP_CLOSING
+};
+
+__END_DECLS
+
#endif /* _NETINET_TCP_H */
diff --git a/9/platforms/android-14/arch-x86/usr/include/poll.h b/9/platforms/android-14/arch-x86/usr/include/poll.h
index 560be89..91068e4 100644
--- a/9/platforms/android-14/arch-x86/usr/include/poll.h
+++ b/9/platforms/android-14/arch-x86/usr/include/poll.h
@@ -35,8 +35,7 @@ __BEGIN_DECLS
typedef unsigned int nfds_t;
-/* POSIX specifies "int" for the timeout, Linux seems to use long... */
-extern int poll(struct pollfd *, nfds_t, long);
+extern int poll(struct pollfd *, nfds_t, int);
__END_DECLS
diff --git a/9/platforms/android-14/arch-x86/usr/include/pthread.h b/9/platforms/android-14/arch-x86/usr/include/pthread.h
index c3f055e..0176abd 100644
--- a/9/platforms/android-14/arch-x86/usr/include/pthread.h
+++ b/9/platforms/android-14/arch-x86/usr/include/pthread.h
@@ -142,7 +142,9 @@ int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
void *(*start_routine)(void *), void * arg);
-void pthread_exit(void * retval);
+
+__noreturn void pthread_exit(void * retval);
+
int pthread_join(pthread_t thid, void ** ret_val);
int pthread_detach(pthread_t thid);
diff --git a/9/platforms/android-14/arch-x86/usr/include/stdint.h b/9/platforms/android-14/arch-x86/usr/include/stdint.h
index 54ea026..7ae2595 100644
--- a/9/platforms/android-14/arch-x86/usr/include/stdint.h
+++ b/9/platforms/android-14/arch-x86/usr/include/stdint.h
@@ -191,8 +191,13 @@ typedef uint64_t uint_fast64_t;
* intptr_t & uintptr_t
*/
+#ifdef __LP64__
+typedef long intptr_t;
+typedef unsigned long uintptr_t;
+#else
typedef int intptr_t;
typedef unsigned int uintptr_t;
+#endif
#ifdef __STDINT_LIMITS
# define INTPTR_MIN INT32_MIN
@@ -234,11 +239,7 @@ typedef int64_t intmax_t;
/* Limits of wchar_t. */
#ifdef __STDINT_LIMITS
- /* Also possibly defined in <wchar.h> */
-# ifndef WCHAR_MIN
-# define WCHAR_MIN INT32_MIN
-# define WCHAR_MAX INT32_MAX
-# endif
+#include <sys/_wchar_limits.h>
#endif
/* Limits of wint_t. */
diff --git a/9/platforms/android-14/arch-x86/usr/include/stdlib.h b/9/platforms/android-14/arch-x86/usr/include/stdlib.h
index 97d8e46..6011787 100644
--- a/9/platforms/android-14/arch-x86/usr/include/stdlib.h
+++ b/9/platforms/android-14/arch-x86/usr/include/stdlib.h
@@ -57,6 +57,7 @@ extern int setenv(const char *, const char *, int);
extern int unsetenv(const char *);
extern int clearenv(void);
+extern char *mkdtemp(char *);
extern char *mktemp (char *);
extern int mkstemp (char *);
@@ -64,8 +65,9 @@ extern long strtol(const char *, char **, int);
extern long long strtoll(const char *, char **, int);
extern unsigned long strtoul(const char *, char **, int);
extern unsigned long long strtoull(const char *, char **, int);
-extern double strtod(const char *nptr, char **endptr);
+extern double strtod(const char *nptr, char **endptr) __NDK_FPABI__;
+__NDK_FPABI__
static __inline__ float strtof(const char *nptr, char **endptr)
{
return (float)strtod(nptr, endptr);
@@ -75,6 +77,7 @@ extern int atoi(const char *);
extern long atol(const char *);
extern long long atoll(const char *);
+ __NDK_FPABI__
static __inline__ double atof(const char *nptr)
{
return (strtod(nptr, NULL));
@@ -106,8 +109,8 @@ extern long mrand48(void);
extern long nrand48(unsigned short *);
extern long lrand48(void);
extern unsigned short *seed48(unsigned short*);
-extern double erand48(unsigned short xsubi[3]);
-extern double drand48(void);
+extern double erand48(unsigned short xsubi[3]) __NDK_FPABI__;
+extern double drand48(void) __NDK_FPABI__;
extern void srand48(long);
extern unsigned int arc4random(void);
extern void arc4random_stir(void);
diff --git a/9/platforms/android-14/arch-x86/usr/include/sys/_wchar_limits.h b/9/platforms/android-14/arch-x86/usr/include/sys/_wchar_limits.h
new file mode 100644
index 0000000..644792f
--- /dev/null
+++ b/9/platforms/android-14/arch-x86/usr/include/sys/_wchar_limits.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS__WCHAR_LIMITS_H
+#define _SYS__WCHAR_LIMITS_H
+
+#include <android/api-level.h>
+
+/* WCHAR_MIN / WCHAR_MAX can be defined by <stdint.h> or <wchar.h>.
+ * Due to historical reasons, their definition is a bit complex.
+ *
+ * - In NDK r8e and older, all definitions of WCHAR_MIN and WCHAR_MAX
+ * where 32-bit signed values (with one exception described below),
+ * despite the fact that wchar_t is 'unsigned' on ARM.
+ * See http://b.android.com/57749
+ *
+ * This is no longer the case, unless you define _WCHAR_IS_ALWAYS_SIGNED
+ * at compile time to restore the old (broken) behaviour. This doesn't
+ * affect other CPU ABIs.
+ *
+ * - Before API level 9, on ARM, wchar_t was typedef to 'char' when
+ * compiling C (not C++). Also, the definitions of WCHAR_MIN and
+ * WCHAR_MAX differed between <stdint.h> and <wchar.h>:
+ *
+ * <stdint.h> conditionally defined them to INT32_MIN / INT32_MAX.
+ * <wchar.h> conditionally defined them to 0 and 255 instead.
+ *
+ * <stdint.h> would only define WCHAR_MIN and WCHAR_MAX when:
+ * - Compiling C sources.
+ * - Compiling C++ sources with __STDC_LIMIT_MACROS being defined.
+ *
+ * <wchar.h> always ends up including <stdint.h> indirectly. This
+ * means that:
+ *
+ * - When compiling C sources, WCHAR_MIN / WCHAR_MAX were always
+ * defined as INT32_MIN / INT32_MAX.
+ *
+ * - When compiling C++ sources with __STDC_LIMIT_MACROS defined,
+ * they were always defined to INT32_MIN / INT32_MAX
+ *
+ * - When compiling C++ sources without __STDC_LIMIT_MACROS defined,
+ * they were defined by <wchar.h> as 0 and 255, respectively.
+ *
+ * Keep in mind that this was ARM-specific, only for API level < 9.
+ *
+ * If _WCHAR_IS_8BIT is defined, the same broken behaviour will
+ * be restored. See http://b.android.com/57267
+ */
+#if !defined(WCHAR_MIN)
+
+# if defined(_WCHAR_IS_8BIT) && defined(__arm__) && __ANDROID_API__ < 9
+# if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS)
+# define WCHAR_MIN 0
+# define WCHAR_MAX 255
+# else
+# define WCHAR_MIN (-2147483647 - 1)
+# define WCHAR_MAX (2147483647)
+# endif
+# elif defined(_WCHAR_IS_ALWAYS_SIGNED)
+# define WCHAR_MIN (-2147483647 - 1)
+# define WCHAR_MAX (2147483647)
+# else
+ /* Otherwise, the value is derived from the toolchain configuration.
+ * to avoid putting explicit CPU checks in this header. */
+# ifndef __WCHAR_MAX__
+# error "__WCHAR_MAX__ is not defined. Check your toolchain!"
+# endif
+ /* Clang does define __WCHAR_MAX__, but not __WCHAR_MIN__ */
+# ifndef __WCHAR_MIN__
+# if __WCHAR_MAX__ == 4294967295
+# define __WCHAR_MIN__ (0U)
+# elif __WCHAR_MAX__ == 2147483647
+# define __WCHAR_MIN__ (-2147483647 - 1)
+# else
+# error "Invalid __WCHAR_MAX__ value. Check your toolchain!"
+# endif
+# endif /* !__WCHAR_MIN__ */
+# define WCHAR_MIN __WCHAR_MIN__
+# define WCHAR_MAX __WCHAR_MAX__
+# endif /* !_WCHAR_IS_ALWAYS_SIGNED */
+
+#endif /* !WCHAR_MIN */
+
+#endif /* _SYS__WCHAR_LIMITS_H */
diff --git a/9/platforms/android-14/arch-x86/usr/include/sys/cdefs.h b/9/platforms/android-14/arch-x86/usr/include/sys/cdefs.h
index 92035d4..beb35c4 100644
--- a/9/platforms/android-14/arch-x86/usr/include/sys/cdefs.h
+++ b/9/platforms/android-14/arch-x86/usr/include/sys/cdefs.h
@@ -499,4 +499,31 @@
#define __BIONIC__ 1
#include <android/api-level.h>
+/* __NDK_FPABI__ or __NDK_FPABI_MATH__ are applied to APIs taking or returning float or
+ [long] double, to ensure even at the presence of -mhard-float (which implies
+ -mfloat-abi=hard), calling to 32-bit Android native APIs still follow -mfloat-abi=softfp.
+
+ __NDK_FPABI_MATH__ is applied to APIs in math.h. It normally equals to __NDK_FPABI__,
+ but allows use of customized libm.a compiled with -mhard-float by -D_NDK_MATH_NO_SOFTFP=1
+
+ NOTE: Disable for clang for now unless _NDK_MATH_NO_SOFTFP=1, because clang before 3.4 doesn't
+ allow change of calling convension for builtin and produces error message reads:
+
+ a.i:564:6: error: function declared 'aapcs' here was previously declared without calling convention
+ int sin(double d) __attribute__((pcs("aapcs")));
+ ^
+ a.i:564:6: note: previous declaration is here
+ */
+#if defined(__ANDROID__) && !__LP64__ && defined( __arm__)
+#define __NDK_FPABI__ __attribute__((pcs("aapcs")))
+#else
+#define __NDK_FPABI__
+#endif
+
+#if (!defined(_NDK_MATH_NO_SOFTFP) || _NDK_MATH_NO_SOFTFP != 1) && !defined(__clang__)
+#define __NDK_FPABI_MATH__ __NDK_FPABI__
+#else
+#define __NDK_FPABI_MATH__ /* nothing */
+#endif
+
#endif /* !_SYS_CDEFS_H_ */
diff --git a/9/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h b/9/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h
index 1e57470..5d2e0f3 100644
--- a/9/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h
+++ b/9/platforms/android-14/arch-x86/usr/include/sys/cdefs_elf.h
@@ -32,7 +32,7 @@
#ifdef __LEADING_UNDERSCORE
#define _C_LABEL(x) __CONCAT(_,x)
-#define _C_LABEL_STRING(x) "_"x
+#define _C_LABEL_STRING(x) "_" x
#else
#define _C_LABEL(x) x
#define _C_LABEL_STRING(x) x
diff --git a/9/platforms/android-14/arch-x86/usr/include/sys/stat.h b/9/platforms/android-14/arch-x86/usr/include/sys/stat.h
index 091ee6d..497f404 100644
--- a/9/platforms/android-14/arch-x86/usr/include/sys/stat.h
+++ b/9/platforms/android-14/arch-x86/usr/include/sys/stat.h
@@ -103,6 +103,10 @@ extern int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int f
extern int fchmodat(int dirfd, const char *path, mode_t mode, int flags);
extern int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+# define UTIME_NOW ((1l << 30) - 1l)
+# define UTIME_OMIT ((1l << 30) - 2l)
+extern int utimensat(int fd, const char *path, const struct timespec times[2], int flags);
+
__END_DECLS
#endif /* _SYS_STAT_H_ */
diff --git a/9/platforms/android-14/arch-x86/usr/include/sys/vfs.h b/9/platforms/android-14/arch-x86/usr/include/sys/vfs.h
index 4adaf5f..4ec0e0d 100644
--- a/9/platforms/android-14/arch-x86/usr/include/sys/vfs.h
+++ b/9/platforms/android-14/arch-x86/usr/include/sys/vfs.h
@@ -34,20 +34,42 @@
__BEGIN_DECLS
-/* note: this corresponds to the kernel's statfs64 type */
+/* The kernel's __kernel_fsid_t has a 'val' member but glibc uses '__val'. */
+typedef struct { int __val[2]; } __fsid_t;
+
+/* Our struct statfs corresponds to the kernel's statfs64 type. */
+#ifdef __mips__
+struct statfs {
+ uint32_t f_type;
+ uint32_t f_bsize;
+ uint32_t f_frsize;
+ uint32_t __pad;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ uint64_t f_bavail;
+ __fsid_t f_fsid;
+ uint32_t f_namelen;
+ uint32_t f_flags;
+ uint32_t f_spare[5];
+};
+#else
struct statfs {
- uint32_t f_type;
- uint32_t f_bsize;
- uint64_t f_blocks;
- uint64_t f_bfree;
- uint64_t f_bavail;
- uint64_t f_files;
- uint64_t f_ffree;
- __kernel_fsid_t f_fsid;
- uint32_t f_namelen;
- uint32_t f_frsize;
- uint32_t f_spare[5];
+ uint32_t f_type;
+ uint32_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ __fsid_t f_fsid;
+ uint32_t f_namelen;
+ uint32_t f_frsize;
+ uint32_t f_flags;
+ uint32_t f_spare[4];
};
+#endif
#define ADFS_SUPER_MAGIC 0xadf5
#define AFFS_SUPER_MAGIC 0xADFF
diff --git a/9/platforms/android-14/arch-x86/usr/include/time.h b/9/platforms/android-14/arch-x86/usr/include/time.h
index 6163c6d..e7ead0f 100644
--- a/9/platforms/android-14/arch-x86/usr/include/time.h
+++ b/9/platforms/android-14/arch-x86/usr/include/time.h
@@ -67,7 +67,7 @@ extern char* asctime(const struct tm* a);
extern char* asctime_r(const struct tm* a, char* buf);
/* Return the difference between TIME1 and TIME0. */
-extern double difftime (time_t __time1, time_t __time0);
+extern double difftime (time_t __time1, time_t __time0) __NDK_FPABI__;
extern time_t mktime (struct tm *a);
extern struct tm* localtime(const time_t *t);
diff --git a/9/platforms/android-14/arch-x86/usr/include/wchar.h b/9/platforms/android-14/arch-x86/usr/include/wchar.h
index 437f52b..b10f470 100644
--- a/9/platforms/android-14/arch-x86/usr/include/wchar.h
+++ b/9/platforms/android-14/arch-x86/usr/include/wchar.h
@@ -41,13 +41,7 @@
#include <malloc.h>
#include <stddef.h>
-
-/* IMPORTANT: Any code that relies on wide character support is essentially
- * non-portable and/or broken. the only reason this header exist
- * is because I'm really a nice guy. However, I'm not nice enough
- * to provide you with a real implementation. instead wchar_t == char
- * and all wc functions are stubs to their "normal" equivalent...
- */
+#include <sys/_wchar_limits.h>
__BEGIN_DECLS
@@ -71,11 +65,6 @@ typedef enum {
WC_TYPE_MAX
} wctype_t;
-#ifndef WCHAR_MAX
-#define WCHAR_MAX INT_MAX
-#define WCHAR_MIN INT_MIN
-#endif
-
#define WEOF ((wint_t)(-1))
extern wint_t btowc(int);
@@ -132,7 +121,7 @@ extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
extern size_t wcsspn(const wchar_t *, const wchar_t *);
extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
-extern double wcstod(const wchar_t *, wchar_t **);
+extern double wcstod(const wchar_t *, wchar_t **) __NDK_FPABI__;
extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
extern long int wcstol(const wchar_t *, wchar_t **, int);
extern size_t wcstombs(char *, const wchar_t *, size_t);