Commit 5dbea46c authored by Daniel Black's avatar Daniel Black

crc32c: Fix AIX compulation - ALIGN defined

ALIGN was defined already:

mysys/crc32/crc32c.cc:390: warning: "ALIGN" redefined
 #define ALIGN(n, m)     ((n + ((1 << m) - 1)) & ~((1 << m) - 1))

In file included from /root/aix/build/include/my_global.h:543,
                 from /root/aix/build/mysys/crc32/crc32c.cc:22:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/include-fixed/sys/socket.h:788: note: this is the location of the previous definition
 #define ALIGN(p)                (ulong)((caddr_t)(p) + MACHINE_ALIGNMENT - 1 - \
parent 60d1461a
...@@ -386,6 +386,10 @@ uint32_t ExtendImpl(uint32_t crc, const char* buf, size_t size) { ...@@ -386,6 +386,10 @@ uint32_t ExtendImpl(uint32_t crc, const char* buf, size_t size) {
const uint8_t *e = p + size; const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu; uint64_t l = crc ^ 0xffffffffu;
#ifdef ALIGN
#undef ALIGN
#endif
// Align n to (1 << m) byte boundary // Align n to (1 << m) byte boundary
#define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1)) #define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment