OS X Atlas build fix. Fix wcsdup emulation. Remove seemingly unneeded compile flag (closes #424).

This was SVN commit r7513.
This commit is contained in:
Ykkrosh 2010-05-07 23:09:36 +00:00
parent 4981af4a57
commit 4ea28cf809
4 changed files with 11 additions and 6 deletions

View File

@ -149,11 +149,6 @@ extern_lib_defs = {
tinsert(package.config["Release"].links, "libxml2")
else
pkgconfig("libxml-2.0")
-- libxml2 needs _REENTRANT or __MT__ for thread support;
-- OS X doesn't get either set by default, so do it manually
if OS == "macosx" then
tinsert(package.defines, "_REENTRANT")
end
end
end,
},

View File

@ -102,7 +102,7 @@ wchar_t* wcsdup(const wchar_t* str)
wchar_t* dst = (wchar_t*)malloc((num_chars+1)*sizeof(wchar_t)); // note: wcsdup is required to use malloc
if(!dst)
return 0;
wcscpy_s(dst, num_chars, str);
wcscpy_s(dst, num_chars+1, str);
return dst;
}
#endif

View File

@ -104,4 +104,12 @@ public:
{
do_fpclassify<double>();
}
void test_wcsdup()
{
const wchar_t* a = L"test";
wchar_t* t = wcsdup(a);
TS_ASSERT_WSTR_EQUALS(t, a);
free(t);
}
};

View File

@ -248,6 +248,7 @@ public:
return true;
}
#if wxUSE_DEBUGREPORT
virtual void OnFatalException()
{
wxDebugReport report;
@ -262,6 +263,7 @@ public:
OpenDirectory(dir);
}
}
#endif // wxUSE_DEBUGREPORT
/* Disabled (and should be removed if it turns out to be unnecessary)
- see MessagePasserImpl.cpp for information