Index: src/MantissaExponentConverter.cc =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/src/MantissaExponentConverter.cc,v retrieving revision 1.1 diff -u -r1.1 MantissaExponentConverter.cc --- src/MantissaExponentConverter.cc 16 Sep 2008 12:12:47 -0000 1.1 +++ src/MantissaExponentConverter.cc 30 Sep 2008 07:56:55 -0000 @@ -60,7 +60,7 @@ sscanf(input, "%d%d%n", &mantissa, &exponent, &length); if (fmt.flags & skip_flag) return length; if (length == -1) return -1; - value = (double)(mantissa) * pow(10, exponent); + value = (double)(mantissa) * pow(10.0, exponent); return length; } @@ -75,7 +75,7 @@ int prec = fmt.prec; if (prec < 1) prec = 6; - buf.printf("%.*e", prec-1, fabs(value)/pow(10, prec-1)); + buf.printf("%.*e", prec-1, fabs(value)/pow(10.0, prec-1)); buf.remove(1,1); buf.remove(buf.find('e'),1); Index: src/RawFloatConverter.cc =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/src/RawFloatConverter.cc,v retrieving revision 1.2 diff -u -r1.2 RawFloatConverter.cc --- src/RawFloatConverter.cc 24 Sep 2008 07:33:21 -0000 1.2 +++ src/RawFloatConverter.cc 2 Oct 2008 14:31:25 -0000 @@ -36,6 +36,19 @@ #include #endif +// Some architectures don't define __BYTE_ORDER but +// define either _LITTLE_ENDIAN or _BIG_ENDIAN +#ifndef __BYTE_ORDER +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#if defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) +#define __BYTE_ORDER __BIG_ENDIAN +#endif +#if !defined(_BIG_ENDIAN) && defined(_LITTLE_ENDIAN) +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif +#endif + #ifndef __BYTE_ORDER #error define __BYTE_ORDER as __LITTLE_ENDIAN or __BIG_ENDIAN #endif