Browse Source

2009-06-20 Zoltan Varga <[email protected]>

	* src/glib.h: Add GUINT32_FROM/TO_BE macros.

svn path=/trunk/mono/; revision=136540
Zoltan Varga 16 years ago
parent
commit
2fefe8320f
2 changed files with 8 additions and 0 deletions
  1. 4 0
      eglib/ChangeLog
  2. 4 0
      eglib/src/glib.h

+ 4 - 0
eglib/ChangeLog

@@ -1,3 +1,7 @@
+2009-06-20  Zoltan Varga  <[email protected]>
+
+	* src/glib.h: Add GUINT32_FROM/TO_BE macros.
+
 2009-06-09  Jonathan Chambers <[email protected]>
 	
 	* CMakeLists.txt: Add start of CMake build.

+ 4 - 0
eglib/src/glib.h

@@ -860,11 +860,15 @@ glong     g_utf8_strlen        (const gchar *str, gssize max);
 #   define GUINT64_TO_LE(x) (x)
 #   define GUINT16_TO_LE(x) (x)
 #   define GUINT_TO_LE(x)   (x)
+#   define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x)
+#   define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
 #else
 #   define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
 #   define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
 #   define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
 #   define GUINT_TO_LE(x)   GUINT32_SWAP_LE_BE(x)
+#   define GUINT32_TO_BE(x) (x)
+#   define GUINT32_FROM_BE(x) (x)
 #endif
 
 #define GUINT32_FROM_LE(x)  (GUINT32_TO_LE (x))