From 11c8b60db484e7333af4be672d5e3e0a7c26b6b5 Mon Sep 17 00:00:00 2001 From: cbiere Date: Sat, 11 Dec 2010 15:46:39 +0000 Subject: Check for presence of sys/select.h before including it. Check for presence of Winsock2.h when using select(). git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@54 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/d_select.U | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mcon/U/d_select.U') diff --git a/mcon/U/d_select.U b/mcon/U/d_select.U index 9a158c0..0cf4c9f 100644 --- a/mcon/U/d_select.U +++ b/mcon/U/d_select.U @@ -12,7 +12,7 @@ ?RCS: Revision 3.0 1993/08/18 12:07:02 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:d_select: Trylink cat i_unistd i_systypes +?MAKE:d_select: Trylink cat i_unistd i_systypes i_sysselct i_winsock2 ?MAKE: -pick add $@ %< ?S:d_select: ?S: This variable conditionally defines HAS_SELECT if select() is @@ -31,6 +31,8 @@ $cat >try.c < @@ -38,8 +40,12 @@ $cat >try.c < #endif -?X: This is the new standard +#ifdef I_SYS_SELECT #include +#endif +#ifdef I_WINSOCK2 +#include +#endif int main(void) { static int ret, n; -- cgit v1.2.3