Skip Menu |

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

Report information
The Basics
Id: 92382
Status: resolved
Priority: 0/
Queue: Win32-Console-ANSI

People
Owner: jl_morel [...] bribes.org
Requestors: jmash01 [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.09



Subject: [XS] - Included File Ordering Issue
Date: Wed, 22 Jan 2014 13:01:42 -0800
To: bug-Win32-Console-ANSI [...] rt.cpan.org
From: J Mash <jmash01 [...] gmail.com>
Currently, the 'perl.h' file is being included before the 'windows.h' file, which may cause this module to fail to build for some older versions of perl. The issue is that the 'perl.h' file is including the 'win32.h' file (in the same directory), which causes _WIN32_WINNT to be defined to a default value before any of the windows headers have had a chance to define it properly based on the OS/SDK setup. This ultimately causes WINVER to be defined incorrectly (on some older perls), and that is what is used to determine if MIIM_BITMAP needs to be defined. In this case, perl 5.10.1 defaults the _WIN32_WINNT to 0x0400, and 0x0500 is required to set up the define for MIIM_BITMAP, so it results in the 'Your SDK is too old." message when trying to build the module. As a test, I just moved the '#include <windows.h>' line directly under '#define PERL_NO_GET_CONTEXT', and the module built, tested, and installed successfully.
Le Mer 22 Jan 2014 16:01:51, jmash01@gmail.com a écrit : Show quoted text
> Currently, the 'perl.h' file is being included before the 'windows.h' file, > which may cause this module to fail to build for some older versions of > perl. > > The issue is that the 'perl.h' file is including the 'win32.h' file (in the > same directory), which causes _WIN32_WINNT to be defined to a default value > before any of the windows headers have had a chance to define it properly > based on the OS/SDK setup. This ultimately causes WINVER to be defined > incorrectly (on some older perls), and that is what is used to determine if > MIIM_BITMAP needs to be defined. > > In this case, perl 5.10.1 defaults the _WIN32_WINNT to 0x0400, and 0x0500 > is required to set up the define for MIIM_BITMAP, so it results in the > 'Your SDK is too old." message when trying to build the module. > > As a test, I just moved the '#include <windows.h>' line directly under > '#define PERL_NO_GET_CONTEXT', and the module built, tested, and installed > successfully.
Thank you for reporting this bug. Fixed in the 1.09 version.