[matroska] r837 - trunk/libebml/ebml/c

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: mosu
Date: 2004-09-24 02:54:24 +0400 (Fri, 24 Sep 2004)
New Revision: 837

Modified:
   trunk/libebml/ebml/c/libebml_t.h
Log:
Fix for the compilation on Solaris. I also redid the #if... hierarchy to be a bit less confusing.

Modified: trunk/libebml/ebml/c/libebml_t.h
===================================================================
--- trunk/libebml/ebml/c/libebml_t.h	2004-09-23 18:53:00 UTC (rev 836)
+++ trunk/libebml/ebml/c/libebml_t.h	2004-09-23 22:54:24 UTC (rev 837)
@@ -50,7 +50,7 @@
 
 // Changed char is unsigned now (signedness was causing trouble in endil)
 #if defined(_WIN32)
-#if !defined(__GNUC__)		// Microsoft Visual C++
+# if !defined(__GNUC__)		// Microsoft Visual C++
     typedef signed __int64 int64;
     typedef signed __int32 int32;
     typedef signed __int16 int16;
@@ -60,8 +60,8 @@
     typedef unsigned __int32 uint32;
     typedef unsigned __int16 uint16;
     typedef unsigned __int8 uint8;
-#else // __GNUC__, this is mingw
-#include <stdint.h>
+# else // __GNUC__, this is mingw
+#  include <stdint.h>
     typedef int64_t int64;
     typedef int32_t int32;
     typedef int16_t int16;
@@ -71,9 +71,8 @@
     typedef uint32_t uint32;
     typedef uint16_t uint16;
     typedef uint8_t uint8;
-#endif // __GNUC__
-#else
-#ifdef DJGPP				/* SL : DJGPP doesn't support POSIX types ???? */
+# endif // __GNUC__
+#elif defined(DJGPP)				/* SL : DJGPP doesn't support POSIX types ???? */
     typedef signed long long int64;
     typedef signed long int32;
     typedef signed short int16;
@@ -83,17 +82,24 @@
     typedef unsigned long uint32;
     typedef unsigned short uint16;
     typedef unsigned char uint8;
-#else	/* DJGPP -> anything else */
-#include <sys/types.h>
-#if defined(sun) && (defined(__svr4__) || defined(__SVR4)) // SOLARIS
-    typedef uint64_t u_int64_t;
-    typedef uint32_t u_int32_t;
-    typedef uint16_t u_int16_t;
-    typedef uint8_t  u_int8_t;
-#endif // SOLARIS
-#ifdef __BEOS__
-#include <support/SupportDefs.h>
-#else
+#elif defined(__sun) && (defined(__svr4__) || defined(__SVR4)) // SOLARIS
+# include <inttypes.h>
+# ifdef _NO_LONGLONG
+#  error This compiler does not support 64bit integers.
+# endif
+    typedef long long int64; // int64_t is not always defined :(
+    typedef int32_t int32;
+    typedef int16_t int16;
+    typedef int8_t int8;
+    typedef int8_t character;
+    typedef unsigned long long uint64; // uint64_t is not always defined :(
+    typedef uint32_t uint32;
+    typedef uint16_t uint16;
+    typedef uint8_t uint8;
+#elif defined(__BEOS__)
+# include <support/SupportDefs.h>
+#else // anything else (Linux, BSD, ...)
+# include <sys/types.h>
     typedef int64_t int64;
     typedef int32_t int32;
     typedef int16_t int16;
@@ -103,9 +109,7 @@
     typedef u_int32_t uint32;
     typedef u_int16_t uint16;
     typedef u_int8_t uint8;
-#endif
 #endif /* anything else */
-#endif /* _MSC_VER */
 
 typedef uint8  binary;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.