diff options
author | Zack Weinberg <zackw@panix.com> | 2019-03-09 18:01:48 -0500 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-01-08 12:56:32 -0500 |
commit | 23432307d4e17872f5573df4413f5b1efa0cab6d (patch) | |
tree | 13e56484dd269eb341a40eb60da64621e3569973 /sysdeps/mach/hurd | |
parent | 9bdd08229bbba415fe9c8e8bb65016adee392412 (diff) | |
download | glibc-23432307d4e17872f5573df4413f5b1efa0cab6d.tar.gz glibc-23432307d4e17872f5573df4413f5b1efa0cab6d.tar.xz glibc-23432307d4e17872f5573df4413f5b1efa0cab6d.zip |
Clean up bits/types.h.
This makes four linked changes to bits/types.h. First, we use __(u)?int(16|32|64)_t to define __[SU](16|32|64)_TYPE. In addition to reducing the amount of ifdeffage, this means __STD_TYPE is no longer necessary, since gcc -std=c89 will complain about ‘typedef long long foo_t’ but not ‘typedef __int64_t foo_t’, even if the underlying type of __int64_t is long long. Second, we eliminate __UQUAD_TYPE and __SQUAD_TYPE from the set of macros bits/typesizes.h should use to define __FOO_T_TYPE macros, since they are always the same as __U64_TYPE and __S64_TYPE respectively. Third, we remove __u_char, __u_short, __u_int, __u_long, __u_quad_t, and __quad_t, we add __uintptr_t, and we define __intmax_t and __uintmax_t as __int64_t and __uint64_t. Fourth, we reorganize the list of typedefs into groups by the standard (if any) that defines them, and sort them alphabetically within each group. * posix/bits/types.h: Move #error for __WORDSIZE neither 32 nor 64 to first group of conditionals on __WORDSIZE, and make it more explicit. Update commentary. Define all __foo_t types with regular ‘typedef’. Reorganize all __foo_t types into the same groups that sys/types.h uses. (__u_char, __u_short, __u_int, __u_long, __quad_t, __u_quad_t) (__UQUAD_TYPE, __SQUAD_TYPE, __STD_TYPE): Don’t define. (__S16_TYPE): Define unconditionally as __int16_t. (__U16_TYPE): Define unconditionally as __uint16_t. (__S32_TYPE): Define unconditionally as __int32_t. (__U32_TYPE): Define unconditionally as __uint32_t. (__S64_TYPE): Define unconditionally as __int64_t. (__U64_TYPE): Define unconditionally as __uint64_t. (__intmax_t): Define unconditionally as __int64_t. (__uintmax_t): Define unconditionally as __uint64_t. (__uintptr_t): New typedef. * bits/time64.h * bits/typesizes.h * sysdeps/mach/hurd/bits/typesizes.h * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h * sysdeps/unix/sysv/linux/generic/bits/typesizes.h * sysdeps/unix/sysv/linux/mips/bits/typesizes.h * sysdeps/unix/sysv/linux/s390/bits/typesizes.h * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h * sysdeps/unix/sysv/linux/x86/bits/typesizes.h: Replace all uses of __UQUAD_TYPE with __U64_TYPE, and all uses of __SQUAD_TYPE with __S64_TYPE. * posix/sys/types.h, rpc/sys/types.h (u_char): Define as unsigned char. (u_short): Define as unsigned short. (u_int): Define as unsigned int. (u_long): Define as unsigned long. (quad_t): Define as __int64_t. (u_quad_t): Define as __uint64_t. * stdlib/stdint.h (intptr_t): Define as __intptr_t. (uintptr_t): Define as __uintptr_t. * scripts/check-obsolete-constructs.py: Update allowed definitions for the obsolete types. No longer allow __STD_TYPE as an alias for typedef.
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r-- | sysdeps/mach/hurd/bits/typesizes.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h index d3b0dcd9c8..b66c3f5e62 100644 --- a/sysdeps/mach/hurd/bits/typesizes.h +++ b/sysdeps/mach/hurd/bits/typesizes.h @@ -30,20 +30,20 @@ #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __ULONGWORD_TYPE -#define __INO64_T_TYPE __UQUAD_TYPE +#define __INO64_T_TYPE __U64_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __UWORD_TYPE #define __OFF_T_TYPE __SLONGWORD_TYPE -#define __OFF64_T_TYPE __SQUAD_TYPE +#define __OFF64_T_TYPE __S64_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __ULONGWORD_TYPE -#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __RLIM64_T_TYPE __U64_TYPE #define __BLKCNT_T_TYPE __SLONGWORD_TYPE -#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __BLKCNT64_T_TYPE __S64_TYPE #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE -#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSBLKCNT64_T_TYPE __U64_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE -#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT64_T_TYPE __U64_TYPE #define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE @@ -54,7 +54,7 @@ #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE __S32_TYPE #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE -#define __FSID_T_TYPE __UQUAD_TYPE +#define __FSID_T_TYPE __U64_TYPE #define __SSIZE_T_TYPE __SWORD_TYPE #define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE |