]> git.lizzy.rs Git - zlib.git/blobdiff - zutil.h
On Darwin, only use /usr/bin/libtool if libtool is not Apple.
[zlib.git] / zutil.h
diff --git a/zutil.h b/zutil.h
index f42214791d58caee19f0d8321885adbf0ac28d28..4e3dcc6ae9f7ac4987e4ccdfe234a68c87c15780 100644 (file)
--- a/zutil.h
+++ b/zutil.h
@@ -13,8 +13,7 @@
 #ifndef ZUTIL_H
 #define ZUTIL_H
 
-#define GCC_VER ((__GNUC__-0) * 100 + __GNUC_MINOR__-0)
-#if (GCC_VER >= 303 && !defined(__APPLE__)) || GCC_VER >= 400
+#ifdef HAVE_HIDDEN
 #  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
 #else
 #  define ZLIB_INTERNAL
@@ -247,18 +246,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
 #define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
 
 /* Reverse the bytes in a 32-bit value */
-#ifndef Z_SOLO
-#  if defined(_WIN32) && (_MSC_VER >= 1300) && (defined(_M_IX86) || defined(_M_X64))
-#    include <stdlib.h>
-#    pragma intrinsic(_byteswap_ulong)
-#    define ZSWAP32(q) _byteswap_ulong(q)
-#  elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-#    define ZSWAP32(q) __builtin_bswap32(q)
-#  endif
-#endif
-#ifndef ZSWAP32
-#  define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-                      (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-#endif
+#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
 
 #endif /* ZUTIL_H */