On Tue, Jun 28, 2016 at 03:03:17PM +0200, Landry Breuil wrote:
> On Tue, Jun 28, 2016 at 01:39:21PM +0100, David CARLIER wrote:
> > ok, I may try to have a look in a couple of hours if it is ok ?
> > 
> > On 28 June 2016 at 13:28, Stuart Henderson <[email protected]> wrote:
> > 
> > > This is broken on 32-bit arch, at least these:
> > >
> > > /usr/obj/ports/minetest-0.4.14/minetest-0.4.14/src/unittest/test_serialization.cpp:385:
> > > error: integer constant is too large for 'long' type
> > > /usr/obj/ports/minetest-0.4.14/minetest-0.4.14/src/unittest/test_serialization.cpp:467:
> > > error: integer constant is too large for 'long' type
> > > /usr/obj/ports/minetest-0.4.14/minetest-0.4.14/src/unittest/test_serialization.cpp:579:
> > > error: integer constant is too large for 'long' type
> > >
> > > and maybe more in other files.
> 
> There's probably more chunks to add to
> patches/patch-src_unittest_test_serialization_cpp that's all.

Here's a potential fix - untested, no i386 right now.

Landry

Index: patches/patch-src_unittest_test_serialization_cpp
===================================================================
RCS file: 
/cvs/ports/games/minetest/patches/patch-src_unittest_test_serialization_cpp,v
retrieving revision 1.2
diff -u -r1.2 patch-src_unittest_test_serialization_cpp
--- patches/patch-src_unittest_test_serialization_cpp   28 Jun 2016 13:56:58 
-0000      1.2
+++ patches/patch-src_unittest_test_serialization_cpp   28 Jun 2016 13:57:58 
-0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_unittest_test_serialization_cpp,v 1.2 2016/06/28 13:56:58 
landry Exp $
 --- src/unittest/test_serialization.cpp.orig   Sun May 15 14:49:15 2016
-+++ src/unittest/test_serialization.cpp        Tue Jun 28 15:56:19 2016
++++ src/unittest/test_serialization.cpp        Tue Jun 28 15:57:37 2016
 @@ -295,7 +295,7 @@ void TestSerialization::testStreamRead()
        UASSERT(readU8(is) == 0x11);
        UASSERT(readU16(is) == 0x2233);
@@ -19,3 +19,30 @@
  
        writeS8(os, -128);
        writeS16(os, 30000);
+@@ -382,7 +382,7 @@ void TestSerialization::testVecPut()
+       putU8(&buf, 0x11);
+       putU16(&buf, 0x2233);
+       putU32(&buf, 0x44556677);
+-      putU64(&buf, 0x8899AABBCCDDEEFF);
++      putU64(&buf, 0x8899AABBCCDDEEFFLL);
+ 
+       putS8(&buf, -128);
+       putS16(&buf, 30000);
+@@ -464,7 +464,7 @@ void TestSerialization::testBufReader()
+       UASSERT(buf.getU8() == 0x11);
+       UASSERT(buf.getU16() == 0x2233);
+       UASSERT(buf.getU32() == 0x44556677);
+-      UASSERT(buf.getU64() == 0x8899AABBCCDDEEFF);
++      UASSERT(buf.getU64() == 0x8899AABBCCDDEEFFLL);
+       UASSERT(buf.getS8() == -128);
+       UASSERT(buf.getS16() == 30000);
+       UASSERT(buf.getS32() == -6);
+@@ -576,7 +576,7 @@ void TestSerialization::testBufReader()
+       UASSERT(u8_data == 0x11);
+       UASSERT(u16_data == 0x2233);
+       UASSERT(u32_data == 0x44556677);
+-      UASSERT(u64_data == 0x8899AABBCCDDEEFF);
++      UASSERT(u64_data == 0x8899AABBCCDDEEFFLL);
+       UASSERT(s8_data == -128);
+       UASSERT(s16_data == 30000);
+       UASSERT(s32_data == -6);

Reply via email to