]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
time: Refactor timesize.h for some ABIs
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 31 Dec 2021 13:58:13 +0000 (10:58 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 31 Dec 2021 13:58:13 +0000 (10:58 -0300)
Commit a4b413135535c83a changed default __TIMESIZE to 64, however
it added sub-architecture timesize.h for powerpc, s390, and
sparc.

Also simplify mips by removing _MIPS_SIM usage (which would require
to add sgidefs inclusion.

sysdeps/unix/sysv/linux/mips/bits/timesize.h
sysdeps/unix/sysv/linux/powerpc/bits/timesize.h [moved from sysdeps/unix/sysv/linux/powerpc/powerpc32/bits/timesize.h with 93% similarity]
sysdeps/unix/sysv/linux/s390/bits/timesize.h [moved from sysdeps/unix/sysv/linux/s390/s390-32/bits/timesize.h with 87% similarity]
sysdeps/unix/sysv/linux/sparc/bits/timesize.h [moved from sysdeps/unix/sysv/linux/sparc/sparc32/bits/timesize.h with 87% similarity]

index 95a27ad5b65a6325b8ecaea1bdce04e4d27f59f1..8497a6be7dccaac2f003911d9118435e08f67a31 100644 (file)
@@ -16,9 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <bits/wordsize.h>
+
 /* Size in bits of the 'time_t' type of the default ABI.  */
-#if _MIPS_SIM == _ABI64
-# define __TIMESIZE    64
-#else
-# define __TIMESIZE    32
-#endif
+#define __TIMESIZE     __WORDSIZE
similarity index 93%
rename from sysdeps/unix/sysv/linux/powerpc/powerpc32/bits/timesize.h
rename to sysdeps/unix/sysv/linux/powerpc/bits/timesize.h
index 33a8bf9862078f81617aa55e079d3f34631e8189..ace12f9c848d524d2ca135be3067c2742a210e2c 100644 (file)
@@ -1,4 +1,4 @@
-/* Bit size of the time_t type at glibc build time, Linux/PowerPC 32-bits.
+/* Bit size of the time_t type at glibc build time, Linux/PowerPC.
    Copyright (C) 2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -16,5 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <bits/wordsize.h>
+
 /* Size in bits of the 'time_t' type of the default ABI.  */
-#define __TIMESIZE     32
+#define __TIMESIZE     __WORDSIZE
similarity index 87%
rename from sysdeps/unix/sysv/linux/s390/s390-32/bits/timesize.h
rename to sysdeps/unix/sysv/linux/s390/bits/timesize.h
index a3eb9455cd2fdcfaac201f22fab872a0b821cb9d..deb79c4af600164595ae934ab7290295450e8057 100644 (file)
@@ -1,4 +1,4 @@
-/* Bit size of the time_t type at glibc build time, Linux/s390 32-bits.
+/* Bit size of the time_t type at glibc build time, Linux/s390.
    Copyright (C) 2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -16,5 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <bits/wordsize.h>
+
 /* Size in bits of the 'time_t' type of the default ABI.  */
-#define __TIMESIZE     32
+#define __TIMESIZE     __WORDSIZE
similarity index 87%
rename from sysdeps/unix/sysv/linux/sparc/sparc32/bits/timesize.h
rename to sysdeps/unix/sysv/linux/sparc/bits/timesize.h
index 586f4d9fdc576c63076f01fd089cbdc48c4a1dcb..319d88b700972cdc8a9ab44fcd073c2e14321973 100644 (file)
@@ -1,4 +1,4 @@
-/* Bit size of the time_t type at glibc build time, Linux/sparc 32-bits.
+/* Bit size of the time_t type at glibc build time, Linux/sparc.
    Copyright (C) 2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -16,5 +16,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <bits/wordsize.h>
+
 /* Size in bits of the 'time_t' type of the default ABI.  */
-#define __TIMESIZE     32
+#define __TIMESIZE     __WORDSIZE