]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Linux: Remove generic sysdep
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Wed, 19 Oct 2022 22:14:29 +0000 (19:14 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 7 Dec 2022 17:33:47 +0000 (14:33 -0300)
The includes chain is added on each architecture sysdep.h and
the __NR__llseek hack is moved to lseek.c and lseek64.c.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/aarch64/sysdep.h
sysdeps/unix/sysv/linux/arc/sysdep.h
sysdeps/unix/sysv/linux/csky/sysdep.h
sysdeps/unix/sysv/linux/generic/sysdep.h [deleted file]
sysdeps/unix/sysv/linux/loongarch/sysdep.h
sysdeps/unix/sysv/linux/lseek.c
sysdeps/unix/sysv/linux/lseek64.c
sysdeps/unix/sysv/linux/nios2/sysdep.h
sysdeps/unix/sysv/linux/or1k/sysdep.h
sysdeps/unix/sysv/linux/riscv/sysdep.h

index 8ba50dab8f799f7610c53970cf975a105e70f041..1b0585b9c4ab3a702592af74f6b26c4c37e503c5 100644 (file)
@@ -21,7 +21,8 @@
 
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/aarch64/sysdep.h>
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sysdep.h>
 
 /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
 #include <dl-sysdep.h>
index 512284a70571fa262a8983cdec13780449a9cc64..95cfd5893d6ba8aa5280122178a5283f0f2e2884 100644 (file)
@@ -20,7 +20,9 @@
 #define _LINUX_ARC_SYSDEP_H 1
 
 #include <sysdeps/arc/sysdep.h>
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <bits/wordsize.h>
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sysdep.h>
 
 /* "workarounds" for generic code needing to handle 64-bit time_t.  */
 
index 76b09f0cc665123c1cf77d07b616e69607e6af42..9632be6ca4d3548bc39252420b276d5ef27204c8 100644 (file)
@@ -20,9 +20,9 @@
 #define _LINUX_CSKY_SYSDEP_H 1
 
 /* There is some commonality.  */
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/csky/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
 
 /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
 #include <dl-sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h
deleted file mode 100644 (file)
index 7af5cb4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2011-2022 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/>.  */
-
-#include <bits/wordsize.h>
-#include <kernel-features.h>
-#include <sysdeps/unix/sysdep.h>
-#include <sysdeps/unix/sysv/linux/sysdep.h>
-
-/* Provide the common name to allow more code reuse.  */
-#ifdef __NR_llseek
-# define __NR__llseek __NR_llseek
-#endif
index 09f8243f252f749c43eabc00fe518b5b409ef565..9437c33fcb68b384d575e4400f50e100ebd60dc7 100644 (file)
@@ -19,7 +19,8 @@
 #ifndef _LINUX_LOONGARCH_SYSDEP_H
 #define _LINUX_LOONGARCH_SYSDEP_H 1
 
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
 #include <tls.h>
 
 #ifdef __ASSEMBLER__
index 148503d7bc085084aac0e0eb882f3be4bb046f98..3f10c8dc96bbd95caaf7c02313759dd7372693af 100644 (file)
@@ -41,6 +41,10 @@ static inline off_t lseek_overflow (loff_t res)
 off_t
 __lseek (int fd, off_t offset, int whence)
 {
+#ifdef __NR_llseek
+# define __NR__llseek __NR_llseek
+#endif
+
 # ifdef __NR__llseek
   loff_t res;
   int rc = INLINE_SYSCALL_CALL (_llseek, fd,
index 74aab82f5a2a4fd4d31657c8193a0410aefa5584..d14ba9e12b3cfa2e12b84e2b15f2ada393140711 100644 (file)
 off64_t
 __lseek64 (int fd, off64_t offset, int whence)
 {
+#ifdef __NR_llseek
+# define __NR__llseek __NR_llseek
+#endif
+
 #ifdef __NR__llseek
   loff_t res;
   int rc = INLINE_SYSCALL_CALL (_llseek, fd,
index 46667b9c19813ef3dfb1a8e0f1e2b98ffc9abd8f..8b3e402ffe3c6eaf1dfefd3c4ccf441814aaf945 100644 (file)
@@ -19,9 +19,9 @@
 #ifndef _LINUX_NIOS2_SYSDEP_H
 #define _LINUX_NIOS2_SYSDEP_H 1
 
+#include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/nios2/sysdep.h>
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
 
 /* For RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
index b1fdf2a80694f93a2e69ee06bdcef9d9198102c4..aca480d7a9ffe049a85112cfa4570e9fc8f2086e 100644 (file)
@@ -19,8 +19,9 @@
 #ifndef _LINUX_OR1K_SYSDEP_H
 #define _LINUX_OR1K_SYSDEP_H 1
 
+#include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/or1k/sysdep.h>
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
 #include <tls.h>
 
 /* "workarounds" for generic code needing to handle 64-bit time_t.  */
index c9af888132266d62adf345809451af5754176b17..4af5fe5dbcb199d2f44c705699b3268df5ada2bf 100644 (file)
@@ -19,7 +19,8 @@
 #ifndef _LINUX_RISCV_SYSDEP_H
 #define _LINUX_RISCV_SYSDEP_H 1
 
-#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
+#include <sysdeps/unix/sysv/linux/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
 #include <tls.h>
 
 #undef SYS_ify