Skip Menu |

This queue is for tickets about the Win32-GuiTest CPAN distribution.

Report information
The Basics
Id: 63309
Status: resolved
Priority: 0/
Queue: Win32-GuiTest

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

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



Subject: Module doesn't compile on 64-bit Windows with VC
The module redefines SIZE_T to DWORD before including windows.h, which will eventually lead to DWORD being redefined by the Windows headers because basetsd.h contains: typedef UINT_PTR SIZE_T, *PSIZE_T; This is benign under 32-bit but break under 64-bit where DWORD must still be a 32-bit type. The easy fix is to get rid of the #define for SIZE_T alltogether, just as it is already removed for GCC: --- Win32-GuiTest/GuiTest.xs.orig 2010-10-31 12:04:41.000000000 -0700 +++ Win32-GuiTest/GuiTest.xs 2010-11-23 21:20:31.042541000 -0800 @@ -15,11 +15,6 @@ #define WIN32_LEAN_AND_MEAN #define _WIN32_IE 0x0500 -#ifndef SIZE_T -# ifndef __GNUC__ -# define SIZE_T DWORD -# endif -#endif #include <windows.h> #include <commctrl.h> #include "dibsect.h" I have no idea why the #define was there originally; the code compiles fine without it with VC6 (32-bit mode) and the 64-bit VC++ compiler from the Windows 2003 SP1 Platform SDK.
I believe that was me guilty for that define, which was for an ancient VC5 I used for builds. There VirtualAllocEx was defined with a DWORD parameter, not SIZE_T. Irony is that now I don't have VC5 setup working anymore, to make the patch that would suit us all. I believe though it would be safe to assume that compatibility with that setup is unnecessary, so I'll remove the define.
will appear in the next version