summaryrefslogtreecommitdiffstats
path: root/common/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/arch.h')
-rw-r--r--common/arch.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/common/arch.h b/common/arch.h
index 14ab9d7d..7070d6ae 100644
--- a/common/arch.h
+++ b/common/arch.h
@@ -19,10 +19,14 @@
#if !defined(ARCH_H)
#define ARCH_H
+#if defined(HAVE_CONFIG_H)
+#include "config_ac.h"
+#endif
+
/* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN
in the makefile to override */
-/* check endianess */
+/* check endianness */
#if !(defined(L_ENDIAN) || defined(B_ENDIAN))
#if !defined(__BYTE_ORDER) && defined(__linux__)
#include <endian.h>
@@ -109,7 +113,6 @@ typedef __int64 tbus;
#else
typedef long tbus;
#endif
-typedef tbus thandle;
typedef tbus tintptr;
/* wide char, socket */
#if defined(_WIN32)
@@ -125,4 +128,22 @@ typedef signed long long tsi64;
#endif
#endif /* DEFINED_Ts */
+/* format string verification */
+#if defined(HAVE_FUNC_ATTRIBUTE_FORMAT)
+#define printflike(arg_format, arg_first_check) \
+ __attribute__((__format__(__printf__, arg_format, arg_first_check)))
+#else
+#define printflike(arg_format, arg_first_check)
+#endif
+
+/* module interface */
+#ifdef __cplusplus
+extern "C" {
+#endif
+ tintptr mod_init();
+ int mod_exit(tintptr);
+#ifdef __cplusplus
+}
+#endif
+
#endif