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 | |
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')
-rw-r--r-- | mcon/U/d_select.U | 10 | ||||
-rw-r--r-- | mcon/U/selecttype.U | 6 |
2 files changed, 13 insertions, 3 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; diff --git a/mcon/U/selecttype.U b/mcon/U/selecttype.U index 4b1eefe..1debbc1 100644 --- a/mcon/U/selecttype.U +++ b/mcon/U/selecttype.U @@ -21,7 +21,7 @@ ?RCS: patch30: created by ADO ?RCS: ?MAKE:selecttype: cat +cc +ccflags rm Oldconfig Myread \ - d_fd_set d_select d_socket i_systime i_sysselct + d_fd_set d_select d_socket i_systime i_sysselct i_winsock2 ?MAKE: -pick add $@ %< ?S:selecttype: ?S: This variable holds the type used for the 2nd, 3rd, and 4th @@ -67,6 +67,7 @@ EOM $cat >try.c <<EOCP #$i_systime I_SYS_TIME #$i_sysselct I_SYS_SELECT +#$i_winsock2 I_WINSOCK2 #$d_socket HAS_SOCKET #include <sys/types.h> #ifdef HAS_SOCKET @@ -78,6 +79,9 @@ EOM #ifdef I_SYS_SELECT #include <sys/select.h> #endif +#ifdef I_WINSOCK2 +#include <Winsock2.h> +#endif int main() { int width; |