Subject: | Cygwin: wcslen(), wcscpy() called without being declared |
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