From: Sebastian Pop Date: Tue, 11 Dec 2018 20:02:24 +0000 (-0600) Subject: move MEMCPY and MEMSET to zutil.h X-Git-Tag: 1.9.9-b1~593 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07b7f63368e349efb9d9e5a62004490280008a96;p=thirdparty%2Fzlib-ng.git move MEMCPY and MEMSET to zutil.h --- diff --git a/memcopy.h b/memcopy.h index 02dfd13f6..84d3c689d 100644 --- 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 bb1dc032a..6cb2bad6d 100644 --- 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_ */