ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/constants.pl.PL
(Generate patch)

Comparing AnyEvent/constants.pl.PL (file contents):
Revision 1.7 by root, Mon Oct 11 04:17:55 2010 UTC vs.
Revision 1.8 by root, Mon Nov 22 06:32:18 2010 UTC

1#! perl 1#! perl
2 2
3# this file is unfortunately only executed at Makefile.PL time 3# this file is unfortunately only executed at Makefile.PL time
4 4
5use Config; 5use Config;
6use Socket; 6
7# when built as part of perl, these are not available
8BEGIN { eval "use Socket ()" }
9BEGIN { eval "use Fcntl ()" }
7 10
8open my $fh, ">lib/AnyEvent/constants.pl" 11open my $fh, ">lib/AnyEvent/constants.pl"
9 or die "lib/AnyEvent/constants.pl: $_[0]\n"; 12 or die "lib/AnyEvent/constants.pl: $_[0]\n";
10 13
11my $oldstdout = select $fh; 14my $oldstdout = select $fh;
29i WIN32 => $WIN32; 32i WIN32 => $WIN32;
30 33
31# 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.
32use Fcntl (); 35use Fcntl ();
33 36
34i F_SETFL => eval { Fcntl::F_SETFL() };
35i F_SETFD => eval { Fcntl::F_SETFD() }; 37i F_SETFD => eval { Fcntl::F_SETFD() } || 2;
38i F_SETFL => eval { Fcntl::F_SETFL() } || 4;
36i O_NONBLOCK => eval { Fcntl::O_NONBLOCK() }; 39i O_NONBLOCK => eval { Fcntl::O_NONBLOCK() } || 04000;
37i FD_CLOEXEC => eval { Fcntl::FD_CLOEXEC() }; 40i FD_CLOEXEC => eval { Fcntl::FD_CLOEXEC() } || 1;
38 41
39print "package AnyEvent::Util;\n"; 42print "package AnyEvent::Util;\n";
40 43
41# broken windows perls use undocumented error codes... 44# broken windows perls use undocumented error codes...
42if ($WIN32) { 45if ($WIN32) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines