aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-12 16:26:53 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-18 15:54:24 -0300
commitbdfed2e2cd166536d03a247925f6df3800ec4acc (patch)
tree04757597d5fcf1140e168e27ac30eecb7381d35c
parentbaab50cfb9b7e31e18f1ecfb463c1908454ce81d (diff)
downloadglibc-bdfed2e2cd166536d03a247925f6df3800ec4acc.tar.xz
glibc-bdfed2e2cd166536d03a247925f6df3800ec4acc.zip
nptl: Remove close from libpthread
The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
-rw-r--r--io/Makefile1
-rw-r--r--nptl/Makefile3
-rw-r--r--nptl/Versions2
-rw-r--r--sysdeps/pthread/sem_open.c4
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arc/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/csky/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/i386/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist2
33 files changed, 4 insertions, 64 deletions
diff --git a/io/Makefile b/io/Makefile
index 2a3aad64e3..914d7689b2 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -104,6 +104,7 @@ CFLAGS-fallocate.c += -fexceptions
CFLAGS-fallocate64.c += -fexceptions
CFLAGS-read.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-write.c += -fexceptions -fasynchronous-unwind-tables
+CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-test-stat.c += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CFLAGS-test-lfs.c += -D_LARGEFILE64_SOURCE
diff --git a/nptl/Makefile b/nptl/Makefile
index 64bbe1243e..c33f29bd49 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -81,7 +81,7 @@ static-only-routines = pthread_atfork
# We need to provide certain routines for compatibility with existing
# binaries.
pthread-compat-wrappers = \
- close accept \
+ accept \
connect recv recvfrom send \
sendto fsync lseek lseek64 \
msync open open64 pause \
@@ -307,7 +307,6 @@ CFLAGS-connect.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-recvfrom.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-recvmsg.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sendmsg.c += -fexceptions -fasynchronous-unwind-tables
-CFLAGS-close.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sigsuspend.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-msync.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-fdatasync.c += -fexceptions -fasynchronous-unwind-tables
diff --git a/nptl/Versions b/nptl/Versions
index add7916c4d..1422c219d2 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -103,7 +103,6 @@ libpthread {
_IO_flockfile;
_IO_ftrylockfile;
_IO_funlockfile;
- __close;
__connect;
__errno_location;
__fcntl;
@@ -131,7 +130,6 @@ libpthread {
_pthread_cleanup_push;
_pthread_cleanup_push_defer;
accept;
- close;
connect;
fcntl;
flockfile;
diff --git a/sysdeps/pthread/sem_open.c b/sysdeps/pthread/sem_open.c
index 62c5908fc9..9755be70ee 100644
--- a/sysdeps/pthread/sem_open.c
+++ b/sysdeps/pthread/sem_open.c
@@ -175,7 +175,7 @@ sem_open (const char *name, int oflag, ...)
(void) unlink (tmpfname);
/* Close the file. */
- (void) __libc_close (fd);
+ close (fd);
goto try_again;
}
@@ -201,7 +201,7 @@ sem_open (const char *name, int oflag, ...)
{
/* Do not disturb errno. */
int save = errno;
- __libc_close (fd);
+ close (fd);
errno = save;
}
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index eae91979b0..428fc6ab23 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.17 _IO_flockfile F
GLIBC_2.17 _IO_ftrylockfile F
GLIBC_2.17 _IO_funlockfile F
-GLIBC_2.17 __close F
GLIBC_2.17 __connect F
GLIBC_2.17 __errno_location F
GLIBC_2.17 __fcntl F
@@ -47,7 +46,6 @@ GLIBC_2.17 _pthread_cleanup_pop_restore F
GLIBC_2.17 _pthread_cleanup_push F
GLIBC_2.17 _pthread_cleanup_push_defer F
GLIBC_2.17 accept F
-GLIBC_2.17 close F
GLIBC_2.17 connect F
GLIBC_2.17 fcntl F
GLIBC_2.17 flockfile F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index fa3bccf4f8..09226d8946 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.0 _IO_flockfile F
GLIBC_2.0 _IO_ftrylockfile F
GLIBC_2.0 _IO_funlockfile F
-GLIBC_2.0 __close F
GLIBC_2.0 __connect F
GLIBC_2.0 __errno_location F
GLIBC_2.0 __fcntl F
@@ -27,7 +26,6 @@ GLIBC_2.0 _pthread_cleanup_pop_restore F
GLIBC_2.0 _pthread_cleanup_push F
GLIBC_2.0 _pthread_cleanup_push_defer F
GLIBC_2.0 accept F
-GLIBC_2.0 close F
GLIBC_2.0 connect F
GLIBC_2.0 fcntl F
GLIBC_2.0 flockfile F
diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
index 3c6b005aff..e0f838f5fa 100644
--- a/sysdeps/unix/sysv/linux/arc/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.32 _IO_flockfile F
GLIBC_2.32 _IO_ftrylockfile F
GLIBC_2.32 _IO_funlockfile F
-GLIBC_2.32 __close F
GLIBC_2.32 __connect F
GLIBC_2.32 __errno_location F
GLIBC_2.32 __h_errno_location F
@@ -47,7 +46,6 @@ GLIBC_2.32 _pthread_cleanup_push F
GLIBC_2.32 _pthread_cleanup_push_defer F
GLIBC_2.32 accept F
GLIBC_2.32 call_once F
-GLIBC_2.32 close F
GLIBC_2.32 cnd_broadcast F
GLIBC_2.32 cnd_destroy F
GLIBC_2.32 cnd_init F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
index f600b137db..fb29a18798 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
@@ -36,7 +36,6 @@ GLIBC_2.31 pthread_clockjoin_np F
GLIBC_2.4 _IO_flockfile F
GLIBC_2.4 _IO_ftrylockfile F
GLIBC_2.4 _IO_funlockfile F
-GLIBC_2.4 __close F
GLIBC_2.4 __connect F
GLIBC_2.4 __errno_location F
GLIBC_2.4 __fcntl F
@@ -82,7 +81,6 @@ GLIBC_2.4 _pthread_cleanup_pop_restore F
GLIBC_2.4 _pthread_cleanup_push F
GLIBC_2.4 _pthread_cleanup_push_defer F
GLIBC_2.4 accept F
-GLIBC_2.4 close F
GLIBC_2.4 connect F
GLIBC_2.4 fcntl F
GLIBC_2.4 flockfile F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
index f600b137db..fb29a18798 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
@@ -36,7 +36,6 @@ GLIBC_2.31 pthread_clockjoin_np F
GLIBC_2.4 _IO_flockfile F
GLIBC_2.4 _IO_ftrylockfile F
GLIBC_2.4 _IO_funlockfile F
-GLIBC_2.4 __close F
GLIBC_2.4 __connect F
GLIBC_2.4 __errno_location F
GLIBC_2.4 __fcntl F
@@ -82,7 +81,6 @@ GLIBC_2.4 _pthread_cleanup_pop_restore F
GLIBC_2.4 _pthread_cleanup_push F
GLIBC_2.4 _pthread_cleanup_push_defer F
GLIBC_2.4 accept F
-GLIBC_2.4 close F
GLIBC_2.4 connect F
GLIBC_2.4 fcntl F
GLIBC_2.4 flockfile F
diff --git a/sysdeps/unix/sysv/linux/csky/libpthread.abilist b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
index 8cc0dc4114..e87e1993f8 100644
--- a/sysdeps/unix/sysv/linux/csky/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.29 _IO_flockfile F
GLIBC_2.29 _IO_ftrylockfile F
GLIBC_2.29 _IO_funlockfile F
-GLIBC_2.29 __close F
GLIBC_2.29 __connect F
GLIBC_2.29 __errno_location F
GLIBC_2.29 __h_errno_location F
@@ -47,7 +46,6 @@ GLIBC_2.29 _pthread_cleanup_push F
GLIBC_2.29 _pthread_cleanup_push_defer F
GLIBC_2.29 accept F
GLIBC_2.29 call_once F
-GLIBC_2.29 close F
GLIBC_2.29 cnd_broadcast F
GLIBC_2.29 cnd_destroy F
GLIBC_2.29 cnd_init F
diff --git a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
index 3ed9d8fb33..fe40905778 100644
--- a/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libpthread.abilist
@@ -9,7 +9,6 @@ GLIBC_2.18 pthread_setattr_default_np F
GLIBC_2.2 _IO_flockfile F
GLIBC_2.2 _IO_ftrylockfile F
GLIBC_2.2 _IO_funlockfile F
-GLIBC_2.2 __close F
GLIBC_2.2 __connect F
GLIBC_2.2 __errno_location F
GLIBC_2.2 __fcntl F
@@ -49,7 +48,6 @@ GLIBC_2.2 _pthread_cleanup_pop_restore F
GLIBC_2.2 _pthread_cleanup_push F
GLIBC_2.2 _pthread_cleanup_push_defer F
GLIBC_2.2 accept F
-GLIBC_2.2 close F
GLIBC_2.2 connect F
GLIBC_2.2 fcntl F
GLIBC_2.2 flockfile F
diff --git a/sysdeps/unix/sysv/linux/i386/libpthread.abilist b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
index bc37af11c6..ece37c69b2 100644
--- a/sysdeps/unix/sysv/linux/i386/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.0 _IO_flockfile F
GLIBC_2.0 _IO_ftrylockfile F
GLIBC_2.0 _IO_funlockfile F
-GLIBC_2.0 __close F
GLIBC_2.0 __connect F
GLIBC_2.0 __errno_location F
GLIBC_2.0 __fcntl F
@@ -27,7 +26,6 @@ GLIBC_2.0 _pthread_cleanup_pop_restore F
GLIBC_2.0 _pthread_cleanup_push F
GLIBC_2.0 _pthread_cleanup_push_defer F
GLIBC_2.0 accept F
-GLIBC_2.0 close F
GLIBC_2.0 connect F
GLIBC_2.0 fcntl F
GLIBC_2.0 flockfile F
diff --git a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
index c27373bb17..e317287356 100644
--- a/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libpthread.abilist
@@ -9,7 +9,6 @@ GLIBC_2.18 pthread_setattr_default_np F
GLIBC_2.2 _IO_flockfile F
GLIBC_2.2 _IO_ftrylockfile F
GLIBC_2.2 _IO_funlockfile F
-GLIBC_2.2 __close F
GLIBC_2.2 __connect F
GLIBC_2.2 __errno_location F
GLIBC_2.2 __fcntl F
@@ -49,7 +48,6 @@ GLIBC_2.2 _pthread_cleanup_pop_restore F
GLIBC_2.2 _pthread_cleanup_push F
GLIBC_2.2 _pthread_cleanup_push_defer F
GLIBC_2.2 accept F
-GLIBC_2.2 close F
GLIBC_2.2 connect F
GLIBC_2.2 fcntl F
GLIBC_2.2 flockfile F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
index f600b137db..fb29a18798 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
@@ -36,7 +36,6 @@ GLIBC_2.31 pthread_clockjoin_np F
GLIBC_2.4 _IO_flockfile F
GLIBC_2.4 _IO_ftrylockfile F
GLIBC_2.4 _IO_funlockfile F
-GLIBC_2.4 __close F
GLIBC_2.4 __connect F
GLIBC_2.4 __errno_location F
GLIBC_2.4 __fcntl F
@@ -82,7 +81,6 @@ GLIBC_2.4 _pthread_cleanup_pop_restore F
GLIBC_2.4 _pthread_cleanup_push F
GLIBC_2.4 _pthread_cleanup_push_defer F
GLIBC_2.4 accept F
-GLIBC_2.4 close F
GLIBC_2.4 connect F
GLIBC_2.4 fcntl F
GLIBC_2.4 flockfile F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
index bc37af11c6..ece37c69b2 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.0 _IO_flockfile F
GLIBC_2.0 _IO_ftrylockfile F
GLIBC_2.0 _IO_funlockfile F
-GLIBC_2.0 __close F
GLIBC_2.0 __connect F
GLIBC_2.0 __errno_location F
GLIBC_2.0 __fcntl F
@@ -27,7 +26,6 @@ GLIBC_2.0 _pthread_cleanup_pop_restore F
GLIBC_2.0 _pthread_cleanup_push F
GLIBC_2.0 _pthread_cleanup_push_defer F
GLIBC_2.0 accept F
-GLIBC_2.0 close F
GLIBC_2.0 connect F
GLIBC_2.0 fcntl F
GLIBC_2.0 flockfile F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
index 9c017da1b3..6e98b15fb2 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.18 _IO_flockfile F
GLIBC_2.18 _IO_ftrylockfile F
GLIBC_2.18 _IO_funlockfile F
-GLIBC_2.18 __close F
GLIBC_2.18 __connect F
GLIBC_2.18 __errno_location F
GLIBC_2.18 __fcntl F
@@ -47,7 +46,6 @@ GLIBC_2.18 _pthread_cleanup_pop_restore F
GLIBC_2.18 _pthread_cleanup_push F
GLIBC_2.18 _pthread_cleanup_push_defer F
GLIBC_2.18 accept F
-GLIBC_2.18 close F
GLIBC_2.18 connect F
GLIBC_2.18 fcntl F
GLIBC_2.18 flockfile F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
index 9c017da1b3..6e98b15fb2 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.18 _IO_flockfile F
GLIBC_2.18 _IO_ftrylockfile F
GLIBC_2.18 _IO_funlockfile F
-GLIBC_2.18 __close F
GLIBC_2.18 __connect F
GLIBC_2.18 __errno_location F
GLIBC_2.18 __fcntl F
@@ -47,7 +46,6 @@ GLIBC_2.18 _pthread_cleanup_pop_restore F
GLIBC_2.18 _pthread_cleanup_push F
GLIBC_2.18 _pthread_cleanup_push_defer F
GLIBC_2.18 accept F
-GLIBC_2.18 close F
GLIBC_2.18 connect F
GLIBC_2.18 fcntl F
GLIBC_2.18 flockfile F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
index e947d46def..3d89ba01df 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.0 _IO_flockfile F
GLIBC_2.0 _IO_ftrylockfile F
GLIBC_2.0 _IO_funlockfile F
-GLIBC_2.0 __close F
GLIBC_2.0 __connect F
GLIBC_2.0 __errno_location F
GLIBC_2.0 __fcntl F
@@ -27,7 +26,6 @@ GLIBC_2.0 _pthread_cleanup_pop_restore F
GLIBC_2.0 _pthread_cleanup_push F
GLIBC_2.0 _pthread_cleanup_push_defer F
GLIBC_2.0 accept F
-GLIBC_2.0 close F
GLIBC_2.0 connect F
GLIBC_2.0 fcntl F
GLIBC_2.0 flockfile F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
index e947d46def..3d89ba01df 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
@@ -1,7 +1,6 @@
GLIBC_2.0 _IO_flockfile F
GLIBC_2.0 _IO_ftrylockfile F
GLIBC_2.0 _IO_funlockfile F
-GLIBC_2.0 __close F
GLIBC_2.0 __connect F
GLIBC_2.0 __errno_location F
GLIBC_2.0 __fcntl F
@@ -27,7 +26,6 @@ GLIBC_2.0 _pthread_cleanup_pop_restore F
GLIBC_2.0 _pthread_cleanup_push F