From: hansr Date: Wed, 15 Oct 2014 11:50:52 +0000 (+0200) Subject: Clean up x86 files to hide functions and variables that are not meant X-Git-Tag: 1.9.9-b1~909 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0f3cb7da3ae274228eedde81eb3917f71d55bc0;p=thirdparty%2Fzlib-ng.git Clean up x86 files to hide functions and variables that are not meant to be used externally. --- diff --git a/arch/x86/Makefile b/arch/x86/Makefile deleted file mode 100644 index 9ffb5b0b8..000000000 --- a/arch/x86/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Makefile for zlib -# Copyright (C) 1995-2013 Jean-loup Gailly, Mark Adler -# For conditions of distribution and use, see copyright notice in zlib.h - -all: x86.o x86.lo - -x86.o: - gcc -O3 -I. -c -o $@x86.c - -x86.lo: - -@mkdir objs 2>/dev/null || test -d objs - gcc -O3 -I. -c -o $@ x86.c - -@mv objs/$*.o $@ - -mostlyclean: clean -clean: - rm -f *.o *.lo *~ \ - rm -rf objs - rm -f *.gcda *.gcno *.gcov diff --git a/arch/x86/Makefile.in b/arch/x86/Makefile.in index 1dd90cf4f..28ec68a35 100644 --- a/arch/x86/Makefile.in +++ b/arch/x86/Makefile.in @@ -12,7 +12,7 @@ x86.o: $(CC) $(CFLAGS) -I. -I../../ -c -o $@ x86.c x86.lo: - $(CC) $(CFLAGS) -fPIC -I. -I../../ -c -o $@ x86.c + $(CC) $(CFLAGS) -I. -I../../ -c -o $@ x86.c fill_window_sse.o: $(CC) $(CFLAGS) -msse2 -I. -I../../ -c -o $@ fill_window_sse.c diff --git a/arch/x86/deflate_quick.c b/arch/x86/deflate_quick.c index b481e48d0..adb15dec1 100644 --- a/arch/x86/deflate_quick.c +++ b/arch/x86/deflate_quick.c @@ -157,7 +157,7 @@ local inline Pos quick_insert_string(deflate_state *z_const s, z_const Pos str) return ret; } -block_state deflate_quick(deflate_state *s, int flush) +ZLIB_INTERNAL block_state deflate_quick(deflate_state *s, int flush) { IPos hash_head; unsigned dist, match_len; diff --git a/arch/x86/fill_window_sse.c b/arch/x86/fill_window_sse.c index ef666e2e2..9f95ad1f7 100644 --- a/arch/x86/fill_window_sse.c +++ b/arch/x86/fill_window_sse.c @@ -15,7 +15,7 @@ extern int read_buf (z_streamp strm, Bytef *buf, unsigned size); -void fill_window_sse(deflate_state *s) +ZLIB_INTERNAL void fill_window_sse(deflate_state *s) { z_const __m128i xmm_wsize = _mm_set1_epi16(s->w_size); diff --git a/arch/x86/x86.c b/arch/x86/x86.c index 097d27964..9efe4553a 100644 --- a/arch/x86/x86.c +++ b/arch/x86/x86.c @@ -10,11 +10,11 @@ #include "x86.h" -int x86_cpu_has_sse2; -int x86_cpu_has_sse42; -int x86_cpu_has_pclmulqdq; +ZLIB_INTERNAL int x86_cpu_has_sse2; +ZLIB_INTERNAL int x86_cpu_has_sse42; +ZLIB_INTERNAL int x86_cpu_has_pclmulqdq; -void x86_check_features(void) +void ZLIB_INTERNAL x86_check_features(void) { unsigned eax, ebx, ecx, edx; diff --git a/arch/x86/x86.h b/arch/x86/x86.h index 99f449982..f68663edb 100644 --- a/arch/x86/x86.h +++ b/arch/x86/x86.h @@ -6,10 +6,12 @@ #ifndef CPU_H #define CPU_H +#define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) + extern int x86_cpu_has_sse2; extern int x86_cpu_has_sse42; extern int x86_cpu_has_pclmulqdq; -void x86_check_features(void); +void ZLIB_INTERNAL x86_check_features(void); #endif