From owner-svn-src-head@freebsd.org Sun Oct 22 20:01:09 2017 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 2D4A4E338A3; Sun, 22 Oct 2017 20:01:09 +0000 (UTC) (envelope-from jilles@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 EF6E472DBB; Sun, 22 Oct 2017 20:01:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9MK18Pj034158; Sun, 22 Oct 2017 20:01:08 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9MK18am034157; Sun, 22 Oct 2017 20:01:08 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201710222001.v9MK18am034157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 22 Oct 2017 20:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324866 - head/include X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/include X-SVN-Commit-Revision: 324866 X-SVN-Commit-Repository: base 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.23 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: Sun, 22 Oct 2017 20:01:09 -0000 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 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())