summaryrefslogtreecommitdiff
path: root/mail/evolution-data-server/patches/patch-as
blob: f9eb0f7968402fe46d8ca92bbe5ff3d0ea471c13 (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
37
38
39
40
$NetBSD: patch-as,v 1.4 2008/04/15 17:45:38 drochner Exp $

--- calendar/libical/src/libical/icaltz-util.c.orig	2008-01-23 12:16:42.000000000 +0100
+++ calendar/libical/src/libical/icaltz-util.c
@@ -21,6 +21,7 @@
  */
 
 #include <string.h>
+#if 0 /* XXX see below */
 #if defined(sun) && defined(__SVR4)
 #include <sys/byteorder.h>
 #else
@@ -34,6 +35,7 @@
 #include <endian.h>
 #endif
 #endif
+#endif
 #include <limits.h>
 #include <time.h>
 #include <stdlib.h>
@@ -85,6 +87,7 @@ typedef struct
 static int
 decode (const void *ptr)
 {
+#if 0 /* XXX nonportable, possibly alignment problems */
 #if defined(sun) && defined(__SVR4)
     if (sizeof (int) == 4)
 #ifdef _BIG_ENDIAN
@@ -99,9 +102,10 @@ decode (const void *ptr)
         return bswap_32 (*(const int *) ptr);
 #endif
 	else
+#endif
 	{
 		const unsigned char *p = ptr;
-		int result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
+		unsigned int result = *p & (1 << (CHAR_BIT - 1)) ? ~0 : 0;
 
 		result = (result << 8) | *p++;
 		result = (result << 8) | *p++;