From: tb Date: Fri, 2 Aug 2024 04:59:23 +0000 (+0000) Subject: Put exported symbols of libz under our own control X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e8780c77e703a467ca9888cfe81383687235970b;p=openbsd Put exported symbols of libz under our own control This adds a Symbols.list containing the exported symbols like in other libraries in base. If upstream adds new API this won't necessarily need a bump on our side. help/ok kettenis --- diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 19f8589341e..c358f4d7140 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2024/01/21 07:33:46 tb Exp $ +# $OpenBSD: Makefile,v 1.23 2024/08/02 04:59:23 tb Exp $ LIB= z HDRS= zconf.h zlib.h @@ -7,6 +7,11 @@ SRCS= adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c \ trees.c uncompr.c zutil.c MAN= compress.3 +VERSION_SCRIPT= Symbols.map +SYMBOL_LIST= ${.CURDIR}/Symbols.list + +CLEANFILES+= ${VERSION_SCRIPT} + PC_FILES=zlib.pc CLEANFILES+=${PC_FILES} @@ -29,4 +34,9 @@ beforeinstall: ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \ -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/ +${VERSION_SCRIPT}: ${SYMBOL_LIST} + { printf '{\n\tglobal:\n'; \ + sed '/^[._a-zA-Z]/s/$$/;/; s/^/ /' ${SYMBOL_LIST}; \ + printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@ + .include diff --git a/lib/libz/Symbols.list b/lib/libz/Symbols.list new file mode 100644 index 00000000000..5e04879a308 --- /dev/null +++ b/lib/libz/Symbols.list @@ -0,0 +1,90 @@ +adler32 +adler32_combine +adler32_combine64 +adler32_z +compress +compress2 +compressBound +crc32 +crc32_combine +crc32_combine64 +crc32_combine_gen +crc32_combine_gen64 +crc32_combine_op +crc32_z +deflate +deflateBound +deflateCopy +deflateEnd +deflateGetDictionary +deflateInit2_ +deflateInit_ +deflateParams +deflatePending +deflatePrime +deflateReset +deflateResetKeep +deflateSetDictionary +deflateSetHeader +deflateTune +deflateUsed +get_crc_table +gzbuffer +gzclearerr +gzclose +gzclose_r +gzclose_w +gzdirect +gzdopen +gzeof +gzerror +gzflush +gzfread +gzfwrite +gzgetc +gzgetc_ +gzgets +gzoffset +gzoffset64 +gzopen +gzopen64 +gzprintf +gzputc +gzputs +gzread +gzrewind +gzseek +gzseek64 +gzsetparams +gztell +gztell64 +gzungetc +gzvprintf +gzwrite +inflate +inflateBack +inflateBackEnd +inflateBackInit_ +inflateCodesUsed +inflateCopy +inflateEnd +inflateGetDictionary +inflateGetHeader +inflateInit2_ +inflateInit_ +inflateMark +inflatePrime +inflateReset +inflateReset2 +inflateResetKeep +inflateSetDictionary +inflateSync +inflateSyncPoint +inflateUndermine +inflateValidate +uncompress +uncompress2 +zError +z_errmsg +zlibCompileFlags +zlibVersion