mirror of
https://github.com/xomboverlord/buildtools.git
synced 2026-01-11 18:33:17 +01:00
372 lines
7.0 KiB
C
372 lines
7.0 KiB
C
typedef __signed__ char __s8;
|
|
typedef unsigned char __u8;
|
|
|
|
typedef __signed__ short __s16;
|
|
typedef unsigned short __u16;
|
|
|
|
typedef __signed__ int __s32;
|
|
typedef unsigned int __u32;
|
|
|
|
typedef unsigned char u_int8_t;
|
|
typedef unsigned short u_int16_t;
|
|
typedef unsigned int u_int32_t;
|
|
|
|
|
|
__extension__ typedef __signed__ long long __s64;
|
|
__extension__ typedef unsigned long long __u64;
|
|
# 8 "/usr/include/asm-generic/types.h" 2 3 4
|
|
# 5 "/usr/include/asm/types.h" 2 3 4
|
|
# 5 "/usr/include/linux/types.h" 2 3 4
|
|
|
|
|
|
|
|
# 1 "/usr/include/linux/posix_types.h" 1 3 4
|
|
|
|
|
|
|
|
# 1 "/usr/include/linux/stddef.h" 1 3 4
|
|
# 14 "/usr/include/linux/stddef.h" 3 4
|
|
# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4
|
|
# 150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/stddef.h" 3 4
|
|
typedef long int ptrdiff_t;
|
|
# 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/stddef.h" 3 4
|
|
typedef long unsigned int size_t;
|
|
# 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/stddef.h" 3 4
|
|
typedef int wchar_t;
|
|
# 15 "/usr/include/linux/stddef.h" 2 3 4
|
|
# 5 "/usr/include/linux/posix_types.h" 2 3 4
|
|
# 36 "/usr/include/linux/posix_types.h" 3 4
|
|
typedef struct {
|
|
unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
|
|
} __kernel_fd_set;
|
|
|
|
|
|
typedef void (*__kernel_sighandler_t)(int);
|
|
|
|
|
|
typedef int __kernel_key_t;
|
|
typedef int __kernel_mqd_t;
|
|
|
|
# 1 "/usr/include/asm/posix_types.h" 1 3 4
|
|
|
|
|
|
|
|
# 1 "/usr/include/asm/posix_types_64.h" 1 3 4
|
|
# 10 "/usr/include/asm/posix_types_64.h" 3 4
|
|
typedef unsigned long __kernel_ino_t;
|
|
typedef unsigned int __kernel_mode_t;
|
|
typedef unsigned long __kernel_nlink_t;
|
|
typedef long __kernel_off_t;
|
|
typedef int __kernel_pid_t;
|
|
typedef int __kernel_ipc_pid_t;
|
|
typedef unsigned int __kernel_uid_t;
|
|
typedef unsigned int __kernel_gid_t;
|
|
typedef unsigned long __kernel_size_t;
|
|
typedef long __kernel_ssize_t;
|
|
typedef long __kernel_ptrdiff_t;
|
|
typedef long __kernel_time_t;
|
|
typedef long __kernel_suseconds_t;
|
|
typedef long __kernel_clock_t;
|
|
typedef int __kernel_timer_t;
|
|
typedef int __kernel_clockid_t;
|
|
typedef int __kernel_daddr_t;
|
|
typedef char * __kernel_caddr_t;
|
|
typedef unsigned short __kernel_uid16_t;
|
|
typedef unsigned short __kernel_gid16_t;
|
|
|
|
|
|
typedef long long __kernel_loff_t;
|
|
|
|
|
|
typedef struct {
|
|
int val[2];
|
|
} __kernel_fsid_t;
|
|
|
|
typedef unsigned short __kernel_old_uid_t;
|
|
typedef unsigned short __kernel_old_gid_t;
|
|
typedef __kernel_uid_t __kernel_uid32_t;
|
|
typedef __kernel_gid_t __kernel_gid32_t;
|
|
|
|
typedef unsigned long __kernel_old_dev_t;
|
|
# 5 "/usr/include/asm/posix_types.h" 2 3 4
|
|
# 48 "/usr/include/linux/posix_types.h" 2 3 4
|
|
# 9 "/usr/include/linux/types.h" 2 3 4
|
|
# 27 "/usr/include/linux/types.h" 3 4
|
|
typedef __u16 __le16;
|
|
typedef __u16 __be16;
|
|
typedef __u32 __le32;
|
|
typedef __u32 __be32;
|
|
typedef __u64 __le64;
|
|
typedef __u64 __be64;
|
|
|
|
typedef __u16 __sum16;
|
|
typedef __u32 __wsum;
|
|
# 12 "/usr/include/linux/byteorder/little_endian.h" 2 3 4
|
|
# 1 "/usr/include/linux/swab.h" 1 3 4
|
|
|
|
|
|
|
|
|
|
|
|
# 1 "/usr/include/asm/swab.h" 1 3 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __u32 __arch_swab32(__u32 val)
|
|
{
|
|
# 21 "/usr/include/asm/swab.h" 3 4
|
|
__asm__("bswapl %0"
|
|
: "=r" (val)
|
|
: "0" (val));
|
|
|
|
return val;
|
|
}
|
|
|
|
|
|
static __inline__ __u64 __arch_swab64(__u64 val)
|
|
{
|
|
# 53 "/usr/include/asm/swab.h" 3 4
|
|
__asm__("bswapq %0"
|
|
: "=r" (val)
|
|
: "0" (val));
|
|
return val;
|
|
|
|
}
|
|
# 7 "/usr/include/linux/swab.h" 2 3 4
|
|
# 46 "/usr/include/linux/swab.h" 3 4
|
|
static __inline__ __u16 __fswab16(__u16 val)
|
|
{
|
|
|
|
|
|
|
|
return ((__u16)( (((__u16)(val) & (__u16)0x00ffU) << 8) | (((__u16)(val) & (__u16)0xff00U) >> 8)));
|
|
|
|
}
|
|
|
|
static __inline__ __u32 __fswab32(__u32 val)
|
|
{
|
|
|
|
return __arch_swab32(val);
|
|
|
|
|
|
|
|
}
|
|
|
|
static __inline__ __u64 __fswab64(__u64 val)
|
|
{
|
|
|
|
return __arch_swab64(val);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
static __inline__ __u32 __fswahw32(__u32 val)
|
|
{
|
|
|
|
|
|
|
|
return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16)));
|
|
|
|
}
|
|
|
|
static __inline__ __u32 __fswahb32(__u32 val)
|
|
{
|
|
|
|
|
|
|
|
return ((__u32)( (((__u32)(val) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(val) & (__u32)0xff00ff00UL) >> 8)));
|
|
|
|
}
|
|
# 148 "/usr/include/linux/swab.h" 3 4
|
|
static __inline__ __u16 __swab16p(const __u16 *p)
|
|
{
|
|
|
|
|
|
|
|
return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __u32 __swab32p(const __u32 *p)
|
|
{
|
|
|
|
|
|
|
|
return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __u64 __swab64p(const __u64 *p)
|
|
{
|
|
|
|
|
|
|
|
return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __u32 __swahw32p(const __u32 *p)
|
|
{
|
|
|
|
|
|
|
|
return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ __u32 __swahb32p(const __u32 *p)
|
|
{
|
|
|
|
|
|
|
|
return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ void __swab16s(__u16 *p)
|
|
{
|
|
|
|
|
|
|
|
*p = __swab16p(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static __inline__ void __swab32s(__u32 *p)
|
|
{
|
|
|
|
|
|
|
|
*p = __swab32p(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ void __swab64s(__u64 *p)
|
|
{
|
|
|
|
|
|
|
|
*p = __swab64p(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ void __swahw32s(__u32 *p)
|
|
{
|
|
|
|
|
|
|
|
*p = __swahw32p(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static __inline__ void __swahb32s(__u32 *p)
|
|
{
|
|
|
|
|
|
|
|
*p = __swahb32p(p);
|
|
|
|
}
|
|
# 13 "/usr/include/linux/byteorder/little_endian.h" 2 3 4
|
|
# 43 "/usr/include/linux/byteorder/little_endian.h" 3 4
|
|
static __inline__ __le64 __cpu_to_le64p(const __u64 *p)
|
|
{
|
|
return (__le64)*p;
|
|
}
|
|
static __inline__ __u64 __le64_to_cpup(const __le64 *p)
|
|
{
|
|
return (__u64)*p;
|
|
}
|
|
static __inline__ __le32 __cpu_to_le32p(const __u32 *p)
|
|
{
|
|
return (__le32)*p;
|
|
}
|
|
static __inline__ __u32 __le32_to_cpup(const __le32 *p)
|
|
{
|
|
return (__u32)*p;
|
|
}
|
|
static __inline__ __le16 __cpu_to_le16p(const __u16 *p)
|
|
{
|
|
return (__le16)*p;
|
|
}
|
|
static __inline__ __u16 __le16_to_cpup(const __le16 *p)
|
|
{
|
|
return (__u16)*p;
|
|
}
|
|
static __inline__ __be64 __cpu_to_be64p(const __u64 *p)
|
|
{
|
|
return (__be64)__swab64p(p);
|
|
}
|
|
static __inline__ __u64 __be64_to_cpup(const __be64 *p)
|
|
{
|
|
return __swab64p((__u64 *)p);
|
|
}
|
|
static __inline__ __be32 __cpu_to_be32p(const __u32 *p)
|
|
{
|
|
return (__be32)__swab32p(p);
|
|
}
|
|
static __inline__ __u32 __be32_to_cpup(const __be32 *p)
|
|
{
|
|
return __swab32p((__u32 *)p);
|
|
}
|
|
static __inline__ __be16 __cpu_to_be16p(const __u16 *p)
|
|
{
|
|
return (__be16)__swab16p(p);
|
|
}
|
|
static __inline__ __u16 __be16_to_cpup(const __be16 *p)
|
|
{
|
|
return __swab16p((__u16 *)p);
|
|
}
|
|
# 5 "/usr/include/asm/byteorder.h" 2
|