summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/Errors.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
commit6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch)
tree7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/OSSupport/Errors.cpp
parentMerge pull request #2958 from LogicParrot/fence (diff)
parentBulk clearing of whitespace (diff)
downloadcuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip
Diffstat (limited to 'src/OSSupport/Errors.cpp')
-rw-r--r--src/OSSupport/Errors.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/OSSupport/Errors.cpp b/src/OSSupport/Errors.cpp
index ce2e2acb0..a05650111 100644
--- a/src/OSSupport/Errors.cpp
+++ b/src/OSSupport/Errors.cpp
@@ -17,37 +17,37 @@ AString GetOSErrorString( int a_ErrNo)
Out.erase(Out.length() - 2);
}
return Out;
-
+
#else // _WIN32
-
+
// According to http://linux.die.net/man/3/strerror_r there are two versions of strerror_r():
-
+
#if defined(__GLIBC__) && defined( _GNU_SOURCE) && !defined(ANDROID_NDK) // GNU version of strerror_r()
-
+
char * res = strerror_r( errno, buffer, ARRAYCOUNT(buffer));
if (res != nullptr)
{
Printf(Out, "%d: %s", a_ErrNo, res);
return Out;
}
-
+
#else // XSI version of strerror_r():
-
+
int res = strerror_r( errno, buffer, ARRAYCOUNT(buffer));
if (res == 0)
{
Printf(Out, "%d: %s", a_ErrNo, buffer);
return Out;
}
-
+
#endif // strerror_r() version
-
+
else
{
Printf(Out, "Error %d while getting error string for error #%d!", errno, a_ErrNo);
return Out;
}
-
+
#endif // else _WIN32
}