void-packages/srcpkgs/Ice/patches/archs.patch

63 lines
1.9 KiB
Diff

--- cpp/include/IceUtil/Config.h
+++ cpp/include/IceUtil/Config.h
@@ -20,31 +20,28 @@
# include <endian.h>
#endif
-#if defined(__i386) || defined(_M_IX86) || defined(__x86_64) || \
- defined(_M_X64) || defined(_M_IA64) || defined(__alpha__) || \
- defined(__ARMEL__) || defined(_M_ARM_FP) || \
- 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))
-# define ICE_BIG_ENDIAN
-#else
-# error "Unknown architecture"
+#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
//
// 32 or 64 bit mode?
//
-#if defined(__sun) && (defined(__sparcv9) || defined(__x86_64)) || \
- defined(__linux) && defined(__x86_64) || \
- defined(__hppa) && defined(__LP64__) || \
- defined(_ARCH_COM) && defined(__64BIT__) || \
- defined(__alpha__) || \
- defined(_WIN64)
-# define ICE_64
-#else
-# define ICE_32
+#if defined(HAVE_LIMITS_H)
+# include <stdint.h>
+# include <limits.h>
+# if __WORDSIZE == 64
+# define ICE_64
+# else
+# define ICE_32
+# endif
#endif
//
--- cpp/src/IceUtil/Makefile
+++ cpp/src/IceUtil/Makefile
@@ -41,7 +41,7 @@
include $(top_srcdir)/config/Make.rules
CPPFLAGS := $(CPPFLAGS) $(ICEUTIL_FLAGS) -DICE_UTIL_API_EXPORTS -I..
-LINKWITH := $(ICEUTIL_OS_LIBS)
+LINKWITH := $(ICEUTIL_OS_LIBS) -lrt
ifeq ($(STATICLIBS),yes)
$(libdir)/$(LIBNAME): $(OBJS)