--- a/src/utils/log.h
+++ b/src/utils/log.h
@@ -193,6 +193,12 @@
#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 @@
": " << strerror_r(errno, buf, 200) << std::endl); \
}
#endif
+#endif // not windows
+
#endif /* _LOG_H_X_INCLUDED_ */