Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[rt.cpan.org #127836] Cygwin: wcslen(), wcscpy() called without being declared

2 views
Skip to first unread message

TONYC via RT

unread,
Nov 28, 2018, 9:45:02 PM11/28/18
to libw...@perl.org
Wed Nov 28 21:33:11 2018: Request 127836 was acted upon.
Transaction: Ticket created by TONYC
Queue: Win32
Subject: Cygwin: wcslen(), wcscpy() called without being declared
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: TO...@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=127836 >


Win32.xs: In function ‘void w32_GetLongPathName(PerlInterpreter*, CV*)’:
Win32.xs:1528:13: error: ‘wcslen’ was not declared in this scope
if (wcslen(wstr) < countof(wide_path)) {
^~~~~~
Win32.xs:1528:13: note: suggested alternative: ‘listen’
if (wcslen(wstr) < countof(wide_path)) {
^~~~~~
listen
Win32.xs:1529:13: error: ‘wcscpy’ was not declared in this scope
wcscpy(wide_path, wstr);
^~~~~~
Win32.xs:1529:13: note: suggested alternative: ‘wctype’
wcscpy(wide_path, wstr);
^~~~~~
wctype

This causes the build to fail if perl is built with g++ on cygwin.

Adding:

#include <wchar.h>

fixes the problem.

Tony

Dagfinn Ilmari Mannsaker via RT

unread,
Jul 19, 2019, 5:45:02 AM7/19/19
to libw...@perl.org
Fri Jul 19 05:33:21 2019: Request 127836 was acted upon.
Transaction: Correspondence added by ilmari
Queue: Win32
Subject: Cygwin: wcslen(), wcscpy() called without being declared
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: TO...@cpan.org
Status: patched
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=127836 >


Hi Jan,

On 2019-05-06 03:10:25, JDB wrote:
> On Wed Nov 28 21:33:11 2018, TONYC wrote:
> >
> > This causes the build to fail if perl is built with g++ on cygwin.
> >
> > Adding:
> >
> > #include <wchar.h>
> >
> > fixes the problem.
>
> Thank you! Fix applied in https://github.com/perl-libwin32/win32/pull/17

Would it be possible to get a CPAN release out, so we can pull this into Perl core?

Thanks,

- ilmari

Jan Dubois via RT

unread,
Aug 5, 2019, 9:15:02 PM8/5/19
to libw...@perl.org
Mon Aug 05 20:59:07 2019: Request 127836 was acted upon.
Transaction: Correspondence added by JDB
Queue: Win32
Subject: Cygwin: wcslen(), wcscpy() called without being declared
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: TO...@cpan.org
Status: patched
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=127836 >


On Fri Jul 19 05:33:21 2019, ilmari wrote:
> Would it be possible to get a CPAN release out, so we can pull this into Perl core?

I've just uploaded Win32-0.53 to CPAN. In addition to this bug fix it also includes some improvements to Win32::GetOSDisplayName() for various Win10 and Windows Server 2016/2019 versions.

Cheers,
-Jan
0 new messages