]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove use of INTDEF/INTUSE in socket
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 29 May 2012 20:40:00 +0000 (22:40 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Wed, 30 May 2012 22:34:41 +0000 (00:34 +0200)
ChangeLog
include/sys/socket.h
socket/connect.c
sysdeps/mach/hurd/connect.c
sysdeps/unix/inet/syscalls.list
sysdeps/unix/sysv/linux/connect.S
sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
sysdeps/unix/sysv/linux/sa_len.c
sysdeps/unix/sysv/linux/x86_64/syscalls.list

index 735aba5d82584e76e23c0c751baeb7640daf8dd3..150b5926bde1d7925343c6ca70b6a21b1d52d0d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
+
+       [BZ #14132]
+       * include/sys/socket.h (__connect_internal)
+       (__libc_sa_len_internal): Remove declaration.
+       (__connect, __libc_sa_len): Declare hidden_proto.
+       (SA_LEN): Remove use of INTUSE.
+       * socket/connect.c: Add libc_hidden_def.
+       * sysdeps/mach/hurd/connect.c: Replace INTDEF by libc_hidden_def.
+       * sysdeps/unix/sysv/linux/sa_len.c: Likewise.
+       * sysdeps/unix/inet/syscalls.list: Remove __connect_internal
+       alias.
+       * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
+       * sysdeps/unix/sysv/linux/connect.S: Use libc_hidden_weak instead
+       of adding _internal alias.
+
 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #14117]
index eac82136ddcfa3daca7f2aa9a4a91af5a0757e20..e356b75b991b8045e6dbed442ef2492409857bee 100644 (file)
@@ -57,8 +57,7 @@ extern ssize_t __libc_recvfrom (int __fd, void *__restrict __buf, size_t __n,
 extern int __libc_connect (int __fd, __CONST_SOCKADDR_ARG __addr,
                           socklen_t __len);
 extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
-extern int __connect_internal (int __fd, __CONST_SOCKADDR_ARG __addr,
-                              socklen_t __len) attribute_hidden;
+libc_hidden_proto (__connect)
 
 /* Read N bytes into BUF from socket FD.
    Returns the number read or -1 for errors.
@@ -144,17 +143,8 @@ extern int __libc_accept4 (int __fd, __SOCKADDR_ARG __addr,
 # define SA_LEN(_x)      (_x)->sa_len
 #else
 extern int __libc_sa_len (sa_family_t __af);
-extern int __libc_sa_len_internal (sa_family_t __af) attribute_hidden;
-# ifndef NOT_IN_libc
-#  define SA_LEN(_x)      INTUSE(__libc_sa_len)((_x)->sa_family)
-# else
-#  define SA_LEN(_x)      __libc_sa_len((_x)->sa_family)
-# endif
-#endif
-
-
-#ifndef NOT_IN_libc
-# define __connect(fd, addr, len) INTUSE(__connect) (fd, addr, len)
+libc_hidden_proto (__libc_sa_len)
+# define SA_LEN(_x)      __libc_sa_len((_x)->sa_family)
 #endif
 
 #ifdef SOCK_CLOEXEC
index 063a8c94a37730fe8d38affa8d92cf21a82c5cae..79f5cd82b77234dfb409fee0f92339fe7b00f3d1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 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
@@ -32,6 +32,7 @@ __connect (fd, addr, len)
   return -1;
 }
 weak_alias (__connect, connect)
+libc_hidden_def (__connect)
 
 stub_warning (connect)
 #include <stub-tag.h>
index 92d3e4c9ccba8476e7bb42efb37bcc642decc1c1..b5c57ccbe238180c9a5298a27517c24a1cf923a6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,94,95,96,97,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 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
@@ -23,8 +23,6 @@
 #include <sys/un.h>
 #include <hurd/ifsock.h>
 
-#undef __connect
-
 /* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
    For connectionless socket types, just set the default address to send to
    and the only address from which to accept transmissions.
@@ -73,5 +71,5 @@ __connect (int fd, __CONST_SOCKADDR_ARG addrarg, socklen_t len)
   return err ? __hurd_dfail (fd, err) : 0;
 }
 
-INTDEF(__connect)
+libc_hidden_def (__connect)
 weak_alias (__connect, connect)
index df2f34eea28f4ea034e48c7655085aa58661f318..aafafd1df74c79e39d1dbf5a4610e281f268ec76 100644 (file)
@@ -2,7 +2,7 @@
 
 accept         -       accept          Ci:iBN  __libc_accept   accept
 bind           -       bind            i:ipi   __bind          bind
-connect                -       connect         Ci:ipi  __libc_connect  __connect __connect_internal connect
+connect                -       connect         Ci:ipi  __libc_connect  __connect connect
 gethostid      -       gethostid       i:      gethostid
 gethostname    -       gethostname     i:bn    __gethostname   gethostname
 getpeername    -       getpeername     i:ibN   __getpeername   getpeername
index 7d1fa12b34a2b810e5519df0fd64a57921b87871..21fc4a64c9f81be103d3ac5abbe3e9677e01ee6a 100644 (file)
@@ -3,5 +3,5 @@
 #define        NARGS   3
 #define NEED_CANCELLATION
 #include <socket.S>
-strong_alias (__libc_connect, __connect_internal)
 weak_alias (__libc_connect, __connect)
+libc_hidden_weak (__connect)
index 791ab9ba52117093c7a7841174b404d3acb62b3a..b826c5d074a884880170077036d436886e8ac25c 100644 (file)
@@ -18,7 +18,7 @@ semctl                -       semctl          i:iiii  __semctl        semctl
 # proper socket implementations:
 accept         -       accept          Ci:iBN  __libc_accept   __accept accept
 bind           -       bind            i:ipi   __bind          bind
-connect                -       connect         Ci:ipi  __libc_connect  __connect_internal __connect connect
+connect                -       connect         Ci:ipi  __libc_connect  __connect connect
 getpeername    -       getpeername     i:ipp   __getpeername   getpeername
 getsockname    -       getsockname     i:ipp   __getsockname   getsockname
 getsockopt     -       getsockopt      i:iiiBN __getsockopt    getsockopt
index fdd721018f243fdb5363c9b52e3cf7ec51ab5f63..9ff87dc6fb9b3e340d07436db73ea2d826d65d81 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 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
@@ -60,4 +60,4 @@ __libc_sa_len (sa_family_t af)
     }
   return 0;
 }
-INTDEF(__libc_sa_len)
+libc_hidden_def (__libc_sa_len)
index ccddb8422999ea2e03067f5dd94e723f7fcff38f..2e4135f50a50ce65aad2acb90c79ee7905b838a4 100644 (file)
@@ -20,7 +20,7 @@ syscall_clock_gettime EXTRA   clock_gettime   Ei:ip           __syscall_clock_gettime
 # proper socket implementations:
 accept         -       accept          Ci:iBN  __libc_accept   __accept accept
 bind           -       bind            i:ipi   __bind          bind
-connect                -       connect         Ci:ipi  __libc_connect  __connect_internal __connect connect
+connect                -       connect         Ci:ipi  __libc_connect  __connect connect
 getpeername    -       getpeername     i:ipp   __getpeername   getpeername
 getsockname    -       getsockname     i:ipp   __getsockname   getsockname
 getsockopt     -       getsockopt      i:iiiBN __getsockopt    getsockopt