[vtkusers] VTK 5.0.2, Mac OS 10.4.8, xlc
Sean McBride
sean at rogue-research.com
Fri Jan 19 11:14:53 EST 2007
On 2007-01-19 16:20, Peter Stihl said:
>CF_INLINE uint16_t CFSwapInt16(uint16_t arg) {
>#if defined(__i386__) && defined(__GNUC__)
> __asm__("xchgb %b0, %h0" : "+q" (arg));
> return arg;
>#elif defined(__ppc__) && defined(__GNUC__)
> uint16_t result;
> __asm__("lhbrx %0,0,%1" : "=r" (result) : "r" (&arg),
>"m" (arg)); <------------------------- line 39
> return result;
>#else
> uint16_t result;
> result = ((arg << 8) & 0xFF00) | ((arg >> 8) & 0xFF);
> return result;
>#endif
>}
>
>I'm not familiar with the inline-assembler syntax and the IBM doc
>doesn't give me a clue. When I remove the elif-block there is no
>error at this point, but the build process breaks again the next time
>the __GNUC__ macro is used. Do I have to make sure the __GNUC__ is
>not defined when using xlc? And if so, how? Adding cmake options
>CMAKE_C(XX)_FLAGS -U__GNUC__ doesn't work and I don't want to make
>changes to the gcc limits-file.
What if you try to build a simple 'Hello World' app that #includes
<CoreFoundation/CoreFoundation.h>? I guess it will also not build.
Also add something like:
#ifdef __GNUC__
print (yes);
#else
print (no);
#endif
to see if __GNUC__ is defined even in a simple app. Also, which OS?
Which Xcode? And which Mac OS SDK are you using?
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers
mailing list