diff options
Diffstat (limited to '9/platforms/android-19/arch-arm64/usr/include/sys')
6 files changed, 57 insertions, 7 deletions
diff --git a/9/platforms/android-19/arch-arm64/usr/include/sys/endian.h b/9/platforms/android-19/arch-arm64/usr/include/sys/endian.h index cbde121..be4c905 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/endian.h +++ b/9/platforms/android-19/arch-arm64/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-arm64/usr/include/sys/stat.h b/9/platforms/android-19/arch-arm64/usr/include/sys/stat.h index e62e76d..c0c168b 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/stat.h +++ b/9/platforms/android-19/arch-arm64/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-arm64/usr/include/sys/statvfs.h b/9/platforms/android-19/arch-arm64/usr/include/sys/statvfs.h index 3d8179e..3495546 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/statvfs.h +++ b/9/platforms/android-19/arch-arm64/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-arm64/usr/include/sys/ucontext.h b/9/platforms/android-19/arch-arm64/usr/include/sys/ucontext.h index 3737cbe..f150ac7 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/ucontext.h +++ b/9/platforms/android-19/arch-arm64/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-arm64/usr/include/sys/user.h b/9/platforms/android-19/arch-arm64/usr/include/sys/user.h index c578a6f..705e0e9 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/user.h +++ b/9/platforms/android-19/arch-arm64/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-arm64/usr/include/sys/vfs.h b/9/platforms/android-19/arch-arm64/usr/include/sys/vfs.h index cd6044d..5358ffb 100644 --- a/9/platforms/android-19/arch-arm64/usr/include/sys/vfs.h +++ b/9/platforms/android-19/arch-arm64/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 |