In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a5f2288d2cde2425afb3fbbaef6e47ddd39b275a?hp=6b217b36163b5443c055a23c59d582cd363bb7b1>

- Log -----------------------------------------------------------------
commit a5f2288d2cde2425afb3fbbaef6e47ddd39b275a
Author: Jan Dubois <[email protected]>
Date:   Tue Dec 14 16:04:00 2010 -0800

    skip_all() is a separate function in test.pl
    
    and not just an argument to plan().

M       t/op/lfs.t

commit 1ab9ebc1154972420d469084d44fa5abd7f8a1a6
Author: Jan Dubois <[email protected]>
Date:   Tue Dec 14 15:48:10 2010 -0800

    Define our own sockaddr_in6 for VC6
    
    The version defined by the VC6 headers is missing the sin6_scope_id
    field, used by Socket.xs.  Ideally VC6 should be used with later
    versions of the header files from a Windows Platform SDK, but this
    patch at least keeps it compilable with plain VC6.  I have not verified
    that the IPv6 code will actually works with this configuration.

M       win32/include/sys/socket.h

commit 8e564886c8ebc2b7a1ef021fd382c03c5908da57
Author: Jan Dubois <[email protected]>
Date:   Tue Dec 14 15:40:17 2010 -0800

    #define some symbols for VC6 compatibility
    
    HWND_MESSAGE and WC_NO_BEST_FIT_CHARS are not defined by the VC6
    headers unless WINVER is set to 0x0500 or higher, but then the
    headers will generate a lot of warnings because Windows 2000
    was still in beta when those headers where released.
    PROCESSOR_ARCHITCTURE_AMD64 is not defined at all in the
    VC6 headers.

M       win32/win32.c
-----------------------------------------------------------------------

Summary of changes:
 t/op/lfs.t                 |    8 +++---
 win32/include/sys/socket.h |   45 ++++++++++++++++++++++++++++++++++++++++++++
 win32/win32.c              |   12 +++++++++++
 3 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/t/op/lfs.t b/t/op/lfs.t
index ad913b6..aac3d34 100644
--- a/t/op/lfs.t
+++ b/t/op/lfs.t
@@ -44,7 +44,7 @@ sub explain {
 EOM
     }
     if (@_) {
-       plan(skip_all => "@_");
+       skip_all(@_);
     }
 }
 
@@ -54,13 +54,13 @@ print "# checking whether we have sparse files...\n";
 
 # Known have-nots.
 if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') {
-    plan(skip_all => "no sparse files in $^O");
+    skip_all("no sparse files in $^O");
 }
 
 # Known haves that have problems running this test
 # (for example because they do not support sparse files, like UNICOS)
 if ($^O eq 'unicos') {
-    plan(skip_all => "no sparse files in $^O, unable to test large files");
+    skip_all("no sparse files in $^O, unable to test large files");
 }
 
 # Then try heuristically to deduce whether we have sparse files.
@@ -109,7 +109,7 @@ print "# s2 = @s2\n";
 unless ($s1[7] == 1_000_003 && $s2[7] == 2_000_003 &&
        $s1[11] == $s2[11] && $s1[12] == $s2[12] &&
        $s1[12] > 0) {
-    plan(skip_all => "no sparse files?");
+    skip_all("no sparse files?");
 }
 
 print "# we seem to have sparse files...\n";
diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index d551d4b..a396f00 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -28,6 +28,51 @@
       */
 #    define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
 #    include <ws2tcpip.h>
+
+#    ifndef SIO_GET_INTERFACE_LIST_EX
+       /* The ws2tcpip.h header included in VC6 doesn't define the
+        * sin6_scope_id member of sockaddr_in6.  We define our own
+        * version and redefine sockaddr_in6 to point to this one
+        * instead for compiling e.g. Socket.xs.
+        */
+       struct my_sockaddr_in6 {
+           short   sin6_family;        /* AF_INET6 */
+           u_short sin6_port;          /* Transport level port number */
+           u_long  sin6_flowinfo;      /* IPv6 flow information */
+           struct in_addr6 sin6_addr;  /* IPv6 address */
+           u_long sin6_scope_id;       /* set of interfaces for a scope */
+       };
+#      define sockaddr_in6 my_sockaddr_in6
+
+       /* Provide implementations of IN6ADDR_SETANY() and IN6ADDR_SETLOOPBACK
+        * that also initialize the sin6_scope_id field.
+        */
+#      undef IN6ADDR_SETANY
+#      define IN6ADDR_SETANY(x) {\
+(x)->sin6_family = AF_INET6; \
+(x)->sin6_port = 0; \
+(x)->sin6_flowinfo = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr)    ) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 1) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 2) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 3) = 0; \
+(x)->sin6_scope_id = 0; \
+}
+
+#      undef IN6ADDR_SETLOOPBACK
+#      define IN6ADDR_SETLOOPBACK(x) {\
+(x)->sin6_family = AF_INET6; \
+(x)->sin6_port = 0; \
+(x)->sin6_flowinfo = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr)    ) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 1) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 2) = 0; \
+*((u_long *)((x)->sin6_addr.s6_addr) + 3) = 1; \
+(x)->sin6_scope_id = 0; \
+}
+
+#    endif
+
 #  endif
 #endif
 
diff --git a/win32/win32.c b/win32/win32.c
index 228ddde..019e681 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -22,6 +22,18 @@
 
 #include <windows.h>
 
+#ifndef HWND_MESSAGE
+#  define HWND_MESSAGE ((HWND)-3)
+#endif
+
+#ifndef PROCESSOR_ARCHITECTURE_AMD64
+#  define PROCESSOR_ARCHITECTURE_AMD64 9
+#endif
+
+#ifndef WC_NO_BEST_FIT_CHARS
+#  define WC_NO_BEST_FIT_CHARS 0x00000400
+#endif
+
 #include <winnt.h>
 #include <commctrl.h>
 #include <tlhelp32.h>

--
Perl5 Master Repository

Reply via email to