On Friday 02 November 2001 14:01, Graham Barr wrote:

> Hm,
>
> It would seem that inet_aton('') on cygwin does not return an error

Bug in Socket.c on Cygwin or bug in the test?

The manpage for Socket.pm says that inet_aton() should return undef if the 
hostname can't be resolved.  man 3 inet_aton implies the same thing (with 0 
instead of undef).  An undefined hostname shouldn't be able to be resolved, 
but we can be more explicit.  

The patch below works just fine on my Linux box, still passing the test.

There's no test for Socket.c in bleadperl for this behavior, but this is a 
corner case.

Anyone want to push for the inet_aton() bug, or shall we see if this patch 
makes Cygwin happy?

-- c
--- t/~config.t	Sat Nov  3 00:55:14 2001
+++ t/config.t	Sat Nov  3 00:55:18 2001
@@ -18,7 +18,7 @@
 
 # this calls inet_aton in the mock Socket, so it *may* not be portable
 $NetConfig{'ftp_firewall'} = 1;
-is( Net::Config->requires_firewall, -1,
+is( Net::Config->requires_firewall(0), -1,
 	'... should return -1 without a valid hostname' );
 
 # use the mock Socket to resolve addresses our way

Reply via email to