Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <72d5e6ea37fff041b0197e60c0563f728ffa263d.camel@postmarketos.org>
Date: Mon, 02 Mar 2026 14:11:33 +0100
From: Pablo Correa Gomez <pabloyoyoista@...tmarketos.org>
To: Rich Felker <dalias@...c.org>, musl@...ts.openwall.com
Subject: Re: High-level binary format for new locale files

> This was supposed to be posted a long time ago, but better late than
> never. The naming and parametrization might be a little bit clunky and
> I expect to rework it for actual inclusion in musl with the locale
> work, but it demonstrates all the concepts.

Thanks for following up!

> The attached __strerror.h is just from current musl. strerror2.c does
> not contain any lookup code; it's just the top-level file to
> instantiate the table. Compiling it to an object file lets you examine
> the emitted binary format. Compiling it with -E to see preprocessed
> output is also informative.
> 
> The magic is in mdecl2.h and mdata2.h. These define the binary format
> and how the source data passed to the M() macro translates into the
> binary format. At the moment I don't have a presentable version
> actually using the multi-level aspect of the table, which nl_langinfo
> needs, and which needs to be there in a minimal form in strerror data.

I know this is not the final version, but I think something that might be super
helpful here is including some sort of documentation in those headers, or at
least a link to the discussion in this thread. I think for future people reading
the code would be super nice to have access to the history.


Pablo

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.