summaryrefslogtreecommitdiff
path: root/deflate.h
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2019-03-06 10:59:06 +0100
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-03-08 11:35:27 +0100
commit66a04611cf80df10f2b4490e1605389f4e2b29f6 (patch)
treedc51b51723b6dd3496f8a18931c7e0960b1aba42 /deflate.h
parent17b7471d240d633aa0a63791becf4aab3069625a (diff)
Update x86 and x86_64 arch checks to use the recommended
define names, resulting in improved compiler support. Based on the overviews from several sites, such as: http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros
Diffstat (limited to 'deflate.h')
-rw-r--r--deflate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/deflate.h b/deflate.h
index 46847d5..1360a3d 100644
--- a/deflate.h
+++ b/deflate.h
@@ -154,7 +154,7 @@ typedef struct internal_state {
unsigned int hash_bits; /* log2(hash_size) */
unsigned int hash_mask; /* hash_size-1 */
- #if !defined(__x86_64) && !defined(__i386_)
+ #if !defined(__x86_64__) && !defined(_M_X64) && !defined(__i386) && !defined(_M_IX86)
unsigned int hash_shift;
#endif
/* Number of bits by which ins_h must be shifted at each input
@@ -392,7 +392,7 @@ void ZLIB_INTERNAL bi_windup(deflate_state *s);
#define TRIGGER_LEVEL 5
#endif
-#if defined(__x86_64) || defined(__i386_)
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86)
#define UPDATE_HASH(s, h, i) \
do {\
if (s->level < TRIGGER_LEVEL) \