1
Unfortunately __WORDSIZE is not portable. In GCC it is even defined
2
on different places depending on the version. If you have a better patch
5
This patch is based on suggestions from Siim Poder on bug #551074.
7
diff -Nur -x '*.orig' -x '*~' zeroc-ice/cpp/include/IceUtil/Config.h zeroc-ice.new/cpp/include/IceUtil/Config.h
8
--- zeroc-ice/cpp/include/IceUtil/Config.h 2009-03-29 11:06:23.035074259 +0200
9
+++ zeroc-ice.new/cpp/include/IceUtil/Config.h 2009-10-18 19:52:40.714084622 +0200
11
// Most CPUs support only one endianness, with the notable exceptions
12
// of Itanium (IA64) and MIPS.
14
-#if defined(__i386) || defined(_M_IX86) || defined(__x86_64) || \
15
+#if defined(HAVE_ENDIAN_H)
17
+# if __BYTE_ORDER==__LITTLE_ENDIAN
18
+# define ICE_LITTLE_ENDIAN
19
+# elif __BYTE_ORDER==__BIG_ENDIAN
20
+# define ICE_BIG_ENDIAN
22
+# error "Unknown endian type"
26
+#if !defined(ICE_LITTLE_ENDIAN) && !defined(ICE_BIG_ENDIAN)
27
+#if defined(__i386) || defined(_M_IX86) || defined(__x86_64) || \
28
defined(_M_X64) || defined(_M_IA64) || defined(__alpha__) || \
30
# define ICE_LITTLE_ENDIAN
33
# error "Unknown architecture"
40
-#if defined(__linux) && defined(__sparc__)
41
+#if defined(HAVE_LIMITS_H)
44
+# if __WORDSIZE == 64
51
+#if !defined(ICE_32) && !defined(ICE_64)
52
+#if defined(__linux) && defined(__sparc__)
54
// We are a linux sparc, which forces 32 bit usr land, no matter
63
// Compiler extensions to export and import symbols: see the documentation