X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=src%2Fttt.h;h=0f2f7e55782f7e7ac54a8bf85daaf0c8795bc64b;hp=910c6883c78ad2473c74dd10405742900224a9d5;hb=80c3009d01077a141a0803267a1f0aff217ed61c;hpb=52bff07c451d6f5fbb2d9dd4f76f41479ba3c323 diff --git a/src/ttt.h b/src/ttt.h index 910c688..0f2f7e5 100644 --- a/src/ttt.h +++ b/src/ttt.h @@ -26,6 +26,31 @@ #include "config.h" #endif -#include "args.h" +/* We use _GNU_SOURCE to get things like asprintf. */ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include + +#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" #endif