summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-06-01 21:19:50 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-06-01 21:19:50 +0000
commit21c5e947e5a68781b3973bfef39ecf5b371d4130 (patch)
tree437887e1f89841b142d9c2b3e211f5f650c220c5
parente0378d7fe4b02ebe2f962bb49f50e1ca4c0442ab (diff)
downloadperl-21c5e947e5a68781b3973bfef39ecf5b371d4130.tar.gz
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..)
-rw-r--r--XSUB.h14
-rw-r--r--ext/IO/poll.c2
2 files changed, 16 insertions, 0 deletions
diff --git a/XSUB.h b/XSUB.h
index d5c777eb81..2d1b8edad7 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -466,6 +466,20 @@ C<xsubpp>. See L<perlxs/"The VERSIONCHECK: Keyword">.
# 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 a09c2472a7..a7892ff34d 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 <sys/time.h>