gst/nsf/types.h: Rename #ifndef header guard symbol to something less generic, so...
authorTim-Philipp Müller <tim@centricular.net>
Tue, 17 Apr 2007 08:48:34 +0000 (08:48 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 17 Apr 2007 08:48:34 +0000 (08:48 +0000)
Original commit message from CVS:
* gst/nsf/types.h:
Rename #ifndef header guard symbol to something less generic, so
types.h doesn't get skipped over when compiling on MingW. Include
GLib headers and use those to set the endianness and the basic
types so that this isn't entirely broken for non-x86 architectures.

ChangeLog
gst/nsf/types.h

index 1c3e86f..52075a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-04-17  Tim-Philipp Müller  <tim at centricular dot net>
 
+       * gst/nsf/types.h:
+         Rename #ifndef header guard symbol to something less generic, so
+         types.h doesn't get skipped over when compiling on MingW. Include
+         GLib headers and use those to set the endianness and the basic
+         types so that this isn't entirely broken for non-x86 architectures.
+
+2007-04-17  Tim-Philipp Müller  <tim at centricular dot net>
+
        * gst/mve/gstmvedemux.c: (gst_mve_audio_init):
          Use G_LITTLE_ENDIAN instead of LITTLE_ENDIAN, so stuff compiles on
          MingW (no idea though why we add a BYTE_ORDER endianness field if
index 04d7bb6..8ba17e9 100644 (file)
 ** $Id$
 */
 
-#ifndef _TYPES_H_
-#define _TYPES_H_
+#ifndef _NSF_TYPES_H_
+#define _NSF_TYPES_H_
 
+#include <glib.h> /* for types, endianness */
+
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
 /* Define this if running on little-endian (x86) systems */
 #define  HOST_LITTLE_ENDIAN
+#else
+#undef  HOST_LITTLE_ENDIAN
+#endif
 
 #ifdef __GNUC__
 #define  INLINE      static inline
 #define  INLINE      static
 #endif
 
-/* These should be changed depending on the platform */
-typedef  char     int8;
-typedef  short    int16;
-typedef  int      int32;
+typedef  gint8     int8;
+typedef  gint16    int16;
+typedef  gint32    int32;
 
-typedef  unsigned char  uint8;
-typedef  unsigned short uint16;
-typedef  unsigned int   uint32;
+typedef  guint8    uint8;
+typedef  guint16   uint16;
+typedef  guint32   uint32;
 
-typedef  uint8    boolean;
+typedef  guint8    boolean;
 
 #ifndef  TRUE
 #define  TRUE     1
@@ -79,10 +84,17 @@ typedef  uint8    boolean;
 #define  ASSERT_MSG(msg)
 #endif
 
-#endif /* _TYPES_H_ */
+#endif /* _NSF_TYPES_H_ */
 
 /*
 ** $Log$
+** Revision 1.3  2007/04/17 08:48:34  tpm
+** * gst/nsf/types.h:
+** Rename #ifndef header guard symbol to something less generic, so
+** types.h doesn't get skipped over when compiling on MingW. Include
+** GLib headers and use those to set the endianness and the basic
+** types so that this isn't entirely broken for non-x86 architectures.
+**
 ** Revision 1.2  2006/07/14 09:11:11  wtay
 ** * gst/nsf/Makefile.am:
 ** * gst/nsf/memguard.c: