HomeFreeBSD

localedef: Fix bootstrapping on Ubuntu 16.04

Description

localedef: Fix bootstrapping on Ubuntu 16.04

Glibc's stdlib.h defines various prototypes for GNU extensions that take
a locale_t. Newer versions use locale_t directly and include an internal
bits/types/locale_t.h in order to get its definition, but older versions
include xlocale.h for that, for which our bootstrap version is empty.
Moreover it expects to use the glibc-specific __locale_t type. Thus,
provide dummy definitions of both types in order to ensure the
prototypes don't give any errors, and guard against the header being
inadvertently included between the bootstrapping namespace.h and
un-namespace.h, where locale_t is #define'd.

This header is not used when bootstrapping on FreeBSD and exists solely
to stub out glibc's, so this should have no impact on FreeBSD hosts.

Reviewed by: arichardson, emaste (comment only)
Differential Revision: https://reviews.freebsd.org/D28317

Details

Provenance
jrtc27Authored on Feb 10 2021, 4:41 PM
Reviewer
arichardson
Differential Revision
D28317: localedef: Fix bootstrapping on Ubuntu 16.04
Parents
R10:5c18744ea9b9: vm: Honour the "noreuse" flag to vm_page_unwire_managed()
Branches
Unknown
Tags
Unknown