with DEBUG_LEAKING_SCALARS, dump multiply-freed scalars
[p5sagit/p5-mst-13.2.git] / ext / IO / poll.h
index d17edff..634bcdd 100644 (file)
 #ifndef POLL_H
 #  define POLL_H
 
-#if defined(I_POLL) || defined(POLLWRBAND)
+#if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND)
 #  include <poll.h>
-#  ifndef HAS_POLL
-#    define HAS_POLL
-#  endif
 #else
 #ifdef HAS_SELECT
 
 
 #define EMULATE_POLL_WITH_SELECT
 
+#ifdef poll
+# undef poll
+#endif
+#define poll Perl_my_poll
+
 typedef struct pollfd {
     int fd;
     short events;
@@ -44,7 +46,7 @@ typedef struct pollfd {
 #define        POLLHUP         0x0010
 #define        POLLNVAL        0x0020
 
-int poll _((struct pollfd *, unsigned long, int));
+int poll (struct pollfd *, unsigned long, int);
 
 #ifndef HAS_POLL
 #  define HAS_POLL