diff --git a/ccan/README b/ccan/README index b5e83b62d..69db7ae64 100644 --- a/ccan/README +++ b/ccan/README @@ -1,3 +1,3 @@ CCAN imported from http://ccodearchive.net. -CCAN version: init-2419-g9bdb4be8 +CCAN version: init-2423-g696c9b68 diff --git a/ccan/ccan/endian/endian.h b/ccan/ccan/endian/endian.h index 6732e8aa8..3753f4900 100644 --- a/ccan/ccan/endian/endian.h +++ b/ccan/ccan/endian/endian.h @@ -113,9 +113,17 @@ static inline uint64_t bswap_64(uint64_t val) #elif HAVE_LITTLE_ENDIAN && HAVE_BIG_ENDIAN #error "Can't compile for both big and little endian." #elif HAVE_LITTLE_ENDIAN +#ifndef __BYTE_ORDER #define __BYTE_ORDER __LITTLE_ENDIAN +#elif __BYTE_ORDER != __LITTLE_ENDIAN +#error "__BYTE_ORDER already defined, but not equal to __LITTLE_ENDIAN" +#endif #elif HAVE_BIG_ENDIAN +#ifndef __BYTE_ORDER #define __BYTE_ORDER __BIG_ENDIAN +#elif __BYTE_ORDER != __BIG_ENDIAN +#error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN" +#endif #endif diff --git a/ccan/ccan/opt/usage.c b/ccan/ccan/opt/usage.c index 353d59bc4..12f44a487 100644 --- a/ccan/ccan/opt/usage.c +++ b/ccan/ccan/opt/usage.c @@ -110,7 +110,7 @@ static char *add_desc(char *base, size_t *len, size_t *max, base = add_str(base, len, max, opt->names); off = strlen(opt->names); - if (opt->type == OPT_HASARG + if ((opt->type & OPT_HASARG) && !strchr(opt->names, ' ') && !strchr(opt->names, '=')) { base = add_str(base, len, max, " "); diff --git a/ccan/tools/configurator/configurator.c b/ccan/tools/configurator/configurator.c index ecf8f9f5f..2e5b09c2b 100644 --- a/ccan/tools/configurator/configurator.c +++ b/ccan/tools/configurator/configurator.c @@ -102,7 +102,8 @@ static struct test tests[] = { "#include \n" "static char *func(int x) {" " char *p;\n" - " if (asprintf(&p, \"%u\", x) == -1) p = NULL;" + " if (asprintf(&p, \"%u\", x) == -1) \n" + " p = NULL;\n" " return p;\n" "}" }, { "HAVE_ATTRIBUTE_COLD", DEFINES_FUNC, NULL, NULL,