blob: 0fbc8cb30b8476374cafd74752fc274a95eab2d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evolution-data-server-2.21.90.orig/calendar/libical/src/libical/icaltz-util.c evolution-data-server-2.21.90/calendar/libical/src/libical/icaltz-util.c
--- evolution-data-server-2.21.90.orig/calendar/libical/src/libical/icaltz-util.c 2008-01-23 06:16:42.000000000 -0500
+++ evolution-data-server-2.21.90/calendar/libical/src/libical/icaltz-util.c 2008-01-30 18:27:13.000000000 -0500
@@ -23,16 +23,16 @@
#include <string.h>
#if defined(sun) && defined(__SVR4)
#include <sys/byteorder.h>
-#else
-#ifdef _WIN32
+#elif defined(_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
+#elif defined(__linux__)
#include <byteswap.h>
#include <endian.h>
-#endif
+#else
+#include <sys/endian.h>
#endif
#include <limits.h>
#include <time.h>
@@ -96,7 +96,11 @@ decode (const void *ptr)
if ((BYTE_ORDER == BIG_ENDIAN) && sizeof (int) == 4)
return *(const int *) ptr;
else if (BYTE_ORDER == LITTLE_ENDIAN && sizeof (int) == 4)
+#ifdef __linux__
return bswap_32 (*(const int *) ptr);
+#else
+ return bswap32 (*(const uint32_t *) ptr);
+#endif
#endif
else
{
|