commit da97901fbe482ddae9a6a19b99806516d5138345 Author: Daniel Black Date: Wed Dec 16 11:14:42 2015 +1100 CRC32 - portablity for compling on non-power platforms Also removed surperflous stdio include. diff --git a/storage/innobase/ut/crc32_power8/crc32.S b/storage/innobase/ut/crc32_power8/crc32.S index 136abe3..52046bb 100644 --- a/storage/innobase/ut/crc32_power8/crc32.S +++ b/storage/innobase/ut/crc32_power8/crc32.S @@ -23,6 +23,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ + +#ifdef __powerpc__ + #include #include "ppc-opcode.h" @@ -737,3 +740,5 @@ FUNC_START(__crc32_vpmsum) mr r3,r10 blr FUNC_END(__crc32_vpmsum) + +#endif /* __powerpc__ */ diff --git a/storage/innobase/ut/crc32_power8/crc32_constants.h b/storage/innobase/ut/crc32_power8/crc32_constants.h index 7a3a8dc..ba2592b 100644 --- a/storage/innobase/ut/crc32_power8/crc32_constants.h +++ b/storage/innobase/ut/crc32_power8/crc32_constants.h @@ -1,3 +1,9 @@ +#ifndef CRC32_CONSTANTS_H +#define CRC32_CONSTANTS_H + +#ifdef __powerpc__ + + #define CRC 0x1edc6f41 #define CRC_XOR #define REFLECT @@ -899,3 +905,7 @@ static const unsigned int crc_table[] = { /* 33 bit reflected Barrett constant n */ .octa 0x00000000000000000000000105ec76f1 #endif + +#endif /* __powerpc__ */ + +#endif diff --git a/storage/innobase/ut/crc32_power8/crc32_wrapper.c b/storage/innobase/ut/crc32_power8/crc32_wrapper.c index 6f9c788..d4c9137 100644 --- a/storage/innobase/ut/crc32_power8/crc32_wrapper.c +++ b/storage/innobase/ut/crc32_power8/crc32_wrapper.c @@ -1,4 +1,4 @@ -#include +#ifdef __powerpc__ #define CRC_TABLE #include "crc32_constants.h" @@ -64,3 +64,5 @@ out: return crc; } + +#endif /* __powerpc__ */