In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a5c69419dcd2db1e3ca3fbccf344983edb97ae97?hp=dbc2ea0c923176b1040e2ba2a21bd680cce3be11>

- Log -----------------------------------------------------------------
commit a5c69419dcd2db1e3ca3fbccf344983edb97ae97
Author: Aristotle Pagaltzis <[email protected]>
Date:   Sun Jul 21 06:43:47 2013 +0200

    Update Socket to CPAN version 2.010
    
    [DELTA]
    
    2013/06/24
    2.010   CHANGES:
             * Wrap some IPTOS_* constants, which may come from <netinet/ip.h>
             * Probe for and optionally include <netinet/ip.h>
             * Defeat C compilers' attempts to optimise away configure-time 
probes
               for functions that are never called
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl  |  2 +-
 cpan/Socket/Makefile.PL | 20 +++++++++++++++-----
 cpan/Socket/Socket.pm   | 12 +++++++++---
 cpan/Socket/Socket.xs   |  3 +++
 4 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index c852804..20046f7 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1574,7 +1574,7 @@ use File::Glob qw(:case);
 
     'Socket' => {
         'MAINTAINER'   => 'pevans',
-        'DISTRIBUTION' => 'PEVANS/Socket-2.009.tar.gz',
+        'DISTRIBUTION' => 'PEVANS/Socket-2.010.tar.gz',
         'FILES'        => q[cpan/Socket],
         'UPSTREAM'     => 'cpan',
     },
diff --git a/cpan/Socket/Makefile.PL b/cpan/Socket/Makefile.PL
index 117d778..0eadd3f 100644
--- a/cpan/Socket/Makefile.PL
+++ b/cpan/Socket/Makefile.PL
@@ -19,7 +19,8 @@ sub check_for
     require ExtUtils::CBuilder;
     $cb ||= ExtUtils::CBuilder->new( quiet => 1 );
 
-    my $main = $args{main};
+    my $main   = $args{main}   || "";
+    my $header = $args{header} || "";
 
     print "Checking $args{define}...\n";
 
@@ -40,6 +41,7 @@ sub check_for
 # include <netinet/in.h>
 # include <arpa/inet.h>
 #endif
+$header
 int main(int argc, char *argv[])
   {
     (void)argc;
@@ -70,7 +72,7 @@ sub check_for_func
 {
     my %args = @_;
     my $func = delete $args{func};
-    check_for( %args, main => "void *p = &$func; (void)p;" );
+    check_for( %args, main => "void *p = &$func; if(p == NULL) return 1;" );
 }
 
 my %defines = (
@@ -115,7 +117,6 @@ check_for(
     main    => "struct ip_mreq mreq; mreq.imr_multiaddr.s_addr = INADDR_ANY;"
 );
 
-# TODO: Needs adding to perl5 core before importing dual-life again
 check_for(
     confkey => "d_ip_mreq_source",
     define  => "HAS_IP_MREQ_SOURCE",
@@ -128,6 +129,13 @@ check_for(
     main    => "struct ipv6_mreq mreq; mreq.ipv6mr_interface = 0;"
 );
 
+# TODO: Needs adding to perl5 core before importing dual-life again
+check_for(
+    confkey => "i_netinet_ip",
+    define  => "I_NETINET_IP",
+    header  => "#include <netinet/ip.h>",
+);
+
 my %makefile_args;
 
 # Since we're providing a later version of a core module, before 5.12 the
@@ -170,8 +178,10 @@ my @names = (
 
        IP_ADD_MEMBERSHIP IP_ADD_SOURCE_MEMBERSHIP IP_DROP_MEMBERSHIP
        IP_DROP_SOURCE_MEMBERSHIP IP_HDRINCL IP_MULTICAST_IF IP_MULTICAST_LOOP
-       IP_MULTICAST_TTL IP_OPTIONS IP_RECVOPTS IP_RECVRETOPTS IP_RETOPTS IP_TOS
-       IP_TTL 
+       IP_MULTICAST_TTL IP_OPTIONS IP_RECVOPTS IP_RECVRETOPTS IP_RETOPTS IP_TOS
+       IP_TTL
+
+       IPTOS_LOWDELAY IPTOS_THROUGHPUT IPTOS_RELIABILITY IPTOS_MINCOST
 
        IPV6_ADD_MEMBERSHIP IPV6_DROP_MEMBERSHIP IPV6_JOIN_GROUP
        IPV6_LEAVE_GROUP IPV6_MTU IPV6_MTU_DISCOVER IPV6_MULTICAST_HOPS
diff --git a/cpan/Socket/Socket.pm b/cpan/Socket/Socket.pm
index 270e4ed..0556ae0 100644
--- a/cpan/Socket/Socket.pm
+++ b/cpan/Socket/Socket.pm
@@ -3,7 +3,7 @@ package Socket;
 use strict;
 { use 5.006001; }
 
-our $VERSION = '2.009';
+our $VERSION = '2.010';
 
 =head1 NAME
 
@@ -108,6 +108,10 @@ C<SOL_SOCKET> level.
 Socket option name constants for IPv4 socket options at the C<IPPROTO_IP>
 level.
 
+=head2 IPTOS_LOWDELAY, IPTOS_THROUGHPUT, IPTOS_RELIABILITY, ...
+
+Socket option value constants for C<IP_TOS> socket option.
+
 =head2 MSG_BCAST, MSG_OOB, MSG_TRUNC, ...
 
 Message flag constants for send() and recv().
@@ -578,8 +582,8 @@ service on the named host.
  print <$sock>;
 
 Because a list of potential candidates is returned, the C<while> loop tries
-each in turn until it it finds one that succeeds both the socket() and
-connect() calls.
+each in turn until it finds one that succeeds both the socket() and connect()
+calls.
 
 This function performs the work of the legacy functions gethostbyname(),
 getservbyname(), inet_aton() and pack_sockaddr_in().
@@ -759,6 +763,8 @@ our @EXPORT_OK = qw(
        IPPROTO_IP IPPROTO_IPV6 IPPROTO_RAW IPPROTO_ICMP IPPROTO_TCP
        IPPROTO_UDP
 
+       IPTOS_LOWDELAY IPTOS_THROUGHPUT IPTOS_RELIABILITY IPTOS_MINCOST
+
        TCP_CONGESTION TCP_CONNECTIONTIMEOUT TCP_CORK TCP_DEFER_ACCEPT TCP_INFO
        TCP_INIT_CWND TCP_KEEPALIVE TCP_KEEPCNT TCP_KEEPIDLE TCP_KEEPINTVL
        TCP_LINGER2 TCP_MAXRT TCP_MAXSEG TCP_MD5SIG TCP_NODELAY TCP_NOOPT
diff --git a/cpan/Socket/Socket.xs b/cpan/Socket/Socket.xs
index 0690435..3cc90f6 100644
--- a/cpan/Socket/Socket.xs
+++ b/cpan/Socket/Socket.xs
@@ -32,6 +32,9 @@
 #if defined(I_NETINET_IN) || defined(__ultrix__)
 #  include <netinet/in.h>
 #endif
+#if defined(I_NETINET_IP)
+#  include <netinet/ip.h>
+#endif
 #ifdef I_NETDB
 #  if !defined(ultrix) /* Avoid double definition. */
 #   include <netdb.h>

--
Perl5 Master Repository

Reply via email to