]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Clean up x86 files to hide functions and variables that are not meant
authorhansr <hk-git@circlestorm.org>
Wed, 15 Oct 2014 11:50:52 +0000 (13:50 +0200)
committerhansr <hk-git@circlestorm.org>
Wed, 15 Oct 2014 11:50:52 +0000 (13:50 +0200)
to be used externally.

arch/x86/Makefile [deleted file]
arch/x86/Makefile.in
arch/x86/deflate_quick.c
arch/x86/fill_window_sse.c
arch/x86/x86.c
arch/x86/x86.h

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
deleted file mode 100644 (file)
index 9ffb5b0..0000000
+++ /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
index 1dd90cf4ff4cac6ebf107a092278723520265656..28ec68a35e3f9b641d88e9df5190105a1590a229 100644 (file)
@@ -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
index b481e48d045e990edac701dfec1ee6400b9e96b0..adb15dec16c0aa31c2a929127aacd4123cbd0a3f 100644 (file)
@@ -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;
index ef666e2e218d21064ab8115e0bff6bb4ddbe6d66..9f95ad1f7780332afe53375f77bf7a81fbf6ec22 100644 (file)
@@ -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);
 
index 097d27964d9455d12994a57aa4c1042a1df51d09..9efe4553acffcbfba426366aa1dda010c8ee617a 100644 (file)
 
 #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;
 
index 99f4499820d3427f9267b60b2d114bb19321f4e0..f68663edbeab4e28da1b9bc7f3b6f1208c5be932 100644 (file)
@@ -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