From owner-svn-src-all@freebsd.org Mon Jan 22 18:40:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08916ECED1C; Mon, 22 Jan 2018 18:40:21 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D7ACC63B41; Mon, 22 Jan 2018 18:40:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 212FD1DF18; Mon, 22 Jan 2018 18:40:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0MIeJGJ082589; Mon, 22 Jan 2018 18:40:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0MIeJls082586; Mon, 22 Jan 2018 18:40:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801221840.w0MIeJls082586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 22 Jan 2018 18:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328263 - head/lib/libregex X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libregex X-SVN-Commit-Revision: 328263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 18:40:21 -0000 Author: kevans Date: Mon Jan 22 18:40:19 2018 New Revision: 328263 URL: https://svnweb.freebsd.org/changeset/base/328263 Log: libregex: Add a symbol map kib points out that trying to re-use symbol versioning from libc is dirty and wrong. The implementation in libregex is incompatible by design with the implementation in libc. Using the symbol versions from libc can and likely will cause confusions for linkers and bring unexpected behavior for consumers that unwillingly (transitively) link against libregex. Reported by: kib Added: head/lib/libregex/Symbol.map (contents, props changed) head/lib/libregex/Versions.def (contents, props changed) Modified: head/lib/libregex/Makefile Modified: head/lib/libregex/Makefile ============================================================================== --- head/lib/libregex/Makefile Mon Jan 22 17:47:49 2018 (r328262) +++ head/lib/libregex/Makefile Mon Jan 22 18:40:19 2018 (r328263) @@ -9,8 +9,10 @@ SHLIB_MINOR= 0 CFLAGS+= -DLIBREGEX LIBC_SRCTOP= ${.CURDIR:H}/libc -SYMBOL_MAPS= ${SYM_MAPS} WARNS?= 2 + +VERSION_DEF= ${.CURDIR}/Versions.def +SYMBOL_MAPS= ${.CURDIR}/Symbol.map #HAS_TESTS= SUBDIR.${MK_TESTS}+= tests Added: head/lib/libregex/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libregex/Symbol.map Mon Jan 22 18:40:19 2018 (r328263) @@ -0,0 +1,16 @@ +/* + * $FreeBSD$ + */ + +/* + * libregex uses a different version name because its symbols are not strictly + * compatible with those provided by libc. Re-using the version name from libc + * could cause linking headaches and make debugging more difficult than it needs + * to be. + */ +LIBREGEX_1.0 { + regcomp; + regerror; + regexec; + regfree; +}; Added: head/lib/libregex/Versions.def ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libregex/Versions.def Mon Jan 22 18:40:19 2018 (r328263) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +LIBREGEX_1.0 { +}; +