From 361f3ea9ee577c5a3e2fed687a0b417b257c31de Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 22 Feb 2012 14:59:32 +1030 Subject: lib/ccan: import failtest and required ccan modules for TDB2 unit tests. New modules: failtest, list, time, read_write_all and tlist. Signed-off-by: Rusty Russell --- lib/ccan/check_type/_info | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lib/ccan/check_type/_info (limited to 'lib/ccan/check_type/_info') diff --git a/lib/ccan/check_type/_info b/lib/ccan/check_type/_info new file mode 100644 index 0000000000..33448b4f1f --- /dev/null +++ b/lib/ccan/check_type/_info @@ -0,0 +1,33 @@ +#include +#include +#include "config.h" + +/** + * check_type - routines for compile time type checking + * + * C has fairly weak typing: ints get automatically converted to longs, signed + * to unsigned, etc. There are some cases where this is best avoided, and + * these macros provide methods for evoking warnings (or build errors) when + * a precise type isn't used. + * + * On compilers which don't support typeof() these routines are less effective, + * since they have to use sizeof() which can only distiguish between types of + * different size. + * + * License: Public domain + * Author: Rusty Russell + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { +#if !HAVE_TYPEOF + printf("ccan/build_assert\n"); +#endif + return 0; + } + + return 1; +} -- cgit