|
a/src/utils/log.h |
|
b/src/utils/log.h |
|
... |
|
... |
191 |
#else
|
191 |
#else
|
192 |
#define LOGFAT(X)
|
192 |
#define LOGFAT(X)
|
193 |
#endif
|
193 |
#endif
|
194 |
#define LOGFATAL LOGFAT
|
194 |
#define LOGFATAL LOGFAT
|
195 |
|
195 |
|
|
|
196 |
#if defined(sun) || defined(_WIN32)
|
|
|
197 |
#define LOGSYSERR(who, what, arg) { \
|
|
|
198 |
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
|
|
199 |
": " << strerror(errno) << std::endl); \
|
|
|
200 |
}
|
|
|
201 |
#else // !WINDOWS->
|
196 |
#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
|
202 |
#if (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE
|
197 |
#define LOGSYSERR(who, what, arg) { \
|
203 |
#define LOGSYSERR(who, what, arg) { \
|
198 |
char buf[200]; buf[0] = 0; strerror_r(errno, buf, 200); \
|
204 |
char buf[200]; buf[0] = 0; strerror_r(errno, buf, 200); \
|
199 |
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
205 |
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
200 |
": " << buf << std::endl); \
|
206 |
": " << buf << std::endl); \
|
|
... |
|
... |
204 |
char buf[200]; buf[0] = 0; \
|
210 |
char buf[200]; buf[0] = 0; \
|
205 |
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
211 |
LOGERR(who << ": " << what << "(" << arg << "): errno " << errno << \
|
206 |
": " << strerror_r(errno, buf, 200) << std::endl); \
|
212 |
": " << strerror_r(errno, buf, 200) << std::endl); \
|
207 |
}
|
213 |
}
|
208 |
#endif
|
214 |
#endif
|
|
|
215 |
#endif // not windows
|
|
|
216 |
|
209 |
#endif /* _LOG_H_X_INCLUDED_ */
|
217 |
#endif /* _LOG_H_X_INCLUDED_ */
|