summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-30 10:26:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-30 10:26:32 +0000
commitdc4c69d9328dff74d38ec5b2dbf795d4f1643b34 (patch)
treef41eaafb20cd2f72463c0141c50d7cf6d6897823 /pp_sys.c
parente0975c9c543c721641bc47684748a204d8333340 (diff)
downloadperl-dc4c69d9328dff74d38ec5b2dbf795d4f1643b34.tar.gz
Not all compilers like #ifdefs within cpp macros
(follow-up on #19086) p4raw-id: //depot/perl@19091
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 3c22a76a80..877d0a084d 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1068,15 +1068,23 @@ PP(pp_sselect)
#endif
}
+#ifdef PERL_IRIX5_SELECT_TIMEVAL_VOID_CAST
+ /* Can't make just the (void*) conditional because that would be
+ * cpp #if within cpp macro, and not all compilers like that. */
+ nfound = PerlSock_select(
+ maxlen * 8,
+ (Select_fd_set_t) fd_sets[1],
+ (Select_fd_set_t) fd_sets[2],
+ (Select_fd_set_t) fd_sets[3],
+ (void*) tbuf); /* Workaround for compiler bug. */
+#else
nfound = PerlSock_select(
maxlen * 8,
(Select_fd_set_t) fd_sets[1],
(Select_fd_set_t) fd_sets[2],
(Select_fd_set_t) fd_sets[3],
-#ifdef PERL_IRIX5_SELECT_TIMEVAL_VOID_CAST
- (void*) /* Workaround for a compiler bug. */
-#endif
tbuf);
+#endif
for (i = 1; i <= 3; i++) {
if (fd_sets[i]) {
sv = SP[i];