[Pkg-mono-svn-commits] [mono] 01/02: Big Endian fix by Than Ngo <than at redhat.com> from https://bugzilla.xamarin.com/show_bug.cgi?id=31779

Jo Shields directhex at moszumanska.debian.org
Mon Jul 27 11:57:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

directhex pushed a commit to annotated tag debian/4.0.2.5+dfsg-2
in repository mono.

commit 7e9725e0a673b6865c65ce0e385b58b20bbbbe80
Author: Jo Shields <jo.shields at xamarin.com>
Date:   Mon Jul 27 12:34:31 2015 +0100

    Big Endian fix by Than Ngo <than at redhat.com> from https://bugzilla.xamarin.com/show_bug.cgi?id=31779
---
 mono/metadata/decimal-ms.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/mono/metadata/decimal-ms.c b/mono/metadata/decimal-ms.c
index d52e8c7..e72c73e 100644
--- a/mono/metadata/decimal-ms.c
+++ b/mono/metadata/decimal-ms.c
@@ -55,8 +55,13 @@ static const uint32_t ten_to_ten_div_4 = 2500000000U;
 #define DECIMAL_LO32(dec)        ((dec).v.v.Lo32)
 #define DECIMAL_MID32(dec)       ((dec).v.v.Mid32)
 #define DECIMAL_HI32(dec)        ((dec).Hi32)
-#define DECIMAL_LO64_GET(dec)    ((dec).v.Lo64)
-#define DECIMAL_LO64_SET(dec,value)   {(dec).v.Lo64 = value; }
+#if G_BYTE_ORDER != G_LITTLE_ENDIAN
+# define DECIMAL_LO64_GET(dec)   (((uint64_t)((dec).v.v.Mid32) << 32) | (dec).v.v.Lo32)
+# define DECIMAL_LO64_SET(dec,value)   {(dec).v.v.Lo32 = (value); (dec).v.v.Mid32 = ((value) >> 32); }
+#else
+# define DECIMAL_LO64_GET(dec)    ((dec).v.Lo64)
+# define DECIMAL_LO64_SET(dec,value)   {(dec).v.Lo64 = value; }
+#endif
 
 #define DECIMAL_SETZERO(dec) {DECIMAL_LO32(dec) = 0; DECIMAL_MID32(dec) = 0; DECIMAL_HI32(dec) = 0; DECIMAL_SIGNSCALE(dec) = 0;}
 #define COPYDEC(dest, src) {DECIMAL_SIGNSCALE(dest) = DECIMAL_SIGNSCALE(src); DECIMAL_HI32(dest) = DECIMAL_HI32(src); \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mono/packages/mono.git



More information about the Pkg-mono-svn-commits mailing list