… | |
… | |
30 | #undef opendir |
30 | #undef opendir |
31 | #undef closedir |
31 | #undef closedir |
32 | |
32 | |
33 | #ifdef _WIN32 |
33 | #ifdef _WIN32 |
34 | |
34 | |
35 | #define EIO_STRUCT_DIRENT Direntry_t |
35 | // perl overrides all those nice libc functions |
|
|
36 | |
36 | #undef malloc |
37 | #undef malloc |
37 | #undef free |
38 | #undef free |
38 | |
|
|
39 | // perl overrides all those nice libc functions |
|
|
40 | #undef open |
39 | #undef open |
41 | #undef read |
40 | #undef read |
42 | #undef write |
41 | #undef write |
43 | #undef send |
42 | #undef send |
44 | #undef recv |
43 | #undef recv |
… | |
… | |
710 | |
709 | |
711 | poll_wait (); |
710 | poll_wait (); |
712 | } |
711 | } |
713 | } |
712 | } |
714 | |
713 | |
|
|
714 | static void ecb_cold |
715 | static void atfork_child (void) |
715 | atfork_child (void) |
716 | { |
716 | { |
717 | create_respipe (); |
717 | create_respipe (); |
|
|
718 | |
|
|
719 | if (eio_init (want_poll, done_poll) < 0) |
|
|
720 | croak ("IO::AIO: unable to initialise eio library"); |
718 | } |
721 | } |
719 | |
722 | |
720 | /*****************************************************************************/ |
723 | /*****************************************************************************/ |
721 | |
724 | |
722 | #if !_POSIX_MAPPED_FILES |
725 | #if !_POSIX_MAPPED_FILES |
… | |
… | |
920 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
923 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
921 | newCONSTSUB (aio_stash, (char *)civ->name, newSViv (civ->iv)); |
924 | newCONSTSUB (aio_stash, (char *)civ->name, newSViv (civ->iv)); |
922 | |
925 | |
923 | newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE)); |
926 | newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE)); |
924 | |
927 | |
925 | create_respipe (); |
|
|
926 | |
|
|
927 | if (eio_init (want_poll, done_poll) < 0) |
|
|
928 | croak ("IO::AIO: unable to initialise eio library"); |
|
|
929 | |
|
|
930 | /* atfork child called in fifo order, so before eio's handler */ |
|
|
931 | X_THREAD_ATFORK (0, 0, atfork_child); |
928 | X_THREAD_ATFORK (0, 0, atfork_child); |
|
|
929 | atfork_child (); /* calls create_respipe and eio_init */ |
932 | } |
930 | } |
933 | |
931 | |
934 | void |
932 | void |
935 | max_poll_reqs (unsigned int nreqs) |
933 | max_poll_reqs (unsigned int nreqs) |
936 | PROTOTYPE: $ |
934 | PROTOTYPE: $ |