Define struct xlat in a separate file so that it could be used later by
tests without inclusion of defs.h header file.
* defs.h (struct xlat, XLAT, XLAT_END): Move ...
* xlat.h: ... here.
* Makefile.am (strace_SOURCES): Add xlat.h.
vsprintf.c \
wait.c \
xattr.c \
+ xlat.h \
xmalloc.c \
# end of strace_SOURCES
#define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV)
#define filtered(tcp) ((tcp)->flags & TCB_FILTERED)
-struct xlat {
- unsigned int val;
- const char *str;
-};
-#define XLAT(x) { x, #x }
-#define XLAT_END { 0, NULL }
+#include "xlat.h"
extern const struct xlat addrfams[];
extern const struct xlat at_flags[];
--- /dev/null
+#ifndef STRACE_XLAT_H
+
+struct xlat {
+ unsigned int val;
+ const char *str;
+};
+
+# define XLAT(x) { x, #x }
+# define XLAT_END { 0, 0 }
+
+#endif