libc/wchar: Fix mbstate_t definition for darwin - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6f9272021fd3925a09a9e445d2ee890d29017a28
 (DIR) parent c80a983e8995a59fc34ca4c2f601c9c00fda5133
 (HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
       Date:   Wed,  5 Mar 2025 08:52:36 +0100
       
       libc/wchar: Fix mbstate_t definition for darwin
       
       Diffstat:
         M include/bits/darwin/sys/cdefs.h     |       5 +++--
         M include/wchar.h                     |       2 +-
       
       2 files changed, 4 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/include/bits/darwin/sys/cdefs.h b/include/bits/darwin/sys/cdefs.h
       @@ -1,7 +1,8 @@
        #ifdef _NEED_MBSTATE_T
        #ifndef _MBSTATE_T
       -typedef union {
       -        char __mbstate8[128];
       +typedef struct {
       +    unsigned char state[MB_CUR_MAX];
       +    size_t count;
        } mbstate_t;
        #define _MBSTATE_T
        #endif
 (DIR) diff --git a/include/wchar.h b/include/wchar.h
       @@ -9,8 +9,8 @@
        #define _NEED_WINT
        #define _NEED_VA_LIST
        #define _NEED_MBSTATE_T
       -#include <sys/cdefs.h>
        #include <arch/cdefs.h>
       +#include <sys/cdefs.h>
        
        struct tm;
        struct _FILE;