logsyserr(): no strerror_r on Windows
This commit is contained in:
parent
7f2b32bff6
commit
2fb61f2583
@ -193,6 +193,12 @@ private:
|
||||
#endif
|
||||
#define LOGFATAL LOGFAT
|
||||
|
||||
#if defined(sun) || defined(_WIN32)
|
||||
#define LOGSYSERR(who, what, arg) { \
|
||||
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
||||
": " << strerror(errno) << std::endl); \
|
||||
}
|
||||
#else // !WINDOWS->
|
||||
#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
|
||||
#define LOGSYSERR(who, what, arg) { \
|
||||
char buf[200]; buf[0] = 0; strerror_r(errno, buf, 200); \
|
||||
@ -206,4 +212,6 @@ private:
|
||||
": " << strerror_r(errno, buf, 200) << std::endl); \
|
||||
}
|
||||
#endif
|
||||
#endif // not windows
|
||||
|
||||
#endif /* _LOG_H_X_INCLUDED_ */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user