Skip Menu |

This queue is for tickets about the Math-Random-MT CPAN distribution.

Report information
The Basics
Id: 48483
Status: resolved
Priority: 0/
Queue: Math-Random-MT

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.08
Fixed in: (no value)



Subject: Compilation failure using MS VC++ 7.0.
Dear Abhijit, As you know, MS VC++ 7.0 doesn't support C99. I'm not sure whether the other versions of MS VC++ support C99 or not. Simply put, VC++ 7.0 doesn't have "stdint.h" so that doesn't have such a type uint32_t. Could you apply the attached patch? Best regards, Taro Nishino
Subject: mt.h.diff.txt
--- Math-Random-MT-1.08-orig\mt.h Thu Aug 6 12:46:51 2009 +++ Math-Random-MT-1.08\mt.h Thu Aug 6 15:29:41 2009 @@ -1,11 +1,13 @@ #ifndef _MATH_MT_H_ #define _MATH_MT_H_ -#if defined(__linux__) || defined(__WIN32__) || defined(__GLIBC__) +/* The compiler is VC++ 7.0 when _MSC_VER == 1300 */ +#if defined(__linux__) || defined( _MSC_VER ) && ( _MSC_VER > 1300 ) || defined(__GLIBC__) #include <stdint.h> #elif defined(__osf__) #include <inttypes.h> -#else +#elif defined( _MSC_VER ) && ( _MSC_VER <= 1300 ) +typedef unsigned __int32 uint32_t; #include <sys/types.h> #endif
Subject: Re: [rt.cpan.org #48483] Compilation failure using MS VC++ 7.0.
Date: Thu, 6 Aug 2009 13:10:55 +0530
To: Taro Nishino via RT <bug-Math-Random-MT [...] rt.cpan.org>
From: Abhijit Menon-Sen <ams [...] toroid.org>
Dear Taro-san, Thank you for your patch. Show quoted text
> -#else > +#elif defined( _MSC_VER ) && ( _MSC_VER <= 1300 ) > +typedef unsigned __int32 uint32_t; > #include <sys/types.h> > #endif
Here I think the #else should be retained after the typedef. But will this patch work for you instead? --- a/mt.h +++ b/mt.h @@ -1,7 +1,9 @@ #ifndef _MATH_MT_H_ #define _MATH_MT_H_ -#if defined(__linux__) || defined(__WIN32__) || defined(__GLIBC__) +#if defined(_MSC_VER) && (_MSC_VER <= 1300) +typedef unsigned __int32 uint32_t; +#elif defined(__linux__) || defined(__GLIBC__) || defined(__WIN32__) #include <stdint.h> #elif defined(__osf__) #include <inttypes.h> -- ams
Subject: Re: [rt.cpan.org #48483] Compilation failure using MS VC++ 7.0.
Date: Thu, 06 Aug 2009 18:33:44 +0900
To: bug-Math-Random-MT [...] rt.cpan.org
From: Taro Nishino <taro.nishino [...] gmail.com>
Hi Abhijit, Thanks for your rapid reply. On Thu, 06 Aug 2009 03:41:20 -0400 "Abhijit Menon-Sen via RT" <bug-Math-Random-MT@rt.cpan.org> wrote: Show quoted text
> > -#else > > +#elif defined( _MSC_VER ) && ( _MSC_VER <= 1300 ) > > +typedef unsigned __int32 uint32_t; > > #include <sys/types.h> > > #endif
> > Here I think the #else should be retained after the typedef.
Oops, my bad. The #else of course should be retained. Show quoted text
>But will this patch work for you instead? > > --- a/mt.h > +++ b/mt.h > @@ -1,7 +1,9 @@ > #ifndef _MATH_MT_H_ > #define _MATH_MT_H_ > > -#if defined(__linux__) || defined(__WIN32__) || defined(__GLIBC__) > +#if defined(_MSC_VER) && (_MSC_VER <= 1300) > +typedef unsigned __int32 uint32_t; > +#elif defined(__linux__) || defined(__GLIBC__) || defined(__WIN32__) > #include <stdint.h> > #elif defined(__osf__) > #include <inttypes.h> >
This patch works well, of course. Thanks. Best regards, Taro Nishino
Subject: Re: [rt.cpan.org #48483] Compilation failure using MS VC++ 7.0.
Date: Thu, 6 Aug 2009 17:33:56 +0530
To: Taro Nishino via RT <bug-Math-Random-MT [...] rt.cpan.org>
From: Abhijit Menon-Sen <ams [...] toroid.org>
At 2009-08-06 05:34:08 -0400, bug-Math-Random-MT@rt.cpan.org wrote: Show quoted text
> > This patch works well, of course.
Thank you. Applied and released as version 1.10 (should have been 1.09, but I messed up a little). -- ams
Fixed in an earlier release.