From owner-svn-src-head@freebsd.org Tue Jul 19 20:22:14 2016 Return-Path: Delivered-To: svn-src-head@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 839C0B9E036; Tue, 19 Jul 2016 20:22:14 +0000 (UTC) (envelope-from pfg@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 mx1.freebsd.org (Postfix) with ESMTPS id 3A3501807; Tue, 19 Jul 2016 20:22:14 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6JKMD6t051362; Tue, 19 Jul 2016 20:22:13 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6JKMDJD051361; Tue, 19 Jul 2016 20:22:13 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607192022.u6JKMDJD051361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 19 Jul 2016 20:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303046 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 20:22:14 -0000 Author: pfg Date: Tue Jul 19 20:22:13 2016 New Revision: 303046 URL: https://svnweb.freebsd.org/changeset/base/303046 Log: libc: tag the Rune initialization function prototypes visibility as hidden. It is good practice to export as few symbols as possible from your shared libraries, so use the GCC visibility attribute in this case, matching what Apple's libc does. Reference: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html Hinted by: Apple's libc 1082.20.4 MFC after: 1 week Modified: head/lib/libc/locale/mblocal.h Modified: head/lib/libc/locale/mblocal.h ============================================================================== --- head/lib/libc/locale/mblocal.h Tue Jul 19 20:11:50 2016 (r303045) +++ head/lib/libc/locale/mblocal.h Tue Jul 19 20:22:13 2016 (r303046) @@ -65,18 +65,18 @@ extern struct xlocale_ctype __xlocale_gl /* * Rune initialization function prototypes. */ -int _none_init(struct xlocale_ctype *, _RuneLocale *); -int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); -int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); -int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); -int _GBK_init(struct xlocale_ctype *, _RuneLocale *); -int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); -int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); -int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _none_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GBK_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); typedef size_t (*mbrtowc_pfn_t)(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict);