diff --git a/src/utils/log.h b/src/utils/log.h index 1c3549f8..bbef77b8 100644 --- a/src/utils/log.h +++ b/src/utils/log.h @@ -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_ */