projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CodingStyle document to tarball
[lttng-ust.git]
/
include
/
usterr-signal-safe.h
diff --git
a/include/usterr-signal-safe.h
b/include/usterr-signal-safe.h
index d46b0f6a7af8929fbd9296dfc3bf29d37bdf179d..474bc3c77116dab1c4419adb5b240a3fcfe6211c 100644
(file)
--- a/
include/usterr-signal-safe.h
+++ b/
include/usterr-signal-safe.h
@@
-22,7
+22,6
@@
#include <string.h>
#include <sys/types.h>
#include <string.h>
#include <sys/types.h>
-#include <sys/syscall.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
@@
-115,7
+114,10
@@
do { \
#define ERR(fmt, args...) ERRMSG("Error: " fmt, ## args)
#define BUG(fmt, args...) ERRMSG("BUG: " fmt, ## args)
#define ERR(fmt, args...) ERRMSG("Error: " fmt, ## args)
#define BUG(fmt, args...) ERRMSG("BUG: " fmt, ## args)
-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)
+#if !defined(__linux__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE))
+/*
+ * Version using XSI strerror_r.
+ */
#define PERROR(call, args...)\
do { \
char buf[200] = "Error in strerror_r()"; \
#define PERROR(call, args...)\
do { \
char buf[200] = "Error in strerror_r()"; \
@@
-123,6
+125,9
@@
do { \
ERRMSG("Error: " call ": %s", ## args, buf); \
} while(0);
#else
ERRMSG("Error: " call ": %s", ## args, buf); \
} while(0);
#else
+/*
+ * Version using GNU strerror_r, for linux with appropriate defines.
+ */
#define PERROR(call, args...)\
do { \
char *buf; \
#define PERROR(call, args...)\
do { \
char *buf; \
This page took
0.02443 seconds
and
4
git commands to generate.