4 static int assert_fail(const char* s, unsigned l)
6 fprintf(stderr, "assertion failed in line %u: '%s'\n", l, s);
9 #define ASSERT(expr) ((expr) ? 1 : assert_fail(#expr,__LINE__))
12 #if !defined(__i386__)
13 #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
16 if (BYTE_ORDER != LITTLE_ENDIAN) return r;
21 union { long l; unsigned char c[sizeof(long)]; } u;
22 u.l = 0; u.c[0] = 0x80;
23 r &= ASSERT(u.l == 128);
24 u.l = 0; u.c[sizeof(long)-1] = 0x80;