+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]
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.
# 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
-/* 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
return -1;
}
weak_alias (__connect, connect)
+libc_hidden_def (__connect)
stub_warning (connect)
#include <stub-tag.h>
-/* 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
#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.
return err ? __hurd_dfail (fd, err) : 0;
}
-INTDEF(__connect)
+libc_hidden_def (__connect)
weak_alias (__connect, connect)
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
#define NARGS 3
#define NEED_CANCELLATION
#include <socket.S>
-strong_alias (__libc_connect, __connect_internal)
weak_alias (__libc_connect, __connect)
+libc_hidden_weak (__connect)
# 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
-/* 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
}
return 0;
}
-INTDEF(__libc_sa_len)
+libc_hidden_def (__libc_sa_len)
# 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