revert changes to Error.cpp; it's hopeless with strerror_r()...

This commit is contained in:
Guenter Obiltschnig 2017-02-14 14:35:56 +01:00
parent f18b7210f4
commit 1435c9ad97
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
//
// Error.cpp
//
// $Id: //poco/1.7/Foundation/src/Error.cpp#3 $
// $Id: //poco/1.4/Foundation/src/Error.cpp#3 $
//
// Library: Foundation
// Package: Core
@ -66,11 +66,11 @@ namespace Poco {
without -D_GNU_SOURCE is needed, otherwise the GNU version is
preferred.
*/
#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || POCO_ANDROID || __APPLE__
#if (_XOPEN_SOURCE >= 600) || POCO_ANDROID
char errmsg[256] = "";
int rc = strerror_r(errorCode, errmsg, 256);
return rc == 0 ? std::string(errmsg) : std::string();
#elif defined(__GLIBC__) && _GNU_SOURCE
strerror_r(errorCode, errmsg, 256);
return errmsg;
#elif defined _GNU_SOURCE
char errmsg[256] = "";
return std::string(strerror_r(errorCode, errmsg, 256));
#else

View File

@ -65,7 +65,7 @@ RELEASEOPT_LINK = -O2
#
# System Specific Flags
#
SYSFLAGS = -D_XOPEN_SOURCE=600 -D_REENTRANT -D_THREAD_SAFE \
SYSFLAGS = -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE \
-DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -DPOCO_HAVE_ADDRINFO -DPOCO_HAVE_LIBRESOLV \
-DHAVE_POSIX_FALLOCATE=0