Merge pull request #607 from souryogurt/master

Fixing unresolved "wcsdup" when compile on Mac OS X
This commit is contained in:
Marc-André Moreau 2012-05-22 09:13:33 -07:00
commit 4d1ab22cd6

View File

@ -143,6 +143,10 @@ wchar_t* xwcsdup(const wchar_t* wstr)
mem = _wcsdup(wstr);
#elif sun
mem = wsdup(wstr);
#elif defined(__APPLE__) && defined(__MACH__)
mem = xmalloc(wcslen(wstr));
if (mem != NULL)
wcscpy(mem, wstr);
#else
mem = wcsdup(wstr);
#endif