2 A POSIX-like <sys/socket.h>.
20 BUILT_SOURCES += $(SYS_SOCKET_H)
22 # We need the following in order to create <sys/socket.h> when the system
23 # doesn't have one that works with the given compiler.
24 sys/socket.h: sys_socket.in.h
26 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
27 sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
28 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
29 -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
30 -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
31 -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
32 -e 's|@''GNULIB_SOCKET''@|$(GNULIB_SOCKET)|g' \
33 -e 's|@''GNULIB_CONNECT''@|$(GNULIB_CONNECT)|g' \
34 -e 's|@''GNULIB_ACCEPT''@|$(GNULIB_ACCEPT)|g' \
35 -e 's|@''GNULIB_BIND''@|$(GNULIB_BIND)|g' \
36 -e 's|@''GNULIB_GETPEERNAME''@|$(GNULIB_GETPEERNAME)|g' \
37 -e 's|@''GNULIB_GETSOCKNAME''@|$(GNULIB_GETSOCKNAME)|g' \
38 -e 's|@''GNULIB_GETSOCKOPT''@|$(GNULIB_GETSOCKOPT)|g' \
39 -e 's|@''GNULIB_LISTEN''@|$(GNULIB_LISTEN)|g' \
40 -e 's|@''GNULIB_RECV''@|$(GNULIB_RECV)|g' \
41 -e 's|@''GNULIB_SEND''@|$(GNULIB_SEND)|g' \
42 -e 's|@''GNULIB_RECVFROM''@|$(GNULIB_RECVFROM)|g' \
43 -e 's|@''GNULIB_SENDTO''@|$(GNULIB_SENDTO)|g' \
44 -e 's|@''GNULIB_SETSOCKOPT''@|$(GNULIB_SETSOCKOPT)|g' \
45 -e 's|@''GNULIB_SHUTDOWN''@|$(GNULIB_SHUTDOWN)|g' \
46 -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
47 -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
48 -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
49 -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
50 < $(srcdir)/sys_socket.in.h; \
53 MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
54 MOSTLYCLEANDIRS += sys
57 #include <sys/socket.h>