view modules/sys_select @ 30232:93e5702f1344

strengthen self-containedness check for sys/select.h 2008-09-29 Paolo Bonzini <bonzini@gnu.org> Bruno Haible <bruno@clisp.org> * lib/sys_select.in.h: Include sys/time.h. * m4/sys_select.h.m4: Test that struct timeval is fully defined. * modules/sys_select: Depend on sys_time. * tests/test-sys_select.c: Test that sys/select.h defines struct timeval fully.
author Paolo Bonzini <bonzini@gnu.org>
date Mon, 29 Sep 2008 12:02:35 +0200
parents 9ecf84bb4ac5
children ca7f9b88efc1
line wrap: on
line source

Description:
A <sys/select.h> for systems lacking it.

Files:
lib/sys_select.in.h
lib/winsock-select.c
m4/sys_select_h.m4

Depends-on:
alloca
include_next
sys_socket
sys_time

configure.ac:
gl_HEADER_SYS_SELECT
AC_PROG_MKDIR_P

Makefile.am:
BUILT_SOURCES += $(SYS_SELECT_H)

# We need the following in order to create <sys/select.h> when the system
# doesn't have one that works with the given compiler.
sys/select.h: sys_select.in.h
	@MKDIR_P@ sys
	rm -f $@-t $@
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
	  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
	      -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
	      -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
	      -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
	      < $(srcdir)/sys_select.in.h; \
	} > $@-t
	mv $@-t $@
MOSTLYCLEANFILES += sys/select.h sys/select.h-t
MOSTLYCLEANDIRS += sys

Include:
#include <sys/select.h>

License:
LGPLv2+

Maintainer:
Simon Josefsson