diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-02-24 01:52:11 -0800 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-01 16:26:55 +0100 |
commit | d9649812521e9c67cebb2f9a932e853d5333b2b1 (patch) | |
tree | b40075ac367101f6a58ea19f3ba14f6158dadfb5 /src/corelib/io/qdatastream.cpp | |
parent | cc78f47778de0feda95d7a85440d03ad7dcf40bd (diff) |
Remove ARMFPA support and Q_DOUBLE_FORMAT detection
Remove the -armfpa option the config.tests/unix/doubleformat*
detection. The places where we used QT_ARMFPA and Q_DOUBLE_FORMAT
has been removed as well.
Rationale: ARM FPA with GCC does not work with EABI. Qt currently
does not support compiling without EABI, making ARM FPA an
impossibility. It is unknown whether other compilers provide ARM FPA
support with EABI. Support for ARM FPA can be re-added in the future
should the need arise, but since ARM VFP is available for ARMv5 and up,
we should encourage implementors to instead use soft-floats or VFP.
Change-Id: I3671aba575118ae3e3e6d769759301c8f2f496f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/io/qdatastream.cpp')
-rw-r--r-- | src/corelib/io/qdatastream.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 7920d881b4..f3fe91427a 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -771,10 +771,6 @@ QDataStream &QDataStream::operator>>(float &f) return *this; } -#if defined(Q_DOUBLE_FORMAT) -#define Q_DF(x) Q_DOUBLE_FORMAT[(x)] - '0' -#endif - /*! \overload @@ -797,7 +793,6 @@ QDataStream &QDataStream::operator>>(double &f) f = 0.0; CHECK_STREAM_PRECOND(*this) -#ifndef Q_DOUBLE_FORMAT if (dev->read((char *)&f, 8) != 8) { f = 0.0; setStatus(ReadPastEnd); @@ -811,39 +806,6 @@ QDataStream &QDataStream::operator>>(double &f) f = x.val1; } } -#else - //non-standard floating point format - union { - double val1; - char val2[8]; - } x; - char *p = x.val2; - char b[8]; - if (dev->read(b, 8) == 8) { - if (noswap) { - *p++ = b[Q_DF(0)]; - *p++ = b[Q_DF(1)]; - *p++ = b[Q_DF(2)]; - *p++ = b[Q_DF(3)]; - *p++ = b[Q_DF(4)]; - *p++ = b[Q_DF(5)]; - *p++ = b[Q_DF(6)]; - *p = b[Q_DF(7)]; - } else { - *p++ = b[Q_DF(7)]; - *p++ = b[Q_DF(6)]; - *p++ = b[Q_DF(5)]; - *p++ = b[Q_DF(4)]; - *p++ = b[Q_DF(3)]; - *p++ = b[Q_DF(2)]; - *p++ = b[Q_DF(1)]; - *p = b[Q_DF(0)]; - } - f = x.val1; - } else { - setStatus(ReadPastEnd); - } -#endif return *this; } @@ -1112,7 +1074,6 @@ QDataStream &QDataStream::operator<<(double f) } CHECK_STREAM_WRITE_PRECOND(*this) -#ifndef Q_DOUBLE_FORMAT if (noswap) { if (dev->write((char *)&f, sizeof(double)) != sizeof(double)) q_status = WriteFailed; @@ -1126,36 +1087,6 @@ QDataStream &QDataStream::operator<<(double f) if (dev->write((char *)&x.val2, sizeof(double)) != sizeof(double)) q_status = WriteFailed; } -#else - union { - double val1; - char val2[8]; - } x; - x.val1 = f; - char *p = x.val2; - char b[8]; - if (noswap) { - b[Q_DF(0)] = *p++; - b[Q_DF(1)] = *p++; - b[Q_DF(2)] = *p++; - b[Q_DF(3)] = *p++; - b[Q_DF(4)] = *p++; - b[Q_DF(5)] = *p++; - b[Q_DF(6)] = *p++; - b[Q_DF(7)] = *p; - } else { - b[Q_DF(7)] = *p++; - b[Q_DF(6)] = *p++; - b[Q_DF(5)] = *p++; - b[Q_DF(4)] = *p++; - b[Q_DF(3)] = *p++; - b[Q_DF(2)] = *p++; - b[Q_DF(1)] = *p++; - b[Q_DF(0)] = *p; - } - if (dev->write(b, 8) != 8) - q_status = WriteFailed; -#endif return *this; } |