core-lightning/libwally-core/src/ccan_config.h
Rusty Russell 1271ac8899 libwally-core: import version 3b025127cbf11912f8b95e7ff3c905d74e8433ce
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-21 15:15:28 +10:30

35 lines
791 B
C

/* Config directives for ccan */
#ifdef WORDS_BIGENDIAN
# define HAVE_BIG_ENDIAN 1
#else
# define HAVE_LITTLE_ENDIAN 1
#endif
#ifdef __GNUC__
# define HAVE_ATTRIBUTE_COLD 1
# define HAVE_ATTRIBUTE_NORETURN 1
# define HAVE_ATTRIBUTE_PRINTF 1
# define HAVE_ATTRIBUTE_CONST 1
# define HAVE_ATTRIBUTE_PURE 1
# define HAVE_ATTRIBUTE_UNUSED 1
# define HAVE_ATTRIBUTE_USED 1
# define HAVE_BUILTIN_CONSTANT_P 1
# define HAVE_WARN_UNUSED_RESULT 1
#endif
#ifdef HAVE_BYTESWAP_H
#define HAVE_BSWAP_64 1
#endif
#if HAVE_UNALIGNED_ACCESS
#define alignment_ok(p, n) true
#else
#define alignment_ok(p, n) ((size_t)(p) % (n) == 0)
#endif
/* Clear a set of memory areas passed as ptr1, len1, ptr2, len2 etc */
void clear_n(unsigned int count, ...);
#define CCAN_CLEAR_MEMORY(p, len) clear_n(1, p, len)