]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
move MEMCPY and MEMSET to zutil.h
authorSebastian Pop <s.pop@samsung.com>
Tue, 11 Dec 2018 20:02:24 +0000 (14:02 -0600)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 12 Dec 2018 16:16:50 +0000 (17:16 +0100)
memcopy.h
zutil.h

index 02dfd13f6a82f092e8b66da0dda46f1d8ba7b0eb..84d3c689d355f373662389ded9634b44b9d1be1c 100644 (file)
--- a/memcopy.h
+++ b/memcopy.h
@@ -4,14 +4,6 @@
 #ifndef MEMCOPY_H_
 #define MEMCOPY_H_
 
-#if (defined(__GNUC__) || defined(__clang__))
-#define MEMCPY __builtin_memcpy
-#define MEMSET __builtin_memset
-#else
-#define MEMCPY memcpy
-#define MEMSET memset
-#endif
-
 /* Load a short from IN and place the bytes at offset BITS in the result. */
 static inline uint32_t load_short(const unsigned char *in, unsigned bits) {
     union {
diff --git a/zutil.h b/zutil.h
index bb1dc032aa4c48e62430728c9e6e4ae1a297fd31..6cb2bad6d6e369f273a10ef661d61a3824c00c56 100644 (file)
--- a/zutil.h
+++ b/zutil.h
@@ -237,4 +237,12 @@ void ZLIB_INTERNAL   zcfree(void *opaque, void *ptr);
 #endif
 #endif
 
+#if (defined(__GNUC__) || defined(__clang__))
+#define MEMCPY __builtin_memcpy
+#define MEMSET __builtin_memset
+#else
+#define MEMCPY memcpy
+#define MEMSET memset
+#endif
+
 #endif /* ZUTIL_H_ */