@@ -60,6 +60,7 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
#ifdef __LP64__
/* Tell the libc code that off_t and off64_t are actually the same type
@@ -222,6 +222,9 @@ typedef int __sig_atomic_t;
__STD_TYPE __TIME64_T_TYPE __time64_t;
#endif
+/* BSD: Size of a general-purpose integer register. */
+__STD_TYPE __REGISTER_T_TYPE __register_t;
+
#undef __STD_TYPE
#endif /* bits/types.h */
@@ -160,11 +160,8 @@ typedef __uint16_t u_int16_t;
typedef __uint32_t u_int32_t;
typedef __uint64_t u_int64_t;
-#if __GNUC_PREREQ (2, 7)
-typedef int register_t __attribute__ ((__mode__ (__word__)));
-#else
-typedef int register_t;
-#endif
+/* Type of a general-purpose integer register (BSD). */
+typedef __register_t register_t;
/* Some code from BIND tests this macro to see if the types above are
defined. */
@@ -60,6 +60,7 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 256
@@ -60,6 +60,7 @@
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
#define __FSWORD_T_TYPE __S32_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
@@ -61,6 +61,7 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
#ifdef __LP64__
/* Tell the libc code that off_t and off64_t are actually the same type
similarity index 90%
copy from sysdeps/unix/sysv/linux/generic/bits/typesizes.h
copy to sysdeps/unix/sysv/linux/mips/bits/typesizes.h
@@ -1,7 +1,6 @@
-/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI.
+/* bits/typesizes.h -- underlying types for *_t. For the MIPS Linux ABI.
Copyright (C) 2011-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -33,7 +32,7 @@
#define __INO_T_TYPE __ULONGWORD_TYPE
#define __INO64_T_TYPE __UQUAD_TYPE
#define __MODE_T_TYPE __U32_TYPE
-#define __NLINK_T_TYPE __U32_TYPE
+#define __NLINK_T_TYPE __UWORD_TYPE
#define __OFF_T_TYPE __SLONGWORD_TYPE
#define __OFF64_T_TYPE __SQUAD_TYPE
#define __PID_T_TYPE __S32_TYPE
@@ -55,13 +54,19 @@
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
-#define __BLKSIZE_T_TYPE __S32_TYPE
+#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#define __REGISTER_T_TYPE __SQUAD_TYPE
+#else
+#define __REGISTER_T_TYPE __SWORD_TYPE
+#endif
+
#ifdef __LP64__
/* Tell the libc code that off_t and off64_t are actually the same type
for all ABI purposes, even if possibly expressed as different base types
@@ -66,6 +66,7 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
#ifdef __s390x__
/* Tell the libc code that off_t and off64_t are actually the same type
@@ -60,6 +60,7 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __CPU_MASK_TYPE __ULONGWORD_TYPE
+#define __REGISTER_T_TYPE __SWORD_TYPE
#if defined __arch64__ || defined __sparcv9
/* Tell the libc code that off_t and off64_t are actually the same type
@@ -30,9 +30,11 @@
#if defined __x86_64__ && defined __ILP32__
# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
+# define __REGISTER_T_TYPE __SQUAD_TYPE
#else
# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+# define __REGISTER_T_TYPE __SWORD_TYPE
#endif
#define __DEV_T_TYPE __UQUAD_TYPE