diff --git a/libbuild2-autoconf-tests/checks/byte-order/driver.c b/libbuild2-autoconf-tests/checks/byte-order/driver.c index 9eea6d5..d8c5c63 100644 --- a/libbuild2-autoconf-tests/checks/byte-order/driver.c +++ b/libbuild2-autoconf-tests/checks/byte-order/driver.c @@ -1,11 +1,11 @@ -#include // uint32_t - -#include "config.h" - /* Test that the byte order detected at runtime matches the one detected at * compile time. */ +#include /* uint32_t */ + +#include "config.h" + /* Return: * * 0 if the runtime and compile time byte orders match diff --git a/libbuild2-autoconf-tests/checks/sizeof/.gitignore b/libbuild2-autoconf-tests/checks/sizeof/.gitignore new file mode 100644 index 0000000..2b0f929 --- /dev/null +++ b/libbuild2-autoconf-tests/checks/sizeof/.gitignore @@ -0,0 +1,2 @@ +config.h +driver diff --git a/libbuild2-autoconf-tests/checks/sizeof/buildfile b/libbuild2-autoconf-tests/checks/sizeof/buildfile new file mode 100644 index 0000000..d03ec6a --- /dev/null +++ b/libbuild2-autoconf-tests/checks/sizeof/buildfile @@ -0,0 +1,11 @@ +exe{driver}: c{driver} h{config} + +h{config}: in{config} + +c.poptions += "-I$out_base" + +if ($c.target.system != 'win32-msvc') +{ + c.libs += -pthread + c.poptions += -DTEST_PTHREAD +} diff --git a/libbuild2-autoconf-tests/checks/sizeof/config.h.in b/libbuild2-autoconf-tests/checks/sizeof/config.h.in new file mode 100644 index 0000000..64dcc0f --- /dev/null +++ b/libbuild2-autoconf-tests/checks/sizeof/config.h.in @@ -0,0 +1,2 @@ +#undef SIZEOF_OFF_T +#undef SIZEOF_PTHREAD_T diff --git a/libbuild2-autoconf-tests/checks/sizeof/driver.c b/libbuild2-autoconf-tests/checks/sizeof/driver.c new file mode 100644 index 0000000..0ab4017 --- /dev/null +++ b/libbuild2-autoconf-tests/checks/sizeof/driver.c @@ -0,0 +1,23 @@ +/* Test more tricky SIZEOF_* checks. + */ + +#include "config.h" + +#include /* off_t */ + +#ifdef TEST_PTHREAD +# include +#endif + +#undef NDEBUG +#include + +int +main () +{ + assert (SIZEOF_OFF_T == sizeof (off_t)); + +#ifdef TEST_PTHREAD + assert (SIZEOF_PTHREAD_T == sizeof (pthread_t)); +#endif +}