From 18c7880d06e42284d765ef2cb7be4019fdcd9281 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 30 Jun 2011 10:58:24 -0700 Subject: [PATCH] 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. --- ChangeLog | 13 +++++++++++++ lib/sys_select.in.h | 4 +++- m4/sys_select_h.m4 | 3 +-- modules/sys_select | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c04ff431..e6b7400b0 100644 --- 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 index d6d8c7be4..ef4c6f3cf 100644 --- 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 index f1671186f..5b51af407 100644 --- 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 @@ dnl with or without modifications, as long as this notice is preserved. 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 index ef5462a50..d0c020978 100644 --- a/modules/sys_select +++ b/modules/sys_select @@ -4,11 +4,11 @@ A for systems lacking it. 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 -- 2.11.0