Subject: | Win32::GuiTest fails to build with MS VS2013 due to strncasecmp |
Date: | Sun, 24 Jan 2016 07:31:35 -0500 |
To: | bug-Win32-GuiTest [...] rt.cpan.org |
From: | "A. Sinan Unur" <sinan [...] unur.com> |
First off, thank you very much for Win32::GuiTest. It has been very
useful to me in many situations.
While running my routine cpan-outdated | cpanm on a Windows 10 laptop
with a perl 5.23.6 built with MS VS2013 tools, I noticed that
Win32::GuiTest 1.62 failed to build with the following error:
Show quoted text
> GuiTest.xs(1600) : error C3861: 'strncasecmp': identifier not found
I believe the correct function for this platform is _strnicmp (see
<https://msdn.microsoft.com/en-us/library/chd90w8e.aspx>).
This probably would not work in Cygwin and/or MinGW environments, so a
conditional define might work best:
#ifdef _MSC_VER
#define strncasecmp _strnicmp
#endif
HTH,
-- Sinan