Browse code

Fix Apple-style universal build (bb #1988).

We defined WORDS_BIGENDIAN to 0 if it wasn't defined, however that doesn't work with Apple universal
builds, since we don't know the endianness at configure time!
So add the ifndef WORDS_BIGNENDIAN -> define WORDS_BIGENDIAN 0 logic to
platform.h.

Török Edvin authored on 2010/04/24 03:39:01
Showing 5 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Apr 23 21:38:19 EEST 2010 (edwin)
2
+-------------------------------------
3
+ * configure: fix Apple-style universal build (bb #1988).
4
+
1 5
 Thu Apr 22 22:34:52 CEST 2010 (acab)
2 6
 ------------------------------------
3 7
  * libclamav/fmap.c: downgrade warning when the kernel doesn't want a map back
... ...
@@ -12766,10 +12766,6 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12766 12766
  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12767 12767
  esac
12768 12768
 
12769
-if test $ac_cv_c_bigendian = no; then
12770
-    $as_echo "#define WORDS_BIGENDIAN 0" >>confdefs.h
12771
-
12772
-fi
12773 12769
 
12774 12770
 LIBM=
12775 12771
 case $host in
... ...
@@ -78,9 +78,6 @@ AC_C_CONST
78 78
 AC_C_INLINE
79 79
 AC_C_FPU_BIGENDIAN
80 80
 AC_C_BIGENDIAN
81
-if test $ac_cv_c_bigendian = no; then
82
-    m4_default([], [AC_DEFINE([WORDS_BIGENDIAN], 0)])
83
-fi
84 81
 
85 82
 LT_LIB_M
86 83
 
... ...
@@ -40,4 +40,6 @@ typedef	unsigned	int	in_addr_t;
40 40
 
41 41
 /* Nothing is safe in windows, not even open */
42 42
 #define safe_open open
43
-
43
+#ifndef WORDS_BIGENDIAN
44
+#define WORDS_BIGENDIAN 0
45
+#endif
... ...
@@ -108,4 +108,4 @@ int real_main(int, char**);
108 108
 #define main main(int argc, char **argv) { _setmode(_fileno(stdin), _O_BINARY); w32_glob(&argc, &argv); return real_main(argc, argv); }; int real_main
109 109
 
110 110
 #endif /* __PLATFORM_H */
111
-
111
+#define WORDS_BIGENDIAN 0