summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acc/acc.h92
-rw-r--r--include/arch/darwin-x86/AndroidConfig.h19
-rw-r--r--include/arch/freebsd-x86/AndroidConfig.h15
-rw-r--r--include/arch/linux-arm/AndroidConfig.h15
-rw-r--r--include/arch/linux-x86/AndroidConfig.h15
-rw-r--r--include/arch/target_linux-x86/AndroidConfig.h15
-rw-r--r--include/arch/windows/AndroidConfig.h15
-rw-r--r--include/cutils/ashmem.h2
-rw-r--r--include/cutils/compiler.h32
-rw-r--r--include/cutils/sched_policy.h36
-rw-r--r--include/cutils/tztime.h7
-rw-r--r--include/mincrypt/sha.h27
-rw-r--r--include/private/android_filesystem_config.h4
-rw-r--r--include/private/pixelflinger/ggl_context.h2
-rw-r--r--include/sysutils/SocketListener.h2
15 files changed, 281 insertions, 17 deletions
diff --git a/include/acc/acc.h b/include/acc/acc.h
new file mode 100644
index 0000000..1182355
--- /dev/null
+++ b/include/acc/acc.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2009 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 ANDROID_ACC_ACC_H
+#define ANDROID_ACC_ACC_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+typedef char ACCchar;
+typedef int32_t ACCint;
+typedef uint32_t ACCuint;
+typedef ssize_t ACCsizei;
+typedef unsigned int ACCenum;
+typedef void ACCvoid;
+typedef struct ACCscript ACCscript;
+
+#define ACC_NO_ERROR 0x0000
+#define ACC_INVALID_ENUM 0x0500
+#define ACC_INVALID_OPERATION 0x0502
+#define ACC_INVALID_VALUE 0x0501
+#define ACC_OUT_OF_MEMORY 0x0505
+
+#define ACC_COMPILE_STATUS 0x8B81
+#define ACC_INFO_LOG_LENGTH 0x8B84
+
+
+// ----------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ACCscript* accCreateScript();
+
+void accDeleteScript(ACCscript* script);
+
+typedef ACCvoid* (*ACCSymbolLookupFn)(ACCvoid* pContext, const ACCchar * name);
+
+void accRegisterSymbolCallback(ACCscript* script, ACCSymbolLookupFn pFn,
+ ACCvoid* pContext);
+
+ACCenum accGetError( ACCscript* script );
+
+void accScriptSource(ACCscript* script,
+ ACCsizei count,
+ const ACCchar** string,
+ const ACCint* length);
+
+void accCompileScript(ACCscript* script);
+
+void accGetScriptiv(ACCscript* script,
+ ACCenum pname,
+ ACCint* params);
+
+void accGetScriptInfoLog(ACCscript* script,
+ ACCsizei maxLength,
+ ACCsizei* length,
+ ACCchar* infoLog);
+
+void accGetScriptLabel(ACCscript* script, const ACCchar * name,
+ ACCvoid** address);
+
+void accGetPragmas(ACCscript* script, ACCsizei* actualStringCount,
+ ACCsizei maxStringCount, ACCchar** strings);
+
+/* Used to implement disassembly */
+
+void accGetProgramBinary(ACCscript* script,
+ ACCvoid** base,
+ ACCsizei* length);
+
+#ifdef __cplusplus
+};
+#endif
+
+// ----------------------------------------------------------------------------
+
+#endif
diff --git a/include/arch/darwin-x86/AndroidConfig.h b/include/arch/darwin-x86/AndroidConfig.h
index 49f04e5..ad16e0c 100644
--- a/include/arch/darwin-x86/AndroidConfig.h
+++ b/include/arch/darwin-x86/AndroidConfig.h
@@ -15,9 +15,7 @@
*/
/*
- * Android config -- "Darwin". Used for PPC Mac OS X.
- *
- * TODO: split this into "x86" and "ppc" versions
+ * Android config -- "Darwin". Used for X86 Mac OS X.
*/
#ifndef _ANDROID_CONFIG_H
#define _ANDROID_CONFIG_H
@@ -257,4 +255,19 @@
*/
#define HAVE_WRITEV 1
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
+/*
+ * Define if <sched.h> exists.
+ */
+#define HAVE_SCHED_H 1
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/freebsd-x86/AndroidConfig.h b/include/arch/freebsd-x86/AndroidConfig.h
index cc118f4..39c564b 100644
--- a/include/arch/freebsd-x86/AndroidConfig.h
+++ b/include/arch/freebsd-x86/AndroidConfig.h
@@ -314,4 +314,19 @@
#define CLOCK_PROCESS_CPUTIME_ID CLOCK_PROF
#endif
+/*
+ * Define if <stdint.h> exists.
+ */
+/* #define HAVE_STDINT_H */
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+/* #define HAVE_STDBOOL_H */
+
+/*
+ * Define if <sched.h> exists.
+ */
+#define HAVE_SCHED_H 1
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/linux-arm/AndroidConfig.h b/include/arch/linux-arm/AndroidConfig.h
index f322127..82e39c0 100644
--- a/include/arch/linux-arm/AndroidConfig.h
+++ b/include/arch/linux-arm/AndroidConfig.h
@@ -302,4 +302,19 @@
*/
#define HAVE_WRITEV 1
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
+/*
+ * Define if <sched.h> exists.
+ */
+#define HAVE_SCHED_H 1
+
#endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/linux-x86/AndroidConfig.h b/include/arch/linux-x86/AndroidConfig.h
index 6de75f8..557ec5f 100644
--- a/include/arch/linux-x86/AndroidConfig.h
+++ b/include/arch/linux-x86/AndroidConfig.h
@@ -283,4 +283,19 @@
*/
#define HAVE_WRITEV 1
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
+/*
+ * Define if <sched.h> exists.
+ */
+#define HAVE_SCHED_H 1
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/arch/target_linux-x86/AndroidConfig.h b/include/arch/target_linux-x86/AndroidConfig.h
index 4aa44f8..6605723 100644
--- a/include/arch/target_linux-x86/AndroidConfig.h
+++ b/include/arch/target_linux-x86/AndroidConfig.h
@@ -293,4 +293,19 @@
*/
#define HAVE_UNWIND_CONTEXT_STRUCT
+/*
+ * Define if <stdint.h> exists.
+ */
+#define HAVE_STDINT_H 1
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+#define HAVE_STDBOOL_H 1
+
+/*
+ * Define if <sched.h> exists.
+ */
+#define HAVE_SCHED_H 1
+
#endif /* _ANDROID_CONFIG_H */
diff --git a/include/arch/windows/AndroidConfig.h b/include/arch/windows/AndroidConfig.h
index c3c6ff1..b240519 100644
--- a/include/arch/windows/AndroidConfig.h
+++ b/include/arch/windows/AndroidConfig.h
@@ -287,4 +287,19 @@
*/
/* #define HAVE_WRITEV */
+/*
+ * Define if <stdint.h> exists.
+ */
+/* #define HAVE_STDINT_H */
+
+/*
+ * Define if <stdbool.h> exists.
+ */
+/* #define HAVE_STDBOOL_H */
+
+/*
+ * Define if <sched.h> exists.
+ */
+/* #define HAVE_SCHED_H */
+
#endif /*_ANDROID_CONFIG_H*/
diff --git a/include/cutils/ashmem.h b/include/cutils/ashmem.h
index 0683bf2..fd56dbe 100644
--- a/include/cutils/ashmem.h
+++ b/include/cutils/ashmem.h
@@ -10,6 +10,8 @@
#ifndef _CUTILS_ASHMEM_H
#define _CUTILS_ASHMEM_H
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/cutils/compiler.h b/include/cutils/compiler.h
new file mode 100644
index 0000000..09112d5
--- /dev/null
+++ b/include/cutils/compiler.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009 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 ANDROID_CUTILS_COMPILER_H
+#define ANDROID_CUTILS_COMPILER_H
+
+/*
+ * helps the compiler's optimizer predicting branches
+ */
+
+#ifdef __cplusplus
+# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), true ))
+# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), false ))
+#else
+# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), 1 ))
+# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), 0 ))
+#endif
+
+#endif // ANDROID_CUTILS_COMPILER_H
diff --git a/include/cutils/sched_policy.h b/include/cutils/sched_policy.h
new file mode 100644
index 0000000..eaf3993
--- /dev/null
+++ b/include/cutils/sched_policy.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007 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 __CUTILS_SCHED_POLICY_H
+#define __CUTILS_SCHED_POLICY_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ SP_BACKGROUND = 0,
+ SP_FOREGROUND = 1,
+} SchedPolicy;
+
+extern int set_sched_policy(int tid, SchedPolicy policy);
+extern int get_sched_policy(int tid, SchedPolicy *policy);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CUTILS_SCHED_POLICY_H */
diff --git a/include/cutils/tztime.h b/include/cutils/tztime.h
index 69dbc88..cf103ca 100644
--- a/include/cutils/tztime.h
+++ b/include/cutils/tztime.h
@@ -17,6 +17,8 @@
#ifndef _CUTILS_TZTIME_H
#define _CUTILS_TZTIME_H
+#include <time.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -24,6 +26,9 @@ extern "C" {
time_t mktime_tz(struct tm * const tmp, char const * tz);
void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);
+#ifndef HAVE_ANDROID_OS
+/* the following is defined in <time.h> in Bionic */
+
struct strftime_locale {
const char *mon[12]; /* short names */
const char *month[12]; /* long names */
@@ -40,6 +45,8 @@ struct strftime_locale {
size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale *locale);
+#endif /* !HAVE_ANDROID_OS */
+
#ifdef __cplusplus
}
#endif
diff --git a/include/mincrypt/sha.h b/include/mincrypt/sha.h
index c523460..af63e87 100644
--- a/include/mincrypt/sha.h
+++ b/include/mincrypt/sha.h
@@ -13,14 +13,14 @@
** be used to endorse or promote products derived from this software
** without specific prior written permission.
**
-** THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR
+** THIS SOFTWARE IS PROVIDED BY Google Inc. ``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
+** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
** EVENT SHALL Google Inc. 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
+** 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.
*/
@@ -36,16 +36,23 @@ extern "C" {
typedef struct SHA_CTX {
uint64_t count;
- uint8_t buf[64];
uint32_t state[5];
+#if defined(HAVE_ENDIAN_H) && defined(HAVE_LITTLE_ENDIAN)
+ union {
+ uint8_t b[64];
+ uint32_t w[16];
+ } buf;
+#else
+ uint8_t buf[64];
+#endif
} SHA_CTX;
-void SHA_init(SHA_CTX *ctx);
-void SHA_update(SHA_CTX *ctx, const void* data, int len);
-const uint8_t* SHA_final(SHA_CTX *ctx);
+void SHA_init(SHA_CTX* ctx);
+void SHA_update(SHA_CTX* ctx, const void* data, int len);
+const uint8_t* SHA_final(SHA_CTX* ctx);
/* Convenience method. Returns digest parameter value. */
-const uint8_t* SHA(const void *data, int len, uint8_t *digest);
+const uint8_t* SHA(const void* data, int len, uint8_t* digest);
#define SHA_DIGEST_SIZE 20
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index 6ba574b..24b7c81 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -156,10 +156,10 @@ static struct fs_path_config android_files[] = {
{ 00550, AID_ROOT, AID_SHELL, "system/etc/init.testmenu" },
{ 00550, AID_DHCP, AID_SHELL, "system/etc/dhcpcd/dhcpcd-run-hooks" },
{ 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/dbus.conf" },
- { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/hcid.conf" },
+ { 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/main.conf" },
{ 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/input.conf" },
{ 00440, AID_BLUETOOTH, AID_BLUETOOTH, "system/etc/bluez/audio.conf" },
- { 00440, AID_RADIO, AID_AUDIO, "system/etc/AudioPara4.csv" },
+ { 00444, AID_RADIO, AID_AUDIO, "system/etc/AudioPara4.csv" },
{ 00555, AID_ROOT, AID_ROOT, "system/etc/ppp/*" },
{ 00644, AID_SYSTEM, AID_SYSTEM, "data/app/*" },
{ 00644, AID_SYSTEM, AID_SYSTEM, "data/app-private/*" },
diff --git a/include/private/pixelflinger/ggl_context.h b/include/private/pixelflinger/ggl_context.h
index 3a030c5..8a36fa9 100644
--- a/include/private/pixelflinger/ggl_context.h
+++ b/include/private/pixelflinger/ggl_context.h
@@ -21,8 +21,8 @@
#include <stddef.h>
#include <string.h>
#include <sys/types.h>
+#include <endian.h>
-#include <utils/Endian.h>
#include <pixelflinger/pixelflinger.h>
#include <private/pixelflinger/ggl_fixed.h>
diff --git a/include/sysutils/SocketListener.h b/include/sysutils/SocketListener.h
index 68dcb8f..c7edfeb 100644
--- a/include/sysutils/SocketListener.h
+++ b/include/sysutils/SocketListener.h
@@ -33,7 +33,7 @@ public:
SocketListener(const char *socketNames, bool listen);
SocketListener(int socketFd, bool listen);
- virtual ~SocketListener() {}
+ virtual ~SocketListener();
int startListener();
int stopListener();