[matroska] r1155 - in trunk/libebml: ebml src
[email protected] Fri, 6 May 2005 15:43:40 +0400 (MSD)
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: robux4
Date: 2005-05-06 15:43:38 +0400 (Fri, 06 May 2005)
New Revision: 1155
Modified:
trunk/libebml/ebml/EbmlConfig.h
trunk/libebml/ebml/EbmlCrc32.h
trunk/libebml/ebml/EbmlEndian.h
trunk/libebml/src/EbmlCrc32.cpp
Log:
libebml: handle the WORS_BIGENDIAN flag the same way as other UNIX libs (defined or not)
Modified: trunk/libebml/ebml/EbmlConfig.h
===================================================================
--- trunk/libebml/ebml/EbmlConfig.h 2005-05-03 06:56:56 UTC (rev 1154)
+++ trunk/libebml/ebml/EbmlConfig.h 2005-05-06 11:43:38 UTC (rev 1155)
@@ -39,12 +39,12 @@
// 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__) || defined (__x86_64__)
-#define WORDS_BIGENDIAN 0
+#undef WORDS_BIGENDIAN
#elif defined (__sparc__) || defined (__alpha__) || defined (__PPC__) || defined (__mips__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
#define WORDS_BIGENDIAN 1
#else
// not automatically detected, put it yourself
-#define WORDS_BIGENDIAN 0 // for my testing platform (x86)
+#undef WORDS_BIGENDIAN // for my testing platform (x86)
#endif
#endif // not autoconf
Modified: trunk/libebml/ebml/EbmlCrc32.h
===================================================================
--- trunk/libebml/ebml/EbmlCrc32.h 2005-05-03 06:56:56 UTC (rev 1154)
+++ trunk/libebml/ebml/EbmlCrc32.h 2005-05-06 11:43:38 UTC (rev 1155)
@@ -44,7 +44,7 @@
const uint32 CRC32_NEGL = 0xffffffffL;
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
# define CRC32_INDEX(c) (c >> 24)
# define CRC32_SHIFTED(c) (c << 8)
#else
Modified: trunk/libebml/ebml/EbmlEndian.h
===================================================================
--- trunk/libebml/ebml/EbmlEndian.h 2005-05-03 06:56:56 UTC (rev 1154)
+++ trunk/libebml/ebml/EbmlEndian.h 2005-05-06 11:43:38 UTC (rev 1155)
@@ -92,7 +92,7 @@
inline void process_endian()
{
endian_value = platform_value;
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (ENDIAN == little_endian)
std::reverse(reinterpret_cast<uint8*>(&endian_value),reinterpret_cast<uint8*>(&endian_value+1));
#else // _ENDIANESS_
@@ -104,7 +104,7 @@
inline void process_platform()
{
platform_value = endian_value;
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (ENDIAN == little_endian)
std::reverse(reinterpret_cast<uint8*>(&platform_value),reinterpret_cast<uint8*>(&platform_value+1));
#else // _ENDIANESS_
Modified: trunk/libebml/src/EbmlCrc32.cpp
===================================================================
--- trunk/libebml/src/EbmlCrc32.cpp 2005-05-03 06:56:56 UTC (rev 1154)
+++ trunk/libebml/src/EbmlCrc32.cpp 2005-05-06 11:43:38 UTC (rev 1155)
@@ -44,7 +44,7 @@
const EbmlCallbacks EbmlCrc32::ClassInfos(EbmlCrc32::Create, EbmlCrc32_TheId, "EBMLCrc32\0ratamadabapa", EbmlVoid_Context);
const uint32 EbmlCrc32::m_tab[] = {
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
0x00000000L, 0x96300777L, 0x2c610eeeL, 0xba510999L, 0x19c46d07L,
0x8ff46a70L, 0x35a563e9L, 0xa395649eL, 0x3288db0eL, 0xa4b8dc79L,
0x1ee9d5e0L, 0x88d9d297L, 0x2b4cb609L, 0xbd7cb17eL, 0x072db8e7L,