未验证 提交 01514b77 编写于 作者: R Rémi Arnaud 提交者: GitHub

Merge pull request #599 from pinotree/glibc

Use more Linux codepaths on any GNU libc-based system
......@@ -57,7 +57,7 @@ namespace COLLADABU
WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)wideString.c_str(), -1, dest, multibyteLength, 0, 0 );
this->assign( dest );
delete[] dest;
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC)
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC) || defined (__GLIBC__)
//# error check if this really works on linux
size_t maxStringLength = wcstombs( 0, wideString.c_str(), 0 ) + 1; // wideString.length()*MB_CUR_MAX + 1;
char* dest = new char[ maxStringLength ];
......@@ -80,7 +80,7 @@ namespace COLLADABU
WideString returnValue( dest );
delete[] dest;
return returnValue;
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC)
#elif defined (COLLADABU_OS_LINUX) || defined (COLLADABU_OS_MAC) || defined (__GLIBC__)
//# error check if this really works on linux
size_t maxStringLength = length() + 1;
......
......@@ -62,7 +62,7 @@ namespace GeneratedSaxParser
typedef unsigned int uint32;
typedef unsigned long long uint64;
#elif defined COLLADABU_OS_LINUX
#elif defined COLLADABU_OS_LINUX || defined __GLIBC__
typedef signed char sint8;
typedef signed short sint16;
typedef signed int sint32;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册