Mercurial > gnulib
annotate modules/sys_socket @ 30157:27e770162c3f
add sockets wrappers
2008-09-23 Paolo Bonzini <bonzini@gnu.org>
* lib/sys_socket.in.h: Do not implement rpl_setsockopt here,
instead define prototypes for a full set of wrappers. Ensure
that Cygwin does not use the compatibility code, which is only
for MinGW.
* lib/winsock.c: New.
* m4/sys_socket_h.m4: Compile lib/winsock.c if WinSock is being used.
* modules/sys_socket: Add lib/winsock.c.
* modules/poll-tests: Add errno and perror.
* tests/test-poll.c: Use ioctl, not ioctlsocket.
author | Paolo Bonzini <bonzini@gnu.org> |
---|---|
date | Fri, 12 Sep 2008 08:43:03 +0200 |
parents | 7902c57e7155 |
children | 659d4e037681 |
rev | line source |
---|---|
26227 | 1 Description: |
29598
55455b90a72a
Override <sys/socket.h> when it exists but is incomplete.
Bruno Haible <bruno@clisp.org>
parents:
28957
diff
changeset
|
2 A POSIX-like <sys/socket.h>. |
26227 | 3 |
4 Files: | |
28957
d3c69849d78a
Rename sys_socket_.h to sys_socket.in.h.
Bruno Haible <bruno@clisp.org>
parents:
28793
diff
changeset
|
5 lib/sys_socket.in.h |
30157 | 6 lib/winsock.c |
26227 | 7 m4/sys_socket_h.m4 |
26620
1e78c92843d2
2006-07-06 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents:
26553
diff
changeset
|
8 m4/sockpfaf.m4 |
26227 | 9 |
10 Depends-on: | |
28689
9b554189d3e9
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
Paul Eggert <eggert@cs.ucla.edu>
parents:
28516
diff
changeset
|
11 include_next |
26227 | 12 |
13 configure.ac: | |
14 gl_HEADER_SYS_SOCKET | |
27591
9630000b64b2
Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
Jim Meyering <jim@meyering.net>
parents:
27188
diff
changeset
|
15 AC_PROG_MKDIR_P |
26227 | 16 |
17 Makefile.am: | |
18 BUILT_SOURCES += $(SYS_SOCKET_H) | |
19 | |
20 # We need the following in order to create <sys/socket.h> when the system | |
21 # doesn't have one that works with the given compiler. | |
28957
d3c69849d78a
Rename sys_socket_.h to sys_socket.in.h.
Bruno Haible <bruno@clisp.org>
parents:
28793
diff
changeset
|
22 sys/socket.h: sys_socket.in.h |
27616
a97092e4ee31
Use @MKDIR_P@ instead of $(MKDIR_P), since automake < 1.10 doesn't the
Bruno Haible <bruno@clisp.org>
parents:
27591
diff
changeset
|
23 @MKDIR_P@ sys |
27112
499aa823eee7
Mark generated files as "DO NOT EDIT".
Bruno Haible <bruno@clisp.org>
parents:
26965
diff
changeset
|
24 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ |
30066
7902c57e7155
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
29598
diff
changeset
|
25 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ |
7902c57e7155
Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents:
29598
diff
changeset
|
26 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ |
28689
9b554189d3e9
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
Paul Eggert <eggert@cs.ucla.edu>
parents:
28516
diff
changeset
|
27 -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ |
28068
41c8b4bfe124
Make <sys/socket.h> self-contained, so that it can be included without
Bruno Haible <bruno@clisp.org>
parents:
27616
diff
changeset
|
28 -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ |
41c8b4bfe124
Make <sys/socket.h> self-contained, so that it can be included without
Bruno Haible <bruno@clisp.org>
parents:
27616
diff
changeset
|
29 -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ |
41c8b4bfe124
Make <sys/socket.h> self-contained, so that it can be included without
Bruno Haible <bruno@clisp.org>
parents:
27616
diff
changeset
|
30 -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ |
28957
d3c69849d78a
Rename sys_socket_.h to sys_socket.in.h.
Bruno Haible <bruno@clisp.org>
parents:
28793
diff
changeset
|
31 < $(srcdir)/sys_socket.in.h; \ |
27112
499aa823eee7
Mark generated files as "DO NOT EDIT".
Bruno Haible <bruno@clisp.org>
parents:
26965
diff
changeset
|
32 } > $@-t |
26965
4f7608f2fb97
Don't make generated files read-only. That would bother too many
Jim Meyering <jim@meyering.net>
parents:
26959
diff
changeset
|
33 mv -f $@-t $@ |
26227 | 34 MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t |
26553 | 35 MOSTLYCLEANDIRS += sys |
26227 | 36 |
37 Include: | |
38 #include <sys/socket.h> | |
39 | |
40 License: | |
28793
e5aee0a89d7f
Use the synonymous term LGPLv2.
Bruno Haible <bruno@clisp.org>
parents:
28689
diff
changeset
|
41 LGPLv2+ |
26227 | 42 |
43 Maintainer: | |
44 Simon Josefsson |