diff options
Diffstat (limited to '8/platforms/android-3/arch-arm/usr')
16 files changed, 129 insertions, 30 deletions
diff --git a/8/platforms/android-3/arch-arm/usr/include/byteswap.h b/8/platforms/android-3/arch-arm/usr/include/byteswap.h index 16d2ad4..74b0e91 100644 --- a/8/platforms/android-3/arch-arm/usr/include/byteswap.h +++ b/8/platforms/android-3/arch-arm/usr/include/byteswap.h @@ -28,7 +28,8 @@ #ifndef _BYTESWAP_H_ #define _BYTESWAP_H_ -#include <sys/endian.h> +/* endian.h rather than sys/endian.h so we get the machine-specific file. */ +#include <endian.h> #define bswap_16(x) swap16(x) #define bswap_32(x) swap32(x) diff --git a/8/platforms/android-3/arch-arm/usr/include/dirent.h b/8/platforms/android-3/arch-arm/usr/include/dirent.h index 55eef7b..f0a1e17 100644 --- a/8/platforms/android-3/arch-arm/usr/include/dirent.h +++ b/8/platforms/android-3/arch-arm/usr/include/dirent.h @@ -51,28 +51,29 @@ __BEGIN_DECLS * who assume to be able to access it directly. sad... */ struct dirent { - uint64_t d_ino; - int64_t d_off; - unsigned short d_reclen; - unsigned char d_type; - char d_name[256]; + uint64_t d_ino; + int64_t d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; }; -typedef struct DIR DIR; +typedef struct DIR DIR; -extern int getdents(unsigned int, struct dirent*, unsigned int); -extern DIR* opendir(const char* dirpath); +extern DIR* opendir(const char* dirpath); extern DIR* fdopendir(int fd); -extern struct dirent* readdir(DIR* dirp); -extern int readdir_r(DIR* dirp, struct dirent *entry, struct dirent **result); -extern int closedir(DIR* dirp); -extern void rewinddir(DIR *dirp); +extern struct dirent* readdir(DIR* dirp); +extern int readdir_r(DIR* dirp, struct dirent* entry, struct dirent** result); +extern int closedir(DIR* dirp); +extern void rewinddir(DIR* dirp); extern int dirfd(DIR* dirp); -extern int alphasort(const void *a, const void *b); -extern int scandir(const char *dir, struct dirent ***namelist, - int(*filter)(const struct dirent *), - int(*compar)(const struct dirent **, - const struct dirent **)); +extern int alphasort(const struct dirent** a, const struct dirent** b); +extern int scandir(const char* dir, struct dirent*** namelist, + int(*filter)(const struct dirent*), + int(*compar)(const struct dirent**, + const struct dirent**)); + +extern int getdents(unsigned int, struct dirent*, unsigned int); __END_DECLS diff --git a/8/platforms/android-3/arch-arm/usr/include/errno.h b/8/platforms/android-3/arch-arm/usr/include/errno.h index 2b2685a..e1b15c0 100644 --- a/8/platforms/android-3/arch-arm/usr/include/errno.h +++ b/8/platforms/android-3/arch-arm/usr/include/errno.h @@ -36,7 +36,7 @@ __BEGIN_DECLS /* on Linux, ENOTSUP and EOPNOTSUPP are defined as the same error code * even if 1000.3 states that they should be different */ -#ifndef ENOTUP +#ifndef ENOTSUP #define ENOTSUP EOPNOTSUPP #endif diff --git a/8/platforms/android-3/arch-arm/usr/include/limits.h b/8/platforms/android-3/arch-arm/usr/include/limits.h index 1de8ea6..b9d4354 100644 --- a/8/platforms/android-3/arch-arm/usr/include/limits.h +++ b/8/platforms/android-3/arch-arm/usr/include/limits.h @@ -89,7 +89,24 @@ #include <sys/syslimits.h> #endif +/* GLibc compatibility definitions. + Note that these are defined by GCC's <limits.h> + only when __GNU_LIBRARY__ is defined, i.e. when + targetting GLibc. */ +#ifndef LONG_LONG_MIN +#define LONG_LONG_MIN LLONG_MIN +#endif + +#ifndef LONG_LONG_MAX +#define LONG_LONG_MAX LLONG_MAX +#endif + +#ifndef ULONG_LONG_MAX +#define ULONG_LONG_MAX ULLONG_MAX +#endif + #ifndef PAGESIZE +#include <asm/page.h> #define PAGESIZE PAGE_SIZE #endif diff --git a/8/platforms/android-3/arch-arm/usr/include/machine/_types.h b/8/platforms/android-3/arch-arm/usr/include/machine/_types.h index 3e779ca..dbc4e9d 100644 --- a/8/platforms/android-3/arch-arm/usr/include/machine/_types.h +++ b/8/platforms/android-3/arch-arm/usr/include/machine/_types.h @@ -116,10 +116,4 @@ typedef int __rune_t; typedef void * __wctrans_t; typedef void * __wctype_t; -#ifdef __ARMEB__ -#define _BYTE_ORDER _BIG_ENDIAN -#else -#define _BYTE_ORDER _LITTLE_ENDIAN -#endif - #endif /* _ARM__TYPES_H_ */ diff --git a/8/platforms/android-3/arch-arm/usr/include/machine/endian.h b/8/platforms/android-3/arch-arm/usr/include/machine/endian.h new file mode 100644 index 0000000..7cba3b9 --- /dev/null +++ b/8/platforms/android-3/arch-arm/usr/include/machine/endian.h @@ -0,0 +1,89 @@ +/* $OpenBSD: endian.h,v 1.3 2005/12/13 00:35:23 millert Exp $ */ + +/* + * Copyright (C) 2010 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _ARM_ENDIAN_H_ +#define _ARM_ENDIAN_H_ + +#ifdef __GNUC__ + +/* + * REV and REV16 weren't available on ARM5 or ARM4. + * We don't include <machine/cpu-features.h> because it pollutes the + * namespace with macros like PLD. + */ +#if !defined __ARM_ARCH_5__ && !defined __ARM_ARCH_5T__ && \ + !defined __ARM_ARCH_5TE__ && !defined __ARM_ARCH_5TEJ__ && \ + !defined __ARM_ARCH_4T__ && !defined __ARM_ARCH_4__ + +/* According to RealView Assembler User's Guide, REV and REV16 are available + * in Thumb code and 16-bit instructions when used in Thumb-2 code. + * + * REV Rd, Rm + * Rd and Rm must both be Lo registers. + * + * REV16 Rd, Rm + * Rd and Rm must both be Lo registers. + * + * The +l constraint takes care of this without constraining us in ARM mode. + */ +#define __swap16md(x) ({ \ + register u_int16_t _x = (x); \ + __asm volatile ("rev16 %0, %0" : "+l" (_x)); \ + _x; \ +}) + +#define __swap32md(x) ({ \ + register u_int32_t _x = (x); \ + __asm volatile ("rev %0, %0" : "+l" (_x)); \ + _x; \ +}) + +#define __swap64md(x) ({ \ + u_int64_t _swap64md_x = (x); \ + (u_int64_t) __swap32md(_swap64md_x >> 32) | \ + (u_int64_t) __swap32md(_swap64md_x & 0xffffffff) << 32; \ +}) + +/* Tell sys/endian.h we have MD variants of the swap macros. */ +#define MD_SWAP + +#endif /* __ARM_ARCH__ */ +#endif /* __GNUC__ */ + +#if defined(__ARMEB__) +#define _BYTE_ORDER _BIG_ENDIAN +#else +#define _BYTE_ORDER _LITTLE_ENDIAN +#endif +#define __STRICT_ALIGNMENT +#include <sys/types.h> +#include <sys/endian.h> + +#endif /* !_ARM_ENDIAN_H_ */ diff --git a/8/platforms/android-3/arch-arm/usr/include/pthread.h b/8/platforms/android-3/arch-arm/usr/include/pthread.h index 2a6029d..ae55782 100644 --- a/8/platforms/android-3/arch-arm/usr/include/pthread.h +++ b/8/platforms/android-3/arch-arm/usr/include/pthread.h @@ -235,9 +235,4 @@ extern void __pthread_cleanup_pop(__pthread_cleanup_t* c, } /* extern "C" */ #endif -/************ TO FIX ************/ - -#define LONG_LONG_MAX __LONG_LONG_MAX__ -#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1) - #endif /* _PTHREAD_H_ */ diff --git a/8/platforms/android-3/arch-arm/usr/include/resolv.h b/8/platforms/android-3/arch-arm/usr/include/resolv.h index 4247d68..7c34012 100644 --- a/8/platforms/android-3/arch-arm/usr/include/resolv.h +++ b/8/platforms/android-3/arch-arm/usr/include/resolv.h @@ -34,6 +34,7 @@ #include <sys/socket.h> #include <stdio.h> #include <arpa/nameser.h> +#include <netinet/in.h> __BEGIN_DECLS diff --git a/8/platforms/android-3/arch-arm/usr/include/sys/endian.h b/8/platforms/android-3/arch-arm/usr/include/sys/endian.h index 00f4839..2a0c658 100644 --- a/8/platforms/android-3/arch-arm/usr/include/sys/endian.h +++ b/8/platforms/android-3/arch-arm/usr/include/sys/endian.h @@ -37,6 +37,7 @@ #define _SYS_ENDIAN_H_ #include <sys/cdefs.h> +#include <machine/endian.h> #include <machine/_types.h> #define _LITTLE_ENDIAN 1234 diff --git a/8/platforms/android-3/arch-arm/usr/lib/libc.so b/8/platforms/android-3/arch-arm/usr/lib/libc.so Binary files differindex eddf461..ffd45a1 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libc.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libc.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/libdl.so b/8/platforms/android-3/arch-arm/usr/lib/libdl.so Binary files differindex b079625..5feb4d9 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libdl.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libdl.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/liblog.so b/8/platforms/android-3/arch-arm/usr/lib/liblog.so Binary files differindex efae74c..95a8044 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/liblog.so +++ b/8/platforms/android-3/arch-arm/usr/lib/liblog.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/libm.so b/8/platforms/android-3/arch-arm/usr/lib/libm.so Binary files differindex fd2dcd4..d3806df 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libm.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libm.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/libstdc++.so b/8/platforms/android-3/arch-arm/usr/lib/libstdc++.so Binary files differindex b011883..8f81027 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libstdc++.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libstdc++.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/libthread_db.so b/8/platforms/android-3/arch-arm/usr/lib/libthread_db.so Binary files differindex 8eabe7f..c849efa 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libthread_db.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libthread_db.so diff --git a/8/platforms/android-3/arch-arm/usr/lib/libz.so b/8/platforms/android-3/arch-arm/usr/lib/libz.so Binary files differindex d3c94b9..a1e360e 100755 --- a/8/platforms/android-3/arch-arm/usr/lib/libz.so +++ b/8/platforms/android-3/arch-arm/usr/lib/libz.so |