Browse code

bb #9017: tomsfastmath warning with zLinux on s390x

David Raynor authored on 2013/10/03 04:00:23
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Sep 30 11:04:58 2013 EDT 2013 (dar)
2
+------------------------------------
3
+ * bb #9017: tomsfastmath warning with zLinux on s390x
4
+
1 5
 Fri Sep 15 18:15:36 2013 EDT 2013 (morgan)
2 6
 ------------------------------------
3 7
  * win32: Import libxml2 2.9.1 components into windows builds for xmlReader support.
... ...
@@ -7,6 +7,14 @@
7 7
  * 
8 8
  * Tom St Denis, tomstdenis@gmail.com
9 9
  */
10
+
11
+/* Oct 1, 2013
12
+ * Adding clamav-config.h include here for size-checking on fall-through case
13
+ */
14
+#if HAVE_CONFIG_H
15
+#include "clamav-config.h"
16
+#endif
17
+
10 18
 #ifndef TFM_H_
11 19
 #define TFM_H_
12 20
 
... ...
@@ -249,7 +257,13 @@
249 249
       typedef signed long long   long64;
250 250
    #endif
251 251
 #endif
252
-   typedef unsigned long      fp_digit;
252
+   /* The code requires that fp_word be twice the size of fp_digit.
253
+    * Add size-checking for special case (both long and long long are 64) */
254
+   #if (SIZEOF_LONG == 8) && (SIZEOF_LONG_LONG == 8)
255
+      typedef unsigned int       fp_digit;
256
+   #else
257
+      typedef unsigned long      fp_digit;
258
+   #endif
253 259
    typedef ulong64            fp_word;
254 260
 #endif
255 261