From 2ff11bad690de020cfc74acd4d665bfce0782a2c Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Sat, 11 Feb 2006 02:42:50 +0000 Subject: Added workaround option for GCC on the PPC platform. This is a manually invoked option because I do not know under what circumstances (eg. versions etc) the problem occurs. If the raidfile test fails in release mode but passes in debug mode then try this option and see if it fixes it. --- lib/raidfile/RaidFileWrite.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/raidfile/RaidFileWrite.cpp b/lib/raidfile/RaidFileWrite.cpp index 8341943d..c9963f05 100644 --- a/lib/raidfile/RaidFileWrite.cpp +++ b/lib/raidfile/RaidFileWrite.cpp @@ -462,6 +462,9 @@ void RaidFileWrite::TransformToRaidStorage() ASSERT(sizeof(RaidFileRead::FileSizeType) >= sizeof(off_t)); int sizePos = (blockSize/sizeof(unsigned int)) - 2; RaidFileRead::FileSizeType sw = box_hton64(writeFileStat.st_size); +#ifdef HAVE_PPC_WORKAROUND + static RaidFileRead::FileSizeType ppcWorkaround = sw; +#endif unsigned int *psize = (unsigned int *)(&sw); pparity[sizePos+0] = pstripe1[sizePos+0] ^ psize[0]; pparity[sizePos+1] = pstripe1[sizePos+1] ^ psize[1]; -- cgit v1.2.3