diff options
author | cbiere <cbiere@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-12-11 15:46:39 +0000 |
---|---|---|
committer | cbiere <cbiere@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-12-11 15:46:39 +0000 |
commit | 11c8b60db484e7333af4be672d5e3e0a7c26b6b5 (patch) | |
tree | 539bf0131009428579e6119e6ce07c7b65dae368 /mcon/U/d_select.U | |
parent | c98e05a8208426eb74ce6596c48b982647a84fa3 (diff) |
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
Diffstat (limited to 'mcon/U/d_select.U')
-rw-r--r-- | mcon/U/d_select.U | 10 |
1 files changed, 8 insertions, 2 deletions
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 <<EOC #$i_unistd I_UNISTD #$i_systypes I_SYS_TYPES +#$i_sysselct I_SYS_SELECT +#$i_winsock2 I_WINSOCK2 ?X: This is still required on some systems #ifdef I_SYS_TYPES #include <sys/types.h> @@ -38,8 +40,12 @@ $cat >try.c <<EOC #ifdef I_UNISTD #include <unistd.h> #endif -?X: This is the new standard +#ifdef I_SYS_SELECT #include <sys/select.h> +#endif +#ifdef I_WINSOCK2 +#include <Winsock2.h> +#endif int main(void) { static int ret, n; |