develooper Front page | perl.perl5.changes | Postings from November 2010

[perl.git] branch blead, updated. v5.13.7-104-gc788c1c

From:
Jan Dubois
Date:
November 25, 2010 15:02
Subject:
[perl.git] branch blead, updated. v5.13.7-104-gc788c1c
Message ID:
E1PLkp3-000332-Qa@camel.ams6.corp.booking.com
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c788c1c2f78983cf6d561b2809d959be4999c7e7?hp=2a25d7b6d65a21dbe54445c03edf63eb4efa6aff>

- Log -----------------------------------------------------------------
commit c788c1c2f78983cf6d561b2809d959be4999c7e7
Author: Jan Dubois <jand@activestate.com>
Date:   Thu Nov 25 14:26:21 2010 -0800

    Sync win32/Makefile with win32/makefile.mk

M	win32/Makefile

commit 0b4dcbc1baee12b555171b57071e6d5f2b479818
Author: Jan Dubois <jand@activestate.com>
Date:   Thu Nov 25 14:14:18 2010 -0800

    Pass STATIC_EXT to t/porting/FindExt.t
    
    The list of static extensions on Windows is only known
    inside win32/Makefile and win32/makefile.mk, so we need
    to somehow pass it to t/porting/FindExt.t to give it
    a chance to pass on Windows.
    
    Unfortunately this means that PERL_STATIC_EXT will have
    to be set manually if this test is to be run directly
    and not via the Makefile.

M	t/porting/FindExt.t
M	win32/Makefile
M	win32/makefile.mk

commit 41ed632ef2f96ef1cd60c4ad0dba5a29ba54e27e
Author: Jan Dubois <jand@activestate.com>
Date:   Thu Nov 25 12:23:05 2010 -0800

    Include ws2tcpip.h to get IPv6 definitions
    
    This commit also moves down the 'extern "C"' wrapper so that
    it doesn't apply to any #included headers because they may
    generate C++ code (templates) which doesn't confirm to "C"
    linkage (when this header is included in C++ mode, e.g. while
    compiling win32/perllib.c).

M	win32/include/sys/socket.h
-----------------------------------------------------------------------

Summary of changes:
 t/porting/FindExt.t        |    5 +++++
 win32/Makefile             |    3 ++-
 win32/include/sys/socket.h |   22 +++++++++++++++-------
 win32/makefile.mk          |    9 ++++++---
 4 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t
index c1be9d9..a877f8b 100644
--- a/t/porting/FindExt.t
+++ b/t/porting/FindExt.t
@@ -12,6 +12,10 @@ use strict;
 # varies based on which headers are present, and which options ./Configure was
 # invoked with.
 
+if ($^O eq "MSWin32" && !defined $ENV{PERL_STATIC_EXT}) {
+    skip_all "PERL_STATIC_EXT must be set to the list of static extensions";
+}
+
 plan tests => 10;
 use FindExt;
 use Config;
@@ -19,6 +23,7 @@ use Config;
 FindExt::scan_ext('../cpan');
 FindExt::scan_ext('../dist');
 FindExt::scan_ext('../ext');
+FindExt::set_static_extensions(split ' ', $ENV{PERL_STATIC_EXT}) if $^O eq "MSWin32";
 
 # Config.pm and FindExt.pm make different choices about what should be built
 my @config_built;
diff --git a/win32/Makefile b/win32/Makefile
index 700c900..2989871 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -869,7 +869,7 @@ config.w32 : $(CFGSH_TMPL)
 # make sure that we recompile perl.c if the git version changes
 ..\perl$(o) : ..\git_version.h
 
-..\config.sh : config.w32 $(MINIPERL) config_sh.PL
+..\config.sh : config.w32 $(MINIPERL) config_sh.PL FindExt.pm
 	$(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
 
 # this target is for when changes to the main config.sh happen.
@@ -1260,6 +1260,7 @@ test-prep : all utils
 	$(XCOPY) $(PERLEXE) ..\t\$(NULL)
 	$(XCOPY) $(PERLDLL) ..\t\$(NULL)
 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
+	set PERL_STATIC_EXT=$(STATIC_EXT)
 
 test : test-prep
 	cd ..\t
diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index 03b60e2..d551d4b 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -6,29 +6,37 @@
 #ifndef  _INC_SYS_SOCKET
 #define  _INC_SYS_SOCKET
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define WIN32_LEAN_AND_MEAN
 #ifdef __GNUC__
 #  define Win32_Winsock
 #endif
 #include <windows.h>
 
-
 /* Too late to include winsock2.h if winsock.h has already been loaded */
 #ifndef _WINSOCKAPI_
 #  if defined(UNDER_CE) && UNDER_CE <= 300
      /* winsock2 only for 4.00+ */
 #    include <winsock.h>
 #  else
-#  include <winsock2.h>
-#endif
+#    include <winsock2.h>
+     /* We need to include ws2tcpip.h to get the IPv6 definitions.
+      * It will in turn include wspiapi.h.  Later versions of that
+      * header in the Windows SDK generate C++ template code that
+      * can't be compiled with VC6 anymore.  The _WSPIAPI_COUNTOF
+      * definition below prevents wspiapi.h from generating this
+      * incompatible code.
+      */
+#    define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
+#    include <ws2tcpip.h>
+#  endif
 #endif
 
 #include "win32.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef ENOTSOCK
 #define ENOTSOCK	WSAENOTSOCK
 #endif
diff --git a/win32/makefile.mk b/win32/makefile.mk
index b7264aa..0c68318 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1663,7 +1663,8 @@ test-prep : all utils
 .ENDIF
 
 test : $(RIGHTMAKE) test-prep
-	cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
+	set PERL_STATIC_EXT=$(STATIC_EXT) && \
+	    cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
 
 test-reonly : reonly utils
 	$(XCOPY) $(PERLEXE) ..\t\$(NULL)
@@ -1677,7 +1678,8 @@ regen :
 	cd .. && regen.pl && cd win32
 
 test-notty : test-prep
-	set PERL_SKIP_TTY_TEST=1 && \
+	set PERL_STATIC_EXT=$(STATIC_EXT) && \
+	    set PERL_SKIP_TTY_TEST=1 && \
 	    cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES)
 
 _test : $(RIGHTMAKE)
@@ -1688,7 +1690,8 @@ _test : $(RIGHTMAKE)
 .ELSE
 	$(XCOPY) $(GLOBEXE) ..\t\$(NULL)
 .ENDIF
-	cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
+	set PERL_STATIC_EXT=$(STATIC_EXT) && \
+	    cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
 
 _clean :
 	-@erase miniperlmain$(o)

--
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About