Subject: Re: mklocale and the new toolchain
To: James Chacon <>
From: Todd Vierling <>
List: tech-toolchain
Date: 10/17/2001 12:00:50
On Wed, 17 Oct 2001, James Chacon wrote:

: Anyways there are is one major include file that gets pulled in:
: runetype.h (via rune.h)

: So what I'm proposing is a new define HOST_TOOLCHAIN that is used to null out
: sections like this (and accordingly have the tools/Makefile's set it within
: CPPFLAGS for all builds). Doing this was relatively simple on runetype.h.


The include file needs to be *duplicated* (with appropriately bit-sized
types in the structs) and put in with the mklocale sources so that the
entire mklocale program can be used independently on a non-NetBSD host.

Hacking runetype.h still assumes that the host is NetBSD, or at least
4.4BSDish, and only makes cross-compiling more difficult.

: Finally, the really ugly part...When you create a new locale the invalid rune
: gets set to the INVALID_RUNE macro as the default. This macro though is just a
: reference to _CurrentLocale which of course isn't a symbol present in anything
: except -current. (Why the invalid rune for a new locale should default to
: different values depending on ones current locale while using mklocale is
: beyond me, but I'm not going there...)
: The choices are 2:
: Just set this value (via a netbsd version check) to -3 (which is what it
: defaults to in the end libc code)

This is the correct choice, for the purposes of mklocale (in the separate,
duplicated header file described above).  It should be a constant, rather
than depend on some user setting, when generating a static file at build

-- Todd Vierling <>  *  Wasabi NetBSD:  Run with it.
-- CDs, Integration, Embedding, Support --