2 Fix compilation on mips
4 Original commit message by Christopher Martin, debian bug 342545.
6 * Add a patch, courtesy of Steve Langasek, that fixes
7 qt-x11-free's longstanding intermittent FTBFS on hppa, caused
8 by "the bogus assumption in src/tools/qlocale.cpp that a
9 char[] can be cast to a double *." (Closes: #342545)
11 --- qt-x11-free-3.3.6.orig/src/tools/qlocale.cpp
12 +++ qt-x11-free-3.3.6/src/tools/qlocale.cpp
16 // We can't rely on -NAN, since all operations on a NAN should return a NAN.
17 +static double be_neg_nan;
18 +static double le_neg_nan;
19 static const unsigned char be_neg_nan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 };
20 static const unsigned char le_neg_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff };
21 +static bool neg_nan_init = false;
23 static inline double negNan()
27 + memcpy(&be_neg_nan,be_neg_nan_bytes,sizeof(be_neg_nan_bytes));
28 + memcpy(&le_neg_nan,le_neg_nan_bytes,sizeof(le_neg_nan_bytes));
29 + neg_nan_init = true;
31 return (ByteOrder == BigEndian ?
32 - *((const double *) be_neg_nan_bytes) :
33 - *((const double *) le_neg_nan_bytes));
39 // Sizes as defined by the ISO C99 standard - fallback