On Fri Feb 17 17:33:27 2012, SPROUT wrote:
Show quoted text> On Thu Feb 16 19:22:23 2012, dkg@fifthhorseman.net wrote:
> > On Thu, 16 Feb 2012 00:18:03 -0500, Daniel Kahn Gillmor
> > <dkg@fifthhorseman.net> wrote:
> > > I'm attaching a revised, simplified patch that doesn't make this
> > > non-portable assumption. On a Debian GNU/Linux wheezy (testing)
> > system
> > > right now, it still passes all tests.
> >
> > Sigh. I tried the -v3 patch on a FreeBSD system (which doesn't have
> > SO_PROTOCOL defined, apparently), and on such a system, the tests
> fail
> > hard (perl process terminates with return code 29) with the
> following
> > message:
> >
> > Your vendor has not defined Socket macro SO_PROTOCOL, used at
> > /usr/lib/perl/5.14/IO/Socket.pm line 359
> >
> > This is bad, and probably worse than just returning undefined as it
> > has
> > up til now.
> >
> > The attached patch (v4) should behave no worse than the existing
> > misbehavior on systems where SO_PROTOCOL (or SO_TYPE) is not defined
> > by
> > the OS, while still re-populating missing cached data on operating
> > systems that do provide these sockopts.
> >
> > Regards,
> >
> > --dkg
>
> I’ve pushed your patches to the smoke-me/cpan61577 branch at
> perl5.git.perl.org.
These tests are not passing for me on darwin:
Pint:perl.git sprout$ ./perl -Ilib dist/IO/t/cachepropagate-tcp.t
1..8
# Running under perl version 5.015007 for darwin
# Current time local: Sat Feb 18 11:13:49 2012
# Current time GMT: Sat Feb 18 19:13:49 2012
# Using Test.pm version 1.25_02
ok 1
ok 2
ok 3
ok 4
ok 5
ok 5
not ok 6
# Test 6 got: <UNDEF> (dist/IO/t/cachepropagate-tcp.t at line 39)
# Expected: "6"
# dist/IO/t/cachepropagate-tcp.t line 39 is: ok($new->protocol(), $p);
ok 7
ok 8
Pint:perl.git sprout$ ./perl -Ilib dist/IO/t/cachepropagate-udp.t
1..7
# Running under perl version 5.015007 for darwin
# Current time local: Sat Feb 18 11:13:59 2012
# Current time GMT: Sat Feb 18 19:13:59 2012
# Using Test.pm version 1.25_02
ok 1
ok 2
ok 3
ok 4
not ok 5
# Test 5 got: <UNDEF> (dist/IO/t/cachepropagate-udp.t at line 25)
# Expected: "17"
# dist/IO/t/cachepropagate-udp.t line 25 is: ok($new->protocol(), $p);
ok 6
ok 7
Pint:perl.git sprout$ ./perl -Ilib dist/IO/t/cachepropagate-unix.t
1..15
# Running under perl version 5.015007 for darwin
# Current time local: Sat Feb 18 11:14:05 2012
# Current time GMT: Sat Feb 18 19:14:05 2012
# Using Test.pm version 1.25_02
ok 1
ok 2
ok 3
ok 4
ok 5
ok 5
not ok 6
# Test 6 got: <UNDEF> (dist/IO/t/cachepropagate-unix.t at line 39)
# Expected: "0"
# dist/IO/t/cachepropagate-unix.t line 39 is: ok($new->protocol(), $p);
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
not ok 13
# Test 13 got: <UNDEF> (dist/IO/t/cachepropagate-unix.t at line 61)
# Expected: "0"
# dist/IO/t/cachepropagate-unix.t line 61 is: ok($new->protocol(), $p);
ok 14
ok 15
Summary of my perl5 (revision 5 version 15 subversion 7) configuration:
Derived from: c72a6582fd80cdcf24404819bef6101cdfb4f1c4
Ancestor: a0ee90d6275e8e8ed2d2366771ed2111c3dc870d
Platform:
osname=darwin, osvers=10.5.0, archname=darwin-thread-multi-2level
uname='darwin pint.local 10.5.0 darwin kernel version 10.5.0: fri nov 5 23:20:39 pdt 2010;
root:xnu-1504.9.17~1release_i386 i386 '
config_args='-de -Dusedevel -DDEBUGGING -Duseithreads -Dmad'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -
pipe -fstack-protector -I/usr/local/include',
optimize='-O3 -g',
cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING -fno-strict-aliasing -pipe -
fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 (Apple Inc. build 5664)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -
L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-
protector'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MAD
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
PERL_TRACK_MEMPOOL PERL_USE_DEVEL USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF USE_REENTRANT_API
Locally applied patches:
uncommitted-changes
c72a6582fd80cdcf24404819bef6101cdfb4f1c4
Built under darwin
Compiled at Feb 17 2012 14:40:56
@INC:
lib
/usr/local/lib/perl5/site_perl/5.15.7/darwin-thread-multi-2level
/usr/local/lib/perl5/site_perl/5.15.7
/usr/local/lib/perl5/5.15.7/darwin-thread-multi-2level
/usr/local/lib/perl5/5.15.7
/usr/local/lib/perl5/site_perl
.