# HG changeset patch # User Paul Eggert # Date 1309456704 25200 # Node ID c7ae1577bd26843f4c92d79b8bb71f1af362d780 # Parent 5e07722935cfa762925a66758b52fdd361a5179c sys_select: don't depend on sys_socket This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see . This fix works on GNU and GNU-like platforms, but has not been tested on native Windows. * lib/sys_select.in.h: Include only if native Windows. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require gl_HEADER_SYS_SOCKET. * modules/sys_select (Files): Add m4/sys_socket_h.m4, for gl_PREREQ_SYS_H_WINSOCK2. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2011-06-30 Paul Eggert + + sys_select: don't depend on sys_socket + This is so that Emacs doesn't have to drag in m4/sockpfaf.m4 etc; see + . + This fix works on GNU and GNU-like platforms, but has not been tested + on native Windows. + * lib/sys_select.in.h: Include only if native Windows. + * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Do not require + gl_HEADER_SYS_SOCKET. + * modules/sys_select (Files): Add m4/sys_socket_h.m4, for + gl_PREREQ_SYS_H_WINSOCK2. + 2011-06-29 Eric Blake pipe2: fix C89 compile problem diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -80,7 +80,9 @@ /* On native Windows platforms: Get the 'fd_set' type. Also, gnulib's redefines select so as to hide the declaration from . */ -# include +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +# endif #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4 --- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -1,4 +1,4 @@ -# sys_select_h.m4 serial 16 +# sys_select_h.m4 serial 17 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,6 @@ AC_DEFUN([gl_HEADER_SYS_SELECT], [ - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], diff --git a/modules/sys_select b/modules/sys_select --- a/modules/sys_select +++ b/modules/sys_select @@ -4,11 +4,11 @@ Files: lib/sys_select.in.h m4/sys_select_h.m4 +m4/sys_socket_h.m4 Depends-on: include_next c++defs -sys_socket sys_time warn-on-use