1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Files
gnulib/modules/socklen
Paul Eggert 0a1d01aeae socklen: do not depend on sys_socket
While trying to modify Emacs to use gnulib's socklen module,
I discovered a circular dependency: socklen depends on sys_socket
and vice versa.  Emacs can use socklen, but it does not need
sys_socket because it has its own substitute for sys/socket.h.
* m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
gl_TYPE_SOCKLEN_T.
(gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
gl_PREREQ_SYS_H_SOCKET.
(gl_TYPE_SOCKLEN_T): Require it instead of requiring
gl_PREREQ_SYS_H_SOCKET.
* m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
* modules/socklen (Depends-on): Do not depend on sys_socket.
(Include): Adjust to match the code used in gl_SOCKET_HEADERS.
2011-03-20 13:33:16 +01:00

27 lines
337 B
Plaintext

Description:
Declare socklen_t in config.h if the system doesn't have it.
Files:
m4/socklen.m4
Depends-on:
configure.ac:
gl_TYPE_SOCKLEN_T
Makefile.am:
Include:
#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif
License:
unlimited
Maintainer:
Simon Josefsson