I can now confirm that dmake works fine, but not nmake.
Show quoted text> So maybe this is an appropriate fix?
> #if defined(_MSC_VER) && (_MSC_VER <= 1600)
>
> But really, is there any reason not to simply write this?
> #if defined(_MSC_VER)
Both solutions seem to work. I committed the second one to the git
repository.
However, there are still other issues that prevent compilation of the
module with nmake:
Show quoted text>nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cp MT.pm blib\lib\Math\Random\MT.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap
C:\Perl\lib\Ext
Utils\typemap -typemap typemap MT.xs > MT.xsc && C:\Perl\bin\perl.exe
-MExtUtils:
:Command -e "mv" -- MT.xsc MT.c
cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_STRI
CT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPL
ICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -MD -Zi -DNDEBUG -O1
-DVERSION=\"1.13
\" -DXS_VERSION=\"1.13\" "-IC:\Perl\lib\CORE" MT.c
MT.c
MT.xs(38) : error C2275: 'U32' : illegal use of this type as an expression
c:\perl\lib\core\handy.h(181) : see declaration of 'U32'
MT.xs(38) : error C2065: 'array' : undeclared identifier
MT.xs(39) : error C2275: 'U32' : illegal use of this type as an expression
c:\perl\lib\core\handy.h(181) : see declaration of 'U32'
MT.xs(39) : error C2146: syntax error : missing ';' before identifier
'ix_array'
MT.xs(39) : error C2065: 'ix_array' : undeclared identifier
MT.xs(41) : error C2065: 'array' : undeclared identifier
MT.xs(41) : error C2065: 'ix_array' : undeclared identifier
MT.xs(41) : error C2109: subscript requires array or pointer type
MT.xs(41) : error C2065: 'ix_array' : undeclared identifier
MT.xs(41) : error C2065: 'ix_array' : undeclared identifier
MT.xs(41) : error C2065: 'ix_array' : undeclared identifier
MT.xs(42) : error C2065: 'ix_array' : undeclared identifier
MT.xs(44) : error C2065: 'array' : undeclared identifier
MT.xs(44) : error C2065: 'ix_array' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio 10.0\V
C\BIN\cl.EXE"' : return code '0x2'
Stop.