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 | |
|
|
5 | my ($fh, $oldstdout); |
|
|
6 | |
|
|
7 | BEGIN { |
|
|
8 | open $fh, ">lib/AnyEvent/constants.pl" |
|
|
9 | or die "lib/AnyEvent/constants.pl: $!\n"; |
|
|
10 | |
|
|
11 | $oldstdout = select $fh; |
|
|
12 | |
|
|
13 | print "# automatically generated from constants.pl.PL\n"; |
|
|
14 | } |
|
|
15 | |
|
|
16 | { |
|
|
17 | # from common::sense 3.74 |
|
|
18 | use strict qw(vars subs); |
|
|
19 | no warnings; |
|
|
20 | use warnings qw(FATAL closed threads internal debugging pack malloc portable prototype |
|
|
21 | inplace io pipe unpack glob digit printf |
|
|
22 | layer reserved taint closure semicolon); |
|
|
23 | no warnings qw(exec newline unopened); |
|
|
24 | |
|
|
25 | BEGIN { |
|
|
26 | print "sub AnyEvent::common_sense {\n"; |
|
|
27 | printf " local \$^W;\n"; |
|
|
28 | printf " \${^WARNING_BITS} ^= \${^WARNING_BITS} ^ \"%s\";\n", |
|
|
29 | join "", map "\\x$_", unpack "(H2)*", ${^WARNING_BITS}; |
|
|
30 | # use strict, use utf8; |
|
|
31 | printf " \$^H |= 0x%x;\n", $^H; |
|
|
32 | print "}\n"; |
|
|
33 | } |
|
|
34 | } |
|
|
35 | |
5 | use Config; |
36 | use Config; |
|
|
37 | |
|
|
38 | print "# generated for perl $] built for $Config{archname}\n"; |
6 | |
39 | |
7 | # when built as part of perl, these are not available |
40 | # when built as part of perl, these are not available |
8 | BEGIN { eval "use Socket ()" } |
41 | BEGIN { eval "use Socket ()" } |
9 | BEGIN { eval "use Fcntl ()" } |
42 | BEGIN { eval "use Fcntl ()" } |
10 | BEGIN { eval "use POSIX ()" } |
43 | BEGIN { eval "use POSIX ()" } |
11 | |
|
|
12 | open my $fh, ">lib/AnyEvent/constants.pl" |
|
|
13 | or die "lib/AnyEvent/constants.pl: $!\n"; |
|
|
14 | |
|
|
15 | my $oldstdout = select $fh; |
|
|
16 | |
|
|
17 | print "# automatically generated from constants.pl.PL for perl $] built for $Config{archname}\n"; |
|
|
18 | |
44 | |
19 | sub i($$) { |
45 | sub i($$) { |
20 | print "sub $_[0](){", $_[1]*1, "}\n"; |
46 | print "sub $_[0](){", $_[1]*1, "}\n"; |
21 | } |
47 | } |
22 | |
48 | |
… | |
… | |
137 | linux TCP_WINDOW_CLAMP 10 |
163 | linux TCP_WINDOW_CLAMP 10 |
138 | linux TCP_INFO 11 |
164 | linux TCP_INFO 11 |
139 | linux TCP_QUICKACK 12 |
165 | linux TCP_QUICKACK 12 |
140 | linux TCP_CONGESTION 13 |
166 | linux TCP_CONGESTION 13 |
141 | linux TCP_MD5SIG 14 |
167 | linux TCP_MD5SIG 14 |
|
|
168 | linux TCP_FASTOPEN 23 |
|
|
169 | linux MSG_DONTWAIT 0x0040 |
|
|
170 | linux MSG_NOSIGNAL 0x4000 |
|
|
171 | linux MSG_MORE 0x8000 |
|
|
172 | linux MSG_FASTOPEN 0x20000000 |
142 | netbsd TCP_MAXSEG 2 |
173 | netbsd TCP_MAXSEG 2 |
143 | netbsd TCP_KEEPIDLE 3 |
174 | netbsd TCP_KEEPIDLE 3 |
144 | netbsd TCP_NOPUSH 4 |
175 | netbsd TCP_NOPUSH 4 |
145 | netbsd TCP_KEEPINTVL 5 |
176 | netbsd TCP_KEEPINTVL 5 |
146 | netbsd TCP_KEEPCNT 6 |
177 | netbsd TCP_KEEPCNT 6 |
147 | netbsd TCP_KEEPINIT 7 |
178 | netbsd TCP_KEEPINIT 7 |
148 | netbsd TCP_NOOPT 8 |
179 | netbsd TCP_NOOPT 8 |
149 | netbsd TCP_MD5SIG 0x10 |
180 | netbsd TCP_MD5SIG 0x10 |
150 | netbsd TCP_CONGESTION 0x20 |
181 | netbsd TCP_CONGESTION 0x20 |
|
|
182 | netbsd MSG_NOSIGNAL 0x0400 |
151 | cygwin TCP_MAXSEG 0x02 |
183 | cygwin TCP_MAXSEG 0x02 |
152 | cygwin TCP_NOPUSH 0x04 |
184 | cygwin TCP_NOPUSH 0x04 |
153 | cygwin TCP_NOOPT 0x08 |
185 | cygwin TCP_NOOPT 0x08 |
154 | freebsd TCP_MAXSEG 0x02 |
186 | freebsd TCP_MAXSEG 0x02 |
155 | freebsd TCP_NOPUSH 0x04 |
187 | freebsd TCP_NOPUSH 0x04 |
156 | freebsd TCP_NOOPT 0x08 |
188 | freebsd TCP_NOOPT 0x08 |
157 | freebsd TCP_MD5SIG 0x10 |
189 | freebsd TCP_MD5SIG 0x10 |
158 | freebsd TCP_INFO 0x20 |
190 | freebsd TCP_INFO 0x20 |
159 | freebsd TCP_CONGESTION 0x40 |
191 | freebsd TCP_CONGESTION 0x40 |
|
|
192 | freebsd MSG_NOSIGNAL 0x20000 |
160 | solaris TCP_CORK 0x18 |
193 | solaris TCP_CORK 0x18 |
161 | solaris TCP_LINGER2 0x1C |
194 | solaris TCP_LINGER2 0x1C |
162 | solaris TCP_INIT_CWND 0x15 |
195 | solaris TCP_INIT_CWND 0x15 |
163 | solaris TCP_KEEPALIVE 0x8 |
196 | solaris TCP_KEEPALIVE 0x8 |
164 | solaris TCP_MAXSEG 0x02 |
197 | solaris TCP_MAXSEG 0x02 |