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

Reply via email to