$OpenBSD: patch-src_tools_qlocale_cpp,v 1.1 2010/07/29 13:41:45 kettenis Exp $
--- src/tools/qlocale.cpp.orig	Fri Feb  2 15:01:05 2007
+++ src/tools/qlocale.cpp	Thu Jul 29 10:08:21 2010
@@ -121,16 +121,6 @@ static inline double nan()
 #   define NAN (::nan())
 #endif
 
-// We can't rely on -NAN, since all operations on a NAN should return a NAN.
-static const unsigned char be_neg_nan_bytes[] = { 0xff, 0xf8, 0, 0, 0, 0, 0, 0 };
-static const unsigned char le_neg_nan_bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0xff };
-static inline double negNan()
-{
-    return (ByteOrder == BigEndian ?
-            *((const double *) be_neg_nan_bytes) :
-            *((const double *) le_neg_nan_bytes));
-}
-
 // Sizes as defined by the ISO C99 standard - fallback
 #ifndef LLONG_MAX
 #   define LLONG_MAX Q_INT64_C(9223372036854775807)
@@ -164,7 +154,7 @@ static inline bool qIsInf(double d)
 
 static inline bool qIsNan(double d)
 {
-    return compareBits(d, NAN) || compareBits(d, negNan());
+    return isnan(d);
 }
 
 static const uint locale_index[] = {
