summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-02-15 19:27:17 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-02-15 19:27:17 +0000
commitca5ca8b88a30d8954a8fc9aa950fa151758b2f51 (patch)
tree95f53c7d98a1bba90b1c05de9d760afcc58a95cd
parentf2c981f7980653b9325d65882cb0ffff291b0cbe (diff)
parent8c0dc3d35ae8a63c7b44ad3b122bff97a562e60f (diff)
downloadndk-ca5ca8b88a30d8954a8fc9aa950fa151758b2f51.tar.gz
Merge "Update bionic headers to a1fa52292." am: e15d893bf2 am: 7c67208d38
am: 8c0dc3d35a Change-Id: I2d88e4cbca2cbca00423095554845a89fb485e05
-rw-r--r--NOTICE44
-rw-r--r--headers/bits/glibc-syscalls.h9
-rw-r--r--headers/dlfcn.h1
-rw-r--r--headers/math.h6
-rw-r--r--headers/signal.h5
-rw-r--r--headers/sys/_system_properties.h74
-rw-r--r--headers/sys/ipc.h5
-rw-r--r--headers/sys/system_properties.h14
8 files changed, 92 insertions, 66 deletions
diff --git a/NOTICE b/NOTICE
index fd6cee6fd..1b996e94e 100644
--- a/NOTICE
+++ b/NOTICE
@@ -932,6 +932,50 @@ SUCH DAMAGE.
-------------------------------------------------------------------
+Copyright (C) 2017 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.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2017 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
Copyright (c) 1980, 1983, 1988, 1993
The Regents of the University of California. All rights reserved.
diff --git a/headers/bits/glibc-syscalls.h b/headers/bits/glibc-syscalls.h
index 598e310b7..3191a23c4 100644
--- a/headers/bits/glibc-syscalls.h
+++ b/headers/bits/glibc-syscalls.h
@@ -670,6 +670,15 @@
#if defined(__NR_pivot_root)
#define SYS_pivot_root __NR_pivot_root
#endif
+#if defined(__NR_pkey_alloc)
+ #define SYS_pkey_alloc __NR_pkey_alloc
+#endif
+#if defined(__NR_pkey_free)
+ #define SYS_pkey_free __NR_pkey_free
+#endif
+#if defined(__NR_pkey_mprotect)
+ #define SYS_pkey_mprotect __NR_pkey_mprotect
+#endif
#if defined(__NR_poll)
#define SYS_poll __NR_poll
#endif
diff --git a/headers/dlfcn.h b/headers/dlfcn.h
index 1fde25d47..d365f42ee 100644
--- a/headers/dlfcn.h
+++ b/headers/dlfcn.h
@@ -29,6 +29,7 @@
#ifndef __DLFCN_H__
#define __DLFCN_H__
+#include <stdint.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/headers/math.h b/headers/math.h
index 6f70c31f3..1a0719c2c 100644
--- a/headers/math.h
+++ b/headers/math.h
@@ -148,12 +148,6 @@ double expm1(double);
double fma(double, double, double);
double hypot(double, double);
int ilogb(double) __attribute_const__;
-
-#if __ANDROID_API__ >= 21
-int(isinf)(double) __attribute_const__ __INTRODUCED_IN(21);
-#endif /* __ANDROID_API__ >= 21 */
-
-int (isnan)(double) __attribute_const__;
double lgamma(double);
long long llrint(double);
long long llround(double);
diff --git a/headers/signal.h b/headers/signal.h
index 8301b2807..be65211c7 100644
--- a/headers/signal.h
+++ b/headers/signal.h
@@ -159,6 +159,11 @@ int raise(int);
int kill(pid_t, int);
int killpg(int, int);
+#if (!defined(__LP64__) && __ANDROID_API__ >= 16) || (defined(__LP64__))
+int tgkill(int tgid, int tid, int sig) __INTRODUCED_IN_32(16);
+#endif /* (!defined(__LP64__) && __ANDROID_API__ >= 16) || (defined(__LP64__)) */
+
+
int sigaltstack(const stack_t*, stack_t*);
diff --git a/headers/sys/_system_properties.h b/headers/sys/_system_properties.h
index 60789d41b..ffa6d2e73 100644
--- a/headers/sys/_system_properties.h
+++ b/headers/sys/_system_properties.h
@@ -33,59 +33,28 @@
#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#error you should #include <sys/system_properties.h> instead
-#else
-#include <sys/system_properties.h>
+#endif
-typedef struct prop_msg prop_msg;
+#include <sys/system_properties.h>
-#define PROP_AREA_MAGIC 0x504f5250
-#define PROP_AREA_VERSION 0xfc6ed0ab
-#define PROP_AREA_VERSION_COMPAT 0x45434f76
+__BEGIN_DECLS
#define PROP_SERVICE_NAME "property_service"
-#define PROP_FILENAME_MAX 1024
#define PROP_FILENAME "/dev/__properties__"
-#define PA_SIZE (128 * 1024)
-
-#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
-#define SERIAL_DIRTY(serial) ((serial) & 1)
-
-__BEGIN_DECLS
-
-struct prop_msg
-{
- unsigned cmd;
- char name[PROP_NAME_MAX];
- char value[PROP_VALUE_MAX];
-};
-
#define PROP_MSG_SETPROP 1
-
-/*
-** Rules:
-**
-** - there is only one writer, but many readers
-** - prop_area.count will never decrease in value
-** - once allocated, a prop_info's name will not change
-** - once allocated, a prop_info's offset will not change
-** - reading a value requires the following steps
-** 1. serial = pi->serial
-** 2. if SERIAL_DIRTY(serial), wait*, then goto 1
-** 3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1)
-** 4. if pi->serial != serial, goto 2
-**
-** - writing a value requires the following steps
-** 1. pi->serial = pi->serial | 1
-** 2. memcpy(pi->value, local_value, value_len)
-** 3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff)
-*/
-
-#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
-#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
-#define PROP_PATH_VENDOR_BUILD "/vendor/build.prop"
-#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
-#define PROP_PATH_FACTORY "/factory/factory.prop"
+#define PROP_MSG_SETPROP2 0x00020001
+
+#define PROP_SUCCESS 0
+#define PROP_ERROR_READ_CMD 0x0004
+#define PROP_ERROR_READ_DATA 0x0008
+#define PROP_ERROR_READ_ONLY_PROPERTY 0x000B
+#define PROP_ERROR_INVALID_NAME 0x0010
+#define PROP_ERROR_INVALID_VALUE 0x0014
+#define PROP_ERROR_PERMISSION_DENIED 0x0018
+#define PROP_ERROR_INVALID_CMD 0x001B
+#define PROP_ERROR_HANDLE_CONTROL_MESSAGE 0x0020
+#define PROP_ERROR_SET_FAILED 0x0024
/*
** Map the property area from the specified filename. This
@@ -132,8 +101,7 @@ unsigned int __system_property_area_serial();
**
** Returns 0 on success, -1 if the property area is full.
*/
-int __system_property_add(const char *name, unsigned int namelen,
- const char *value, unsigned int valuelen);
+int __system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen);
/* Update the value of a system property returned by
** __system_property_find. Can only be done by a single process
@@ -157,15 +125,6 @@ unsigned int __system_property_serial(const prop_info *pi);
** successive call. */
unsigned int __system_property_wait_any(unsigned int serial);
-/* Compatibility functions to support using an old init with a new libc,
- ** mostly for the OTA updater binary. These can be deleted once OTAs from
- ** a pre-K release no longer needed to be supported. */
-const prop_info *__system_property_find_compat(const char *name);
-int __system_property_read_compat(const prop_info *pi, char *name, char *value);
-int __system_property_foreach_compat(
- void (*propfn)(const prop_info *pi, void *cookie),
- void *cookie);
-
/* Initialize the system properties area in read only mode.
* Should be done by all processes that need to read system
* properties.
@@ -177,4 +136,3 @@ int __system_properties_init();
__END_DECLS
#endif
-#endif
diff --git a/headers/sys/ipc.h b/headers/sys/ipc.h
index 1a5a4a09f..3d6c45f60 100644
--- a/headers/sys/ipc.h
+++ b/headers/sys/ipc.h
@@ -33,6 +33,11 @@
#include <sys/types.h>
#include <linux/ipc.h>
+#if defined(__USE_GNU)
+#define __key key
+#define __seq seq
+#endif
+
#define ipc_perm ipc64_perm
__BEGIN_DECLS
diff --git a/headers/sys/system_properties.h b/headers/sys/system_properties.h
index 26554f7c9..b3fbc48ff 100644
--- a/headers/sys/system_properties.h
+++ b/headers/sys/system_properties.h
@@ -30,6 +30,7 @@
#define _INCLUDE_SYS_SYSTEM_PROPERTIES_H
#include <sys/cdefs.h>
+#include <stddef.h>
__BEGIN_DECLS
@@ -68,7 +69,8 @@ const prop_info *__system_property_find(const char *name);
/* Read the value of a system property. Returns the length
** of the value. Copies the value and \0 terminator into
** the provided value pointer. Total length (including
-** terminator) will be no greater that PROP_VALUE_MAX.
+** terminator) will be no greater that PROP_VALUE_MAX for
+** __system_property_read.
**
** If name is nonzero, up to PROP_NAME_MAX bytes will be
** copied into the provided name pointer. The name will
@@ -76,6 +78,13 @@ const prop_info *__system_property_find(const char *name);
*/
int __system_property_read(const prop_info *pi, char *name, char *value);
+#if __ANDROID_API__ >= __ANDROID_API_FUTURE__
+void __system_property_read_callback(const prop_info *pi,
+ void (*)(void* cookie, const char *name, const char *value),
+ void* cookie) __INTRODUCED_IN_FUTURE;
+#endif /* __ANDROID_API__ >= __ANDROID_API_FUTURE__ */
+
+
/* Return a prop_info for the nth system property, or NULL if
** there is no nth property. Use __system_property_read() to
** read the value of this property.
@@ -85,7 +94,8 @@ int __system_property_read(const prop_info *pi, char *name, char *value);
** is inefficient and order of results may change from call
** to call.
*/
-const prop_info *__system_property_find_nth(unsigned n);
+const prop_info *__system_property_find_nth(unsigned n)
+ __REMOVED_IN(26);
/* Pass a prop_info for each system property to the provided
** callback. Use __system_property_read() to read the value