diff --git a/gfx/src/nsCoord.h b/gfx/src/nsCoord.h index ea4668347d3b..ff41a68a9533 100644 --- a/gfx/src/nsCoord.h +++ b/gfx/src/nsCoord.h @@ -59,7 +59,7 @@ inline void VERIFY_COORD(nscoord aCoord) { inline nscoord NSToCoordRound(float aValue) { -#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) +#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__) return NS_lroundup30(aValue); #else return nscoord(floorf(aValue + 0.5f)); @@ -68,7 +68,7 @@ inline nscoord NSToCoordRound(float aValue) inline nscoord NSToCoordRound(double aValue) { -#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) +#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__) return NS_lroundup30((float)aValue); #else return nscoord(floor(aValue + 0.5f)); diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h index 558bdae32153..aedd31eab77c 100644 --- a/xpcom/ds/nsMathUtils.h +++ b/xpcom/ds/nsMathUtils.h @@ -35,7 +35,7 @@ inline int32_t NS_lround(double x) /* NS_roundup30 rounds towards infinity for positive and */ /* negative numbers. */ -#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) +#if defined(XP_WIN32) && defined(_M_IX86) && !defined(__GNUC__) && !defined(__clang__) inline int32_t NS_lroundup30(float x) { /* Code derived from Laurent de Soras' paper at */