Commit 60f09cd2 authored by Daniel Black's avatar Daniel Black

MDEV-9288: portablity for compling on non-power platforms

Also removed surperflous stdio include.
parent 2538c7cf
......@@ -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 <ppc-asm.h>
#include "ppc-opcode.h"
......@@ -737,3 +740,5 @@ FUNC_START(__crc32_vpmsum)
mr r3,r10
blr
FUNC_END(__crc32_vpmsum)
#endif /* __powerpc__ */
#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
#include <stdio.h>
#ifdef __powerpc__
#define CRC_TABLE
#include "crc32_constants.h"
......@@ -64,3 +64,5 @@ unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
return crc;
}
#endif /* __powerpc__ */
......@@ -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 <ppc-asm.h>
#include "ppc-opcode.h"
......@@ -737,3 +740,5 @@ FUNC_START(__crc32_vpmsum)
mr r3,r10
blr
FUNC_END(__crc32_vpmsum)
#endif /* __powerpc__ */
#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
#include <stdio.h>
#ifdef __powerpc__
#define CRC_TABLE
#include "crc32_constants.h"
......@@ -64,3 +64,5 @@ unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
return crc;
}
#endif /* __powerpc__ */
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