… | |
… | |
42 | print "package AnyEvent::Base;\n"; |
42 | print "package AnyEvent::Base;\n"; |
43 | |
43 | |
44 | # add these purely to avoid loading POSIX, which is slow and bloated. |
44 | # add these purely to avoid loading POSIX, which is slow and bloated. |
45 | |
45 | |
46 | i WNOHANG => eval { POSIX::WNOHANG() } || 1; |
46 | i WNOHANG => eval { POSIX::WNOHANG() } || 1; |
|
|
47 | |
|
|
48 | print "package AnyEvent::IO;\n"; |
|
|
49 | |
|
|
50 | i O_RDONLY => eval { Fcntl::O_RDONLY() } || 0; |
|
|
51 | i O_WRONLY => eval { Fcntl::O_WRONLY() } || 1; |
|
|
52 | i O_RDWR => eval { Fcntl::O_RDWR () } || 2; |
|
|
53 | i O_CREAT => eval { Fcntl::O_CREAT () } || 64; |
|
|
54 | i O_EXCL => eval { Fcntl::O_EXCL () } || 128; |
|
|
55 | i O_TRUNC => eval { Fcntl::O_TRUNC () } || 512; |
|
|
56 | i O_APPEND => eval { Fcntl::O_APPEND() } || 1024; |
47 | |
57 | |
48 | print "package AnyEvent::Util;\n"; |
58 | print "package AnyEvent::Util;\n"; |
49 | |
59 | |
50 | # broken windows perls use undocumented error codes... |
60 | # broken windows perls use undocumented error codes... |
51 | if ($WIN32) { |
61 | if ($WIN32) { |