From 21c5e947e5a68781b3973bfef39ecf5b371d4130 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sat, 1 Jun 2002 21:19:50 +0000 Subject: [PATCH] Integrate #16971 from maint-5.6; IO::Poll wasn't working on windows since poll.c wasn't using the same abstractions as perl; for test case, see: http://bugs.activestate.com/show_bug.cgi?id=19624 p4raw-id: //depot/perl@16973 p4raw-integrated: from //depot/maint-5.6/perl@16972 'merge in' ext/IO/poll.c (@5902..) XSUB.h (@7887..) --- XSUB.h | 14 ++++++++++++++ ext/IO/poll.c | 2 ++ 2 files changed, 16 insertions(+) diff --git a/XSUB.h b/XSUB.h index d5c777e..2d1b8ed 100644 --- a/XSUB.h +++ b/XSUB.h @@ -466,6 +466,20 @@ C. See L. # define socket PerlSock_socket # define socketpair PerlSock_socketpair # endif /* NETWARE && USE_STDIO */ + +# ifdef USE_SOCKETS_AS_HANDLES +# undef fd_set +# undef FD_SET +# undef FD_CLR +# undef FD_ISSET +# undef FD_ZERO +# define fd_set Perl_fd_set +# define FD_SET(n,p) PERL_FD_SET(n,p) +# define FD_CLR(n,p) PERL_FD_CLR(n,p) +# define FD_ISSET(n,p) PERL_FD_ISSET(n,p) +# define FD_ZERO(p) PERL_FD_ZERO(p) +# endif /* USE_SOCKETS_AS_HANDLES */ + # endif /* NO_XSLOCKS */ #endif /* PERL_IMPLICIT_SYS && !PERL_CORE */ diff --git a/ext/IO/poll.c b/ext/IO/poll.c index a09c247..a7892ff 100644 --- a/ext/IO/poll.c +++ b/ext/IO/poll.c @@ -12,6 +12,8 @@ #include "EXTERN.h" #include "perl.h" +#include "XSUB.h" + #include "poll.h" #ifdef I_SYS_TIME # include -- 2.7.4