endian: add constant versions.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Apr 2013 07:08:24 +0000 (16:38 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Apr 2013 07:08:24 +0000 (16:38 +0930)
commit6abc867fce8c3eba40eb26092d31e34b47dd9165
treef9ab84f77c6fe508c2c20a4130735bae684f0a93
parente5663b6f7df31a84efab04b329fded373af50716
endian: add constant versions.

Sometimes you really need a compile-time constant, but there's no generic way
to create a macro which does this and only evaluates its argument once.

Thus we need specific const macros.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/endian/endian.h
ccan/endian/test/compile_ok-constant.c [new file with mode: 0644]