gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash libamf/amf.cpp ChangeLog


From: Martin Guy
Subject: [Gnash-commit] gnash libamf/amf.cpp ChangeLog
Date: Wed, 02 May 2007 14:18:06 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Martin Guy <martinwguy> 07/05/02 14:18:05

Modified files:
        libamf         : amf.cpp 
        .              : ChangeLog 

Log message:
                * Revert attempt to use endian.hpp. It broke someone's build. 
QED.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.cpp?cvsroot=gnash&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3063&r2=1.3064

Patches:
Index: libamf/amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- libamf/amf.cpp      2 May 2007 07:34:34 -0000       1.35
+++ libamf/amf.cpp      2 May 2007 14:18:05 -0000       1.36
@@ -16,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: amf.cpp,v 1.35 2007/05/02 07:34:34 strk Exp $ */
+/* $Id: amf.cpp,v 1.36 2007/05/02 14:18:05 martinwguy Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -36,8 +36,6 @@
 #include "amf.h"
 #include "amfutf8.h"
 
-#include <boost/detail/endian.hpp>
-
 using namespace std;
 using namespace gnash;
 
@@ -122,10 +120,20 @@
 static void *
 swapBytes(void *word, int size)
 {
-#ifdef BOOST_BIG_ENDIAN
+    union {
+       uint16_t s;
+       struct {
+           uint8_t c0;
+           uint8_t c1;
+       } c;
+    } u;
+          
+    u.s = 1;
+    if (u.c.c0 == 0) {
     // Big-endian machine: do nothing
-#else
-# ifdef BOOST_LITTLE_ENDIAN
+       return word;
+    }
+
     // Little-endian machine: byte-swap the word
 
     // A conveniently-typed pointer to the source data
@@ -155,10 +163,6 @@
        break;
       }
     }
-# else
-#  error "Unsupported host endianness"
-# endif
-#endif
 
     return word;
 }

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3063
retrieving revision 1.3064
diff -u -b -r1.3063 -r1.3064
--- ChangeLog   2 May 2007 13:37:15 -0000       1.3063
+++ ChangeLog   2 May 2007 14:18:05 -0000       1.3064
@@ -14,6 +14,7 @@
        * libbase/tu_config.h,libbase/jpeg.cpp,server/swf/tag_loaders.cpp,
          compatibility_include.h: Having jpeglib is compulsory, so
          remove TU_CONFIG_LINK_TO_JPEGLIB
+       * Revert attempt to use endian.hpp. It broke someone's build. QED.
 
 2007-05-02 Sandro Santilli <address@hidden>
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]