]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libc: Do not refer to _DefaultRuneLocale in ctype inlines
authorjilles <jilles@FreeBSD.org>
Sun, 22 Oct 2017 20:01:07 +0000 (20:01 +0000)
committerjilles <jilles@FreeBSD.org>
Sun, 22 Oct 2017 20:01:07 +0000 (20:01 +0000)
commitf22cf85ee190c3485e562891e554e7a03b6b52dd
tree5f0df76443783d29352e052ddd4e2d33102278e7
parent4abe1e1eaaac524fbdc5b12ab8bdea3d13aa8d7a
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
include/runetype.h