[Matroska-users] libebml GCC4 diff

Stefan Seyfried seife at gmane0305.slipkontur.de
Thu Apr 14 16:54:41 CEST 2005


Hi,

our compiler guys are updating the compiler right now and are fixing several
packages up while doing so. One of them was libebml :-)
The patch is against libebml 0.7.3

Have a lot of fun,

   Stefan


--- libebml-0.7.3/ebml/EbmlCrc32.h.ORG	2005-01-10 23:49:42.000000000 +0100
+++ libebml-0.7.3/ebml/EbmlCrc32.h	2005-04-14 10:32:01.612072785 +0200
@@ -143,7 +143,7 @@
 
 inline bool IsAlignedOn(const void *p, unsigned int alignment)
 {
-	return IsPowerOf2(alignment) ? ModPowerOf2((unsigned int)p, alignment) == 0 : (unsigned int)p % alignment == 0;
+	return IsPowerOf2(alignment) ? ModPowerOf2((unsigned long)p, alignment) == 0 : (unsigned long)p % alignment == 0;
 }
 
 template <class T>
--- libebml-0.7.3/ebml/EbmlConfig.h.ORG	2004-08-10 14:27:34.000000000 +0200
+++ libebml-0.7.3/ebml/EbmlConfig.h	2005-04-14 11:09:39.880890052 +0200
@@ -38,7 +38,7 @@
 
 // automatic endianess detection working on GCC
 #if !defined(WORDS_BIGENDIAN)
-#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) || defined (__amd64__)
+#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) || defined (__amd64__) || defined (__x86_64__)
 #define WORDS_BIGENDIAN 0
 #elif defined (__sparc__) || defined (__alpha__) || defined (__PPC__) || defined (__mips__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
 #define WORDS_BIGENDIAN 1
--- libebml-0.7.3/src/EbmlFloat.cpp.ORG	2005-01-10 23:49:42.000000000 +0100
+++ libebml-0.7.3/src/EbmlFloat.cpp	2005-04-14 13:07:46.609694143 +0200
@@ -102,8 +102,10 @@
 		if (Size == 4) {
 			big_int32 TmpRead;
 			TmpRead.Eval(Buffer);
-			float val = *((float *)&(int32(TmpRead)));
-			Value = val;
+			int32 val = int32(TmpRead);
+			Value = float(val);
+		//	float val = *((float *)&(int32(TmpRead)));
+		//	Value = val;
 			bValueIsSet = true;
 		} else if (Size == 8) {
 			big_int64 TmpRead;
-- 
Stefan Seyfried




More information about the Matroska-users mailing list