Package: zeroc-ice / 3.4.2-8.2

archs.patch Patch series | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
Index: zeroc-ice/cpp/include/IceUtil/Config.h
===================================================================
--- zeroc-ice.orig/cpp/include/IceUtil/Config.h	2011-06-27 21:16:27.573221312 +0200
+++ zeroc-ice/cpp/include/IceUtil/Config.h	2011-06-27 21:24:39.334322730 +0200
@@ -16,28 +16,53 @@
 // Most CPUs support only one endianness, with the notable exceptions
 // of Itanium (IA64) and MIPS.
 //
+
 #ifdef __GLIBC__
 # include <endian.h>
 #endif
 
-#if defined(__i386)     || defined(_M_IX86) || defined(__x86_64)  || \
-    defined(_M_X64)     || defined(_M_IA64) || defined(__alpha__) || \
-    defined(__MIPSEL__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN))
+#if defined(HAVE_ENDIAN_H)
+#   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
+#endif
+
+#if !defined(ICE_LITTLE_ENDIAN) && !defined(ICE_BIG_ENDIAN)
+#if defined(__i386)     || defined(_M_IX86) || defined(__x86_64)  ||   \
+  defined(_M_X64)     || defined(_M_IA64) || defined(__alpha__) ||     \
+  defined(__MIPSEL__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN))
 #   define ICE_LITTLE_ENDIAN
 #elif defined(__sparc) || defined(__sparc__) || defined(__hppa)      || \
-      defined(__ppc__) || defined(__powerpc) || defined(_ARCH_COM) || \
-      defined(__MIPSEB__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN))
+  defined(__ppc__) || defined(__powerpc) || defined(_ARCH_COM) ||	\
+  defined(__MIPSEB__) || (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN))
 #   define ICE_BIG_ENDIAN
 #else
 #   error "Unknown architecture"
 #endif
+#endif
 
 //
 // 32 or 64 bit mode?
 //
+#if defined(HAVE_LIMITS_H)
+#   include <stdint.h>
+#   include <limits.h>
+#   if __WORDSIZE == 64
+#      define ICE_64
+#   else
+#      define ICE_32
+#   endif
+#endif
+
+#if !defined(ICE_32) && !defined(ICE_64)
 #if defined(__linux) && defined(__sparc__)
 //
-// We are a linux sparc, which forces 32 bit usr land, no matter 
+// We are a linux sparc, which forces 32 bit usr land, no matter
 // the architecture
 //
 #   define  ICE_32
@@ -51,9 +76,10 @@
 #else
 #   define ICE_32
 #endif
+#endif
 
 //
-// Compiler extensions to export and import symbols: see the documentation 
+// Compiler extensions to export and import symbols: see the documentation
 // for Visual C++, Sun ONE Studio 8 and HP aC++.
 //
 // TODO: more macros to support IBM Visual Age _Export syntax as well.
@@ -132,7 +158,7 @@
 //     non dll-interface class ... used as base for dll-interface class ...
 #      pragma warning( disable : 4275 )
 //      ...: decorated name length exceeded, name was truncated
-#      pragma warning( disable : 4503 )  
+#      pragma warning( disable : 4503 )
 #   endif
 
     //
@@ -179,7 +205,7 @@
 protected:
 
     noncopyable() { }
-    ~noncopyable() { } // May not be virtual! Classes without virtual 
+    ~noncopyable() { } // May not be virtual! Classes without virtual
                        // operations also derive from noncopyable.
 
 private:
@@ -233,7 +259,7 @@
 {
 public:
 
-    ~DummyBCC() 
+    ~DummyBCC()
     {
     }
 };
Index: zeroc-ice/cpp/config/Make.rules.Linux
===================================================================
--- zeroc-ice.orig/cpp/config/Make.rules.Linux	2011-06-27 21:24:31.278304684 +0200
+++ zeroc-ice/cpp/config/Make.rules.Linux	2011-06-27 21:24:39.334322730 +0200
@@ -75,7 +75,7 @@
       endif
    endif
 
-   CXXFLAGS		= $(CXXARCHFLAGS) -Wall -D_REENTRANT
+   CXXFLAGS		= $(CXXARCHFLAGS) -Wall -D_REENTRANT -DHAVE_ENDIAN_H -DHAVE_LIMITS_H
 
    ifneq ($(GENPIC),no)
       CXXFLAGS		+= -fPIC
@@ -140,7 +140,7 @@
 
 endif
 
-BASELIBS		= -lIceUtil -lpthread -lrt
+BASELIBS		= -lIceUtil -lpthread
 ifneq ($(NPTL_LIB),)
     CXXFLAGS		+= $(NPTL_FLAGS)
     BASELIBS		:= $(NPTL_LIB) $(BASELIBS)