summaryrefslogtreecommitdiffstats
path: root/9/platforms
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-08-18 02:41:14 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2014-09-03 22:40:51 -0700
commit08fc3bec721b70d0c3c0ab2487d4a0eff5454874 (patch)
treefa5d5a45cee003808b7ac25bc6bf92ea22b97495 /9/platforms
parent71a04678bcea092e7d56697b46076da88ccff89e (diff)
downloadprebuilts_ndk-08fc3bec721b70d0c3c0ab2487d4a0eff5454874.zip
prebuilts_ndk-08fc3bec721b70d0c3c0ab2487d4a0eff5454874.tar.gz
prebuilts_ndk-08fc3bec721b70d0c3c0ab2487d4a0eff5454874.tar.bz2
Refresh 64-bit headers/libs (WW36)
sync to lmp-dev/bionic 1e010d60397db706cd3d1c4d5701a2bced441aa8 Change-Id: Id4e86e5b4b236c7abe70d5972895b4ad8a71db16
Diffstat (limited to '9/platforms')
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/android/configuration.h4
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/android/keycodes.h9
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/android/sensor.h58
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/linux/ion.h37
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/malloc.h11
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/math.h4
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/sha1.h23
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/stdatomic.h179
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/stdio.h20
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/stdlib.h9
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/string.h33
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/sys/cdefs.h38
-rw-r--r--9/platforms/android-19/arch-arm64/usr/include/sys/fsuid.h3
-rwxr-xr-x9/platforms/android-19/arch-arm64/usr/lib/libandroid.sobin22234 -> 22544 bytes
-rw-r--r--9/platforms/android-19/arch-arm64/usr/lib/libc.abin13411370 -> 13463998 bytes
-rwxr-xr-x9/platforms/android-19/arch-arm64/usr/lib/libc.sobin86670 -> 86108 bytes
-rw-r--r--9/platforms/android-19/arch-arm64/usr/lib/libstdc++.abin3588 -> 182608 bytes
-rwxr-xr-x9/platforms/android-19/arch-arm64/usr/lib/libstdc++.sobin5576 -> 6191 bytes
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/android/configuration.h4
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/android/keycodes.h9
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/android/sensor.h58
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/linux/ion.h37
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/malloc.h11
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/math.h4
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/sha1.h23
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/stdatomic.h179
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/stdio.h20
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/stdlib.h9
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/string.h33
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/sys/cdefs.h38
-rw-r--r--9/platforms/android-19/arch-mips64/usr/include/sys/fsuid.h3
-rwxr-xr-x9/platforms/android-19/arch-mips64/usr/lib64/libandroid.sobin32465 -> 33495 bytes
-rw-r--r--9/platforms/android-19/arch-mips64/usr/lib64/libc.abin14351546 -> 14306696 bytes
-rwxr-xr-x9/platforms/android-19/arch-mips64/usr/lib64/libc.sobin148375 -> 146421 bytes
-rw-r--r--9/platforms/android-19/arch-mips64/usr/lib64/libm.abin2900306 -> 2890458 bytes
-rw-r--r--9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.abin4560 -> 185510 bytes
-rwxr-xr-x9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.sobin3343 -> 5315 bytes
-rw-r--r--9/platforms/android-19/arch-mips64/usr/lib64/libz.abin964376 -> 980464 bytes
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/android/configuration.h4
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/android/keycodes.h9
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/android/sensor.h58
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/linux/ion.h37
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/machine/asm.h5
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/malloc.h11
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/math.h4
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/sha1.h23
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/stdatomic.h179
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/stdio.h20
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/stdlib.h9
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/string.h33
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/sys/cdefs.h38
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/include/sys/fsuid.h3
-rwxr-xr-x9/platforms/android-19/arch-x86_64/usr/lib64/libandroid.sobin30432 -> 30744 bytes
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/lib64/libc.abin16042628 -> 16079984 bytes
-rwxr-xr-x9/platforms/android-19/arch-x86_64/usr/lib64/libc.sobin131616 -> 131056 bytes
-rw-r--r--9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.abin3476 -> 191664 bytes
-rwxr-xr-x9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.sobin5584 -> 6088 bytes
57 files changed, 927 insertions, 362 deletions
diff --git a/9/platforms/android-19/arch-arm64/usr/include/android/configuration.h b/9/platforms/android-19/arch-arm64/usr/include/android/configuration.h
index d5cddb3..be00066 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/android/configuration.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/android/configuration.h
@@ -45,6 +45,7 @@ enum {
ACONFIGURATION_DENSITY_XHIGH = 320,
ACONFIGURATION_DENSITY_XXHIGH = 480,
ACONFIGURATION_DENSITY_XXXHIGH = 640,
+ ACONFIGURATION_DENSITY_ANY = 0xfffe,
ACONFIGURATION_DENSITY_NONE = 0xffff,
ACONFIGURATION_KEYBOARD_ANY = 0x0000,
@@ -83,6 +84,7 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
+ ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
@@ -113,6 +115,8 @@ enum {
ACONFIGURATION_UI_MODE = 0x1000,
ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
ACONFIGURATION_LAYOUTDIR = 0x4000,
+
+ ACONFIGURATION_MNC_ZERO = 0xffff,
};
/**
diff --git a/9/platforms/android-19/arch-arm64/usr/include/android/keycodes.h b/9/platforms/android-19/arch-arm64/usr/include/android/keycodes.h
index 1ca1332..813d411 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/android/keycodes.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/android/keycodes.h
@@ -266,6 +266,15 @@ enum {
AKEYCODE_BRIGHTNESS_DOWN = 220,
AKEYCODE_BRIGHTNESS_UP = 221,
AKEYCODE_MEDIA_AUDIO_TRACK = 222,
+ AKEYCODE_SLEEP = 223,
+ AKEYCODE_WAKEUP = 224,
+ AKEYCODE_PAIRING = 225,
+ AKEYCODE_MEDIA_TOP_MENU = 226,
+ AKEYCODE_11 = 227,
+ AKEYCODE_12 = 228,
+ AKEYCODE_LAST_CHANNEL = 229,
+ AKEYCODE_TV_DATA_SERVICE = 230,
+ AKEYCODE_VOICE_ASSIST = 231
// 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-19/arch-arm64/usr/include/android/sensor.h b/9/platforms/android-19/arch-arm64/usr/include/android/sensor.h
index 589058d..910fd39 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/android/sensor.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/android/sensor.h
@@ -41,6 +41,7 @@
*/
#include <sys/types.h>
+#include <stdbool.h>
#include <android/looper.h>
@@ -66,6 +67,7 @@ enum {
* Sensor accuracy measure
*/
enum {
+ ASENSOR_STATUS_NO_CONTACT = -1,
ASENSOR_STATUS_UNRELIABLE = 0,
ASENSOR_STATUS_ACCURACY_LOW = 1,
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
@@ -73,6 +75,16 @@ enum {
};
/*
+ * Sensor Reporting Modes.
+ */
+enum {
+ AREPORTING_MODE_CONTINUOUS = 0,
+ AREPORTING_MODE_ON_CHANGE = 1,
+ AREPORTING_MODE_ONE_SHOT = 2,
+ AREPORTING_MODE_SPECIAL_TRIGGER = 3
+};
+
+/*
* A few useful constants
*/
@@ -130,6 +142,11 @@ typedef struct AUncalibratedEvent {
};
} AUncalibratedEvent;
+typedef struct AHeartRateEvent {
+ float bpm;
+ int8_t status;
+} AHeartRateEvent;
+
/* NOTE: Must match hardware/sensors.h */
typedef struct ASensorEvent {
int32_t version; /* sizeof(struct ASensorEvent) */
@@ -151,13 +168,16 @@ typedef struct ASensorEvent {
AUncalibratedEvent uncalibrated_gyro;
AUncalibratedEvent uncalibrated_magnetic;
AMetaDataEvent meta_data;
+ AHeartRateEvent heart_rate;
};
union {
uint64_t data[8];
uint64_t step_counter;
} u64;
};
- int32_t reserved1[4];
+
+ uint32_t flags;
+ int32_t reserved1[3];
} ASensorEvent;
struct ASensorManager;
@@ -191,11 +211,18 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
/*
* Returns the default sensor for the given type, or NULL if no sensor
- * of that type exist.
+ * of that type exists.
*/
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
/*
+ * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
+ * of this type and wakeUp properties exists.
+ */
+ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
+ bool wakeUp);
+
+/*
* Creates a new sensor event queue and associate it with a looper.
*/
ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
@@ -272,7 +299,7 @@ int ASensor_getType(ASensor const* sensor);
/*
* Returns this sensors's resolution
*/
-float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
+float ASensor_getResolution(ASensor const* sensor);
/*
* Returns the minimum delay allowed between events in microseconds.
@@ -281,6 +308,31 @@ float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
*/
int ASensor_getMinDelay(ASensor const* sensor);
+/*
+ * Returns the maximum size of batches for this sensor. Batches will often be
+ * smaller, as the hardware fifo might be used for other sensors.
+ */
+int ASensor_getFifoMaxEventCount(ASensor const* sensor);
+
+/*
+ * Returns the hardware batch fifo size reserved to this sensor.
+ */
+int ASensor_getFifoReservedEventCount(ASensor const* sensor);
+
+/*
+ * Returns this sensor's string type.
+ */
+const char* ASensor_getStringType(ASensor const* sensor);
+
+/*
+ * Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants.
+ */
+int ASensor_getReportingMode(ASensor const* sensor);
+
+/*
+ * Returns true if this is a wake up sensor, false otherwise.
+ */
+bool ASensor_isWakeUpSensor(ASensor const* sensor);
#ifdef __cplusplus
};
diff --git a/9/platforms/android-19/arch-arm64/usr/include/linux/ion.h b/9/platforms/android-19/arch-arm64/usr/include/linux/ion.h
index f18939d..5af39d0 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/linux/ion.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/linux/ion.h
@@ -16,56 +16,63 @@
***
****************************************************************************
****************************************************************************/
-#ifndef _LINUX_ION_H
-#define _LINUX_ION_H
+#ifndef _UAPI_LINUX_ION_H
+#define _UAPI_LINUX_ION_H
+#include <linux/ioctl.h>
#include <linux/types.h>
-struct ion_handle;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef int ion_user_handle_t;
enum ion_heap_type {
ION_HEAP_TYPE_SYSTEM,
ION_HEAP_TYPE_SYSTEM_CONTIG,
- ION_HEAP_TYPE_CARVEOUT,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ ION_HEAP_TYPE_CARVEOUT,
+ ION_HEAP_TYPE_CHUNK,
+ ION_HEAP_TYPE_DMA,
ION_HEAP_TYPE_CUSTOM,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_NUM_HEAPS = 16,
};
#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
+#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
+#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8
#define ION_FLAG_CACHED 1
-#define ION_FLAG_CACHED_NEEDS_SYNC 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
struct ion_allocation_data {
size_t len;
size_t align;
- unsigned int heap_mask;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int heap_id_mask;
unsigned int flags;
- struct ion_handle *handle;
+ ion_user_handle_t handle;
};
-struct ion_fd_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_fd_data {
+ ion_user_handle_t handle;
int fd;
};
-struct ion_handle_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_handle_data {
+ ion_user_handle_t handle;
};
struct ion_custom_data {
- unsigned int cmd;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int cmd;
unsigned long arg;
};
#define ION_IOC_MAGIC 'I'
-#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
-#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
diff --git a/9/platforms/android-19/arch-arm64/usr/include/malloc.h b/9/platforms/android-19/arch-arm64/usr/include/malloc.h
index e6ea276..1e92b7d 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/malloc.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/malloc.h
@@ -27,12 +27,19 @@
__BEGIN_DECLS
+#if !defined(__clang__) || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ < 5)
extern void* malloc(size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(1)));
extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur __attribute__((alloc_size(1,2)));
extern void* realloc(void* p, size_t byte_count) __wur __attribute__((alloc_size(2)));
-extern void free(void* p);
-
extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2)));
+#else
+extern void* malloc(size_t byte_count) __mallocfunc __wur;
+extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur;
+extern void* realloc(void* p, size_t byte_count) __wur;
+extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur;
+#endif
+
+extern void free(void* p);
extern size_t malloc_usable_size(const void* p);
#ifndef STRUCT_MALLINFO_DECLARED
diff --git a/9/platforms/android-19/arch-arm64/usr/include/math.h b/9/platforms/android-19/arch-arm64/usr/include/math.h
index 79d9c5c..8369d6e 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/math.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/math.h
@@ -36,11 +36,11 @@ extern const union __nan_un {
float __uf;
} __nan;
-#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
+#if __GNUC_PREREQ(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __MATH_BUILTIN_CONSTANTS
#endif
-#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
+#if __GNUC_PREREQ(3, 0) && !defined(__INTEL_COMPILER)
#define __MATH_BUILTIN_RELOPS
#endif
diff --git a/9/platforms/android-19/arch-arm64/usr/include/sha1.h b/9/platforms/android-19/arch-arm64/usr/include/sha1.h
deleted file mode 100644
index 7f6cf5d..0000000
--- a/9/platforms/android-19/arch-arm64/usr/include/sha1.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * 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 _SHA1_H_
-#define _SHA1_H_
-
-#warning "include <sys/sha1.h> instead for better portability"
-#include <sys/sha1.h>
-
-#endif
diff --git a/9/platforms/android-19/arch-arm64/usr/include/stdatomic.h b/9/platforms/android-19/arch-arm64/usr/include/stdatomic.h
index 669cefd..3db25a7 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/stdatomic.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/stdatomic.h
@@ -31,17 +31,142 @@
#define _STDATOMIC_H_
#include <sys/cdefs.h>
+
+
+#if defined(__cplusplus) && defined(_USING_LIBCXX)
+# ifdef __clang__
+# if __has_feature(cxx_atomic)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# else /* gcc */
+# if __GNUC_PREREQ(4, 7)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# endif
+#endif
+
+#ifdef _STDATOMIC_HAVE_ATOMIC
+
+/* We have a usable C++ <atomic>; use it instead. */
+
+#include <atomic>
+
+#undef _Atomic
+ /* Also defined by <atomic> for gcc. But not used in macros. */
+ /* Also a clang intrinsic. */
+ /* Should not be used by client code before this file is */
+ /* included. The definitions in <atomic> themselves see */
+ /* the old definition, as they should. */
+ /* Client code sees the following definition. */
+
+#define _Atomic(t) std::atomic<t>
+
+using std::atomic_is_lock_free;
+using std::atomic_init;
+using std::atomic_store;
+using std::atomic_store_explicit;
+using std::atomic_load;
+using std::atomic_load_explicit;
+using std::atomic_exchange;
+using std::atomic_exchange_explicit;
+using std::atomic_compare_exchange_strong;
+using std::atomic_compare_exchange_strong_explicit;
+using std::atomic_compare_exchange_weak;
+using std::atomic_compare_exchange_weak_explicit;
+using std::atomic_fetch_add;
+using std::atomic_fetch_add_explicit;
+using std::atomic_fetch_sub;
+using std::atomic_fetch_sub_explicit;
+using std::atomic_fetch_or;
+using std::atomic_fetch_or_explicit;
+using std::atomic_fetch_xor;
+using std::atomic_fetch_xor_explicit;
+using std::atomic_fetch_and;
+using std::atomic_fetch_and_explicit;
+using std::atomic_thread_fence;
+using std::atomic_signal_fence;
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_wchar_t;
+using std::atomic_int_least8_t;
+using std::atomic_uint_least8_t;
+using std::atomic_int_least16_t;
+using std::atomic_uint_least16_t;
+using std::atomic_int_least32_t;
+using std::atomic_uint_least32_t;
+using std::atomic_int_least64_t;
+using std::atomic_uint_least64_t;
+using std::atomic_int_fast8_t;
+using std::atomic_uint_fast8_t;
+using std::atomic_int_fast16_t;
+using std::atomic_uint_fast16_t;
+using std::atomic_int_fast32_t;
+using std::atomic_uint_fast32_t;
+using std::atomic_int_fast64_t;
+using std::atomic_uint_fast64_t;
+using std::atomic_intptr_t;
+using std::atomic_uintptr_t;
+using std::atomic_size_t;
+using std::atomic_ptrdiff_t;
+using std::atomic_intmax_t;
+using std::atomic_uintmax_t;
+
+#else /* <atomic> unavailable, possibly because this is C, not C++ */
+
#include <sys/types.h>
#include <stdbool.h>
-#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
-#define __CLANG_ATOMICS
-#elif __GNUC_PREREQ__(4, 7)
-#define __GNUC_ATOMICS
-#elif defined(__GNUC__)
-#define __SYNC_ATOMICS
+/*
+ * C: Do it ourselves.
+ * Note that the runtime representation defined here should be compatible
+ * with the C++ one, i.e. an _Atomic(T) needs to contain the same
+ * bits as a T.
+ */
+
+#include <stddef.h> /* For ptrdiff_t. */
+#include <stdint.h> /* TODO: Should pollute namespace less. */
+#if __STDC_VERSION__ >= 201112L
+# include <uchar.h> /* For char16_t and char32_t. */
+#endif
+
+#ifdef __clang__
+# if __has_extension(c_atomic) || __has_extension(cxx_atomic)
+# define __CLANG_ATOMICS
+# else
+# error "stdatomic.h does not support your compiler"
+# endif
+# if __has_builtin(__sync_swap)
+# define __HAS_BUILTIN_SYNC_SWAP
+# endif
#else
-#error "stdatomic.h does not support your compiler"
+# if __GNUC_PREREQ(4, 7)
+# define __GNUC_ATOMICS
+# else
+# define __SYNC_ATOMICS
+# ifdef __cplusplus
+# define __ATOMICS_AVOID_DOT_INIT
+# endif
+# endif
#endif
/*
@@ -50,33 +175,53 @@
#ifdef __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_BOOL_LOCK_FREE 2 /* For all modern platforms */
#endif
#ifdef __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR16_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR32_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_WCHAR_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_SHORT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_INT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LONG_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LLONG_LOCK_FREE 1 /* maybe */
#endif
#ifdef __GCC_ATOMIC_POINTER_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_POINTER_LOCK_FREE 2
#endif
/*
@@ -87,7 +232,11 @@
#define ATOMIC_VAR_INIT(value) (value)
#define atomic_init(obj, value) __c11_atomic_init(obj, value)
#else
+#ifdef __ATOMICS_AVOID_DOT_INIT
+#define ATOMIC_VAR_INIT(value) { value }
+#else
#define ATOMIC_VAR_INIT(value) { .__val = (value) }
+#endif
#define atomic_init(obj, value) ((void)((obj)->__val = (value)))
#endif
@@ -121,6 +270,8 @@
*
* The memory_order_* constants that denote the barrier behaviour of the
* atomic operations.
+ * The enum values must be identical to those used by the
+ * C++ <atomic> header.
*/
typedef enum {
@@ -137,7 +288,7 @@ typedef enum {
*/
static __inline void
-atomic_thread_fence(memory_order __order __unused)
+atomic_thread_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -150,7 +301,7 @@ atomic_thread_fence(memory_order __order __unused)
}
static __inline void
-atomic_signal_fence(memory_order __order __unused)
+atomic_signal_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -172,7 +323,7 @@ atomic_signal_fence(memory_order __order __unused)
((void)(obj), (_Bool)1)
#elif defined(__CLANG_ATOMICS)
#define atomic_is_lock_free(obj) \
- __atomic_is_lock_free(sizeof(*(obj)), obj)
+ __c11_atomic_is_lock_free(sizeof(*(obj)))
#elif defined(__GNUC_ATOMICS)
#define atomic_is_lock_free(obj) \
__atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
@@ -185,7 +336,7 @@ atomic_signal_fence(memory_order __order __unused)
* 7.17.6 Atomic integer types.
*/
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#ifndef __CLANG_ATOMICS
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.
@@ -306,7 +457,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
desired, success, failure) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure)
-#if __has_builtin(__sync_swap)
+#ifdef __HAS_BUILTIN_SYNC_SWAP
/* Clang provides a full-barrier atomic exchange - use it if available. */
#define atomic_exchange_explicit(object, desired, order) \
((void)(order), __sync_swap(&(object)->__val, desired))
@@ -386,7 +537,7 @@ typedef struct {
atomic_bool __flag;
} atomic_flag;
-#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) }
+#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(false) }
static __inline bool
atomic_flag_test_and_set_explicit(volatile atomic_flag *__object,
@@ -419,4 +570,6 @@ atomic_flag_clear(volatile atomic_flag *__object)
}
#endif /* !_KERNEL */
+#endif /* <atomic> unavailable */
+
#endif /* !_STDATOMIC_H_ */
diff --git a/9/platforms/android-19/arch-arm64/usr/include/stdio.h b/9/platforms/android-19/arch-arm64/usr/include/stdio.h
index 4d160a3..9edf9d2 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/stdio.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/stdio.h
@@ -38,6 +38,14 @@
#ifndef _STDIO_H_
#define _STDIO_H_
+/*
+ * This file must contain a reference to __gnuc_va_list so that GCC's
+ * fixincludes knows that that's what's being used for va_list, and so
+ * to leave our <stdio.h> alone. (fixincludes gets in the way of pointing
+ * one toolchain at various different sets of platform headers.)
+ * If you alter this comment, be sure to keep "__gnuc_va_list" in it!
+ */
+
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -58,10 +66,17 @@ typedef off_t fpos_t; /* stdio file position type */
*/
/* stdio buffers */
+#if defined(__LP64__)
+struct __sbuf {
+ unsigned char* _base;
+ size_t _size;
+};
+#else
struct __sbuf {
unsigned char *_base;
int _size;
};
+#endif
/*
* stdio state variables.
@@ -94,8 +109,13 @@ typedef struct __sFILE {
unsigned char *_p; /* current position in (some) buffer */
int _r; /* read space left for getc() */
int _w; /* write space left for putc() */
+#if defined(__LP64__)
+ int _flags; /* flags, below; this FILE is free if 0 */
+ int _file; /* fileno, if Unix descriptor, else -1 */
+#else
short _flags; /* flags, below; this FILE is free if 0 */
short _file; /* fileno, if Unix descriptor, else -1 */
+#endif
struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
int _lbfsize; /* 0 or -_bf._size, for inline putc */
diff --git a/9/platforms/android-19/arch-arm64/usr/include/stdlib.h b/9/platforms/android-19/arch-arm64/usr/include/stdlib.h
index 39fad0f..a0f017c 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/stdlib.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/stdlib.h
@@ -111,12 +111,6 @@ void arc4random_buf(void*, size_t);
#define RAND_MAX 0x7fffffff
-/* Work around x86/x86-64 libvpx build breakage caused by postproc_x86.c. */
-#if (defined(__i386__) || defined(__x86_64__)) && defined(rand)
-#undef rand
-#define __rand lrand48
-#endif
-
int rand(void);
int rand_r(unsigned int*);
void srand(unsigned int);
@@ -167,7 +161,8 @@ extern int mbtowc(wchar_t *, const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
-#define MB_CUR_MAX 4U
+extern size_t __ctype_get_mb_cur_max(void);
+#define MB_CUR_MAX __ctype_get_mb_cur_max()
__END_DECLS
diff --git a/9/platforms/android-19/arch-arm64/usr/include/string.h b/9/platforms/android-19/arch-arm64/usr/include/string.h
index af1c0c1..8df68e3 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/string.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/string.h
@@ -94,9 +94,6 @@ extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale
#if defined(__BIONIC_FORTIFY)
-__errordecl(__memcpy_dest_size_error, "memcpy: prevented write past end of buffer");
-__errordecl(__memcpy_src_size_error, "memcpy: prevented read past end of buffer");
-
__BIONIC_FORTIFY_INLINE
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
char *d = (char *) dest;
@@ -104,14 +101,6 @@ void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amou
size_t s_len = __bos0(s);
size_t d_len = __bos0(d);
- if (__builtin_constant_p(copy_amount) && (copy_amount > d_len)) {
- __memcpy_dest_size_error();
- }
-
- if (__builtin_constant_p(copy_amount) && (copy_amount > s_len)) {
- __memcpy_src_size_error();
- }
-
return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
}
@@ -130,16 +119,12 @@ char* strcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___strcpy_chk(dest, src, __bos(dest));
}
-__errordecl(__stpncpy_error, "stpncpy: prevented write past end of buffer");
extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __stpncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
@@ -157,16 +142,12 @@ char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
return __stpncpy_chk2(dest, src, n, bos_dest, bos_src);
}
-__errordecl(__strncpy_error, "strncpy: prevented write past end of buffer");
extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __strncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
@@ -201,7 +182,6 @@ void* memset(void *s, int c, size_t n) {
extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcpy");
-__errordecl(__strlcpy_error, "strlcpy: prevented write past end of buffer");
extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
__BIONIC_FORTIFY_INLINE
@@ -219,12 +199,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcpy_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcpy_error();
- }
#endif /* !defined(__clang__) */
return __strlcpy_chk(dest, src, size, bos);
@@ -232,7 +206,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcat");
-__errordecl(__strlcat_error, "strlcat: prevented write past end of buffer");
extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
@@ -251,12 +224,6 @@ size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcat_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcat_error();
- }
#endif /* !defined(__clang__) */
return __strlcat_chk(dest, src, size, bos);
diff --git a/9/platforms/android-19/arch-arm64/usr/include/sys/cdefs.h b/9/platforms/android-19/arch-arm64/usr/include/sys/cdefs.h
index 9c92a1c..8ee34f7 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/sys/cdefs.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/sys/cdefs.h
@@ -60,18 +60,18 @@
* or later, for e.g. features that appeared in a particular version
* of GNU C. Usage:
*
- * #if __GNUC_PREREQ__(major, minor)
+ * #if __GNUC_PREREQ(major, minor)
* ...cool feature...
* #else
* ...delete feature...
* #endif
*/
#ifdef __GNUC__
-#define __GNUC_PREREQ__(x, y) \
+#define __GNUC_PREREQ(x, y) \
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
(__GNUC__ > (x)))
#else
-#define __GNUC_PREREQ__(x, y) 0
+#define __GNUC_PREREQ(x, y) 0
#endif
#include <sys/cdefs_elf.h>
@@ -163,7 +163,7 @@
* GCC2 provides __extension__ to suppress warnings for various GNU C
* language extensions under "-ansi -pedantic".
*/
-#if !__GNUC_PREREQ__(2, 0)
+#if !__GNUC_PREREQ(2, 0)
#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
#endif
@@ -175,7 +175,7 @@
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
-#if !__GNUC_PREREQ__(2, 5)
+#if !__GNUC_PREREQ(2, 5)
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile
@@ -189,7 +189,7 @@
#define __pure
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __unused __attribute__((__unused__))
#else
#define __unused /* delete */
@@ -197,13 +197,13 @@
#define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __used __attribute__((__used__))
#else
#define __used /* delete */
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
@@ -217,11 +217,11 @@
#define __section(x) error: no __section for this compiler
#endif
-#if !__GNUC_PREREQ__(2, 8)
+#if !__GNUC_PREREQ(2, 8)
#define __extension__
#endif
-#if __GNUC_PREREQ__(2, 8)
+#if __GNUC_PREREQ(2, 8)
#define __statement(x) __extension__(x)
#elif defined(lint)
#define __statement(x) (0)
@@ -241,7 +241,7 @@
#if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L
#define __restrict restrict
#else
-#if !__GNUC_PREREQ__(2, 92)
+#if !__GNUC_PREREQ(2, 92)
#define __restrict /* delete __restrict when not supported */
#endif
#endif
@@ -251,9 +251,9 @@
* in GCC 2.95.
*/
#if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L)
-#if __GNUC_PREREQ__(2, 6)
+#if __GNUC_PREREQ(2, 6)
#define __func__ __PRETTY_FUNCTION__
-#elif __GNUC_PREREQ__(2, 4)
+#elif __GNUC_PREREQ(2, 4)
#define __func__ __FUNCTION__
#else
#define __func__ ""
@@ -286,7 +286,7 @@
* register values. This is gcc specific, the version is more or less
* arbitrary, might work with older compilers.
*/
-#if __GNUC_PREREQ__(2, 95)
+#if __GNUC_PREREQ(2, 95)
#define __insn_barrier() __asm __volatile("":::"memory")
#else
#define __insn_barrier() /* */
@@ -320,7 +320,7 @@
* basic block reordering that this affects can often generate
* larger code.
*/
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
#else
@@ -328,7 +328,7 @@
#define __predict_false(exp) (exp)
#endif
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __noreturn __attribute__((__noreturn__))
#define __mallocfunc __attribute__((malloc))
#define __purefunc __attribute__((pure))
@@ -338,19 +338,19 @@
#define __purefunc
#endif
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __always_inline __attribute__((__always_inline__))
#else
#define __always_inline
#endif
-#if __GNUC_PREREQ__(3, 4)
+#if __GNUC_PREREQ(3, 4)
#define __wur __attribute__((__warn_unused_result__))
#else
#define __wur
#endif
-#if __GNUC_PREREQ__(4, 3)
+#if __GNUC_PREREQ(4, 3)
#define __errordecl(name, msg) extern void name(void) __attribute__((__error__(msg)))
#define __warnattr(msg) __attribute__((__warning__(msg)))
#else
diff --git a/9/platforms/android-19/arch-arm64/usr/include/sys/fsuid.h b/9/platforms/android-19/arch-arm64/usr/include/sys/fsuid.h
index bc47e3d..03355b7 100644
--- a/9/platforms/android-19/arch-arm64/usr/include/sys/fsuid.h
+++ b/9/platforms/android-19/arch-arm64/usr/include/sys/fsuid.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_FSUID_H_
#define _SYS_FSUID_H_
@@ -33,10 +34,8 @@
__BEGIN_DECLS
-#if 0 /* MISSING FROM BIONIC */
extern int setfsuid(uid_t);
extern int setfsgid(gid_t);
-#endif /* MISSING */
__END_DECLS
diff --git a/9/platforms/android-19/arch-arm64/usr/lib/libandroid.so b/9/platforms/android-19/arch-arm64/usr/lib/libandroid.so
index 5504493..4b031dc 100755
--- a/9/platforms/android-19/arch-arm64/usr/lib/libandroid.so
+++ b/9/platforms/android-19/arch-arm64/usr/lib/libandroid.so
Binary files differ
diff --git a/9/platforms/android-19/arch-arm64/usr/lib/libc.a b/9/platforms/android-19/arch-arm64/usr/lib/libc.a
index 6e15bdd..628a7d0 100644
--- a/9/platforms/android-19/arch-arm64/usr/lib/libc.a
+++ b/9/platforms/android-19/arch-arm64/usr/lib/libc.a
Binary files differ
diff --git a/9/platforms/android-19/arch-arm64/usr/lib/libc.so b/9/platforms/android-19/arch-arm64/usr/lib/libc.so
index 31ff8d8..75f77f3 100755
--- a/9/platforms/android-19/arch-arm64/usr/lib/libc.so
+++ b/9/platforms/android-19/arch-arm64/usr/lib/libc.so
Binary files differ
diff --git a/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.a b/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.a
index e30b11d..d2e3b34 100644
--- a/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.a
+++ b/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.a
Binary files differ
diff --git a/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.so b/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.so
index deca3f4..5987704 100755
--- a/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.so
+++ b/9/platforms/android-19/arch-arm64/usr/lib/libstdc++.so
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/include/android/configuration.h b/9/platforms/android-19/arch-mips64/usr/include/android/configuration.h
index d5cddb3..be00066 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/android/configuration.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/android/configuration.h
@@ -45,6 +45,7 @@ enum {
ACONFIGURATION_DENSITY_XHIGH = 320,
ACONFIGURATION_DENSITY_XXHIGH = 480,
ACONFIGURATION_DENSITY_XXXHIGH = 640,
+ ACONFIGURATION_DENSITY_ANY = 0xfffe,
ACONFIGURATION_DENSITY_NONE = 0xffff,
ACONFIGURATION_KEYBOARD_ANY = 0x0000,
@@ -83,6 +84,7 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
+ ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
@@ -113,6 +115,8 @@ enum {
ACONFIGURATION_UI_MODE = 0x1000,
ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
ACONFIGURATION_LAYOUTDIR = 0x4000,
+
+ ACONFIGURATION_MNC_ZERO = 0xffff,
};
/**
diff --git a/9/platforms/android-19/arch-mips64/usr/include/android/keycodes.h b/9/platforms/android-19/arch-mips64/usr/include/android/keycodes.h
index 1ca1332..813d411 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/android/keycodes.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/android/keycodes.h
@@ -266,6 +266,15 @@ enum {
AKEYCODE_BRIGHTNESS_DOWN = 220,
AKEYCODE_BRIGHTNESS_UP = 221,
AKEYCODE_MEDIA_AUDIO_TRACK = 222,
+ AKEYCODE_SLEEP = 223,
+ AKEYCODE_WAKEUP = 224,
+ AKEYCODE_PAIRING = 225,
+ AKEYCODE_MEDIA_TOP_MENU = 226,
+ AKEYCODE_11 = 227,
+ AKEYCODE_12 = 228,
+ AKEYCODE_LAST_CHANNEL = 229,
+ AKEYCODE_TV_DATA_SERVICE = 230,
+ AKEYCODE_VOICE_ASSIST = 231
// 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-19/arch-mips64/usr/include/android/sensor.h b/9/platforms/android-19/arch-mips64/usr/include/android/sensor.h
index 589058d..910fd39 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/android/sensor.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/android/sensor.h
@@ -41,6 +41,7 @@
*/
#include <sys/types.h>
+#include <stdbool.h>
#include <android/looper.h>
@@ -66,6 +67,7 @@ enum {
* Sensor accuracy measure
*/
enum {
+ ASENSOR_STATUS_NO_CONTACT = -1,
ASENSOR_STATUS_UNRELIABLE = 0,
ASENSOR_STATUS_ACCURACY_LOW = 1,
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
@@ -73,6 +75,16 @@ enum {
};
/*
+ * Sensor Reporting Modes.
+ */
+enum {
+ AREPORTING_MODE_CONTINUOUS = 0,
+ AREPORTING_MODE_ON_CHANGE = 1,
+ AREPORTING_MODE_ONE_SHOT = 2,
+ AREPORTING_MODE_SPECIAL_TRIGGER = 3
+};
+
+/*
* A few useful constants
*/
@@ -130,6 +142,11 @@ typedef struct AUncalibratedEvent {
};
} AUncalibratedEvent;
+typedef struct AHeartRateEvent {
+ float bpm;
+ int8_t status;
+} AHeartRateEvent;
+
/* NOTE: Must match hardware/sensors.h */
typedef struct ASensorEvent {
int32_t version; /* sizeof(struct ASensorEvent) */
@@ -151,13 +168,16 @@ typedef struct ASensorEvent {
AUncalibratedEvent uncalibrated_gyro;
AUncalibratedEvent uncalibrated_magnetic;
AMetaDataEvent meta_data;
+ AHeartRateEvent heart_rate;
};
union {
uint64_t data[8];
uint64_t step_counter;
} u64;
};
- int32_t reserved1[4];
+
+ uint32_t flags;
+ int32_t reserved1[3];
} ASensorEvent;
struct ASensorManager;
@@ -191,11 +211,18 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
/*
* Returns the default sensor for the given type, or NULL if no sensor
- * of that type exist.
+ * of that type exists.
*/
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
/*
+ * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
+ * of this type and wakeUp properties exists.
+ */
+ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
+ bool wakeUp);
+
+/*
* Creates a new sensor event queue and associate it with a looper.
*/
ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
@@ -272,7 +299,7 @@ int ASensor_getType(ASensor const* sensor);
/*
* Returns this sensors's resolution
*/
-float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
+float ASensor_getResolution(ASensor const* sensor);
/*
* Returns the minimum delay allowed between events in microseconds.
@@ -281,6 +308,31 @@ float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
*/
int ASensor_getMinDelay(ASensor const* sensor);
+/*
+ * Returns the maximum size of batches for this sensor. Batches will often be
+ * smaller, as the hardware fifo might be used for other sensors.
+ */
+int ASensor_getFifoMaxEventCount(ASensor const* sensor);
+
+/*
+ * Returns the hardware batch fifo size reserved to this sensor.
+ */
+int ASensor_getFifoReservedEventCount(ASensor const* sensor);
+
+/*
+ * Returns this sensor's string type.
+ */
+const char* ASensor_getStringType(ASensor const* sensor);
+
+/*
+ * Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants.
+ */
+int ASensor_getReportingMode(ASensor const* sensor);
+
+/*
+ * Returns true if this is a wake up sensor, false otherwise.
+ */
+bool ASensor_isWakeUpSensor(ASensor const* sensor);
#ifdef __cplusplus
};
diff --git a/9/platforms/android-19/arch-mips64/usr/include/linux/ion.h b/9/platforms/android-19/arch-mips64/usr/include/linux/ion.h
index f18939d..5af39d0 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/linux/ion.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/linux/ion.h
@@ -16,56 +16,63 @@
***
****************************************************************************
****************************************************************************/
-#ifndef _LINUX_ION_H
-#define _LINUX_ION_H
+#ifndef _UAPI_LINUX_ION_H
+#define _UAPI_LINUX_ION_H
+#include <linux/ioctl.h>
#include <linux/types.h>
-struct ion_handle;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef int ion_user_handle_t;
enum ion_heap_type {
ION_HEAP_TYPE_SYSTEM,
ION_HEAP_TYPE_SYSTEM_CONTIG,
- ION_HEAP_TYPE_CARVEOUT,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ ION_HEAP_TYPE_CARVEOUT,
+ ION_HEAP_TYPE_CHUNK,
+ ION_HEAP_TYPE_DMA,
ION_HEAP_TYPE_CUSTOM,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_NUM_HEAPS = 16,
};
#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
+#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
+#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8
#define ION_FLAG_CACHED 1
-#define ION_FLAG_CACHED_NEEDS_SYNC 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
struct ion_allocation_data {
size_t len;
size_t align;
- unsigned int heap_mask;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int heap_id_mask;
unsigned int flags;
- struct ion_handle *handle;
+ ion_user_handle_t handle;
};
-struct ion_fd_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_fd_data {
+ ion_user_handle_t handle;
int fd;
};
-struct ion_handle_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_handle_data {
+ ion_user_handle_t handle;
};
struct ion_custom_data {
- unsigned int cmd;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int cmd;
unsigned long arg;
};
#define ION_IOC_MAGIC 'I'
-#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
-#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
diff --git a/9/platforms/android-19/arch-mips64/usr/include/malloc.h b/9/platforms/android-19/arch-mips64/usr/include/malloc.h
index e6ea276..1e92b7d 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/malloc.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/malloc.h
@@ -27,12 +27,19 @@
__BEGIN_DECLS
+#if !defined(__clang__) || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ < 5)
extern void* malloc(size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(1)));
extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur __attribute__((alloc_size(1,2)));
extern void* realloc(void* p, size_t byte_count) __wur __attribute__((alloc_size(2)));
-extern void free(void* p);
-
extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2)));
+#else
+extern void* malloc(size_t byte_count) __mallocfunc __wur;
+extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur;
+extern void* realloc(void* p, size_t byte_count) __wur;
+extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur;
+#endif
+
+extern void free(void* p);
extern size_t malloc_usable_size(const void* p);
#ifndef STRUCT_MALLINFO_DECLARED
diff --git a/9/platforms/android-19/arch-mips64/usr/include/math.h b/9/platforms/android-19/arch-mips64/usr/include/math.h
index 79d9c5c..8369d6e 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/math.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/math.h
@@ -36,11 +36,11 @@ extern const union __nan_un {
float __uf;
} __nan;
-#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
+#if __GNUC_PREREQ(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __MATH_BUILTIN_CONSTANTS
#endif
-#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
+#if __GNUC_PREREQ(3, 0) && !defined(__INTEL_COMPILER)
#define __MATH_BUILTIN_RELOPS
#endif
diff --git a/9/platforms/android-19/arch-mips64/usr/include/sha1.h b/9/platforms/android-19/arch-mips64/usr/include/sha1.h
deleted file mode 100644
index 7f6cf5d..0000000
--- a/9/platforms/android-19/arch-mips64/usr/include/sha1.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * 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 _SHA1_H_
-#define _SHA1_H_
-
-#warning "include <sys/sha1.h> instead for better portability"
-#include <sys/sha1.h>
-
-#endif
diff --git a/9/platforms/android-19/arch-mips64/usr/include/stdatomic.h b/9/platforms/android-19/arch-mips64/usr/include/stdatomic.h
index 669cefd..3db25a7 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/stdatomic.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/stdatomic.h
@@ -31,17 +31,142 @@
#define _STDATOMIC_H_
#include <sys/cdefs.h>
+
+
+#if defined(__cplusplus) && defined(_USING_LIBCXX)
+# ifdef __clang__
+# if __has_feature(cxx_atomic)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# else /* gcc */
+# if __GNUC_PREREQ(4, 7)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# endif
+#endif
+
+#ifdef _STDATOMIC_HAVE_ATOMIC
+
+/* We have a usable C++ <atomic>; use it instead. */
+
+#include <atomic>
+
+#undef _Atomic
+ /* Also defined by <atomic> for gcc. But not used in macros. */
+ /* Also a clang intrinsic. */
+ /* Should not be used by client code before this file is */
+ /* included. The definitions in <atomic> themselves see */
+ /* the old definition, as they should. */
+ /* Client code sees the following definition. */
+
+#define _Atomic(t) std::atomic<t>
+
+using std::atomic_is_lock_free;
+using std::atomic_init;
+using std::atomic_store;
+using std::atomic_store_explicit;
+using std::atomic_load;
+using std::atomic_load_explicit;
+using std::atomic_exchange;
+using std::atomic_exchange_explicit;
+using std::atomic_compare_exchange_strong;
+using std::atomic_compare_exchange_strong_explicit;
+using std::atomic_compare_exchange_weak;
+using std::atomic_compare_exchange_weak_explicit;
+using std::atomic_fetch_add;
+using std::atomic_fetch_add_explicit;
+using std::atomic_fetch_sub;
+using std::atomic_fetch_sub_explicit;
+using std::atomic_fetch_or;
+using std::atomic_fetch_or_explicit;
+using std::atomic_fetch_xor;
+using std::atomic_fetch_xor_explicit;
+using std::atomic_fetch_and;
+using std::atomic_fetch_and_explicit;
+using std::atomic_thread_fence;
+using std::atomic_signal_fence;
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_wchar_t;
+using std::atomic_int_least8_t;
+using std::atomic_uint_least8_t;
+using std::atomic_int_least16_t;
+using std::atomic_uint_least16_t;
+using std::atomic_int_least32_t;
+using std::atomic_uint_least32_t;
+using std::atomic_int_least64_t;
+using std::atomic_uint_least64_t;
+using std::atomic_int_fast8_t;
+using std::atomic_uint_fast8_t;
+using std::atomic_int_fast16_t;
+using std::atomic_uint_fast16_t;
+using std::atomic_int_fast32_t;
+using std::atomic_uint_fast32_t;
+using std::atomic_int_fast64_t;
+using std::atomic_uint_fast64_t;
+using std::atomic_intptr_t;
+using std::atomic_uintptr_t;
+using std::atomic_size_t;
+using std::atomic_ptrdiff_t;
+using std::atomic_intmax_t;
+using std::atomic_uintmax_t;
+
+#else /* <atomic> unavailable, possibly because this is C, not C++ */
+
#include <sys/types.h>
#include <stdbool.h>
-#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
-#define __CLANG_ATOMICS
-#elif __GNUC_PREREQ__(4, 7)
-#define __GNUC_ATOMICS
-#elif defined(__GNUC__)
-#define __SYNC_ATOMICS
+/*
+ * C: Do it ourselves.
+ * Note that the runtime representation defined here should be compatible
+ * with the C++ one, i.e. an _Atomic(T) needs to contain the same
+ * bits as a T.
+ */
+
+#include <stddef.h> /* For ptrdiff_t. */
+#include <stdint.h> /* TODO: Should pollute namespace less. */
+#if __STDC_VERSION__ >= 201112L
+# include <uchar.h> /* For char16_t and char32_t. */
+#endif
+
+#ifdef __clang__
+# if __has_extension(c_atomic) || __has_extension(cxx_atomic)
+# define __CLANG_ATOMICS
+# else
+# error "stdatomic.h does not support your compiler"
+# endif
+# if __has_builtin(__sync_swap)
+# define __HAS_BUILTIN_SYNC_SWAP
+# endif
#else
-#error "stdatomic.h does not support your compiler"
+# if __GNUC_PREREQ(4, 7)
+# define __GNUC_ATOMICS
+# else
+# define __SYNC_ATOMICS
+# ifdef __cplusplus
+# define __ATOMICS_AVOID_DOT_INIT
+# endif
+# endif
#endif
/*
@@ -50,33 +175,53 @@
#ifdef __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_BOOL_LOCK_FREE 2 /* For all modern platforms */
#endif
#ifdef __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR16_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR32_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_WCHAR_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_SHORT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_INT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LONG_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LLONG_LOCK_FREE 1 /* maybe */
#endif
#ifdef __GCC_ATOMIC_POINTER_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_POINTER_LOCK_FREE 2
#endif
/*
@@ -87,7 +232,11 @@
#define ATOMIC_VAR_INIT(value) (value)
#define atomic_init(obj, value) __c11_atomic_init(obj, value)
#else
+#ifdef __ATOMICS_AVOID_DOT_INIT
+#define ATOMIC_VAR_INIT(value) { value }
+#else
#define ATOMIC_VAR_INIT(value) { .__val = (value) }
+#endif
#define atomic_init(obj, value) ((void)((obj)->__val = (value)))
#endif
@@ -121,6 +270,8 @@
*
* The memory_order_* constants that denote the barrier behaviour of the
* atomic operations.
+ * The enum values must be identical to those used by the
+ * C++ <atomic> header.
*/
typedef enum {
@@ -137,7 +288,7 @@ typedef enum {
*/
static __inline void
-atomic_thread_fence(memory_order __order __unused)
+atomic_thread_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -150,7 +301,7 @@ atomic_thread_fence(memory_order __order __unused)
}
static __inline void
-atomic_signal_fence(memory_order __order __unused)
+atomic_signal_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -172,7 +323,7 @@ atomic_signal_fence(memory_order __order __unused)
((void)(obj), (_Bool)1)
#elif defined(__CLANG_ATOMICS)
#define atomic_is_lock_free(obj) \
- __atomic_is_lock_free(sizeof(*(obj)), obj)
+ __c11_atomic_is_lock_free(sizeof(*(obj)))
#elif defined(__GNUC_ATOMICS)
#define atomic_is_lock_free(obj) \
__atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
@@ -185,7 +336,7 @@ atomic_signal_fence(memory_order __order __unused)
* 7.17.6 Atomic integer types.
*/
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#ifndef __CLANG_ATOMICS
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.
@@ -306,7 +457,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
desired, success, failure) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure)
-#if __has_builtin(__sync_swap)
+#ifdef __HAS_BUILTIN_SYNC_SWAP
/* Clang provides a full-barrier atomic exchange - use it if available. */
#define atomic_exchange_explicit(object, desired, order) \
((void)(order), __sync_swap(&(object)->__val, desired))
@@ -386,7 +537,7 @@ typedef struct {
atomic_bool __flag;
} atomic_flag;
-#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) }
+#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(false) }
static __inline bool
atomic_flag_test_and_set_explicit(volatile atomic_flag *__object,
@@ -419,4 +570,6 @@ atomic_flag_clear(volatile atomic_flag *__object)
}
#endif /* !_KERNEL */
+#endif /* <atomic> unavailable */
+
#endif /* !_STDATOMIC_H_ */
diff --git a/9/platforms/android-19/arch-mips64/usr/include/stdio.h b/9/platforms/android-19/arch-mips64/usr/include/stdio.h
index 4d160a3..9edf9d2 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/stdio.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/stdio.h
@@ -38,6 +38,14 @@
#ifndef _STDIO_H_
#define _STDIO_H_
+/*
+ * This file must contain a reference to __gnuc_va_list so that GCC's
+ * fixincludes knows that that's what's being used for va_list, and so
+ * to leave our <stdio.h> alone. (fixincludes gets in the way of pointing
+ * one toolchain at various different sets of platform headers.)
+ * If you alter this comment, be sure to keep "__gnuc_va_list" in it!
+ */
+
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -58,10 +66,17 @@ typedef off_t fpos_t; /* stdio file position type */
*/
/* stdio buffers */
+#if defined(__LP64__)
+struct __sbuf {
+ unsigned char* _base;
+ size_t _size;
+};
+#else
struct __sbuf {
unsigned char *_base;
int _size;
};
+#endif
/*
* stdio state variables.
@@ -94,8 +109,13 @@ typedef struct __sFILE {
unsigned char *_p; /* current position in (some) buffer */
int _r; /* read space left for getc() */
int _w; /* write space left for putc() */
+#if defined(__LP64__)
+ int _flags; /* flags, below; this FILE is free if 0 */
+ int _file; /* fileno, if Unix descriptor, else -1 */
+#else
short _flags; /* flags, below; this FILE is free if 0 */
short _file; /* fileno, if Unix descriptor, else -1 */
+#endif
struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
int _lbfsize; /* 0 or -_bf._size, for inline putc */
diff --git a/9/platforms/android-19/arch-mips64/usr/include/stdlib.h b/9/platforms/android-19/arch-mips64/usr/include/stdlib.h
index 39fad0f..a0f017c 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/stdlib.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/stdlib.h
@@ -111,12 +111,6 @@ void arc4random_buf(void*, size_t);
#define RAND_MAX 0x7fffffff
-/* Work around x86/x86-64 libvpx build breakage caused by postproc_x86.c. */
-#if (defined(__i386__) || defined(__x86_64__)) && defined(rand)
-#undef rand
-#define __rand lrand48
-#endif
-
int rand(void);
int rand_r(unsigned int*);
void srand(unsigned int);
@@ -167,7 +161,8 @@ extern int mbtowc(wchar_t *, const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
-#define MB_CUR_MAX 4U
+extern size_t __ctype_get_mb_cur_max(void);
+#define MB_CUR_MAX __ctype_get_mb_cur_max()
__END_DECLS
diff --git a/9/platforms/android-19/arch-mips64/usr/include/string.h b/9/platforms/android-19/arch-mips64/usr/include/string.h
index af1c0c1..8df68e3 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/string.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/string.h
@@ -94,9 +94,6 @@ extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale
#if defined(__BIONIC_FORTIFY)
-__errordecl(__memcpy_dest_size_error, "memcpy: prevented write past end of buffer");
-__errordecl(__memcpy_src_size_error, "memcpy: prevented read past end of buffer");
-
__BIONIC_FORTIFY_INLINE
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
char *d = (char *) dest;
@@ -104,14 +101,6 @@ void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amou
size_t s_len = __bos0(s);
size_t d_len = __bos0(d);
- if (__builtin_constant_p(copy_amount) && (copy_amount > d_len)) {
- __memcpy_dest_size_error();
- }
-
- if (__builtin_constant_p(copy_amount) && (copy_amount > s_len)) {
- __memcpy_src_size_error();
- }
-
return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
}
@@ -130,16 +119,12 @@ char* strcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___strcpy_chk(dest, src, __bos(dest));
}
-__errordecl(__stpncpy_error, "stpncpy: prevented write past end of buffer");
extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __stpncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
@@ -157,16 +142,12 @@ char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
return __stpncpy_chk2(dest, src, n, bos_dest, bos_src);
}
-__errordecl(__strncpy_error, "strncpy: prevented write past end of buffer");
extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __strncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
@@ -201,7 +182,6 @@ void* memset(void *s, int c, size_t n) {
extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcpy");
-__errordecl(__strlcpy_error, "strlcpy: prevented write past end of buffer");
extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
__BIONIC_FORTIFY_INLINE
@@ -219,12 +199,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcpy_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcpy_error();
- }
#endif /* !defined(__clang__) */
return __strlcpy_chk(dest, src, size, bos);
@@ -232,7 +206,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcat");
-__errordecl(__strlcat_error, "strlcat: prevented write past end of buffer");
extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
@@ -251,12 +224,6 @@ size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcat_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcat_error();
- }
#endif /* !defined(__clang__) */
return __strlcat_chk(dest, src, size, bos);
diff --git a/9/platforms/android-19/arch-mips64/usr/include/sys/cdefs.h b/9/platforms/android-19/arch-mips64/usr/include/sys/cdefs.h
index 9c92a1c..8ee34f7 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/sys/cdefs.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/sys/cdefs.h
@@ -60,18 +60,18 @@
* or later, for e.g. features that appeared in a particular version
* of GNU C. Usage:
*
- * #if __GNUC_PREREQ__(major, minor)
+ * #if __GNUC_PREREQ(major, minor)
* ...cool feature...
* #else
* ...delete feature...
* #endif
*/
#ifdef __GNUC__
-#define __GNUC_PREREQ__(x, y) \
+#define __GNUC_PREREQ(x, y) \
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
(__GNUC__ > (x)))
#else
-#define __GNUC_PREREQ__(x, y) 0
+#define __GNUC_PREREQ(x, y) 0
#endif
#include <sys/cdefs_elf.h>
@@ -163,7 +163,7 @@
* GCC2 provides __extension__ to suppress warnings for various GNU C
* language extensions under "-ansi -pedantic".
*/
-#if !__GNUC_PREREQ__(2, 0)
+#if !__GNUC_PREREQ(2, 0)
#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
#endif
@@ -175,7 +175,7 @@
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
-#if !__GNUC_PREREQ__(2, 5)
+#if !__GNUC_PREREQ(2, 5)
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile
@@ -189,7 +189,7 @@
#define __pure
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __unused __attribute__((__unused__))
#else
#define __unused /* delete */
@@ -197,13 +197,13 @@
#define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __used __attribute__((__used__))
#else
#define __used /* delete */
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
@@ -217,11 +217,11 @@
#define __section(x) error: no __section for this compiler
#endif
-#if !__GNUC_PREREQ__(2, 8)
+#if !__GNUC_PREREQ(2, 8)
#define __extension__
#endif
-#if __GNUC_PREREQ__(2, 8)
+#if __GNUC_PREREQ(2, 8)
#define __statement(x) __extension__(x)
#elif defined(lint)
#define __statement(x) (0)
@@ -241,7 +241,7 @@
#if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L
#define __restrict restrict
#else
-#if !__GNUC_PREREQ__(2, 92)
+#if !__GNUC_PREREQ(2, 92)
#define __restrict /* delete __restrict when not supported */
#endif
#endif
@@ -251,9 +251,9 @@
* in GCC 2.95.
*/
#if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L)
-#if __GNUC_PREREQ__(2, 6)
+#if __GNUC_PREREQ(2, 6)
#define __func__ __PRETTY_FUNCTION__
-#elif __GNUC_PREREQ__(2, 4)
+#elif __GNUC_PREREQ(2, 4)
#define __func__ __FUNCTION__
#else
#define __func__ ""
@@ -286,7 +286,7 @@
* register values. This is gcc specific, the version is more or less
* arbitrary, might work with older compilers.
*/
-#if __GNUC_PREREQ__(2, 95)
+#if __GNUC_PREREQ(2, 95)
#define __insn_barrier() __asm __volatile("":::"memory")
#else
#define __insn_barrier() /* */
@@ -320,7 +320,7 @@
* basic block reordering that this affects can often generate
* larger code.
*/
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
#else
@@ -328,7 +328,7 @@
#define __predict_false(exp) (exp)
#endif
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __noreturn __attribute__((__noreturn__))
#define __mallocfunc __attribute__((malloc))
#define __purefunc __attribute__((pure))
@@ -338,19 +338,19 @@
#define __purefunc
#endif
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __always_inline __attribute__((__always_inline__))
#else
#define __always_inline
#endif
-#if __GNUC_PREREQ__(3, 4)
+#if __GNUC_PREREQ(3, 4)
#define __wur __attribute__((__warn_unused_result__))
#else
#define __wur
#endif
-#if __GNUC_PREREQ__(4, 3)
+#if __GNUC_PREREQ(4, 3)
#define __errordecl(name, msg) extern void name(void) __attribute__((__error__(msg)))
#define __warnattr(msg) __attribute__((__warning__(msg)))
#else
diff --git a/9/platforms/android-19/arch-mips64/usr/include/sys/fsuid.h b/9/platforms/android-19/arch-mips64/usr/include/sys/fsuid.h
index bc47e3d..03355b7 100644
--- a/9/platforms/android-19/arch-mips64/usr/include/sys/fsuid.h
+++ b/9/platforms/android-19/arch-mips64/usr/include/sys/fsuid.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_FSUID_H_
#define _SYS_FSUID_H_
@@ -33,10 +34,8 @@
__BEGIN_DECLS
-#if 0 /* MISSING FROM BIONIC */
extern int setfsuid(uid_t);
extern int setfsgid(gid_t);
-#endif /* MISSING */
__END_DECLS
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libandroid.so b/9/platforms/android-19/arch-mips64/usr/lib64/libandroid.so
index 059c98b..dcb1f15 100755
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libandroid.so
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libandroid.so
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libc.a b/9/platforms/android-19/arch-mips64/usr/lib64/libc.a
index 452219e..92e26d3 100644
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libc.a
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libc.a
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libc.so b/9/platforms/android-19/arch-mips64/usr/lib64/libc.so
index e0de597..25de469 100755
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libc.so
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libc.so
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libm.a b/9/platforms/android-19/arch-mips64/usr/lib64/libm.a
index 13d4b79..5e847b5 100644
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libm.a
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libm.a
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.a b/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.a
index ed4cab4..40105c0 100644
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.a
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.a
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.so b/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.so
index 36ca402..4747f52 100755
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.so
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libstdc++.so
Binary files differ
diff --git a/9/platforms/android-19/arch-mips64/usr/lib64/libz.a b/9/platforms/android-19/arch-mips64/usr/lib64/libz.a
index 244f755..8e658fa 100644
--- a/9/platforms/android-19/arch-mips64/usr/lib64/libz.a
+++ b/9/platforms/android-19/arch-mips64/usr/lib64/libz.a
Binary files differ
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/android/configuration.h b/9/platforms/android-19/arch-x86_64/usr/include/android/configuration.h
index d5cddb3..be00066 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/android/configuration.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/android/configuration.h
@@ -45,6 +45,7 @@ enum {
ACONFIGURATION_DENSITY_XHIGH = 320,
ACONFIGURATION_DENSITY_XXHIGH = 480,
ACONFIGURATION_DENSITY_XXXHIGH = 640,
+ ACONFIGURATION_DENSITY_ANY = 0xfffe,
ACONFIGURATION_DENSITY_NONE = 0xffff,
ACONFIGURATION_KEYBOARD_ANY = 0x0000,
@@ -83,6 +84,7 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
+ ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
@@ -113,6 +115,8 @@ enum {
ACONFIGURATION_UI_MODE = 0x1000,
ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
ACONFIGURATION_LAYOUTDIR = 0x4000,
+
+ ACONFIGURATION_MNC_ZERO = 0xffff,
};
/**
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/android/keycodes.h b/9/platforms/android-19/arch-x86_64/usr/include/android/keycodes.h
index 1ca1332..813d411 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/android/keycodes.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/android/keycodes.h
@@ -266,6 +266,15 @@ enum {
AKEYCODE_BRIGHTNESS_DOWN = 220,
AKEYCODE_BRIGHTNESS_UP = 221,
AKEYCODE_MEDIA_AUDIO_TRACK = 222,
+ AKEYCODE_SLEEP = 223,
+ AKEYCODE_WAKEUP = 224,
+ AKEYCODE_PAIRING = 225,
+ AKEYCODE_MEDIA_TOP_MENU = 226,
+ AKEYCODE_11 = 227,
+ AKEYCODE_12 = 228,
+ AKEYCODE_LAST_CHANNEL = 229,
+ AKEYCODE_TV_DATA_SERVICE = 230,
+ AKEYCODE_VOICE_ASSIST = 231
// 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-19/arch-x86_64/usr/include/android/sensor.h b/9/platforms/android-19/arch-x86_64/usr/include/android/sensor.h
index 589058d..910fd39 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/android/sensor.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/android/sensor.h
@@ -41,6 +41,7 @@
*/
#include <sys/types.h>
+#include <stdbool.h>
#include <android/looper.h>
@@ -66,6 +67,7 @@ enum {
* Sensor accuracy measure
*/
enum {
+ ASENSOR_STATUS_NO_CONTACT = -1,
ASENSOR_STATUS_UNRELIABLE = 0,
ASENSOR_STATUS_ACCURACY_LOW = 1,
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
@@ -73,6 +75,16 @@ enum {
};
/*
+ * Sensor Reporting Modes.
+ */
+enum {
+ AREPORTING_MODE_CONTINUOUS = 0,
+ AREPORTING_MODE_ON_CHANGE = 1,
+ AREPORTING_MODE_ONE_SHOT = 2,
+ AREPORTING_MODE_SPECIAL_TRIGGER = 3
+};
+
+/*
* A few useful constants
*/
@@ -130,6 +142,11 @@ typedef struct AUncalibratedEvent {
};
} AUncalibratedEvent;
+typedef struct AHeartRateEvent {
+ float bpm;
+ int8_t status;
+} AHeartRateEvent;
+
/* NOTE: Must match hardware/sensors.h */
typedef struct ASensorEvent {
int32_t version; /* sizeof(struct ASensorEvent) */
@@ -151,13 +168,16 @@ typedef struct ASensorEvent {
AUncalibratedEvent uncalibrated_gyro;
AUncalibratedEvent uncalibrated_magnetic;
AMetaDataEvent meta_data;
+ AHeartRateEvent heart_rate;
};
union {
uint64_t data[8];
uint64_t step_counter;
} u64;
};
- int32_t reserved1[4];
+
+ uint32_t flags;
+ int32_t reserved1[3];
} ASensorEvent;
struct ASensorManager;
@@ -191,11 +211,18 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
/*
* Returns the default sensor for the given type, or NULL if no sensor
- * of that type exist.
+ * of that type exists.
*/
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
/*
+ * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
+ * of this type and wakeUp properties exists.
+ */
+ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
+ bool wakeUp);
+
+/*
* Creates a new sensor event queue and associate it with a looper.
*/
ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
@@ -272,7 +299,7 @@ int ASensor_getType(ASensor const* sensor);
/*
* Returns this sensors's resolution
*/
-float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
+float ASensor_getResolution(ASensor const* sensor);
/*
* Returns the minimum delay allowed between events in microseconds.
@@ -281,6 +308,31 @@ float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
*/
int ASensor_getMinDelay(ASensor const* sensor);
+/*
+ * Returns the maximum size of batches for this sensor. Batches will often be
+ * smaller, as the hardware fifo might be used for other sensors.
+ */
+int ASensor_getFifoMaxEventCount(ASensor const* sensor);
+
+/*
+ * Returns the hardware batch fifo size reserved to this sensor.
+ */
+int ASensor_getFifoReservedEventCount(ASensor const* sensor);
+
+/*
+ * Returns this sensor's string type.
+ */
+const char* ASensor_getStringType(ASensor const* sensor);
+
+/*
+ * Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants.
+ */
+int ASensor_getReportingMode(ASensor const* sensor);
+
+/*
+ * Returns true if this is a wake up sensor, false otherwise.
+ */
+bool ASensor_isWakeUpSensor(ASensor const* sensor);
#ifdef __cplusplus
};
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/linux/ion.h b/9/platforms/android-19/arch-x86_64/usr/include/linux/ion.h
index f18939d..5af39d0 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/linux/ion.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/linux/ion.h
@@ -16,56 +16,63 @@
***
****************************************************************************
****************************************************************************/
-#ifndef _LINUX_ION_H
-#define _LINUX_ION_H
+#ifndef _UAPI_LINUX_ION_H
+#define _UAPI_LINUX_ION_H
+#include <linux/ioctl.h>
#include <linux/types.h>
-struct ion_handle;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef int ion_user_handle_t;
enum ion_heap_type {
ION_HEAP_TYPE_SYSTEM,
ION_HEAP_TYPE_SYSTEM_CONTIG,
- ION_HEAP_TYPE_CARVEOUT,
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ ION_HEAP_TYPE_CARVEOUT,
+ ION_HEAP_TYPE_CHUNK,
+ ION_HEAP_TYPE_DMA,
ION_HEAP_TYPE_CUSTOM,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
ION_NUM_HEAPS = 16,
};
#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
+#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
+#define ION_NUM_HEAP_IDS sizeof(unsigned int) * 8
#define ION_FLAG_CACHED 1
-#define ION_FLAG_CACHED_NEEDS_SYNC 2
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_FLAG_CACHED_NEEDS_SYNC 2
struct ion_allocation_data {
size_t len;
size_t align;
- unsigned int heap_mask;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int heap_id_mask;
unsigned int flags;
- struct ion_handle *handle;
+ ion_user_handle_t handle;
};
-struct ion_fd_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_fd_data {
+ ion_user_handle_t handle;
int fd;
};
-struct ion_handle_data {
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
- struct ion_handle *handle;
+struct ion_handle_data {
+ ion_user_handle_t handle;
};
struct ion_custom_data {
- unsigned int cmd;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ unsigned int cmd;
unsigned long arg;
};
#define ION_IOC_MAGIC 'I'
-#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
-#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/machine/asm.h b/9/platforms/android-19/arch-x86_64/usr/include/machine/asm.h
index 0af6dae..06da39a 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/machine/asm.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/machine/asm.h
@@ -37,13 +37,8 @@
#ifndef _AMD64_ASM_H_
#define _AMD64_ASM_H_
-#ifdef __PIC__
#define PIC_PLT(x) x@PLT
#define PIC_GOT(x) x@GOTPCREL(%rip)
-#else
-#define PIC_PLT(x) x
-#define PIC_GOT(x) x
-#endif
/* let kernels and others override entrypoint alignment */
#ifndef _ALIGN_TEXT
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/malloc.h b/9/platforms/android-19/arch-x86_64/usr/include/malloc.h
index e6ea276..1e92b7d 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/malloc.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/malloc.h
@@ -27,12 +27,19 @@
__BEGIN_DECLS
+#if !defined(__clang__) || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ < 5)
extern void* malloc(size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(1)));
extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur __attribute__((alloc_size(1,2)));
extern void* realloc(void* p, size_t byte_count) __wur __attribute__((alloc_size(2)));
-extern void free(void* p);
-
extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2)));
+#else
+extern void* malloc(size_t byte_count) __mallocfunc __wur;
+extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur;
+extern void* realloc(void* p, size_t byte_count) __wur;
+extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur;
+#endif
+
+extern void free(void* p);
extern size_t malloc_usable_size(const void* p);
#ifndef STRUCT_MALLINFO_DECLARED
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/math.h b/9/platforms/android-19/arch-x86_64/usr/include/math.h
index 79d9c5c..8369d6e 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/math.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/math.h
@@ -36,11 +36,11 @@ extern const union __nan_un {
float __uf;
} __nan;
-#if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
+#if __GNUC_PREREQ(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __MATH_BUILTIN_CONSTANTS
#endif
-#if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER)
+#if __GNUC_PREREQ(3, 0) && !defined(__INTEL_COMPILER)
#define __MATH_BUILTIN_RELOPS
#endif
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sha1.h b/9/platforms/android-19/arch-x86_64/usr/include/sha1.h
deleted file mode 100644
index 7f6cf5d..0000000
--- a/9/platforms/android-19/arch-x86_64/usr/include/sha1.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * 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 _SHA1_H_
-#define _SHA1_H_
-
-#warning "include <sys/sha1.h> instead for better portability"
-#include <sys/sha1.h>
-
-#endif
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/stdatomic.h b/9/platforms/android-19/arch-x86_64/usr/include/stdatomic.h
index 669cefd..3db25a7 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/stdatomic.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/stdatomic.h
@@ -31,17 +31,142 @@
#define _STDATOMIC_H_
#include <sys/cdefs.h>
+
+
+#if defined(__cplusplus) && defined(_USING_LIBCXX)
+# ifdef __clang__
+# if __has_feature(cxx_atomic)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# else /* gcc */
+# if __GNUC_PREREQ(4, 7)
+# define _STDATOMIC_HAVE_ATOMIC
+# endif
+# endif
+#endif
+
+#ifdef _STDATOMIC_HAVE_ATOMIC
+
+/* We have a usable C++ <atomic>; use it instead. */
+
+#include <atomic>
+
+#undef _Atomic
+ /* Also defined by <atomic> for gcc. But not used in macros. */
+ /* Also a clang intrinsic. */
+ /* Should not be used by client code before this file is */
+ /* included. The definitions in <atomic> themselves see */
+ /* the old definition, as they should. */
+ /* Client code sees the following definition. */
+
+#define _Atomic(t) std::atomic<t>
+
+using std::atomic_is_lock_free;
+using std::atomic_init;
+using std::atomic_store;
+using std::atomic_store_explicit;
+using std::atomic_load;
+using std::atomic_load_explicit;
+using std::atomic_exchange;
+using std::atomic_exchange_explicit;
+using std::atomic_compare_exchange_strong;
+using std::atomic_compare_exchange_strong_explicit;
+using std::atomic_compare_exchange_weak;
+using std::atomic_compare_exchange_weak_explicit;
+using std::atomic_fetch_add;
+using std::atomic_fetch_add_explicit;
+using std::atomic_fetch_sub;
+using std::atomic_fetch_sub_explicit;
+using std::atomic_fetch_or;
+using std::atomic_fetch_or_explicit;
+using std::atomic_fetch_xor;
+using std::atomic_fetch_xor_explicit;
+using std::atomic_fetch_and;
+using std::atomic_fetch_and_explicit;
+using std::atomic_thread_fence;
+using std::atomic_signal_fence;
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_wchar_t;
+using std::atomic_int_least8_t;
+using std::atomic_uint_least8_t;
+using std::atomic_int_least16_t;
+using std::atomic_uint_least16_t;
+using std::atomic_int_least32_t;
+using std::atomic_uint_least32_t;
+using std::atomic_int_least64_t;
+using std::atomic_uint_least64_t;
+using std::atomic_int_fast8_t;
+using std::atomic_uint_fast8_t;
+using std::atomic_int_fast16_t;
+using std::atomic_uint_fast16_t;
+using std::atomic_int_fast32_t;
+using std::atomic_uint_fast32_t;
+using std::atomic_int_fast64_t;
+using std::atomic_uint_fast64_t;
+using std::atomic_intptr_t;
+using std::atomic_uintptr_t;
+using std::atomic_size_t;
+using std::atomic_ptrdiff_t;
+using std::atomic_intmax_t;
+using std::atomic_uintmax_t;
+
+#else /* <atomic> unavailable, possibly because this is C, not C++ */
+
#include <sys/types.h>
#include <stdbool.h>
-#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
-#define __CLANG_ATOMICS
-#elif __GNUC_PREREQ__(4, 7)
-#define __GNUC_ATOMICS
-#elif defined(__GNUC__)
-#define __SYNC_ATOMICS
+/*
+ * C: Do it ourselves.
+ * Note that the runtime representation defined here should be compatible
+ * with the C++ one, i.e. an _Atomic(T) needs to contain the same
+ * bits as a T.
+ */
+
+#include <stddef.h> /* For ptrdiff_t. */
+#include <stdint.h> /* TODO: Should pollute namespace less. */
+#if __STDC_VERSION__ >= 201112L
+# include <uchar.h> /* For char16_t and char32_t. */
+#endif
+
+#ifdef __clang__
+# if __has_extension(c_atomic) || __has_extension(cxx_atomic)
+# define __CLANG_ATOMICS
+# else
+# error "stdatomic.h does not support your compiler"
+# endif
+# if __has_builtin(__sync_swap)
+# define __HAS_BUILTIN_SYNC_SWAP
+# endif
#else
-#error "stdatomic.h does not support your compiler"
+# if __GNUC_PREREQ(4, 7)
+# define __GNUC_ATOMICS
+# else
+# define __SYNC_ATOMICS
+# ifdef __cplusplus
+# define __ATOMICS_AVOID_DOT_INIT
+# endif
+# endif
#endif
/*
@@ -50,33 +175,53 @@
#ifdef __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_BOOL_LOCK_FREE 2 /* For all modern platforms */
#endif
#ifdef __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR16_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_CHAR32_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_WCHAR_T_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_SHORT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_INT_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LONG_LOCK_FREE 2
#endif
#ifdef __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_LLONG_LOCK_FREE 1 /* maybe */
#endif
#ifdef __GCC_ATOMIC_POINTER_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
+#elif defined(__SYNC_ATOMICS)
+#define ATOMIC_POINTER_LOCK_FREE 2
#endif
/*
@@ -87,7 +232,11 @@
#define ATOMIC_VAR_INIT(value) (value)
#define atomic_init(obj, value) __c11_atomic_init(obj, value)
#else
+#ifdef __ATOMICS_AVOID_DOT_INIT
+#define ATOMIC_VAR_INIT(value) { value }
+#else
#define ATOMIC_VAR_INIT(value) { .__val = (value) }
+#endif
#define atomic_init(obj, value) ((void)((obj)->__val = (value)))
#endif
@@ -121,6 +270,8 @@
*
* The memory_order_* constants that denote the barrier behaviour of the
* atomic operations.
+ * The enum values must be identical to those used by the
+ * C++ <atomic> header.
*/
typedef enum {
@@ -137,7 +288,7 @@ typedef enum {
*/
static __inline void
-atomic_thread_fence(memory_order __order __unused)
+atomic_thread_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -150,7 +301,7 @@ atomic_thread_fence(memory_order __order __unused)
}
static __inline void
-atomic_signal_fence(memory_order __order __unused)
+atomic_signal_fence(memory_order __order __attribute__((unused)))
{
#ifdef __CLANG_ATOMICS
@@ -172,7 +323,7 @@ atomic_signal_fence(memory_order __order __unused)
((void)(obj), (_Bool)1)
#elif defined(__CLANG_ATOMICS)
#define atomic_is_lock_free(obj) \
- __atomic_is_lock_free(sizeof(*(obj)), obj)
+ __c11_atomic_is_lock_free(sizeof(*(obj)))
#elif defined(__GNUC_ATOMICS)
#define atomic_is_lock_free(obj) \
__atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
@@ -185,7 +336,7 @@ atomic_signal_fence(memory_order __order __unused)
* 7.17.6 Atomic integer types.
*/
-#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+#ifndef __CLANG_ATOMICS
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.
@@ -306,7 +457,7 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
desired, success, failure) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure)
-#if __has_builtin(__sync_swap)
+#ifdef __HAS_BUILTIN_SYNC_SWAP
/* Clang provides a full-barrier atomic exchange - use it if available. */
#define atomic_exchange_explicit(object, desired, order) \
((void)(order), __sync_swap(&(object)->__val, desired))
@@ -386,7 +537,7 @@ typedef struct {
atomic_bool __flag;
} atomic_flag;
-#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) }
+#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(false) }
static __inline bool
atomic_flag_test_and_set_explicit(volatile atomic_flag *__object,
@@ -419,4 +570,6 @@ atomic_flag_clear(volatile atomic_flag *__object)
}
#endif /* !_KERNEL */
+#endif /* <atomic> unavailable */
+
#endif /* !_STDATOMIC_H_ */
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/stdio.h b/9/platforms/android-19/arch-x86_64/usr/include/stdio.h
index 4d160a3..9edf9d2 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/stdio.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/stdio.h
@@ -38,6 +38,14 @@
#ifndef _STDIO_H_
#define _STDIO_H_
+/*
+ * This file must contain a reference to __gnuc_va_list so that GCC's
+ * fixincludes knows that that's what's being used for va_list, and so
+ * to leave our <stdio.h> alone. (fixincludes gets in the way of pointing
+ * one toolchain at various different sets of platform headers.)
+ * If you alter this comment, be sure to keep "__gnuc_va_list" in it!
+ */
+
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -58,10 +66,17 @@ typedef off_t fpos_t; /* stdio file position type */
*/
/* stdio buffers */
+#if defined(__LP64__)
+struct __sbuf {
+ unsigned char* _base;
+ size_t _size;
+};
+#else
struct __sbuf {
unsigned char *_base;
int _size;
};
+#endif
/*
* stdio state variables.
@@ -94,8 +109,13 @@ typedef struct __sFILE {
unsigned char *_p; /* current position in (some) buffer */
int _r; /* read space left for getc() */
int _w; /* write space left for putc() */
+#if defined(__LP64__)
+ int _flags; /* flags, below; this FILE is free if 0 */
+ int _file; /* fileno, if Unix descriptor, else -1 */
+#else
short _flags; /* flags, below; this FILE is free if 0 */
short _file; /* fileno, if Unix descriptor, else -1 */
+#endif
struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
int _lbfsize; /* 0 or -_bf._size, for inline putc */
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/stdlib.h b/9/platforms/android-19/arch-x86_64/usr/include/stdlib.h
index 39fad0f..a0f017c 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/stdlib.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/stdlib.h
@@ -111,12 +111,6 @@ void arc4random_buf(void*, size_t);
#define RAND_MAX 0x7fffffff
-/* Work around x86/x86-64 libvpx build breakage caused by postproc_x86.c. */
-#if (defined(__i386__) || defined(__x86_64__)) && defined(rand)
-#undef rand
-#define __rand lrand48
-#endif
-
int rand(void);
int rand_r(unsigned int*);
void srand(unsigned int);
@@ -167,7 +161,8 @@ extern int mbtowc(wchar_t *, const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
-#define MB_CUR_MAX 4U
+extern size_t __ctype_get_mb_cur_max(void);
+#define MB_CUR_MAX __ctype_get_mb_cur_max()
__END_DECLS
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/string.h b/9/platforms/android-19/arch-x86_64/usr/include/string.h
index af1c0c1..8df68e3 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/string.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/string.h
@@ -94,9 +94,6 @@ extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale
#if defined(__BIONIC_FORTIFY)
-__errordecl(__memcpy_dest_size_error, "memcpy: prevented write past end of buffer");
-__errordecl(__memcpy_src_size_error, "memcpy: prevented read past end of buffer");
-
__BIONIC_FORTIFY_INLINE
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
char *d = (char *) dest;
@@ -104,14 +101,6 @@ void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amou
size_t s_len = __bos0(s);
size_t d_len = __bos0(d);
- if (__builtin_constant_p(copy_amount) && (copy_amount > d_len)) {
- __memcpy_dest_size_error();
- }
-
- if (__builtin_constant_p(copy_amount) && (copy_amount > s_len)) {
- __memcpy_src_size_error();
- }
-
return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
}
@@ -130,16 +119,12 @@ char* strcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___strcpy_chk(dest, src, __bos(dest));
}
-__errordecl(__stpncpy_error, "stpncpy: prevented write past end of buffer");
extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __stpncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
@@ -157,16 +142,12 @@ char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
return __stpncpy_chk2(dest, src, n, bos_dest, bos_src);
}
-__errordecl(__strncpy_error, "strncpy: prevented write past end of buffer");
extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
__BIONIC_FORTIFY_INLINE
char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __bos(dest);
size_t bos_src = __bos(src);
- if (__builtin_constant_p(n) && (n > bos_dest)) {
- __strncpy_error();
- }
if (bos_src == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
@@ -201,7 +182,6 @@ void* memset(void *s, int c, size_t n) {
extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcpy");
-__errordecl(__strlcpy_error, "strlcpy: prevented write past end of buffer");
extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
__BIONIC_FORTIFY_INLINE
@@ -219,12 +199,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcpy_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcpy_error();
- }
#endif /* !defined(__clang__) */
return __strlcpy_chk(dest, src, size, bos);
@@ -232,7 +206,6 @@ size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
__asm__(__USER_LABEL_PREFIX__ "strlcat");
-__errordecl(__strlcat_error, "strlcat: prevented write past end of buffer");
extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
@@ -251,12 +224,6 @@ size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) {
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcat_real(dest, src, size);
}
-
- // Compiler can prove, at compile time, that the passed in size
- // is always > the actual object size. Force a compiler error.
- if (__builtin_constant_p(size) && (size > bos)) {
- __strlcat_error();
- }
#endif /* !defined(__clang__) */
return __strlcat_chk(dest, src, size, bos);
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/cdefs.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/cdefs.h
index 9c92a1c..8ee34f7 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/sys/cdefs.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/cdefs.h
@@ -60,18 +60,18 @@
* or later, for e.g. features that appeared in a particular version
* of GNU C. Usage:
*
- * #if __GNUC_PREREQ__(major, minor)
+ * #if __GNUC_PREREQ(major, minor)
* ...cool feature...
* #else
* ...delete feature...
* #endif
*/
#ifdef __GNUC__
-#define __GNUC_PREREQ__(x, y) \
+#define __GNUC_PREREQ(x, y) \
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
(__GNUC__ > (x)))
#else
-#define __GNUC_PREREQ__(x, y) 0
+#define __GNUC_PREREQ(x, y) 0
#endif
#include <sys/cdefs_elf.h>
@@ -163,7 +163,7 @@
* GCC2 provides __extension__ to suppress warnings for various GNU C
* language extensions under "-ansi -pedantic".
*/
-#if !__GNUC_PREREQ__(2, 0)
+#if !__GNUC_PREREQ(2, 0)
#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
#endif
@@ -175,7 +175,7 @@
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
-#if !__GNUC_PREREQ__(2, 5)
+#if !__GNUC_PREREQ(2, 5)
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile
@@ -189,7 +189,7 @@
#define __pure
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __unused __attribute__((__unused__))
#else
#define __unused /* delete */
@@ -197,13 +197,13 @@
#define __pure2 __attribute__((__const__)) /* Android-added: used by FreeBSD libm */
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __used __attribute__((__used__))
#else
#define __used /* delete */
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ(2, 7)
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
@@ -217,11 +217,11 @@
#define __section(x) error: no __section for this compiler
#endif
-#if !__GNUC_PREREQ__(2, 8)
+#if !__GNUC_PREREQ(2, 8)
#define __extension__
#endif
-#if __GNUC_PREREQ__(2, 8)
+#if __GNUC_PREREQ(2, 8)
#define __statement(x) __extension__(x)
#elif defined(lint)
#define __statement(x) (0)
@@ -241,7 +241,7 @@
#if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L
#define __restrict restrict
#else
-#if !__GNUC_PREREQ__(2, 92)
+#if !__GNUC_PREREQ(2, 92)
#define __restrict /* delete __restrict when not supported */
#endif
#endif
@@ -251,9 +251,9 @@
* in GCC 2.95.
*/
#if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L)
-#if __GNUC_PREREQ__(2, 6)
+#if __GNUC_PREREQ(2, 6)
#define __func__ __PRETTY_FUNCTION__
-#elif __GNUC_PREREQ__(2, 4)
+#elif __GNUC_PREREQ(2, 4)
#define __func__ __FUNCTION__
#else
#define __func__ ""
@@ -286,7 +286,7 @@
* register values. This is gcc specific, the version is more or less
* arbitrary, might work with older compilers.
*/
-#if __GNUC_PREREQ__(2, 95)
+#if __GNUC_PREREQ(2, 95)
#define __insn_barrier() __asm __volatile("":::"memory")
#else
#define __insn_barrier() /* */
@@ -320,7 +320,7 @@
* basic block reordering that this affects can often generate
* larger code.
*/
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
#else
@@ -328,7 +328,7 @@
#define __predict_false(exp) (exp)
#endif
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ(2, 96)
#define __noreturn __attribute__((__noreturn__))
#define __mallocfunc __attribute__((malloc))
#define __purefunc __attribute__((pure))
@@ -338,19 +338,19 @@
#define __purefunc
#endif
-#if __GNUC_PREREQ__(3, 1)
+#if __GNUC_PREREQ(3, 1)
#define __always_inline __attribute__((__always_inline__))
#else
#define __always_inline
#endif
-#if __GNUC_PREREQ__(3, 4)
+#if __GNUC_PREREQ(3, 4)
#define __wur __attribute__((__warn_unused_result__))
#else
#define __wur
#endif
-#if __GNUC_PREREQ__(4, 3)
+#if __GNUC_PREREQ(4, 3)
#define __errordecl(name, msg) extern void name(void) __attribute__((__error__(msg)))
#define __warnattr(msg) __attribute__((__warning__(msg)))
#else
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/fsuid.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/fsuid.h
index bc47e3d..03355b7 100644
--- a/9/platforms/android-19/arch-x86_64/usr/include/sys/fsuid.h
+++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/fsuid.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_FSUID_H_
#define _SYS_FSUID_H_
@@ -33,10 +34,8 @@
__BEGIN_DECLS
-#if 0 /* MISSING FROM BIONIC */
extern int setfsuid(uid_t);
extern int setfsgid(gid_t);
-#endif /* MISSING */
__END_DECLS
diff --git a/9/platforms/android-19/arch-x86_64/usr/lib64/libandroid.so b/9/platforms/android-19/arch-x86_64/usr/lib64/libandroid.so
index 19e0f6c..9dd350a 100755
--- a/9/platforms/android-19/arch-x86_64/usr/lib64/libandroid.so
+++ b/9/platforms/android-19/arch-x86_64/usr/lib64/libandroid.so
Binary files differ
diff --git a/9/platforms/android-19/arch-x86_64/usr/lib64/libc.a b/9/platforms/android-19/arch-x86_64/usr/lib64/libc.a
index 7cbbb67..e315edf 100644
--- a/9/platforms/android-19/arch-x86_64/usr/lib64/libc.a
+++ b/9/platforms/android-19/arch-x86_64/usr/lib64/libc.a
Binary files differ
diff --git a/9/platforms/android-19/arch-x86_64/usr/lib64/libc.so b/9/platforms/android-19/arch-x86_64/usr/lib64/libc.so
index b3d00b7..1bfc237 100755
--- a/9/platforms/android-19/arch-x86_64/usr/lib64/libc.so
+++ b/9/platforms/android-19/arch-x86_64/usr/lib64/libc.so
Binary files differ
diff --git a/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.a b/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.a
index df959bd..92d47c8 100644
--- a/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.a
+++ b/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.a
Binary files differ
diff --git a/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.so b/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.so
index 1ab21ca..a9c373b 100755
--- a/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.so
+++ b/9/platforms/android-19/arch-x86_64/usr/lib64/libstdc++.so
Binary files differ