#include <stdio.h>
#include <byteswap.h>
int main()
{
long int fred,joe;
fred=66;
joe=bswap_64(fred);
printf(“fred=0%lx joe=0%lx\n”,fred,joe);
}
fails with:
foo.c:(.text+0x17): undefined reference to `__bswap_64’
Works with 6.2-5
Seems, looking at pgcc -E output, the problem is you read in
/usr/include/bits/byteswap.h
instead of your own version
linux86-64/7.0-4/include/bits/byteswap.h
This unfortunately causes compiling Qlogic/QuickSIlver MVAPICH to fail in
this way.
Work around?
Regards,
Mostyn