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.10 by root, Sun Dec 5 11:41:45 2010 UTC vs.
Revision 1.12 by root, Sat Sep 22 00:22:59 2012 UTC

8BEGIN { eval "use Socket ()" } 8BEGIN { eval "use Socket ()" }
9BEGIN { eval "use Fcntl ()" } 9BEGIN { eval "use Fcntl ()" }
10BEGIN { eval "use POSIX ()" } 10BEGIN { eval "use POSIX ()" }
11 11
12open my $fh, ">lib/AnyEvent/constants.pl" 12open my $fh, ">lib/AnyEvent/constants.pl"
13 or die "lib/AnyEvent/constants.pl: $_[0]\n"; 13 or die "lib/AnyEvent/constants.pl: $!\n";
14 14
15my $oldstdout = select $fh; 15my $oldstdout = select $fh;
16 16
17print "# automatically generated from constants.pl.PL for perl $] built for $Config{archname}\n"; 17print "# automatically generated from constants.pl.PL for perl $] built for $Config{archname}\n";
18 18
42print "package AnyEvent::Base;\n"; 42print "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
46i WNOHANG => eval { POSIX::WNOHANG() } || 1; 46i WNOHANG => eval { POSIX::WNOHANG() } || 1;
47
48print "package AnyEvent::IO;\n";
49
50i O_RDONLY => eval { Fcntl::O_RDONLY() } || 0;
51i O_WRONLY => eval { Fcntl::O_WRONLY() } || 1;
52i O_RDWR => eval { Fcntl::O_RDWR () } || 2;
53i O_CREAT => eval { Fcntl::O_CREAT () } || 64;
54i O_EXCL => eval { Fcntl::O_EXCL () } || 128;
55i O_TRUNC => eval { Fcntl::O_TRUNC () } || 512;
56i O_APPEND => eval { Fcntl::O_APPEND() } || 1024;
47 57
48print "package AnyEvent::Util;\n"; 58print "package AnyEvent::Util;\n";
49 59
50# broken windows perls use undocumented error codes... 60# broken windows perls use undocumented error codes...
51if ($WIN32) { 61if ($WIN32) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines