svn commit: r303336 - stable/11/lib/libc/locale

Pedro F. Giffuni pfg at FreeBSD.org
Tue Jul 26 14:12:12 UTC 2016


Author: pfg
Date: Tue Jul 26 14:12:11 2016
New Revision: 303336
URL: https://svnweb.freebsd.org/changeset/base/303336

Log:
  MFC r303046:
  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
  Approved by:	re (gjb)

Modified:
  stable/11/lib/libc/locale/mblocal.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/locale/mblocal.h
==============================================================================
--- stable/11/lib/libc/locale/mblocal.h	Tue Jul 26 13:36:28 2016	(r303335)
+++ stable/11/lib/libc/locale/mblocal.h	Tue Jul 26 14:12:11 2016	(r303336)
@@ -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);


More information about the svn-src-stable mailing list