diff options
Diffstat (limited to '9/platforms/android-19/arch-x86_64/usr/include')
14 files changed, 107 insertions, 50 deletions
diff --git a/9/platforms/android-19/arch-x86_64/usr/include/arpa/inet.h b/9/platforms/android-19/arch-x86_64/usr/include/arpa/inet.h index b008812..067be1f 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/arpa/inet.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/arpa/inet.h @@ -36,19 +36,18 @@ __BEGIN_DECLS typedef uint32_t in_addr_t; -extern uint32_t inet_addr(const char *); - -extern int inet_aton(const char *, struct in_addr *); -extern char* inet_ntoa(struct in_addr); - -extern int inet_pton(int, const char *, void *); -extern const char* inet_ntop(int, const void *, char *, socklen_t); - -extern unsigned int inet_nsap_addr(const char *, unsigned char *, int); -extern char* inet_nsap_ntoa(int, const unsigned char *, char *); +in_addr_t inet_addr(const char*); +int inet_aton(const char*, struct in_addr*); +in_addr_t inet_lnaof(struct in_addr); +struct in_addr inet_makeaddr(in_addr_t, in_addr_t); +in_addr_t inet_netof(struct in_addr); +in_addr_t inet_network(const char*); +char* inet_ntoa(struct in_addr); +const char* inet_ntop(int, const void*, char*, socklen_t); +unsigned int inet_nsap_addr(const char*, unsigned char*, int); +char* inet_nsap_ntoa(int, const unsigned char*, char*); +int inet_pton(int, const char*, void*); __END_DECLS #endif /* _ARPA_INET_H_ */ - - diff --git a/9/platforms/android-19/arch-x86_64/usr/include/dirent.h b/9/platforms/android-19/arch-x86_64/usr/include/dirent.h index bfe4ea4..71eb2e7 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/dirent.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/dirent.h @@ -56,6 +56,8 @@ __BEGIN_DECLS struct dirent { __DIRENT64_BODY }; struct dirent64 { __DIRENT64_BODY }; +#undef __DIRENT64_BODY + #define d_fileno d_ino typedef struct DIR DIR; diff --git a/9/platforms/android-19/arch-x86_64/usr/include/mntent.h b/9/platforms/android-19/arch-x86_64/usr/include/mntent.h index 6cc0b18..de285d0 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/mntent.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/mntent.h @@ -35,23 +35,21 @@ #define MOUNTED _PATH_MOUNTED #define MNTTYPE_IGNORE "ignore" -struct mntent -{ - char* mnt_fsname; - char* mnt_dir; - char* mnt_type; - char* mnt_opts; - int mnt_freq; - int mnt_passno; +struct mntent { + char* mnt_fsname; + char* mnt_dir; + char* mnt_type; + char* mnt_opts; + int mnt_freq; + int mnt_passno; }; - __BEGIN_DECLS - +int endmntent(FILE*); struct mntent* getmntent(FILE*); +struct mntent* getmntent_r(FILE*, struct mntent*, char*, int); FILE* setmntent(const char*, const char*); -int endmntent(FILE*); __END_DECLS diff --git a/9/platforms/android-19/arch-x86_64/usr/include/nsswitch.h b/9/platforms/android-19/arch-x86_64/usr/include/nsswitch.h index d19d055..e03844b 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/nsswitch.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/nsswitch.h @@ -54,7 +54,7 @@ /* * Layout of: * uint32_t ns_src.flags - */ + */ /* nsswitch.conf status codes and nsdispatch(3) return values */ #define NS_SUCCESS (1<<0) /* entry was found */ #define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */ @@ -125,7 +125,7 @@ typedef struct { */ #define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) }, #define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) }, - + #ifdef HESIOD # define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) }, #else @@ -149,6 +149,7 @@ typedef struct { } ns_src; +#if 0 /* * Default sourcelists (if nsswitch.conf is missing, corrupt, * or the requested database doesn't have an entry) @@ -160,7 +161,7 @@ extern const ns_src __nsdefaultfiles[]; extern const ns_src __nsdefaultfiles_forceall[]; extern const ns_src __nsdefaultnis[]; extern const ns_src __nsdefaultnis_forceall[]; - +#endif /* * ns_mtab - `nsswitch method table' diff --git a/9/platforms/android-19/arch-x86_64/usr/include/pthread.h b/9/platforms/android-19/arch-x86_64/usr/include/pthread.h index 7b8de81..49f943a 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/pthread.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/pthread.h @@ -35,7 +35,7 @@ #include <limits.h> #include <sys/types.h> -#ifdef __LP64__ +#if defined(__LP64__) #define __RESERVED_INITIALIZER , {0} #else #define __RESERVED_INITIALIZER @@ -112,7 +112,11 @@ typedef volatile int pthread_once_t; #define PTHREAD_ONCE_INIT 0 +#if defined(__LP64__) +#define PTHREAD_STACK_MIN (4 * PAGE_SIZE) +#else #define PTHREAD_STACK_MIN (2 * PAGE_SIZE) +#endif #define PTHREAD_CREATE_DETACHED 0x00000001 #define PTHREAD_CREATE_JOINABLE 0x00000000 diff --git a/9/platforms/android-19/arch-x86_64/usr/include/pwd.h b/9/platforms/android-19/arch-x86_64/usr/include/pwd.h index 6f3fad5..6d483c0 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/pwd.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/pwd.h @@ -100,12 +100,15 @@ struct passwd { - char* pw_name; - char* pw_passwd; - uid_t pw_uid; - gid_t pw_gid; - char* pw_dir; - char* pw_shell; + char* pw_name; + char* pw_passwd; + uid_t pw_uid; + gid_t pw_gid; +#ifdef __LP64__ + char* pw_gecos; +#endif + char* pw_dir; + char* pw_shell; }; __BEGIN_DECLS diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sched.h b/9/platforms/android-19/arch-x86_64/usr/include/sched.h index 68115bb..e43b6cc 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sched.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sched.h @@ -59,10 +59,10 @@ extern int unshare(int); extern int sched_getcpu(void); extern int setns(int, int); -#ifdef __LP32__ -#define CPU_SETSIZE 32 -#else +#ifdef __LP64__ #define CPU_SETSIZE 1024 +#else +#define CPU_SETSIZE 32 #endif #define __CPU_BITTYPE unsigned long int /* mandated by the kernel */ diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/endian.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/endian.h index cbde121..be4c905 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/endian.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/endian.h @@ -39,6 +39,8 @@ #include <sys/cdefs.h> #include <machine/endian.h> +#include <stdint.h> + #define _LITTLE_ENDIAN 1234 #define _BIG_ENDIAN 4321 #define _PDP_ENDIAN 3412 @@ -186,14 +188,22 @@ #define letoh64(x) (x) #endif /* __BSD_VISIBLE */ -#define htons(x) __swap16(x) +/* glibc compatibility. */ +__BEGIN_DECLS +uint32_t htonl(uint32_t) __pure2; +uint16_t htons(uint16_t) __pure2; +uint32_t ntohl(uint32_t) __pure2; +uint16_t ntohs(uint16_t) __pure2; +__END_DECLS + #define htonl(x) __swap32(x) -#define ntohs(x) __swap16(x) +#define htons(x) __swap16(x) #define ntohl(x) __swap32(x) +#define ntohs(x) __swap16(x) /* Bionic additions */ -#define ntohq(x) __swap64(x) #define htonq(x) __swap64(x) +#define ntohq(x) __swap64(x) #define __LITTLE_ENDIAN_BITFIELD diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/stat.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/stat.h index e62e76d..c0c168b 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/stat.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/stat.h @@ -130,6 +130,8 @@ __BEGIN_DECLS struct stat { __STAT64_BODY }; struct stat64 { __STAT64_BODY }; +#undef __STAT64_BODY + #define st_atimensec st_atime_nsec #define st_mtimensec st_mtime_nsec #define st_ctimensec st_ctime_nsec diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/statvfs.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/statvfs.h index 3d8179e..3495546 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/statvfs.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/statvfs.h @@ -23,6 +23,12 @@ __BEGIN_DECLS +#ifdef __LP64__ +#define __STATVFS64_RESERVED uint32_t __f_reserved[6]; +#else +#define __STATVFS64_RESERVED +#endif + #define __STATVFS64_BODY \ unsigned long f_bsize; \ unsigned long f_frsize; \ @@ -35,10 +41,14 @@ __BEGIN_DECLS unsigned long f_fsid; \ unsigned long f_flag; \ unsigned long f_namemax; \ + __STATVFS64_RESERVED struct statvfs { __STATVFS64_BODY }; struct statvfs64 { __STATVFS64_BODY }; +#undef __STATVFS64_BODY +#undef __STATVFS64_RESERVED + #define ST_RDONLY 0x0001 #define ST_NOSUID 0x0002 #define ST_NODEV 0x0004 diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/ucontext.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/ucontext.h index 3737cbe..f150ac7 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/ucontext.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/ucontext.h @@ -150,7 +150,8 @@ typedef struct ucontext { stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; - /* TODO: __fpregs_mem? */ + char __padding[128 - sizeof(sigset_t)]; + struct _libc_fpstate __fpregs_mem; } ucontext_t; #elif defined(__mips__) @@ -238,7 +239,31 @@ enum { typedef long greg_t; typedef greg_t gregset_t[NGREG]; -typedef struct user_i387_struct* fpregset_t; +struct _libc_fpxreg { + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; + +struct _libc_xmmreg { + uint32_t element[4]; +}; + +struct _libc_fpstate { + uint16_t cwd; + uint16_t swd; + uint16_t ftw; + uint16_t fop; + uint64_t rip; + uint64_t rdp; + uint32_t mxcsr; + uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + uint32_t padding[24]; +}; + +typedef struct _libc_fpstate* fpregset_t; typedef struct { gregset_t gregs; @@ -252,7 +277,8 @@ typedef struct ucontext { stack_t uc_stack; mcontext_t uc_mcontext; sigset_t uc_sigmask; - /* TODO: __fpregs_mem? */ + char __padding[128 - sizeof(sigset_t)]; + struct _libc_fpstate __fpregs_mem; } ucontext_t; #endif diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/user.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/user.h index c578a6f..705e0e9 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/user.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/user.h @@ -103,7 +103,7 @@ struct user { struct user_fpregs_struct { unsigned short cwd; unsigned short swd; - unsigned short twd; + unsigned short ftw; unsigned short fop; __u64 rip; __u64 rdp; diff --git a/9/platforms/android-19/arch-x86_64/usr/include/sys/vfs.h b/9/platforms/android-19/arch-x86_64/usr/include/sys/vfs.h index cd6044d..5358ffb 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/sys/vfs.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/sys/vfs.h @@ -107,6 +107,8 @@ typedef __fsid_t fsid_t; struct statfs { __STATFS64_BODY }; struct statfs64 { __STATFS64_BODY }; +#undef __STATFS64_BODY + /* Declare that we have the f_namelen, f_frsize, and f_flags fields. */ #define _STATFS_F_NAMELEN #define _STATFS_F_FRSIZE diff --git a/9/platforms/android-19/arch-x86_64/usr/include/wchar.h b/9/platforms/android-19/arch-x86_64/usr/include/wchar.h index fe2fe07..af7593f 100644 --- a/9/platforms/android-19/arch-x86_64/usr/include/wchar.h +++ b/9/platforms/android-19/arch-x86_64/usr/include/wchar.h @@ -41,15 +41,13 @@ __BEGIN_DECLS typedef __WINT_TYPE__ wint_t; typedef struct { -#ifdef __LP32__ - int dummy; -#else - // 8 bytes should be enough to support at least UTF-8 - char __reserved[8]; + uint8_t __seq[4]; +#ifdef __LP64__ + char __reserved[4]; #endif } mbstate_t; -typedef enum { +enum { WC_TYPE_INVALID = 0, WC_TYPE_ALNUM, WC_TYPE_ALPHA, @@ -64,7 +62,9 @@ typedef enum { WC_TYPE_UPPER, WC_TYPE_XDIGIT, WC_TYPE_MAX -} wctype_t; +}; + +typedef long wctype_t; #define WEOF ((wint_t)(-1)) |