aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/elf/start.S (renamed from sysdeps/unix/sysv/linux/alpha/start.S)5
-rw-r--r--sysdeps/generic/ustatbits.h26
-rw-r--r--sysdeps/mach/hurd/errnos.awk8
-rw-r--r--sysdeps/mach/hurd/errnos.h22
-rw-r--r--sysdeps/unix/alpha/sysdep.S8
-rw-r--r--sysdeps/unix/sysv/linux/netinet/in.h98
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/ustatbits.h2
8 files changed, 64 insertions, 108 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/alpha/elf/start.S
index bffa913538..c534d6987b 100644
--- a/sysdeps/unix/sysv/linux/alpha/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,6 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson <rth@tamu.edu>
+/* Startup code for Alpha/ELF.
+Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+Contributed by Richard Henderson <rth@tamu.edu>
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
diff --git a/sysdeps/generic/ustatbits.h b/sysdeps/generic/ustatbits.h
new file mode 100644
index 0000000000..57bebdc66f
--- /dev/null
+++ b/sysdeps/generic/ustatbits.h
@@ -0,0 +1,26 @@
+/* Generic declaration of ustat structure.
+Copyright (C) 1994 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 Library General Public License as
+published by the Free Software Foundation; either version 2 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+struct ustat
+{
+ daddr_t f_tfree; /* total free */
+ ino_t f_tinode; /* total inodes free */
+ char f_fname[6]; /* filesystem name */
+ char f_fpack[6]; /* filesystem pack name */
+};
diff --git a/sysdeps/mach/hurd/errnos.awk b/sysdeps/mach/hurd/errnos.awk
index 5c88d11210..100e4b1114 100644
--- a/sysdeps/mach/hurd/errnos.awk
+++ b/sysdeps/mach/hurd/errnos.awk
@@ -54,15 +54,15 @@ errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" \
{ ++errnoh; e = $4; next; }
errnoh == 3 && $1 == "@comment" && $2 == "errno" {
- errno = $3 + 0;
- if (errno == 0)
- next;
- if (errno > maxerrno) maxerrno = errno;
if (e == "EWOULDBLOCK")
{
print "#define EWOULDBLOCK EAGAIN /* Operation would block */";
next;
}
+ errno = $3 + 0;
+ if (errno == 0)
+ next;
+ if (errno > maxerrno) maxerrno = errno;
x = sprintf ("%-40s/*%s */", sprintf ("%-24s%s", "#define\t" e,
"_HURD_ERRNO (" errno ")"),
etext);
diff --git a/sysdeps/mach/hurd/errnos.h b/sysdeps/mach/hurd/errnos.h
index 2ec061596a..b14c98ab88 100644
--- a/sysdeps/mach/hurd/errnos.h
+++ b/sysdeps/mach/hurd/errnos.h
@@ -42,7 +42,7 @@ enum __error_t_codes
ENOTBLK = _HURD_ERRNO (15),
#define ENOTBLK _HURD_ERRNO (15)/* Block device required */
EBUSY = _HURD_ERRNO (16),
-#define EBUSY _HURD_ERRNO (16)/* Device busy */
+#define EBUSY _HURD_ERRNO (16)/* Device or resource busy */
EEXIST = _HURD_ERRNO (17),
#define EEXIST _HURD_ERRNO (17)/* File exists */
EXDEV = _HURD_ERRNO (18),
@@ -103,11 +103,11 @@ enum __error_t_codes
EPFNOSUPPORT = _HURD_ERRNO (46),
#define EPFNOSUPPORT _HURD_ERRNO (46)/* Protocol family not supported */
EAFNOSUPPORT = _HURD_ERRNO (47),
-#define EAFNOSUPPORT _HURD_ERRNO (47)/* Address family not supported by protocol family */
+#define EAFNOSUPPORT _HURD_ERRNO (47)/* Address family not supported by protocol */
EADDRINUSE = _HURD_ERRNO (48),
#define EADDRINUSE _HURD_ERRNO (48)/* Address already in use */
EADDRNOTAVAIL = _HURD_ERRNO (49),
-#define EADDRNOTAVAIL _HURD_ERRNO (49)/* Can't assign requested address */
+#define EADDRNOTAVAIL _HURD_ERRNO (49)/* Cannot assign requested address */
ENETDOWN = _HURD_ERRNO (50),
#define ENETDOWN _HURD_ERRNO (50)/* Network is down */
ENETUNREACH = _HURD_ERRNO (51),
@@ -121,15 +121,15 @@ enum __error_t_codes
ENOBUFS = _HURD_ERRNO (55),
#define ENOBUFS _HURD_ERRNO (55)/* No buffer space available */
EISCONN = _HURD_ERRNO (56),
-#define EISCONN _HURD_ERRNO (56)/* Socket is already connected */
+#define EISCONN _HURD_ERRNO (56)/* Transport endpoint is already connected */
ENOTCONN = _HURD_ERRNO (57),
-#define ENOTCONN _HURD_ERRNO (57)/* Socket is not connected */
+#define ENOTCONN _HURD_ERRNO (57)/* Transport endpoint is not connected */
EDESTADDRREQ = _HURD_ERRNO (39),
#define EDESTADDRREQ _HURD_ERRNO (39)/* Destination address required */
ESHUTDOWN = _HURD_ERRNO (58),
-#define ESHUTDOWN _HURD_ERRNO (58)/* Can't send after socket shutdown */
+#define ESHUTDOWN _HURD_ERRNO (58)/* Cannot send after transport endpoint shutdown */
ETOOMANYREFS = _HURD_ERRNO (59),
-#define ETOOMANYREFS _HURD_ERRNO (59)/* Too many references: can't splice */
+#define ETOOMANYREFS _HURD_ERRNO (59)/* Too many references: cannot splice */
ETIMEDOUT = _HURD_ERRNO (60),
#define ETIMEDOUT _HURD_ERRNO (60)/* Connection timed out */
ECONNREFUSED = _HURD_ERRNO (61),
@@ -153,7 +153,7 @@ enum __error_t_codes
ESTALE = _HURD_ERRNO (70),
#define ESTALE _HURD_ERRNO (70)/* Stale NFS file handle */
EREMOTE = _HURD_ERRNO (71),
-#define EREMOTE _HURD_ERRNO (71)/* Too many levels of remote in path */
+#define EREMOTE _HURD_ERRNO (71)/* Object is remote */
EBADRPC = _HURD_ERRNO (72),
#define EBADRPC _HURD_ERRNO (72)/* RPC struct is bad */
ERPCMISMATCH = _HURD_ERRNO (73),
@@ -174,6 +174,8 @@ enum __error_t_codes
#define ENEEDAUTH _HURD_ERRNO (81)/* Need authenticator */
ENOSYS = _HURD_ERRNO (78),
#define ENOSYS _HURD_ERRNO (78)/* Function not implemented */
+ EILSEQ = _HURD_ERRNO (106),
+#define EILSEQ _HURD_ERRNO (106)/* Invalid or incomplete multibyte or wide character */
EBACKGROUND = _HURD_ERRNO (100),
#define EBACKGROUND _HURD_ERRNO (100)/* Inappropriate operation for background process */
EDIED = _HURD_ERRNO (101),
@@ -240,6 +242,8 @@ enum __error_t_codes
EKERN_RIGHT_EXISTS = 21,
EKERN_INVALID_HOST = 22,
EKERN_MEMORY_PRESENT = 23,
+ EKERN_WRITE_PROTECTION_FAILURE = 24,
+ EKERN_TERMINATED = 26,
/* Errors from <mach/mig_errors.h>. */
EMIG_TYPE_ERROR = -300, /* client type check failure */
@@ -267,7 +271,7 @@ enum __error_t_codes
};
-#define _HURD_ERRNOS 106
+#define _HURD_ERRNOS 107
/* User-visible type of error codes. It is ok to use `int' or
`kern_return_t' for these, but with `error_t' the debugger prints
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 6540b80af6..2d05305ce0 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -20,11 +20,15 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H
#include <errnos.h>
- .comm errno, 4
+ .section .bss
+ .globl errno
+errno: .space 4
#ifdef __ELF__
- .type errno, @object
+ .type errno, @object
+ .size errno, 4
#endif
+ .text
LEAF(__syscall_error, 0)
ldgp gp, 0(t12)
.prologue 1
diff --git a/sysdeps/unix/sysv/linux/netinet/in.h b/sysdeps/unix/sysv/linux/netinet/in.h
index ebe6b4cf58..a0b8714fd6 100644
--- a/sysdeps/unix/sysv/linux/netinet/in.h
+++ b/sysdeps/unix/sysv/linux/netinet/in.h
@@ -21,23 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <features.h>
#include <sys/socket.h>
-
-
-/* Standard well-defined IP protocols. */
-enum
- {
- IPPROTO_IP = 0, /* Dummy protocol for TCP. */
- IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */
- IPPROTO_IGMP = 2, /* Internet Group Management Protocol. */
- IPPROTO_TCP = 6, /* Transmission Control Protocol. */
- IPPROTO_EGP = 8, /* Exterior Gateway Protocol. */
- IPPROTO_PUP = 12, /* PUP protocol. */
- IPPROTO_UDP = 17, /* User Datagram Protocol. */
- IPPROTO_IDP = 22, /* XNS IDP protocol. */
-
- IPPROTO_RAW = 255, /* Raw IP packets. */
- IPPROTO_MAX
- };
+#include <linux/in.h>
/* Standard well-known ports. */
enum
@@ -85,75 +69,9 @@ enum
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
-
-/* Internet address. */
-struct in_addr
- {
- unsigned int s_addr;
- };
-
-
-/* Definitions of the bits in an Internet address integer.
-
- On subnets, host and network parts are found according to
- the subnet mask, not these masks. */
-
-#define IN_CLASSA(a) ((((unsigned) (a)) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(a) ((((unsigned) (a)) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(a) ((((unsigned) (a)) & 0xc0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
-
-#define IN_CLASSD(a) ((((unsigned) (a)) & 0xf0000000) == 0xe0000000)
-#define IN_MULTICAST(a) IN_CLASSD(a)
-
-#define IN_EXPERIMENTAL(a) ((((unsigned) (a)) & 0xe0000000) == 0xe0000000)
-#define IN_BADCLASS(a) ((((unsigned) (a)) & 0xf0000000) == 0xf0000000)
-
-/* Address to accept any incoming messages. */
-#define INADDR_ANY ((unsigned) 0x00000000)
-/* Address to send to all hosts. */
-#define INADDR_BROADCAST ((unsigned) 0xffffffff)
-/* Address indicating an error return. */
-#define INADDR_NONE 0xffffffff
-
-/* Network number for local host loopback. */
-#define IN_LOOPBACKNET 127
-/* Address to loopback in software to local host. */
-#ifndef INADDR_LOOPBACK
-#define INADDR_LOOPBACK 0x7f000001 /* Internet address 127.0.0.1. */
-#endif
-
-
/* Get the definition of the macro to define the common sockaddr members. */
#include <sockaddrcom.h>
-
-/* Structure describing an Internet socket address. */
-struct sockaddr_in
- {
- __SOCKADDR_COMMON (sin_);
- unsigned short int sin_port; /* Port number. */
- struct in_addr sin_addr; /* Internet address. */
-
- /* Pad to size of `struct sockaddr'. */
- unsigned char sin_zero[sizeof(struct sockaddr) -
- __SOCKADDR_COMMON_SIZE -
- sizeof(unsigned short int) -
- sizeof(struct in_addr)];
- };
-
/* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
The `ip_dst' field is used for the first-hop gateway when using a
source route (this gets put into the header proper). */
@@ -163,13 +81,6 @@ struct ip_opts
char ip_opts[40]; /* Actually variable in size. */
};
-/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
-struct ip_mreq
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
/* Functions to convert between host and network byte order. */
extern unsigned long int ntohl __P ((unsigned long int));
@@ -188,4 +99,11 @@ extern unsigned short int htons __P ((unsigned short int));
#define htons(x) (x)
#endif
+__BEGIN_DECLS
+
+/* Bind socket FD to a privileged IP address SIN. */
+extern int bindresvport __P((int __fd, struct sockaddr_in * __sin));
+
+__END_DECLS
+
#endif /* netinet/in.h */
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index da10170bf5..d9dd3d100a 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -18,6 +18,7 @@ init_module EXTRA init_module 5 init_module
ioperm - ioperm 3 ioperm
iopl - iopl 1 iopl
ipc msgget ipc 5 __ipc
+klogctl EXTRA syslog 3 klogctl
llseek EXTRA _llseek 5 llseek
mlock - mlock 2 __mlock mlock
mlockall - mlockall 1 __mlockall mlockall
@@ -49,7 +50,7 @@ sigprocmask - sigprocmask 3 __sigprocmask sigprocmask
s_sysctl sysctl _sysctl 1 __syscall__sysctl
sysinfo EXTRA sysinfo 1 sysinfo
swapon - swapon 2 swapon
-klogctl EXTRA syslog 3 klogctl
umount EXTRA umount 1 __umount umount
uselib EXTRA uselib 1 uselib
+ustat - ustat 2 __ustat ustat
wait4 - wait4 4 __wait4 wait4
diff --git a/sysdeps/unix/sysv/linux/ustatbits.h b/sysdeps/unix/sysv/linux/ustatbits.h
new file mode 100644
index 0000000000..96580031c7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ustatbits.h
@@ -0,0 +1,2 @@
+/* struct ustat is currently in <linux/types.h>. Good or bad? */
+#include <linux/types.h>