diff options
Diffstat (limited to 'sysdeps')
94 files changed, 346 insertions, 131 deletions
diff --git a/sysdeps/aarch64/multiarch/memset_generic.S b/sysdeps/aarch64/multiarch/memset_generic.S index 81748bdbce..e125a5ed85 100644 --- a/sysdeps/aarch64/multiarch/memset_generic.S +++ b/sysdeps/aarch64/multiarch/memset_generic.S @@ -33,3 +33,7 @@ #endif #include <../memset.S> + +#if IS_IN (rtld) +strong_alias (memset, __memset_generic) +#endif diff --git a/sysdeps/arc/utmp-size.h b/sysdeps/arc/utmp-size.h new file mode 100644 index 0000000000..a247fcd3da --- /dev/null +++ b/sysdeps/arc/utmp-size.h @@ -0,0 +1,3 @@ +/* arc has less padding than other architectures with 64-bit time_t. */ +#define UTMP_SIZE 392 +#define LASTLOG_SIZE 296 diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/arm/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/arm/utmp-size.h b/sysdeps/arm/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/arm/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/csky/bits/wordsize.h b/sysdeps/csky/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/csky/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/csky/utmp-size.h b/sysdeps/csky/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/csky/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/generic/utmp-size.h b/sysdeps/generic/utmp-size.h new file mode 100644 index 0000000000..89dbe878b0 --- /dev/null +++ b/sysdeps/generic/utmp-size.h @@ -0,0 +1,23 @@ +/* Expected sizes of utmp-related structures stored in files. 64-bit version. + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +/* Expected size, in bytes, of struct utmp and struct utmpx. */ +#define UTMP_SIZE 400 + +/* Expected size, in bytes, of struct lastlog. */ +#define LASTLOG_SIZE 296 diff --git a/sysdeps/hppa/utmp-size.h b/sysdeps/hppa/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/hppa/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S index 3e26f112d6..79856d498a 100644 --- a/sysdeps/i386/i586/memcpy.S +++ b/sysdeps/i386/i586/memcpy.S @@ -26,7 +26,7 @@ #define LEN SRC+4 .text -#if defined PIC && IS_IN (libc) +#if defined SHARED && IS_IN (libc) ENTRY (__memcpy_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) diff --git a/sysdeps/i386/i686/memmove.S b/sysdeps/i386/i686/memmove.S index f230359ad6..effd958120 100644 --- a/sysdeps/i386/i686/memmove.S +++ b/sysdeps/i386/i686/memmove.S @@ -29,7 +29,7 @@ #define SRC DEST+4 #define LEN SRC+4 -#if defined PIC && IS_IN (libc) +#if defined SHARED && IS_IN (libc) ENTRY_CHK (__memmove_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) diff --git a/sysdeps/i386/i686/memset.S b/sysdeps/i386/i686/memset.S index f02f5a6df7..ab06771ea0 100644 --- a/sysdeps/i386/i686/memset.S +++ b/sysdeps/i386/i686/memset.S @@ -27,7 +27,7 @@ #define LEN CHR+4 .text -#if defined PIC && IS_IN (libc) +#if defined SHARED && IS_IN (libc) ENTRY_CHK (__memset_chk) movl 12(%esp), %eax cmpl %eax, 16(%esp) diff --git a/sysdeps/loongarch/lp64/multiarch/dl-symbol-redir-ifunc.h b/sysdeps/loongarch/lp64/multiarch/dl-symbol-redir-ifunc.h index cb640d77b7..a73390b12f 100644 --- a/sysdeps/loongarch/lp64/multiarch/dl-symbol-redir-ifunc.h +++ b/sysdeps/loongarch/lp64/multiarch/dl-symbol-redir-ifunc.h @@ -19,6 +19,9 @@ #ifndef _DL_IFUNC_GENERIC_H #define _DL_IFUNC_GENERIC_H +#ifndef SHARED asm ("memset = __memset_aligned"); +asm ("memcmp = __memcmp_aligned"); +#endif #endif diff --git a/sysdeps/m68k/bits/wordsize.h b/sysdeps/m68k/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/m68k/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/m68k/utmp-size.h b/sysdeps/m68k/utmp-size.h new file mode 100644 index 0000000000..5946685819 --- /dev/null +++ b/sysdeps/m68k/utmp-size.h @@ -0,0 +1,3 @@ +/* m68k has 2-byte alignment. */ +#define UTMP_SIZE 382 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h index 3e72f9fa93..b5eeac3731 100644 --- a/sysdeps/mach/hurd/bits/socket.h +++ b/sysdeps/mach/hurd/bits/socket.h @@ -153,7 +153,7 @@ enum __socket_type #include <bits/sockaddr.h> /* Structure describing a generic socket address. */ -struct sockaddr +struct __attribute_struct_may_alias__ sockaddr { __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ char sa_data[14]; /* Address data. */ @@ -170,7 +170,7 @@ struct sockaddr #define _SS_PADSIZE \ (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype)) -struct sockaddr_storage +struct __attribute_struct_may_alias__ sockaddr_storage { __SOCKADDR_COMMON (ss_); /* Address family, etc. */ char __ss_padding[_SS_PADSIZE]; diff --git a/sysdeps/microblaze/bits/wordsize.h b/sysdeps/microblaze/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/microblaze/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/microblaze/utmp-size.h b/sysdeps/microblaze/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/microblaze/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index 57f0f2a22f..30dd3fd85d 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -19,11 +19,7 @@ #define __WORDSIZE _MIPS_SZPTR -#if _MIPS_SIM == _ABI64 -# define __WORDSIZE_TIME64_COMPAT32 1 -#else -# define __WORDSIZE_TIME64_COMPAT32 0 -#endif +#define __WORDSIZE_TIME64_COMPAT32 1 #if __WORDSIZE == 32 #define __WORDSIZE32_SIZE_ULONG 0 diff --git a/sysdeps/mips/utmp-size.h b/sysdeps/mips/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/mips/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/nios2/bits/wordsize.h b/sysdeps/nios2/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/nios2/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/nios2/utmp-size.h b/sysdeps/nios2/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/nios2/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h index 1607fdf29a..3d4f4a756c 100644 --- a/sysdeps/nptl/pthread.h +++ b/sysdeps/nptl/pthread.h @@ -223,7 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return); the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. @@ -796,7 +796,7 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); @@ -813,7 +813,7 @@ extern int __REDIRECT_NTHNL (pthread_mutex_timedlock, #endif #ifdef __USE_GNU -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, clockid_t __clockid, const struct timespec *__restrict @@ -982,7 +982,7 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specified time. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); @@ -1000,7 +1000,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock, # endif # ifdef __USE_GNU -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict @@ -1029,7 +1029,7 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specified time. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); @@ -1047,7 +1047,7 @@ extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock, # endif # ifdef __USE_GNU -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, clockid_t __clockid, const struct timespec *__restrict @@ -1141,7 +1141,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, This function is a cancellation point and therefore not marked with __THROW. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) @@ -1167,7 +1167,7 @@ extern int __REDIRECT (pthread_cond_timedwait, This function is a cancellation point and therefore not marked with __THROW. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __clockid_t __clock_id, diff --git a/sysdeps/or1k/utmp-size.h b/sysdeps/or1k/utmp-size.h new file mode 100644 index 0000000000..6b3653aa4d --- /dev/null +++ b/sysdeps/or1k/utmp-size.h @@ -0,0 +1,3 @@ +/* or1k has less padding than other architectures with 64-bit time_t. */ +#define UTMP_SIZE 392 +#define LASTLOG_SIZE 296 diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h index 04ca9debf0..6993fb6b29 100644 --- a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -2,10 +2,9 @@ #if defined __powerpc64__ # define __WORDSIZE 64 -# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 -# define __WORDSIZE_TIME64_COMPAT32 0 # define __WORDSIZE32_SIZE_ULONG 0 # define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/powerpc/powerpc64/bits/wordsize.h b/sysdeps/powerpc/powerpc64/bits/wordsize.h index 04ca9debf0..6993fb6b29 100644 --- a/sysdeps/powerpc/powerpc64/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc64/bits/wordsize.h @@ -2,10 +2,9 @@ #if defined __powerpc64__ # define __WORDSIZE 64 -# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 -# define __WORDSIZE_TIME64_COMPAT32 0 # define __WORDSIZE32_SIZE_ULONG 0 # define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/powerpc/utmp-size.h b/sysdeps/powerpc/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/powerpc/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/pthread/semaphore.h b/sysdeps/pthread/semaphore.h index c75ca4ce6d..8a09633699 100644 --- a/sysdeps/pthread/semaphore.h +++ b/sysdeps/pthread/semaphore.h @@ -59,7 +59,7 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1)); This function is a cancellation point and therefore not marked with __THROW. */ -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int sem_timedwait (sem_t *__restrict __sem, const struct timespec *__restrict __abstime) __nonnull ((1, 2)); @@ -77,7 +77,7 @@ extern int __REDIRECT (sem_timedwait, #endif #ifdef __USE_GNU -# ifndef __USE_TIME_BITS64 +# ifndef __USE_TIME64_REDIRECTS extern int sem_clockwait (sem_t *__restrict __sem, clockid_t clock, const struct timespec *__restrict __abstime) diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h index c5410b5c3a..7cade24e1f 100644 --- a/sysdeps/pthread/threads.h +++ b/sysdeps/pthread/threads.h @@ -90,7 +90,7 @@ extern thrd_t thrd_current (void); __TIME_POINT. The current thread may resume if receives a signal. In that case, if __REMAINING is not NULL, the remaining time is stored in the object pointed by it. */ -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int thrd_sleep (const struct timespec *__time_point, struct timespec *__remaining); #else @@ -143,7 +143,7 @@ extern int mtx_lock (mtx_t *__mutex); /* Block the current thread until the mutex pointed by __MUTEX is unlocked or time pointed by __TIME_POINT is reached. In case the mutex is unlock, the current thread will not be blocked. */ -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int mtx_timedlock (mtx_t *__restrict __mutex, const struct timespec *__restrict __time_point); #else @@ -194,7 +194,7 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex); /* Block current thread on the condition variable until condition variable pointed by __COND is signaled or time pointed by __TIME_POINT is reached. */ -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int cnd_timedwait (cnd_t *__restrict __cond, mtx_t *__restrict __mutex, const struct timespec *__restrict __time_point); diff --git a/sysdeps/riscv/utmp-size.h b/sysdeps/riscv/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/riscv/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/sh/bits/wordsize.h b/sysdeps/sh/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/sh/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/sh/utmp-size.h b/sysdeps/sh/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/sh/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/sparc/sparc32/bits/wordsize.h b/sysdeps/sparc/sparc32/bits/wordsize.h index 4bbd2e63b4..a2e79e0fa9 100644 --- a/sysdeps/sparc/sparc32/bits/wordsize.h +++ b/sysdeps/sparc/sparc32/bits/wordsize.h @@ -1,6 +1,6 @@ /* Determine the wordsize from the preprocessor defines. */ #define __WORDSIZE 32 -#define __WORDSIZE_TIME64_COMPAT32 0 +#define __WORDSIZE_TIME64_COMPAT32 1 #define __WORDSIZE32_SIZE_ULONG 0 #define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/sparc/sparc64/bits/wordsize.h b/sysdeps/sparc/sparc64/bits/wordsize.h index 2f66f10d72..ea103e5970 100644 --- a/sysdeps/sparc/sparc64/bits/wordsize.h +++ b/sysdeps/sparc/sparc64/bits/wordsize.h @@ -2,10 +2,9 @@ #if defined __arch64__ || defined __sparcv9 # define __WORDSIZE 64 -# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 -# define __WORDSIZE_TIME64_COMPAT32 0 # define __WORDSIZE32_SIZE_ULONG 0 # define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/sparc/sparc64/rtld-memset.c b/sysdeps/sparc/sparc64/rtld-memset.c index 55f3835790..a19202a620 100644 --- a/sysdeps/sparc/sparc64/rtld-memset.c +++ b/sysdeps/sparc/sparc64/rtld-memset.c @@ -1 +1,4 @@ #include <string/memset.c> +#if IS_IN(rtld) +strong_alias (memset, __memset_ultra1) +#endif diff --git a/sysdeps/sparc/utmp-size.h b/sysdeps/sparc/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/sparc/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h b/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h index 255feaa8cb..89534fea85 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h @@ -28,7 +28,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -83,13 +83,13 @@ struct stat # else __ino64_t st_ino; /* File serial number. */ # endif -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -125,7 +125,7 @@ struct stat64 unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __ino64_t st_ino; /* File serial number. */ -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/bits/socket-constants.h b/sysdeps/unix/sysv/linux/bits/socket-constants.h index d997dbf594..b2102d3abf 100644 --- a/sysdeps/unix/sysv/linux/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/bits/socket-constants.h @@ -64,7 +64,7 @@ # define SO_TIMESTAMPNS_NEW 64 # define SO_TIMESTAMPING_NEW 65 -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 0d86feb4ca..6dab283a2e 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -180,7 +180,7 @@ typedef __socklen_t socklen_t; #include <bits/sockaddr.h> /* Structure describing a generic socket address. */ -struct sockaddr +struct __attribute_struct_may_alias__ sockaddr { __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ char sa_data[14]; /* Address data. */ @@ -193,7 +193,7 @@ struct sockaddr #define _SS_PADSIZE \ (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype)) -struct sockaddr_storage +struct __attribute_struct_may_alias__ sockaddr_storage { __SOCKADDR_COMMON (ss_); /* Address family, etc. */ char __ss_padding[_SS_PADSIZE]; diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index b70ba58a7d..cab4057971 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -77,7 +77,7 @@ __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2)); -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # if defined(__REDIRECT_NTH) extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id, struct timex *__utx), diff --git a/sysdeps/unix/sysv/linux/bits/timex.h b/sysdeps/unix/sysv/linux/bits/timex.h index 398d8094f2..03ccde6d0a 100644 --- a/sysdeps/unix/sysv/linux/bits/timex.h +++ b/sysdeps/unix/sysv/linux/bits/timex.h @@ -25,7 +25,7 @@ struct timex { -# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32) +# if defined __USE_TIME64_REDIRECTS || (__TIMESIZE == 64 && __WORDSIZE == 32) unsigned int modes; /* mode selector */ int :32; /* pad */ long long offset; /* time offset (usec) */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h index fae50281c7..86296ca922 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h index 3c277ed1d8..2ac89b3ce4 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h index 09de0b4e3a..1012ed0317 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h index 7854cccef3..ead7a09156 100644 --- a/sysdeps/unix/sysv/linux/bits/uio-ext.h +++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h @@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ +#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ __END_DECLS diff --git a/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h b/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h index 4b4822d6d0..47a9f0aaff 100644 --- a/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h @@ -43,7 +43,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -88,7 +88,7 @@ struct stat #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ diff --git a/sysdeps/unix/sysv/linux/features-time64.h b/sysdeps/unix/sysv/linux/features-time64.h index dd3442c2ea..8d573cd23e 100644 --- a/sysdeps/unix/sysv/linux/features-time64.h +++ b/sysdeps/unix/sysv/linux/features-time64.h @@ -24,9 +24,8 @@ # if _TIME_BITS == 64 # if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64 # error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64" -# elif __TIMESIZE == 32 -# define __USE_TIME_BITS64 1 # endif +# define __USE_TIME_BITS64 1 # elif _TIME_BITS == 32 # if __TIMESIZE > 32 # error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32" @@ -34,4 +33,10 @@ # else # error Invalid _TIME_BITS value (can only be 32 or 64-bit) # endif +#elif __TIMESIZE == 64 +# define __USE_TIME_BITS64 1 +#endif + +#if defined __USE_TIME_BITS64 && __TIMESIZE == 32 +# define __USE_TIME64_REDIRECTS 1 #endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h b/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h index 58b523d03a..80a76a17dc 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h @@ -54,7 +54,7 @@ # define SO_TIMESTAMPNS_NEW 0x4039 # define SO_TIMESTAMPING_NEW 0x403A -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h b/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h index 069efdbc55..09ea40054b 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h @@ -28,7 +28,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -83,13 +83,13 @@ struct stat # else __ino64_t st_ino; /* File serial number. */ # endif -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -125,7 +125,7 @@ struct stat64 unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __ino64_t st_ino; /* File serial number. */ -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h index 2bc7cac06d..4995e0a4a5 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h index dd8fbebcf4..df88949dc2 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h index 58ac572b6e..cb3b0303aa 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h b/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h new file mode 100644 index 0000000000..6ecbfe7c86 --- /dev/null +++ b/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#define __WORDSIZE 32 +#define __WORDSIZE_TIME64_COMPAT32 1 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h index 3b1db157bc..b7f20189b1 100644 --- a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h @@ -25,7 +25,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -80,13 +80,13 @@ struct stat # else __ino64_t st_ino; /* File serial number. */ # endif -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -122,7 +122,7 @@ struct stat64 unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __ino64_t st_ino; /* File serial number. */ -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h index 0f4693fb1f..ff1e269f14 100644 --- a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h @@ -26,7 +26,7 @@ #ifndef __USE_FILE_OFFSET64 struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -64,7 +64,7 @@ struct stat # endif unsigned int __glibc_reserved4; unsigned int __glibc_reserved5; -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #else /* __USE_FILE_OFFSET64 */ /* MS: If __USE_FILE_OFFSET64 is setup then struct stat should match stat64 @@ -74,7 +74,7 @@ struct stat * create one ifdef to separate stats structures. */ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else unsigned long long st_dev; /* Device. */ @@ -112,14 +112,14 @@ struct stat # endif unsigned int __glibc_reserved4; unsigned int __glibc_reserved5; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif /* __USE_FILE_OFFSET64 */ #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else unsigned long long st_dev; /* Device. */ @@ -157,7 +157,7 @@ struct stat64 # endif unsigned int __glibc_reserved4; unsigned int __glibc_reserved5; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h b/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h index c6908a2793..77ffc8b890 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h @@ -54,7 +54,7 @@ # define SO_TIMESTAMPNS_NEW 64 # define SO_TIMESTAMPING_NEW 65 -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h index 277ebad9b6..50a4b367f6 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h @@ -29,7 +29,7 @@ /* Structure describing file characteristics. */ struct stat { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else unsigned long int st_dev; @@ -82,13 +82,13 @@ struct stat __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ # endif long int st_pad5[14]; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; # ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else unsigned long int st_dev; @@ -123,7 +123,7 @@ struct stat64 long int st_pad3; __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ long int st_pad4[14]; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; # endif /* __USE_LARGEFILE64 */ @@ -131,7 +131,7 @@ struct stat64 struct stat { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; @@ -189,7 +189,7 @@ struct stat #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; @@ -224,7 +224,7 @@ struct stat64 unsigned int st_pad3; __blkcnt64_t st_blocks; int st_pad4[14]; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h index 4e8bd51b0a..09c53648b7 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h index d1a30e3164..0746684a7d 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h index 8771164b57..c665af1874 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/net/if_packet.h b/sysdeps/unix/sysv/linux/net/if_packet.h index 9ffb69b508..c17e1c23c5 100644 --- a/sysdeps/unix/sysv/linux/net/if_packet.h +++ b/sysdeps/unix/sysv/linux/net/if_packet.h @@ -26,7 +26,7 @@ From Linux 2.1 the AF_PACKET interface is preferred and you should consider using it in place of this one. */ -struct sockaddr_pkt +struct __attribute_struct_may_alias__ sockaddr_pkt { __SOCKADDR_COMMON (spkt_); unsigned char spkt_device[14]; diff --git a/sysdeps/unix/sysv/linux/netash/ash.h b/sysdeps/unix/sysv/linux/netash/ash.h index 7d885d17cc..7a6ff50b17 100644 --- a/sysdeps/unix/sysv/linux/netash/ash.h +++ b/sysdeps/unix/sysv/linux/netash/ash.h @@ -22,7 +22,7 @@ #include <features.h> #include <bits/sockaddr.h> -struct sockaddr_ash +struct __attribute_struct_may_alias__ sockaddr_ash { __SOCKADDR_COMMON (sash_); /* Common data: address family etc. */ int sash_ifindex; /* Interface to use. */ diff --git a/sysdeps/unix/sysv/linux/neteconet/ec.h b/sysdeps/unix/sysv/linux/neteconet/ec.h index b07a107961..f3132f06ff 100644 --- a/sysdeps/unix/sysv/linux/neteconet/ec.h +++ b/sysdeps/unix/sysv/linux/neteconet/ec.h @@ -28,7 +28,7 @@ struct ec_addr unsigned char net; /* Network number. */ }; -struct sockaddr_ec +struct __attribute_struct_may_alias__ sockaddr_ec { __SOCKADDR_COMMON (sec_); unsigned char port; /* Port number. */ diff --git a/sysdeps/unix/sysv/linux/netiucv/iucv.h b/sysdeps/unix/sysv/linux/netiucv/iucv.h index f5fad81751..27151e8bbe 100644 --- a/sysdeps/unix/sysv/linux/netiucv/iucv.h +++ b/sysdeps/unix/sysv/linux/netiucv/iucv.h @@ -23,7 +23,7 @@ __BEGIN_DECLS -struct sockaddr_iucv +struct __attribute_struct_may_alias__ sockaddr_iucv { __SOCKADDR_COMMON (siucv_); unsigned short siucv_port; /* Reserved */ diff --git a/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h b/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h index 672c7c6bb8..dab466d881 100644 --- a/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h @@ -43,7 +43,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -88,7 +88,7 @@ struct stat #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ diff --git a/sysdeps/unix/sysv/linux/pidfd_getpid.c b/sysdeps/unix/sysv/linux/pidfd_getpid.c index 8567b413dd..30025e5863 100644 --- a/sysdeps/unix/sysv/linux/pidfd_getpid.c +++ b/sysdeps/unix/sysv/linux/pidfd_getpid.c @@ -74,8 +74,10 @@ parse_fdinfo (const char *l, void *arg) /* Ignore invalid large values. */ if (INT_MULTIPLY_WRAPV (10, n, &n) - || INT_ADD_WRAPV (n, *l++ - '0', &n)) + || INT_ADD_WRAPV (n, *l - '0', &n)) return -1; + + l++; } /* -1 indicates that the process is terminated. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h index 6be5055e65..0d3e095c5d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h @@ -54,7 +54,7 @@ # define SO_TIMESTAMPNS_NEW 64 # define SO_TIMESTAMPING_NEW 65 -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h index f6328399cd..2cf331544a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h @@ -28,7 +28,7 @@ #if __WORDSIZE == 32 struct stat { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -79,13 +79,13 @@ struct stat # endif unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; # ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -122,7 +122,7 @@ struct stat64 # endif unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; # endif /* __USE_LARGEFILE64 */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h index 830629cd37..44ae08265d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h index 4370257557..ccee57c28b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h index da1b4b3c56..58145d0a5d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h index 04ca9debf0..6993fb6b29 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h @@ -2,10 +2,9 @@ #if defined __powerpc64__ # define __WORDSIZE 64 -# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 -# define __WORDSIZE_TIME64_COMPAT32 0 # define __WORDSIZE32_SIZE_ULONG 0 # define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h b/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h index 9911c47bb2..e5c9024fb2 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h @@ -65,7 +65,7 @@ struct stat #else struct stat { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -166,7 +166,7 @@ struct stat64 # else struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ diff --git a/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h b/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h index cbd4bc0f31..d47cd7be1e 100644 --- a/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h @@ -28,7 +28,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -83,13 +83,13 @@ struct stat # else __ino64_t st_ino; /* File serial number. */ # endif -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -125,7 +125,7 @@ struct stat64 unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __ino64_t st_ino; /* File serial number. */ -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h index 59958611c4..e7a6b684cc 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h @@ -54,7 +54,7 @@ # define SO_TIMESTAMPNS_NEW 0x0042 # define SO_TIMESTAMPING_NEW 0x0043 -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h index 4e48634edc..fcab5f4804 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h @@ -28,7 +28,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -79,13 +79,13 @@ struct stat # endif unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -126,7 +126,7 @@ struct stat64 # endif unsigned long int __glibc_reserved4; unsigned long int __glibc_reserved5; -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h index db783c28d4..ed8d47c9b6 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h index 1c8a3693db..b9e729b8b4 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h index 35a0cc36ab..7885d2ab25 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h index 7562875ee2..ea103e5970 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h @@ -2,10 +2,9 @@ #if defined __arch64__ || defined __sparcv9 # define __WORDSIZE 64 -# define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 # define __WORDSIZE32_SIZE_ULONG 0 # define __WORDSIZE32_PTRDIFF_LONG 0 -# define __WORDSIZE_TIME64_COMPAT32 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h index 9b51e3bd14..fc8dce45c8 100644 --- a/sysdeps/unix/sysv/linux/sys/epoll.h +++ b/sysdeps/unix/sysv/linux/sys/epoll.h @@ -140,7 +140,7 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events, This function is a cancellation point and therefore not marked with __THROW. */ -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int epoll_pwait2 (int __epfd, struct epoll_event *__events, int __maxevents, const struct timespec *__timeout, const __sigset_t *__ss) diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h index b13b846261..79a9b31273 100644 --- a/sysdeps/unix/sysv/linux/sys/prctl.h +++ b/sysdeps/unix/sysv/linux/sys/prctl.h @@ -38,7 +38,7 @@ __BEGIN_DECLS /* Control process execution. */ -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int prctl (int __option, ...) __THROW; #else # ifdef __REDIRECT diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h index 19d0cbfae0..f66ece306a 100644 --- a/sysdeps/unix/sysv/linux/sys/timerfd.h +++ b/sysdeps/unix/sysv/linux/sys/timerfd.h @@ -47,7 +47,7 @@ extern int timerfd_settime (int __ufd, int __flags, const struct itimerspec *__utmr, struct itimerspec *__otmr) __THROW; -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # if defined(__REDIRECT_NTH) extern int __REDIRECT_NTH (timerfd_settime, (int __ufd, int __flags, @@ -62,7 +62,7 @@ extern int __REDIRECT_NTH (timerfd_settime, /* Return the next expiration time of UFD. */ extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # if defined(__REDIRECT_NTH) extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd, struct itimerspec *__otmr), diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h index 28ce022253..568748d767 100644 --- a/sysdeps/unix/sysv/linux/sys/timex.h +++ b/sysdeps/unix/sysv/linux/sys/timex.h @@ -54,7 +54,7 @@ struct ntptimeval __BEGIN_DECLS -#ifndef __USE_TIME_BITS64 +#ifndef __USE_TIME64_REDIRECTS extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1)); extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1)); diff --git a/sysdeps/unix/sysv/linux/timespec_get.c b/sysdeps/unix/sysv/linux/timespec_get.c index c6e5e66289..778d1e3354 100644 --- a/sysdeps/unix/sysv/linux/timespec_get.c +++ b/sysdeps/unix/sysv/linux/timespec_get.c @@ -5,7 +5,7 @@ The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2.1 of the License. + version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/sysdeps/unix/sysv/linux/timespec_getres.c b/sysdeps/unix/sysv/linux/timespec_getres.c index 5acebe2a2c..2eef9e512c 100644 --- a/sysdeps/unix/sysv/linux/timespec_getres.c +++ b/sysdeps/unix/sysv/linux/timespec_getres.c @@ -5,7 +5,7 @@ The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2.1 of the License. + version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h index 21aa315d8d..810d6566f0 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h +++ b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h @@ -25,7 +25,7 @@ struct stat { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> #else __dev_t st_dev; /* Device. */ @@ -95,14 +95,14 @@ struct stat __ino64_t st_ino; /* File serial number. */ # endif # endif -#endif /* __USE_TIME_BITS64 */ +#endif /* __USE_TIME64_REDIRECTS */ }; #ifdef __USE_LARGEFILE64 /* Note stat64 has the same shape as stat for x86-64. */ struct stat64 { -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # include <bits/struct_stat_time64_helper.h> # else __dev_t st_dev; /* Device. */ @@ -152,7 +152,7 @@ struct stat64 # else __ino64_t st_ino; /* File serial number. */ # endif -# endif /* __USE_TIME_BITS64 */ +# endif /* __USE_TIME64_REDIRECTS */ }; #endif diff --git a/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h index 9f3d170b65..81867c0316 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/x86/bits/wordsize.h b/sysdeps/x86/bits/wordsize.h index 70f652bca1..3f40aa76f9 100644 --- a/sysdeps/x86/bits/wordsize.h +++ b/sysdeps/x86/bits/wordsize.h @@ -8,10 +8,9 @@ #define __WORDSIZE32_PTRDIFF_LONG 0 #endif +#define __WORDSIZE_TIME64_COMPAT32 1 + #ifdef __x86_64__ -# define __WORDSIZE_TIME64_COMPAT32 1 /* Both x86-64 and x32 use the 64-bit system call interface. */ # define __SYSCALL_WORDSIZE 64 -#else -# define __WORDSIZE_TIME64_COMPAT32 0 #endif diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c index 93008dac70..0f43ef2b2d 100644 --- a/sysdeps/x86/tst-cpu-features-supports.c +++ b/sysdeps/x86/tst-cpu-features-supports.c @@ -65,7 +65,7 @@ do_test (int argc, char **argv) #endif fails += CHECK_FEATURE_ACTIVE (avx, AVX); fails += CHECK_FEATURE_ACTIVE (avx2, AVX2); -#if __GNUC_PREREQ (7, 0) +#if __GNUC_PREREQ (7, 0) && !__GNUC_PREREQ (15, 0) fails += CHECK_FEATURE_ACTIVE (avx5124fmaps, AVX512_4FMAPS); fails += CHECK_FEATURE_ACTIVE (avx5124vnniw, AVX512_4VNNIW); #endif @@ -92,14 +92,18 @@ do_test (int argc, char **argv) #if __GNUC_PREREQ (6, 0) fails += CHECK_FEATURE_ACTIVE (avx512bw, AVX512BW); fails += CHECK_FEATURE_ACTIVE (avx512cd, AVX512CD); +# if !__GNUC_PREREQ (15, 0) fails += CHECK_FEATURE_ACTIVE (avx512er, AVX512ER); +# endif fails += CHECK_FEATURE_ACTIVE (avx512dq, AVX512DQ); #endif #if __GNUC_PREREQ (5, 0) fails += CHECK_FEATURE_ACTIVE (avx512f, AVX512F); #endif #if __GNUC_PREREQ (6, 0) +# if !__GNUC_PREREQ (15, 0) fails += CHECK_FEATURE_ACTIVE (avx512pf, AVX512PF); +# endif fails += CHECK_FEATURE_ACTIVE (avx512vl, AVX512VL); #endif #if __GNUC_PREREQ (5, 0) @@ -148,7 +152,9 @@ do_test (int argc, char **argv) #endif fails += CHECK_FEATURE_ACTIVE (popcnt, POPCNT); #if __GNUC_PREREQ (11, 0) +# if !__GNUC_PREREQ (15, 0) fails += CHECK_FEATURE_ACTIVE (prefetchwt1, PREFETCHWT1); +# endif fails += CHECK_FEATURE_ACTIVE (ptwrite, PTWRITE); fails += CHECK_FEATURE_ACTIVE (rdpid, RDPID); fails += CHECK_FEATURE_ACTIVE (rdrnd, RDRAND); diff --git a/sysdeps/x86/utmp-size.h b/sysdeps/x86/utmp-size.h new file mode 100644 index 0000000000..8f21ebe1b6 --- /dev/null +++ b/sysdeps/x86/utmp-size.h @@ -0,0 +1,2 @@ +#define UTMP_SIZE 384 +#define LASTLOG_SIZE 292 diff --git a/sysdeps/x86_64/multiarch/wcsncat-evex.S b/sysdeps/x86_64/multiarch/wcsncat-evex.S index 392215950a..10bfb0a531 100644 --- a/sysdeps/x86_64/multiarch/wcsncat-evex.S +++ b/sysdeps/x86_64/multiarch/wcsncat-evex.S @@ -1,9 +1,9 @@ -#ifndef WCSCAT -# define WCSCAT __wcsncat_evex +#ifndef WCSNCAT +# define WCSNCAT __wcsncat_evex #endif #define USE_AS_WCSCPY #define USE_AS_STRCAT -#define STRNCAT WCSCAT +#define STRNCAT WCSNCAT #include "strncat-evex.S" diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh index 46f1233757..0a9a164a3e 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1e-static.sh @@ -26,7 +26,7 @@ ${common_objpfx}elf/tst-shstk-legacy-1e-static status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1 diff --git a/sysdeps/x86_64/tst-shstk-legacy-1e.sh b/sysdeps/x86_64/tst-shstk-legacy-1e.sh index 31212453d9..3dec5623e4 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1e.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1e.sh @@ -28,7 +28,7 @@ ${test_program_prefix} \ status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1 diff --git a/sysdeps/x86_64/tst-shstk-legacy-1g.sh b/sysdeps/x86_64/tst-shstk-legacy-1g.sh index e84087068e..249831e816 100755 --- a/sysdeps/x86_64/tst-shstk-legacy-1g.sh +++ b/sysdeps/x86_64/tst-shstk-legacy-1g.sh @@ -28,7 +28,7 @@ ${test_program_prefix} \ status=$? if test $status -eq 77; then exit 77 -elif test $status == 139; then +elif test $status -eq 139; then exit 0 else exit 1 |