summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-10-06 02:15:14 +0200
committerBruno Haible <bruno@clisp.org>2008-10-06 02:15:14 +0200
commit44656541e5be621a9430633f8c3a4fdea64d284d (patch)
tree90ec93c62c84290f82e85e51185e5e712ca00826 /modules
parent0db6df9e0962ee1cf4ffd591f28a5d8fe0d23fc0 (diff)
downloadgnulib-44656541e5be621a9430633f8c3a4fdea64d284d.tar.gz
New modules 'accept', 'bind', 'connect', 'getpeername', 'getsockname', 'getsockopt', 'listen', 'recv', 'recvfrom', 'send', 'sendto', 'setsockopt', 'socket'.
Diffstat (limited to 'modules')
-rw-r--r--modules/accept27
-rw-r--r--modules/bind27
-rw-r--r--modules/connect27
-rw-r--r--modules/getpeername28
-rw-r--r--modules/getsockname28
-rw-r--r--modules/getsockopt27
-rw-r--r--modules/listen27
-rw-r--r--modules/poll-tests6
-rw-r--r--modules/recv27
-rw-r--r--modules/recvfrom27
-rw-r--r--modules/select-tests6
-rw-r--r--modules/send27
-rw-r--r--modules/sendto27
-rw-r--r--modules/setsockopt27
-rw-r--r--modules/socket27
-rw-r--r--modules/sys_socket15
16 files changed, 380 insertions, 0 deletions
diff --git a/modules/accept b/modules/accept
new file mode 100644
index 0000000000..f786882009
--- /dev/null
+++ b/modules/accept
@@ -0,0 +1,27 @@
+Description:
+accept() function: accept a connection to a server socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/bind b/modules/bind
new file mode 100644
index 0000000000..856148a9f1
--- /dev/null
+++ b/modules/bind
@@ -0,0 +1,27 @@
+Description:
+bind() function: bind a server socket to a port.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/connect b/modules/connect
new file mode 100644
index 0000000000..304e1076d8
--- /dev/null
+++ b/modules/connect
@@ -0,0 +1,27 @@
+Description:
+connect() function: connect a client socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/getpeername b/modules/getpeername
new file mode 100644
index 0000000000..f980bb80b9
--- /dev/null
+++ b/modules/getpeername
@@ -0,0 +1,28 @@
+Description:
+getpeername() function: return information about the remote end of a connected
+socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([getpeername])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/getsockname b/modules/getsockname
new file mode 100644
index 0000000000..2b4fd6469a
--- /dev/null
+++ b/modules/getsockname
@@ -0,0 +1,28 @@
+Description:
+getsockname() function: return information about the local end of a connected
+socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([getsockname])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/getsockopt b/modules/getsockopt
new file mode 100644
index 0000000000..a4e3131ddb
--- /dev/null
+++ b/modules/getsockopt
@@ -0,0 +1,27 @@
+Description:
+getsockopt() function: retrieve optional settings on a socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([getsockopt])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/listen b/modules/listen
new file mode 100644
index 0000000000..bbaa7a5c4c
--- /dev/null
+++ b/modules/listen
@@ -0,0 +1,27 @@
+Description:
+listen() function: make a server socket ready for accepting connections.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/poll-tests b/modules/poll-tests
index 94cca234f9..72241ae737 100644
--- a/modules/poll-tests
+++ b/modules/poll-tests
@@ -11,6 +11,12 @@ inet_pton
errno
perror
sockets
+socket
+bind
+setsockopt
+listen
+connect
+accept
configure.ac:
AC_CHECK_HEADERS_ONCE([unistd.h sys/wait.h])
diff --git a/modules/recv b/modules/recv
new file mode 100644
index 0000000000..a5322409e4
--- /dev/null
+++ b/modules/recv
@@ -0,0 +1,27 @@
+Description:
+recv() function: receive (read) data from a connected socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/recvfrom b/modules/recvfrom
new file mode 100644
index 0000000000..50e1339fd7
--- /dev/null
+++ b/modules/recvfrom
@@ -0,0 +1,27 @@
+Description:
+recvfrom() function: receive (read) data from a potentially unconnected socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/select-tests b/modules/select-tests
index 2285033d16..1788348155 100644
--- a/modules/select-tests
+++ b/modules/select-tests
@@ -10,6 +10,12 @@ inet_pton
errno
perror
sockets
+socket
+bind
+setsockopt
+listen
+connect
+accept
configure.ac:
diff --git a/modules/send b/modules/send
new file mode 100644
index 0000000000..75309ce8b0
--- /dev/null
+++ b/modules/send
@@ -0,0 +1,27 @@
+Description:
+send() function: send (write) data to a connected socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([send])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/sendto b/modules/sendto
new file mode 100644
index 0000000000..888d0dc7f5
--- /dev/null
+++ b/modules/sendto
@@ -0,0 +1,27 @@
+Description:
+sendto() function: send (write) data to a potentially unconnected socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([sendto])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/setsockopt b/modules/setsockopt
new file mode 100644
index 0000000000..5cd3d1db0b
--- /dev/null
+++ b/modules/setsockopt
@@ -0,0 +1,27 @@
+Description:
+setsockopt() function: specify optional settings on a socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/socket b/modules/socket
new file mode 100644
index 0000000000..900d9ec95d
--- /dev/null
+++ b/modules/socket
@@ -0,0 +1,27 @@
+Description:
+socket() function: create a socket.
+
+Files:
+lib/winsock.c
+
+Depends-on:
+sys_socket
+errno
+
+configure.ac:
+AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_LIBOBJ([winsock])
+fi
+gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+
+Makefile.am:
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Paolo Bonzini, Simon Josefsson
diff --git a/modules/sys_socket b/modules/sys_socket
index f5569c5b1c..d2cf460ce0 100644
--- a/modules/sys_socket
+++ b/modules/sys_socket
@@ -9,6 +9,7 @@ m4/sockpfaf.m4
Depends-on:
include_next
+link-warning
errno
configure.ac:
@@ -27,8 +28,22 @@ sys/socket.h: sys_socket.in.h
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
-e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
+ -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \
+ -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \
+ -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \
+ -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \
+ -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \
+ -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \
+ -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \
+ -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \
+ -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \
+ -e 's|@''GNULIB_SEND''@|$()GNULIB_SEND|g' \
+ -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \
+ -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \
+ -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/sys_socket.in.h; \
} > $@-t
mv -f $@-t $@