tags 360482 + patch
On Sun, Apr 02, 2006 at 04:43:18PM +0200, Bastian Blank wrote:
> > ../../include/IceUtil/Config.h:27:5: error: #error "Unknown architecture"
> > make[3]: *** [Base64.o] Error 1
The following patch takes advantage of <endian.h> and <limits.h> to
support all linux/glibc architectures.
lamont
diff -ur t/zeroc-ice-3.0.1/debian/patches/bugs-arch.diff
zeroc-ice-3.0.1/debian/patches/bugs-arch.diff
--- t/zeroc-ice-3.0.1/debian/patches/bugs-arch.diff 2006-04-12
05:38:57.000000000 +0000
+++ zeroc-ice-3.0.1/debian/patches/bugs-arch.diff 2006-04-12
05:42:30.000000000 +0000
@@ -4,39 +4,59 @@
Date: Mon, 20 Mar 2006 05:23:57 +0000
Added __alpha__ to icecpp config.h too.
+Use endian.h and limits.h to determine endianness and size (on __linux)
Index: include/IceUtil/Config.h
===================================================================
---- include/IceUtil/Config.h~ 2006-02-01 06:56:14.000000000 +0100
-+++ include/IceUtil/Config.h 2006-03-20 12:15:48.000000000 +0100
-@@ -18,10 +18,10 @@
+--- include/IceUtil/Config.h.orig 2006-04-11 23:28:51.000000000 -0600
++++ include/IceUtil/Config.h 2006-04-11 23:34:23.000000000 -0600
+@@ -16,7 +16,16 @@
+ // Most CPUs support only one endianness, with the notable exceptions
+ // of Itanium (IA64) and MIPS.
//
- #if defined(__i386) || defined(_M_IX86) || \
+-#if defined(__i386) || defined(_M_IX86) || \
++#if defined(__linux)
++# include <endian.h>
++# if __BYTE_ORDER==__LITTLE_ENDIAN
++# define ICE_LITTLE_ENDIAN
++# elif __BYTE_ORDER==__BIG_ENDIAN
++# define ICE_BIG_ENDIAN
++# else
++# error "Unknown endian type"
++# endif
++#elif defined(__i386) || defined(_M_IX86) || \
defined(__x86_64) || defined(_M_X64) || \
-- defined(_M_IA64) || defined(__alpha__)
-+ defined(_M_IA64) || defined(__alpha__) || defined(__MIPSEL__)
+ defined(_M_IA64) || defined(__alpha__)
# define ICE_LITTLE_ENDIAN
--#elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \
-- defined(__ppc__) || defined(_ARCH_COM)
-+#elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \
-+ defined(__ppc__) || defined(__MIPSEB__) || defined(_ARCH_COM)
- # define ICE_BIG_ENDIAN
- #else
- # error "Unknown architecture"
+@@ -30,7 +39,14 @@
+ //
+ // 32 or 64 bit mode?
+ //
+-#if defined(__linux) && defined(__sparc__)
++#if defined(__linux)
++# include <limits.h>
++# if __WORDSIZE == 64
++# define ICE_64
++# else
++# define ICE_32
++# endif
++#elif defined(__linux) && defined(__sparc__)
+ //
+ // We are a linux sparc, which forces 32 bit usr land, no matter
+ // the architecture
Index: src/icecpp/config.h
===================================================================
---- src/icecpp/config.h~ 2005-09-22 16:01:13.000000000 +0200
-+++ src/icecpp/config.h 2006-03-24 13:39:00.000000000 +0100
-@@ -72,7 +72,8 @@
- #if defined(_WIN32)
- # define WCHAR_TYPE_SIZE 2
- #elif (defined(__linux) || defined(__FreeBSD__)) && \
-- (defined(__i386) || defined(__x86_64) || defined(__sparc)) || \
-+ (defined(__i386) || defined(__x86_64) || defined(__sparc) || \
-+ defined(__mips) || defined(__alpha)) || \
+--- src/icecpp/config.h.orig 2006-04-11 23:28:51.000000000 -0600
++++ src/icecpp/config.h 2006-04-11 23:36:58.000000000 -0600
+@@ -76,6 +76,8 @@
defined (__sun) || defined(__hpux) || defined(__APPLE__) || \
defined(_AIX) || defined(__osf1__)
# define WCHAR_TYPE_SIZE 4
++#elif defined(__linux)
++# define WCHAR_TYPE_SIZE 4
+ #else
+ # error "unsupported operating system or platform"
+ #endif
Index: src/icecpp/prefix.c
===================================================================
--- src/icecpp/prefix.c~ 2006-04-01 23:37:09.000000000 +0200
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]