diff options
author | Zack Weinberg <zackw@panix.com> | 2019-03-09 18:01:48 -0500 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2019-03-09 21:04:58 -0500 |
commit | fb94ec0647d2fd3b1243fc1668a421b30edca388 (patch) | |
tree | 29c6bbaa824dd8e2576bfdc3a29fed366a2404ff /sysdeps/unix/sysv/linux/sparc | |
parent | 0ce3e22e38068c9857553dcd287c67d792a9f56b (diff) | |
download | glibc-fb94ec0647d2fd3b1243fc1668a421b30edca388.tar.gz |
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/unix/sysv/linux/sparc')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/typesizes.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h index b2d39294e9..c084ebd6b6 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h @@ -26,24 +26,24 @@ /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ -#define __DEV_T_TYPE __UQUAD_TYPE +#define __DEV_T_TYPE __U64_TYPE #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 __U32_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 |