summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/fpu/bits/mathdef.h4
-rw-r--r--sysdeps/generic/_strerror.c28
-rw-r--r--sysdeps/i386/bits/string.h39
-rw-r--r--sysdeps/i386/i486/bits/string.h12
-rw-r--r--sysdeps/unix/sysv/linux/accept.S3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list16
-rw-r--r--sysdeps/unix/sysv/linux/arm/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/connect.S3
-rw-r--r--sysdeps/unix/sysv/linux/i386/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/m68k/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/mips/syscalls.list16
-rw-r--r--sysdeps/unix/sysv/linux/net/if.h18
-rw-r--r--sysdeps/unix/sysv/linux/netinet/ip_fw.h23
-rw-r--r--sysdeps/unix/sysv/linux/recv.S3
-rw-r--r--sysdeps/unix/sysv/linux/recvfrom.S3
-rw-r--r--sysdeps/unix/sysv/linux/recvmsg.S3
-rw-r--r--sysdeps/unix/sysv/linux/send.S3
-rw-r--r--sysdeps/unix/sysv/linux/sendmsg.S3
-rw-r--r--sysdeps/unix/sysv/linux/sendto.S3
-rw-r--r--sysdeps/unix/sysv/linux/siglist.c4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list16
22 files changed, 162 insertions, 86 deletions
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 1c259403f5..2ff626d089 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -63,5 +63,9 @@ typedef double double_t;
#endif
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+#define FP_ILOGB0 0x80000001
+#define FP_ILOGBNAN 0x7fffffff
+
/* Number of decimal digits for the `double' type. */
#define DECIMAL_DIG 15
diff --git a/sysdeps/generic/_strerror.c b/sysdeps/generic/_strerror.c
index bcba45d519..e6f56556aa 100644
--- a/sysdeps/generic/_strerror.c
+++ b/sysdeps/generic/_strerror.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 95, 96, 97, 98 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
@@ -19,7 +19,8 @@
#include <libintl.h>
#include <stdio.h>
#include <string.h>
-#include "../stdio-common/_itoa.h"
+#include <sys/param.h>
+#include <stdio-common/_itoa.h>
#ifndef HAVE_GNU_LD
#define _sys_errlist sys_errlist
@@ -41,12 +42,27 @@ _strerror_internal (int errnum, char *buf, size_t buflen)
{
if (errnum < 0 || errnum >= _sys_nerr)
{
+ /* Buffer we use to print the number in. For a maximum size for
+ `int' of 8 bytes we never need more than 20 digits. */
+ char numbuf[21];
const char *unk = _("Unknown error ");
const size_t unklen = strlen (unk);
- char *p = buf + buflen;
- *--p = '\0';
- p = _itoa_word (errnum, p, 10, 0);
- return memcpy (p - unklen, unk, unklen);
+ char *p, *q;
+
+ numbuf[20] = '\0';
+ p = _itoa_word (errnum, &numbuf[20], 10, 0);
+
+ /* Now construct the result while taking care for the destination
+ buffer size. */
+ q = __mempcpy (buf, unk, MIN (unklen, buflen));
+ if (unklen < buflen)
+ __stpncpy (q, p, buflen - unklen);
+
+ /* Terminate the string in any case. */
+ if (buflen > 0)
+ buf[buflen - 1] = '\0';
+
+ return buf;
}
return (char *) _(_sys_errlist[errnum]);
diff --git a/sysdeps/i386/bits/string.h b/sysdeps/i386/bits/string.h
index c6deb2b6a4..c424306bcd 100644
--- a/sysdeps/i386/bits/string.h
+++ b/sysdeps/i386/bits/string.h
@@ -1,5 +1,5 @@
/* Optimized, inlined string functions. i386 version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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
@@ -38,6 +38,7 @@
/* Copy N bytes of SRC to DEST. */
+#define _HAVE_STRING_ARCH_memcpy 1
#define memcpy(dest, src, n) \
(__extension__ (__builtin_constant_p (n) \
? __memcpy_c (dest, src, n) \
@@ -132,6 +133,7 @@ __memcpy_c (void *__dest, __const void *__src, size_t __n)
/* Copy N bytes of SRC to DEST, guaranteeing
correct behavior for overlapping strings. */
+#define _HAVE_STRING_ARCH_memmove 1
__STRING_INLINE void *
memmove (void *__dest, __const void *__src, size_t __n)
{
@@ -158,6 +160,7 @@ memmove (void *__dest, __const void *__src, size_t __n)
/* Set N bytes of S to C. */
+#define _HAVE_STRING_ARCH_memset 1
#define memset(s, c, n) \
(__extension__ (__builtin_constant_p (c) \
? (__builtin_constant_p (n) \
@@ -249,27 +252,7 @@ __memset_gg (void *__s, char __c, size_t __n)
/* Search N bytes of S for C. */
-__STRING_INLINE void *
-memchr (__const void *__s, int __c, size_t __n)
-{
- register void *__res;
- if (count == 0)
- return NULL;
- __asm__ __volatile__
- ("cld\n\t"
- "repne; scasb\n\t"
- "je 1f\n\t"
- "movl $1,%0\n"
- "1:\n\t"
- "decl %0"
- : "=D" (__res)
- : "a" (__c), "D" (__s), "c" (__n)
- : "cx", "cc");
- return __res;
-}
-
-
-/* Search N bytes of S for C. */
+#define _HAVE_STRING_ARCH_memchr 1
__STRING_INLINE void *
memchr (__const void *__s, int __c, size_t __n)
{
@@ -291,6 +274,7 @@ memchr (__const void *__s, int __c, size_t __n)
/* Return the length of S. */
+#define _HAVE_STRING_ARCH_strlen 1
__STRING_INLINE size_t
strlen (__const char *__str)
{
@@ -307,6 +291,7 @@ strlen (__const char *__str)
/* Copy SRC to DEST. */
+#define _HAVE_STRING_ARCH_strcpy 1
__STRING_INLINE char *
strcpy (char *__dest, __const char *__src)
{
@@ -325,6 +310,7 @@ strcpy (char *__dest, __const char *__src)
/* Copy no more than N characters of SRC to DEST. */
+#define _HAVE_STRING_ARCH_strncpy 1
__STRING_INLINE char *
strncpy (char *__dest, __const char *__src, size_t __n)
{
@@ -347,6 +333,7 @@ strncpy (char *__dest, __const char *__src, size_t __n)
/* Append SRC onto DEST. */
+#define _HAVE_STRING_ARCH_strcat 1
__STRING_INLINE char *
strcat (char *__dest, __const char *__src)
{
@@ -367,6 +354,7 @@ strcat (char *__dest, __const char *__src)
/* Append no more than N characters from SRC onto DEST. */
+#define _HAVE_STRING_ARCH_strncat 1
__STRING_INLINE char *
strncat (char *__dest, __const char *__src, size_t __n)
{
@@ -393,6 +381,7 @@ strncat (char *__dest, __const char *__src, size_t __n)
/* Compare S1 and S2. */
+#define _HAVE_STRING_ARCH_strcmp 1
__STRING_INLINE int
strcmp (__const char *__s1, __const char *__s2)
{
@@ -419,6 +408,7 @@ strcmp (__const char *__s1, __const char *__s2)
/* Compare N characters of S1 and S2. */
+#define _HAVE_STRING_ARCH_strncmp 1
__STRING_INLINE int
strncmp (__const char *__s1, __const char *__s2, size_t __n)
{
@@ -448,6 +438,7 @@ strncmp (__const char *__s1, __const char *__s2, size_t __n)
/* Find the first occurrence of C in S. */
+#define _HAVE_STRING_ARCH_strchr 1
#define strchr(s, c) \
(__extension__ (__builtin_constant_p (c) \
? __strchr_c (s, ((c) & 0xff) << 8) \
@@ -499,6 +490,7 @@ __strchr_c (__const char *__s, int __c)
/* Return the length of the initial segment of S which
consists entirely of characters not in REJECT. */
+#define _HAVE_STRING_ARCH_strcspn 1
#ifdef __PIC__
__STRING_INLINE size_t
strcspn (__const char *__s, __const char *__reject)
@@ -558,6 +550,7 @@ strcspn (__const char *__s, __const char *__reject)
/* Return the length of the initial segment of S which
consists entirely of characters in ACCEPT. */
+#define _HAVE_STRING_ARCH_strspn 1
#ifdef __PIC__
__STRING_INLINE size_t
strspn (__const char *__s, __const char *__accept)
@@ -616,6 +609,7 @@ strspn (__const char *__s, __const char *__accept)
/* Find the first occurrence in S of any character in ACCEPT. */
+#define _HAVE_STRING_ARCH_strpbrk 1
#ifdef __PIC__
__STRING_INLINE char *
strpbrk (__const char *__s, __const char *__accept)
@@ -682,6 +676,7 @@ strpbrk (__const char *__s, __const char *__accept)
/* Find the first occurrence of NEEDLE in HAYSTACK. */
+#define _HAVE_STRING_ARCH_strstr 1
#ifdef __PIC__
__STRING_INLINE char *
strstr (__const char *__haystack, __const char *__needle)
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 210bf7f745..aaa636a56d 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -1,5 +1,5 @@
/* Optimized, inlined string functions. i486 version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 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
@@ -373,7 +373,7 @@ __strlen_g (__const char *__str)
: (char *) memcpy (dest, src, strlen (src) + 1)) \
: __strcpy_g (dest, src)))
-# define __strcpy_small(dest, src, srclen) \
+#define __strcpy_small(dest, src, srclen) \
(__extension__ ({ unsigned char *__dest = (unsigned char *) (dest); \
switch (srclen) \
{ \
@@ -1006,11 +1006,11 @@ __strrchr_c (__const char *__s, int __c)
"1:\n\t"
"lodsb\n\t"
"cmpb %%ah,%%al\n\t"
- "cmovne %%esi,%0\n\t"
+ "cmove %%esi,%0\n\t"
"testb %%al,%%al\n\t"
"jne 1b"
: "=d" (__res)
- : "0" (1), "S" (__s),"a" (__c)
+ : "0" (1), "S" (__s), "a" (__c)
: "ax", "si", "cc");
return __res - 1;
}
@@ -1025,11 +1025,11 @@ __strrchr_g (__const char *__s, int __c)
"1:\n\t"
"lodsb\n\t"
"cmpb %%ah,%%al\n\t"
- "cmovne %%esi,%0\n\t"
+ "cmove %%esi,%0\n\t"
"testb %%al,%%al\n\t"
"jne 1b"
: "=r" (__res)
- : "0" (1), "S" (__s),"a" (__c)
+ : "0" (1), "S" (__s), "a" (__c)
: "ax", "si", "cc");
return __res - 1;
}
diff --git a/sysdeps/unix/sysv/linux/accept.S b/sysdeps/unix/sysv/linux/accept.S
index b713a6e267..196634d46a 100644
--- a/sysdeps/unix/sysv/linux/accept.S
+++ b/sysdeps/unix/sysv/linux/accept.S
@@ -1,4 +1,5 @@
#define socket accept
+#define __socket __libc_accept
#define NARGS 3
#include <socket.S>
-strong_alias (__accept, __libc_accept)
+weak_alias (__libc_accept, __accept)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9406892124..17c55f0991 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,20 +36,20 @@ sys_mknod xmknod mknod 3 __syscall_mknod
# override select.S in parent directory:
select - select 5 __select select
-accept - accept 3 __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 4d877e51d5..1940061dda 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Do the system call trap. */
swi SYS_ify(socketcall)
@@ -44,6 +48,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/connect.S b/sysdeps/unix/sysv/linux/connect.S
index 2840c58174..d1dd69a217 100644
--- a/sysdeps/unix/sysv/linux/connect.S
+++ b/sysdeps/unix/sysv/linux/connect.S
@@ -1,4 +1,5 @@
#define socket connect
+#define __socket __libc_connect
#define NARGS 3
#include <socket.S>
-strong_alias (__connect, __libc_connect)
+weak_alias (__libc_connect, __connect)
diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S
index 7c539e17d2..f649470122 100644
--- a/sysdeps/unix/sysv/linux/i386/socket.S
+++ b/sysdeps/unix/sysv/linux/i386/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Save registers. */
movl %ebx, %edx
@@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
ret
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 51aaa4b6f9..81e5a213dd 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Save registers. */
move.l %d2, %a0
@@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
rts
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 6dd9cd81c5..1c9c095ed3 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -16,19 +16,19 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept 3 __accept accept
+ccept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
diff --git a/sysdeps/unix/sysv/linux/net/if.h b/sysdeps/unix/sysv/linux/net/if.h
index 468fed23e6..dd33af0337 100644
--- a/sysdeps/unix/sysv/linux/net/if.h
+++ b/sysdeps/unix/sysv/linux/net/if.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
@@ -28,24 +28,40 @@
enum
{
IFF_UP = 0x1, /* Interface is up. */
+#define IFF_UP IFF_UP
IFF_BROADCAST = 0x2, /* Broadcast address valid. */
+#define IFF_BROADCAST IFF_BROADCAST
IFF_DEBUG = 0x4, /* Turn on debugging. */
+#define IFF_DEBUG IFF_DEBUG
IFF_LOOPBACK = 0x8, /* Is a loopback net. */
+#define IFF_LOOPBACK IFF_LOOPBACK
IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */
+#define IFF_POINTOPOINT IFF_POINTOPOINT
IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */
+#define IFF_NOTRAILERS IFF_NOTRAILERS
IFF_RUNNING = 0x40, /* Resources allocated. */
+#define IFF_RUNNING IFF_RUNNING
IFF_NOARP = 0x80, /* No address resolution protocol. */
+#define IFF_NOARP IFF_NOARP
IFF_PROMISC = 0x100, /* Receive all packets. */
+#define IFF_PROMISC IFF_PROMISC
+
/* Not supported */
IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */
+#define IFF_ALLMULTI IFF_ALLMULTI
IFF_MASTER = 0x400, /* Master of a load balancer. */
+#define IFF_MASTER IFF_MASTER
IFF_SLAVE = 0x800, /* Slave of a load balancer. */
+#define IFF_SLAVE IFF_SLAVE
IFF_MULTICAST = 0x1000, /* Supports multicast. */
+#define IFF_MULTICAST IFF_MULTICAST
IFF_PORTSEL = 0x2000, /* Can set media type. */
+#define IFF_PORTSEL IFF_PORTSEL
IFF_AUTOMEDIA = 0x4000 /* Auto media select active. */
+#define IFF_AUTOMEDIA IFF_AUTOMEDIA
};
/* The ifaddr structure contains information about one address of an
diff --git a/sysdeps/unix/sysv/linux/netinet/ip_fw.h b/sysdeps/unix/sysv/linux/netinet/ip_fw.h
index 322467b5ff..2139c37ba7 100644
--- a/sysdeps/unix/sysv/linux/netinet/ip_fw.h
+++ b/sysdeps/unix/sysv/linux/netinet/ip_fw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 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
@@ -125,6 +125,7 @@ struct ip_fw {
#define IP_FW_OUT 2
#define IP_FW_ACCT 3
#define IP_FW_CHAINS 4 /* total number of ip_fw chains */
+#define IP_FW_MASQ 5
#define IP_FW_INSERT (IP_FW_BASE_CTL)
#define IP_FW_APPEND (IP_FW_BASE_CTL+1)
@@ -165,6 +166,11 @@ struct ip_fw {
#define IP_ACCT_FLUSH (IP_FW_FLUSH | (IP_FW_ACCT << IP_FW_SHIFT))
#define IP_ACCT_ZERO (IP_FW_ZERO | (IP_FW_ACCT << IP_FW_SHIFT))
+#define IP_FW_MASQ_INSERT (IP_FW_INSERT | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_ADD (IP_FW_APPEND | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_DEL (IP_FW_DELETE | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_FLUSH (IP_FW_FLUSH | (IP_FW_MASQ << IP_FW_SHIFT))
+
struct ip_fwpkt
{
struct iphdr fwp_iph; /* IP header */
@@ -177,6 +183,21 @@ struct ip_fwpkt
char fwp_vianame[IFNAMSIZ]; /* interface name */
};
+#define IP_FW_MASQCTL_MAX 256
+#define IP_MASQ_MOD_NMAX 32
+
+struct ip_fw_masqctl
+{
+ int mctl_action;
+ union {
+ struct {
+ char name[IP_MASQ_MOD_NMAX];
+ char data[1];
+ } mod;
+ } u;
+};
+
+
/*
* timeouts for ip masquerading
*/
diff --git a/sysdeps/unix/sysv/linux/recv.S b/sysdeps/unix/sysv/linux/recv.S
index d895080f9a..cb9eb91b8c 100644
--- a/sysdeps/unix/sysv/linux/recv.S
+++ b/sysdeps/unix/sysv/linux/recv.S
@@ -1,4 +1,5 @@
#define socket recv
+#define __socket __libc_recv
#define NARGS 4
#include <socket.S>
-strong_alias (__recv, __libc_recv)
+weak_alias (__libc_recv, __recv)
diff --git a/sysdeps/unix/sysv/linux/recvfrom.S b/sysdeps/unix/sysv/linux/recvfrom.S
index a2c94a71bc..93a3110d0a 100644
--- a/sysdeps/unix/sysv/linux/recvfrom.S
+++ b/sysdeps/unix/sysv/linux/recvfrom.S
@@ -1,4 +1,5 @@
#define socket recvfrom
+#define __socket __libc_recvfrom
#define NARGS 6
#include <socket.S>
-strong_alias (__recvfrom, __libc_recvfrom)
+weak_alias (__libc_recvfrom, __recvfrom)
diff --git a/sysdeps/unix/sysv/linux/recvmsg.S b/sysdeps/unix/sysv/linux/recvmsg.S
index e5d8cdd16a..98be36be5b 100644
--- a/sysdeps/unix/sysv/linux/recvmsg.S
+++ b/sysdeps/unix/sysv/linux/recvmsg.S
@@ -1,4 +1,5 @@
#define socket recvmsg
+#define __socket __libc_recvmsg
#define NARGS 3
#include <socket.S>
-strong_alias (__recvmsg, __libc_recvmsg)
+weak_alias (__libc_recvmsg, __recvmsg)
diff --git a/sysdeps/unix/sysv/linux/send.S b/sysdeps/unix/sysv/linux/send.S
index 5191265f62..3f5e00ce9e 100644
--- a/sysdeps/unix/sysv/linux/send.S
+++ b/sysdeps/unix/sysv/linux/send.S
@@ -1,4 +1,5 @@
#define socket send
+#define __socket __libc_send
#define NARGS 4
#include <socket.S>
-strong_alias (__send, __libc_send)
+weak_alias (__libc_send, __send)
diff --git a/sysdeps/unix/sysv/linux/sendmsg.S b/sysdeps/unix/sysv/linux/sendmsg.S
index 6f511af1c7..c01d9b68e7 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.S
+++ b/sysdeps/unix/sysv/linux/sendmsg.S
@@ -1,4 +1,5 @@
#define socket sendmsg
+#define __socket __libc_sendmsg
#define NARGS 3
#include <socket.S>
-strong_alias (__sendmsg, __libc_sendmsg)
+weak_alias (__libc_sendmsg, __sendmsg)
diff --git a/sysdeps/unix/sysv/linux/sendto.S b/sysdeps/unix/sysv/linux/sendto.S
index b34a609a93..8717b2bac1 100644
--- a/sysdeps/unix/sysv/linux/sendto.S
+++ b/sysdeps/unix/sysv/linux/sendto.S
@@ -1,4 +1,5 @@
#define socket sendto
+#define __socket __libc_sendto
#define NARGS 6
#include <socket.S>
-strong_alias (__sendto, __libc_sendto)
+weak_alias (__libc_sendto, __sendto)
diff --git a/sysdeps/unix/sysv/linux/siglist.c b/sysdeps/unix/sysv/linux/siglist.c
index 6bb8562899..43b229fc95 100644
--- a/sysdeps/unix/sysv/linux/siglist.c
+++ b/sysdeps/unix/sysv/linux/siglist.c
@@ -1,14 +1,14 @@
#include <stddef.h>
#include <signal.h>
-const char * const __new_sys_siglist[NSIG] =
+const char * const __new_sys_siglist[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] desc,
#include "siglist.h"
#undef init_sig
};
-const char * const __new_sys_sigabbrev[NSIG] =
+const char * const __new_sys_sigabbrev[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] abbrev,
#include "siglist.h"
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
index 4c65ac7f3c..8d6fd77c10 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
@@ -39,8 +39,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Drop up to 6 arguments (recvfrom) into the memory allocated by
the caller for varargs, since that's really what we have. */
@@ -71,6 +75,6 @@ ENTRY (P(__,socket))
1: SYSCALL_ERROR_HANDLER
-END (P(__,socket))
+END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index ca142da29c..3f62a7cd53 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -14,19 +14,19 @@ mmap - mmap 6 __mmap mmap __mmap64 mmap64
# Override select.S in parent directory:
select - select 5 __select select
-accept - accept 3 __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair