aboutsummaryrefslogtreecommitdiffstats
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-09 23:17:59 +0000
committerRoland McGrath <roland@gnu.org>1996-07-09 23:17:59 +0000
commit07a4742f9ec2b0587c0d488bb65da2a6faa50fed (patch)
tree2b10e82cad4053bcbe27447bc3d444f6d2aef5e7 /sysdeps/unix
parentTue Jul 9 09:37:55 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu> (diff)
downloadglibc-cvs/libc-960710.tar.xz
glibc-cvs/libc-960710.zip
* posix/glob.h (__glob_opendir_hook, __glob_readdir_hook,cvs/libc-960710
__glob_closedir_hook): Remove decls. * sysdeps/generic/machine-gmon.h: Declare mcount_internal. * sysdeps/unix/inet/syscalls.list: Define __ names with weak aliases for send and connect syscalls. * socket/sys/socket.h: New file, taken from non-sysdep parts of linux/sys/socket.h; break sysdeps parts out into socketbits.h. Declare __ names for send and connect. * sysdeps/generic/socketbits.h: New file. * sysdeps/unix/sysv/linux/socketbits.h: New file. * sysdeps/unix/sysv/linux/sys/socket.h: File removed. * sysdeps/generic/sys/socket.h: File removed. * sysdeps/mach/hurd/connect.c: Define __ name and weak alias. * sysdeps/mach/hurd/send.c: Likewise.
Diffstat (limited to '')
-rw-r--r--socket/sys/socket.h (renamed from sysdeps/unix/sysv/linux/sys/socket.h)18
-rw-r--r--sysdeps/unix/inet/syscalls.list4
-rw-r--r--sysdeps/unix/sysv/linux/configure10
-rw-r--r--sysdeps/unix/sysv/linux/socketbits.h2
4 files changed, 24 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/socket.h b/socket/sys/socket.h
index a680d5fb29..172c897af7 100644
--- a/sysdeps/unix/sysv/linux/sys/socket.h
+++ b/socket/sys/socket.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
+/* Declarations of socket constants, types, and functions.
+Copyright (C) 1991, 92, 94, 95, 96 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
@@ -27,8 +28,11 @@ __BEGIN_DECLS
#include <stddef.h>
-/* Get Linux specific constants and data types. */
-#include <linux/socket.h>
+/* This operating system-specific header file defines the SOCK_*, PF_*,
+ AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr',
+ `struct msghdr', and `struct linger' types. */
+#include <socketbits.h>
+
/* This is the type we use for generic socket address arguments.
@@ -90,6 +94,8 @@ extern int getsockname __P ((int __fd, __SOCKADDR_ARG __addr,
For connectionless socket types, just set the default address to send to
and the only address from which to accept transmissions.
Return 0 on success, -1 for errors. */
+extern int __connect __P ((int __fd,
+ __CONST_SOCKADDR_ARG __addr, size_t __len));
extern int connect __P ((int __fd,
__CONST_SOCKADDR_ARG __addr, size_t __len));
@@ -100,6 +106,7 @@ extern int getpeername __P ((int __fd, __SOCKADDR_ARG __addr,
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
+extern int __send __P ((int __fd, __ptr_t __buf, size_t __n, int __flags));
extern int send __P ((int __fd, __ptr_t __buf, size_t __n, int __flags));
/* Read N bytes into BUF from socket FD.
@@ -164,6 +171,11 @@ extern int accept __P ((int __fd, __SOCKADDR_ARG __addr,
extern int shutdown __P ((int __fd, int __how));
+/* FDTYPE is S_IFSOCK or another S_IF* macro defined in <sys/stat.h>;
+ returns 1 if FD is open on an object of the indicated type, 0 if not,
+ or -1 for errors (setting errno). */
+extern int isfdtype __P ((int __fd, int __fdtype));
+
__END_DECLS
#endif /* sys/socket.h */
diff --git a/sysdeps/unix/inet/syscalls.list b/sysdeps/unix/inet/syscalls.list
index 3b6ac59990..661a8433f5 100644
--- a/sysdeps/unix/inet/syscalls.list
+++ b/sysdeps/unix/inet/syscalls.list
@@ -2,7 +2,7 @@
accept - accept 3 accept
bind - bind 3 bind
-connect - connect 3 connect
+__connect - connect 3 connect connect
gethostid - gethostid 0 gethostid
gethostname - gethostname 2 __gethostname gethostname
getpeername - getpeername 3 getpeername
@@ -12,7 +12,7 @@ listen - listen 2 listen
recv - recv 4 recv
recvfrom - recvfrom 6 recvfrom
recvmsg - recvmsg 3 recvmsg
-send - send 4 send
+__send - send 4 send send
sendmsg - sendmsg 3 sendmsg
sendto - sendto 6 sendto
sethostid - sethostid 1 sethostid
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 7dbb0f9f33..fd72c092ad 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -8,7 +8,7 @@ test $stdio = default && stdio=libio
inhibit_glue=yes
echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
-if eval "test \"`echo '$''{'libc_cv_linux'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'libc_cv_linux201'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
@@ -24,17 +24,17 @@ eat flaming death
EOF
if { (eval echo configure:26: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- libc_cv_linux='2.0.1 or later'
+ libc_cv_linux201='2.0.1 or later'
else
rm -rf conftest*
- libc_cv_linux='TOO OLD!'
+ libc_cv_linux201='TOO OLD!'
fi
rm -f conftest*
fi
-echo "$ac_t""$libc_cv_linux" 1>&6
-if test "$libc_cv_linux" != '2.0.1 or later'; then
+echo "$ac_t""$libc_cv_linux201" 1>&6
+if test "$libc_cv_linux201" != '2.0.1 or later'; then
{ echo "configure: error: GNU libc requires kernel header files from Linux 2.0.1
or later to be installed before configuring. The kernel header files
are found usually in /usr/include/asm and /usr/include/linux; make sure
diff --git a/sysdeps/unix/sysv/linux/socketbits.h b/sysdeps/unix/sysv/linux/socketbits.h
new file mode 100644
index 0000000000..1c7cee0dad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/socketbits.h
@@ -0,0 +1,2 @@
+/* Get Linux specific constants and data types kernel header. */
+#include <linux/socket.h>