Skip Menu |
 

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 48548
Status: resolved
Priority: 0/
Queue: Devel-Declare

People
Owner: Nobody in particular
Requestors: cosimo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.005008
Fixed in: (no value)



Subject: [PATCH] Make Devel::Declare compile correctly under MSVC
Download (untitled) / with headers
text/plain 315b
Hi there, I was trying to install latest CPAN Devel::Declare on a windows vista machine, perl 5.10.0, MSVC 2008 and it failed for me. The problem seems to lie in the two variable declarations at the start of the "BOOT" section. The following patch fixes the problem (maybe not properly?) and passes all tests.
Subject: dd-msvc.patch
Download dd-msvc.patch
text/x-diff 658b
--- Declare.xs.orig Sat Aug 08 21:51:55 2009 +++ Declare.xs Sat Aug 08 21:49:19 2009 @@ -41,6 +41,10 @@ #define DD_AM_LEXING DD_AM_LEXING_CHECK #endif +/* static vars for the boot section, MSVC doesn't like them down there */ +static char *endptr; +static char *debug_str; + /* thing that decides whether we're dealing with a declarator */ int dd_is_declarator(pTHX_ char* name) { @@ -488,8 +492,7 @@ in_declare = value; BOOT: - char *endptr; - char *debug_str = getenv ("DD_DEBUG"); + debug_str = getenv ("DD_DEBUG"); if (debug_str) { dd_debug = strtol (debug_str, &endptr, 10); if (*endptr != '\0') {
I've just released 0.005009 with a fix, not entirely unlike yours, that should fix this issue.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.