From: Nathan Moinvaziri Date: Sun, 23 Aug 2020 01:07:50 +0000 (-0700) Subject: Rename ZLIB_REGISTER to Z_REGISTER for consistency. X-Git-Tag: 1.9.9-b1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5a81501f272084ebde8a2bc3871c6c1e22d26ff;p=thirdparty%2Fzlib-ng.git Rename ZLIB_REGISTER to Z_REGISTER for consistency. --- diff --git a/arch/arm/crc32_acle.c b/arch/arm/crc32_acle.c index 82731223..88ba6c38 100644 --- a/arch/arm/crc32_acle.c +++ b/arch/arm/crc32_acle.c @@ -12,9 +12,9 @@ #include "../../zutil.h" uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) { - ZLIB_REGISTER uint32_t c; - ZLIB_REGISTER const uint16_t *buf2; - ZLIB_REGISTER const uint32_t *buf4; + Z_REGISTER uint32_t c; + Z_REGISTER const uint16_t *buf2; + Z_REGISTER const uint32_t *buf4; c = ~crc; if (len && ((ptrdiff_t)buf & 1)) { diff --git a/arch/arm/slide_neon.c b/arch/arm/slide_neon.c index e5bea64f..8b1736db 100644 --- a/arch/arm/slide_neon.c +++ b/arch/arm/slide_neon.c @@ -19,8 +19,8 @@ /* SIMD version of hash_chain rebase */ static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) { - ZLIB_REGISTER uint16x8_t v, *p; - ZLIB_REGISTER size_t n; + Z_REGISTER uint16x8_t v, *p; + Z_REGISTER size_t n; size_t size = entries*sizeof(table[0]); Assert((size % sizeof(uint16x8_t) * 8 == 0), "hash table size err"); diff --git a/arch/s390/dfltcc_common.c b/arch/s390/dfltcc_common.c index b8ccfd82..f80d76bd 100644 --- a/arch/s390/dfltcc_common.c +++ b/arch/s390/dfltcc_common.c @@ -14,7 +14,7 @@ */ static inline int is_dfltcc_enabled(void) { uint64_t facilities[(DFLTCC_FACILITY / 64) + 1]; - ZLIB_REGISTER uint8_t r0 __asm__("r0"); + Z_REGISTER uint8_t r0 __asm__("r0"); memset(facilities, 0, sizeof(facilities)); r0 = sizeof(facilities) / sizeof(facilities[0]) - 1; diff --git a/arch/s390/dfltcc_detail.h b/arch/s390/dfltcc_detail.h index 6b2905bc..22886242 100644 --- a/arch/s390/dfltcc_detail.h +++ b/arch/s390/dfltcc_detail.h @@ -51,12 +51,12 @@ static inline dfltcc_cc dfltcc(int fn, void *param, size_t t3 = len1 ? *len1 : 0; const unsigned char *t4 = op2 ? *op2 : NULL; size_t t5 = len2 ? *len2 : 0; - ZLIB_REGISTER int r0 __asm__("r0") = fn; - ZLIB_REGISTER void *r1 __asm__("r1") = param; - ZLIB_REGISTER unsigned char *r2 __asm__("r2") = t2; - ZLIB_REGISTER size_t r3 __asm__("r3") = t3; - ZLIB_REGISTER const unsigned char *r4 __asm__("r4") = t4; - ZLIB_REGISTER size_t r5 __asm__("r5") = t5; + Z_REGISTER int r0 __asm__("r0") = fn; + Z_REGISTER void *r1 __asm__("r1") = param; + Z_REGISTER unsigned char *r2 __asm__("r2") = t2; + Z_REGISTER size_t r3 __asm__("r3") = t3; + Z_REGISTER const unsigned char *r4 __asm__("r4") = t4; + Z_REGISTER size_t r5 __asm__("r5") = t5; int cc; __asm__ volatile( diff --git a/crc32.c b/crc32.c index d4682730..19b6a019 100644 --- a/crc32.c +++ b/crc32.c @@ -100,8 +100,8 @@ uint32_t ZEXPORT PREFIX(crc32)(uint32_t crc, const unsigned char *buf, uint32_t /* ========================================================================= */ ZLIB_INTERNAL uint32_t crc32_little(uint32_t crc, const unsigned char *buf, uint64_t len) { - ZLIB_REGISTER uint32_t c; - ZLIB_REGISTER const uint32_t *buf4; + Z_REGISTER uint32_t c; + Z_REGISTER const uint32_t *buf4; c = crc; c = ~c; @@ -142,8 +142,8 @@ ZLIB_INTERNAL uint32_t crc32_little(uint32_t crc, const unsigned char *buf, uint /* ========================================================================= */ ZLIB_INTERNAL uint32_t crc32_big(uint32_t crc, const unsigned char *buf, uint64_t len) { - ZLIB_REGISTER uint32_t c; - ZLIB_REGISTER const uint32_t *buf4; + Z_REGISTER uint32_t c; + Z_REGISTER const uint32_t *buf4; c = ZSWAP32(crc); c = ~c; diff --git a/match_tpl.h b/match_tpl.h index b853b2a3..306f9a07 100644 --- a/match_tpl.h +++ b/match_tpl.h @@ -34,8 +34,8 @@ ZLIB_INTERNAL int32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) { const unsigned wmask = s->w_mask; unsigned char *window = s->window; unsigned char *scan = window + strstart; - ZLIB_REGISTER unsigned char *mbase_start = window; - ZLIB_REGISTER unsigned char *mbase_end; + Z_REGISTER unsigned char *mbase_start = window; + Z_REGISTER unsigned char *mbase_end; const Pos *prev = s->prev; Pos limit; uint32_t chain_length, nice_match, best_len, offset; @@ -98,7 +98,7 @@ ZLIB_INTERNAL int32_t LONGEST_MATCH(deflate_state *const s, Pos cur_match) { Assert((unsigned long)strstart <= s->window_size - MIN_LOOKAHEAD, "need lookahead"); for (;;) { - ZLIB_REGISTER unsigned int len; + Z_REGISTER unsigned int len; if (cur_match >= strstart) break; diff --git a/trees.c b/trees.c index 83d77c15..e7a9fcf0 100644 --- a/trees.c +++ b/trees.c @@ -816,7 +816,7 @@ static void bi_flush(deflate_state *s) { ZLIB_INTERNAL unsigned bi_reverse(unsigned code, int len) { /* code: the value to invert */ /* len: its bit length */ - ZLIB_REGISTER unsigned res = 0; + Z_REGISTER unsigned res = 0; do { res |= code & 1; code >>= 1, res <<= 1; diff --git a/zutil.h b/zutil.h index 4fb2e2fd..647e2d40 100644 --- a/zutil.h +++ b/zutil.h @@ -19,9 +19,9 @@ #endif #ifndef __cplusplus -# define ZLIB_REGISTER register +# define Z_REGISTER register #else -# define ZLIB_REGISTER +# define Z_REGISTER #endif #ifndef Z_TLS