toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

added locale.h and added more wide-char prototypes

Open ZERICO2005 opened this issue 1 month ago • 0 comments

Added <locale.h>. setlocale and localeconv are basically hard-coded to return the "C" locale. The llvm/libcxx headers require locale. I have also defined prototypes for wide-char and multi-byte-char functions. This allows for clang headers to compile without #if 0'ing code; But there is no intention on implementing these functions.

I came up with this definition for mbstate_t. But this can be changed to any non-empty struct.

typedef struct {
    int __count;
    union {
        wint_t __value;
        unsigned char __bytes[sizeof(wint_t)];
    };
} mbstate_t;

ZERICO2005 avatar Nov 04 '25 19:11 ZERICO2005