… | |
… | |
30 | # used a lot |
30 | # used a lot |
31 | i CYGWIN => $^O =~ /cygwin/i; |
31 | i CYGWIN => $^O =~ /cygwin/i; |
32 | i WIN32 => $WIN32; |
32 | i WIN32 => $WIN32; |
33 | |
33 | |
34 | # add these purely to avoid loading Fcntl, which is slow and bloated. |
34 | # add these purely to avoid loading Fcntl, which is slow and bloated. |
35 | use Fcntl (); |
|
|
36 | |
35 | |
37 | i F_SETFD => eval { Fcntl::F_SETFD() } || 2; |
36 | i F_SETFD => eval { Fcntl::F_SETFD() } || 2; |
38 | i F_SETFL => eval { Fcntl::F_SETFL() } || 4; |
37 | i F_SETFL => eval { Fcntl::F_SETFL() } || 4; |
39 | i O_NONBLOCK => eval { Fcntl::O_NONBLOCK() } || 04000; |
38 | i O_NONBLOCK => eval { Fcntl::O_NONBLOCK() } || 04000; |
40 | i FD_CLOEXEC => eval { Fcntl::FD_CLOEXEC() } || 1; |
39 | i FD_CLOEXEC => eval { Fcntl::FD_CLOEXEC() } || 1; |