mirror of
git://git.musl-libc.org/musl
synced 2025-01-18 04:41:24 +00:00
919ad8d5fb
standing alone, both the signed and int keywords identify the same type, a (signed) int. however the C language has an exception where, when the lone keyword int is used to declare a bitfield, it's implementation-defined whether the bitfield is signed or unsigned. C11 footnote 125 extends this implementation-definedness to typedefs, and DR#315 extends it to other integer types (for which support with bitfields is implementation-defined). while reasonable ABIs (all the ones we support) define bitfields as signed by default, GCC and compatible compilers offer an option -funsigned-bitfields to change the default. while any signed types defined without explicit use of the signed keyword are affected, the stdint.h types, especially intNN_t, have a natural use in bitfields. ensure that bitfields defined with these types always have the correct signedness regardless of compiler & flags used. see also GCC PR 83294.
76 lines
2.0 KiB
C
76 lines
2.0 KiB
C
TYPEDEF unsigned _Addr size_t;
|
|
TYPEDEF unsigned _Addr uintptr_t;
|
|
TYPEDEF _Addr ptrdiff_t;
|
|
TYPEDEF _Addr ssize_t;
|
|
TYPEDEF _Addr intptr_t;
|
|
TYPEDEF _Addr regoff_t;
|
|
TYPEDEF _Reg register_t;
|
|
|
|
TYPEDEF signed char int8_t;
|
|
TYPEDEF signed short int16_t;
|
|
TYPEDEF signed int int32_t;
|
|
TYPEDEF signed _Int64 int64_t;
|
|
TYPEDEF signed _Int64 intmax_t;
|
|
TYPEDEF unsigned char uint8_t;
|
|
TYPEDEF unsigned short uint16_t;
|
|
TYPEDEF unsigned int uint32_t;
|
|
TYPEDEF unsigned _Int64 uint64_t;
|
|
TYPEDEF unsigned _Int64 u_int64_t;
|
|
TYPEDEF unsigned _Int64 uintmax_t;
|
|
|
|
TYPEDEF unsigned mode_t;
|
|
TYPEDEF unsigned _Reg nlink_t;
|
|
TYPEDEF _Int64 off_t;
|
|
TYPEDEF unsigned _Int64 ino_t;
|
|
TYPEDEF unsigned _Int64 dev_t;
|
|
TYPEDEF long blksize_t;
|
|
TYPEDEF _Int64 blkcnt_t;
|
|
TYPEDEF unsigned _Int64 fsblkcnt_t;
|
|
TYPEDEF unsigned _Int64 fsfilcnt_t;
|
|
|
|
TYPEDEF unsigned wint_t;
|
|
TYPEDEF unsigned long wctype_t;
|
|
|
|
TYPEDEF void * timer_t;
|
|
TYPEDEF int clockid_t;
|
|
TYPEDEF long clock_t;
|
|
STRUCT timeval { time_t tv_sec; suseconds_t tv_usec; };
|
|
STRUCT timespec { time_t tv_sec; long tv_nsec; };
|
|
|
|
TYPEDEF int pid_t;
|
|
TYPEDEF unsigned id_t;
|
|
TYPEDEF unsigned uid_t;
|
|
TYPEDEF unsigned gid_t;
|
|
TYPEDEF int key_t;
|
|
TYPEDEF unsigned useconds_t;
|
|
|
|
#ifdef __cplusplus
|
|
TYPEDEF unsigned long pthread_t;
|
|
#else
|
|
TYPEDEF struct __pthread * pthread_t;
|
|
#endif
|
|
TYPEDEF int pthread_once_t;
|
|
TYPEDEF unsigned pthread_key_t;
|
|
TYPEDEF int pthread_spinlock_t;
|
|
TYPEDEF struct { unsigned __attr; } pthread_mutexattr_t;
|
|
TYPEDEF struct { unsigned __attr; } pthread_condattr_t;
|
|
TYPEDEF struct { unsigned __attr; } pthread_barrierattr_t;
|
|
TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
|
|
|
TYPEDEF struct _IO_FILE FILE;
|
|
|
|
TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
|
|
|
|
TYPEDEF struct __locale_struct * locale_t;
|
|
|
|
TYPEDEF struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
|
|
|
|
STRUCT iovec { void *iov_base; size_t iov_len; };
|
|
|
|
TYPEDEF unsigned socklen_t;
|
|
TYPEDEF unsigned short sa_family_t;
|
|
|
|
#undef _Addr
|
|
#undef _Int64
|
|
#undef _Reg
|