Date: Sun, 22 Oct 2017 20:01:08 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324866 - head/include Message-ID: <201710222001.v9MK18am034157@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Oct 22 20:01:07 2017 New Revision: 324866 URL: https://svnweb.freebsd.org/changeset/base/324866 Log: libc: Do not refer to _DefaultRuneLocale in ctype inlines Referring to _DefaultRuneLocale causes this >4KB structure to be copied to all executables that use <ctype.h> inlines (except PIE executables). This only affects the case where thread local storage is available. _CurrentRuneLocale cannot be NULL, so the check can be removed entirely. _DefaultRuneLocale needs to remain available for now since libc++ uses it. The __isctype inline in include/_ctype.h also refers to _DefaultRuneLocale and remains available because it may still be used by third party software. Reviewed by: bdrewery, theraven Differential Revision: https://reviews.freebsd.org/D10363 Modified: head/include/runetype.h Modified: head/include/runetype.h ============================================================================== --- head/include/runetype.h Sun Oct 22 19:17:25 2017 (r324865) +++ head/include/runetype.h Sun Oct 22 20:01:07 2017 (r324866) @@ -95,9 +95,7 @@ static __inline const _RuneLocale *__getCurrentRuneLoc if (_ThreadRuneLocale) return _ThreadRuneLocale; - if (_CurrentRuneLocale) - return _CurrentRuneLocale; - return &_DefaultRuneLocale; + return _CurrentRuneLocale; } #endif /* __NO_TLS || __RUNETYPE_INTERNAL */ #define _CurrentRuneLocale (__getCurrentRuneLocale())
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710222001.v9MK18am034157>