[Box Backup-dev] PPC workaround (was: COMMIT r436 - in box/trunk: . lib/raidfile)

Ben Summers boxbackup-dev at fluffy.co.uk
Sun Feb 12 10:28:39 GMT 2006


On 12 Feb 2006, at 03:16, subversion at fluffy.co.uk wrote:

> Author: martin
> Date: 2006-02-12 03:16:57 +0000 (Sun, 12 Feb 2006)
> New Revision: 436
>
> Modified:
>    box/trunk/configure.ac
>    box/trunk/lib/raidfile/RaidFileWrite.cpp
> Log:
> This ppc problem is clearly a common big-endian platform issue.
> Remove ppc hack and configure option. Replace dubious casts with  
> clearer use of memcpy to make this work on all platforms all of the  
> time.


The ppc hack wasn't necessary on the Mac. gcc -v outputs

Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5247.obj~4/src/configure -- 
disable-checking -enable-werror --prefix=/usr --mandir=/share/man -- 
enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg] 
[^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 -- 
build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 -- 
target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5247)

Which gcc are you using?

Should this be specific to a compiler version?


> Note that there isn't really a call to memcpy, the compiler inlines  
> it as 2 int copies which is an insignificant overhead (even true  
> with -O0).

You are very trusting of compilers.

Ben







More information about the Boxbackup-dev mailing list