aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-04-12 21:12:12 +0200
committerMattias Andrée <maandree@kth.se>2019-04-12 21:13:19 +0200
commit1484b1264552ad05d75a4ca4f40972ac94e729e9 (patch)
treeb9f6d6212866699db66e8bd64310d445498db2f3 /internal.h
downloadliberror-1484b1264552ad05d75a4ca4f40972ac94e729e9.tar.gz
liberror-1484b1264552ad05d75a4ca4f40972ac94e729e9.tar.bz2
liberror-1484b1264552ad05d75a4ca4f40972ac94e729e9.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/internal.h b/internal.h
new file mode 100644
index 0000000..a77aa43
--- /dev/null
+++ b/internal.h
@@ -0,0 +1,34 @@
+/* See LICENSE file for copyright and license details. */
+#include "liberror.h"
+
+#include <alloca.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+#if defined(__GNUC__)
+# define GCC_ATTRIBUTES(...) __attribute__((__VA_ARGS__))
+#else
+# define GCC_ATTRIBUTES(...)
+#endif
+
+#define HIDDEN GCC_ATTRIBUTES(__visibility__("hidden"))
+#define WEAK GCC_ATTRIBUTES(__weak__)
+
+
+struct liberror_backtrace {
+ size_t refcount;
+ size_t n;
+ uintptr_t rips[];
+};
+
+
+HIDDEN extern _Thread_local struct liberror_error liberror_error_;
+HIDDEN extern _Thread_local int liberror_have_error_;
+
+
+int liberror_save_backtrace_(struct liberror_error *);