# HG changeset patch # User Christian Kamm # Date 1217271041 -7200 # Node ID 491264b7cb93bd36c1a8f56590470a2becc1e173 # Parent 023fa78c1203a72c99e195e4a1a5f5528ce12b27 Use == in RealEquals and get rid of the memcmp there entirely. diff -r 023fa78c1203 -r 491264b7cb93 dmd/expression.c --- a/dmd/expression.c Mon Jul 28 08:05:21 2008 +0200 +++ b/dmd/expression.c Mon Jul 28 20:50:41 2008 +0200 @@ -1498,7 +1498,7 @@ /* In some cases, the REALPAD bytes get garbage in them, * so be sure and ignore them. */ - memcmp(&x1, &x2, REAL_T_SIZE - REAL_T_PAD) == 0; + x1 == x2; } int RealExp::equals(Object *o) diff -r 023fa78c1203 -r 491264b7cb93 dmd/mars.h --- a/dmd/mars.h Mon Jul 28 08:05:21 2008 +0200 +++ b/dmd/mars.h Mon Jul 28 20:50:41 2008 +0200 @@ -213,14 +213,6 @@ #include "d-gcc-real.h" #else typedef long double real_t; -// this should be enough -#if defined(i386) || defined(__i386__) || defined(_WIN32) || defined(__MINGW32__) -#define REAL_T_SIZE 12 -#define REAL_T_PAD 2 -#else -#define REAL_T_SIZE sizeof(real_t) -#define REAL_T_PAD 0 -#endif #endif // Modify OutBuffer::writewchar to write the correct size of wchar