libical r631 - in trunk: . src/libical



Author: tml
Date: Wed Jan 23 03:04:14 2008
New Revision: 631
URL: http://svn.gnome.org/viewvc/libical?rev=631&view=rev

Log:
2008-01-23  Tor Lillqvist  <tml novell com>

	* src/libical/icaltz-util.c: Implement byteorder macros on Win32.



Modified:
   trunk/ChangeLog
   trunk/src/libical/icaltz-util.c

Modified: trunk/src/libical/icaltz-util.c
==============================================================================
--- trunk/src/libical/icaltz-util.c	(original)
+++ trunk/src/libical/icaltz-util.c	Wed Jan 23 03:04:14 2008
@@ -24,9 +24,16 @@
 #if defined(sun) && defined(__SVR4)
 #include <sys/byteorder.h>
 #else
+#ifdef _WIN32
+#define BIG_ENDIAN 'B'
+#define LITTLE_ENDIAN 'l'
+#define BYTE_ORDER LITTLE_ENDIAN
+#define bswap_32(val) ((((val) & 0x000000ffU) << 24) | (((val) & 0x0000ff00U) <<  8) | (((val) & 0x00ff0000U) >>  8) | (((val) & 0xff000000U) >> 24))
+#else
 #include <byteswap.h>
 #include <endian.h>
 #endif
+#endif
 #include <limits.h>
 #include <time.h>
 #include <stdlib.h>



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