]> git.cworth.org Git - ttt/blobdiff - src/ttt.h
2005-11-11 Carl Worth <cworth@cworth.org>
[ttt] / src / ttt.h
index 910c6883c78ad2473c74dd10405742900224a9d5..316d74494c6e34ae1fde8d7684cbfc84f5d24cea 100644 (file)
--- a/src/ttt.h
+++ b/src/ttt.h
 #include "config.h"
 #endif
 
-#include "args.h"
+/* We use _GNU_SOURCE to get things like asprintf. */
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <pthread.h>
+
+#define ASSERT_NOT_REACHED             \
+do {                                   \
+    static const int NOT_REACHED = 0;  \
+    assert (NOT_REACHED);              \
+    exit (1);                          \
+} while (0)
+
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define TTT_PRINTF_FORMAT(fmt_index, va_index) \
+       __attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define TTT_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
+#include "ttt-args.h"
+#include "x.h"
+
+typedef int ttt_bool_t;
+
+typedef enum {
+    TTT_STATUS_SUCCESS = 0,
+    TTT_STATUS_FAILURE
+} ttt_status_t;
 
 #endif