URI: 
       libc/wchar: Remove macros for mblen and mbrlen - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 8b488b39369013d53b7fea4419f213e7b04a6604
   DIR parent a378af318684a868015e1efa73b14ab525d3ac27
  HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
       Date:   Thu, 20 Mar 2025 22:29:25 +0100
       
       libc/wchar: Remove macros for mblen and mbrlen
       
       These macros were using the hidden state from mbrtowc() that violates
       the constraint of the standard that specifies that the libc should
       behave as mbrtowc() is not called internally by the own libc.
       
       Diffstat:
         M include/stdlib.h                    |       2 --
         M include/wchar.h                     |       1 -
       
       2 files changed, 0 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/include/stdlib.h b/include/stdlib.h
       @@ -66,6 +66,4 @@ extern int wctomb(char *, wchar_t);
        extern size_t mbstowcs(wchar_t *restrict, const char *restrict, size_t);
        extern size_t wcstombs(char *restrict, const wchar_t *restrict, size_t);
        
       -#define mblen(s,n) mbtowc(NULL, s, n)
       -
        #endif
   DIR diff --git a/include/wchar.h b/include/wchar.h
       @@ -90,7 +90,6 @@ extern size_t mbsrtowcs(wchar_t *restrict, const char **restrict, size_t, mbstat
        extern size_t wcsrtombs(char *restrict, const wchar_t **restrict, size_t, mbstate_t *restrict);
        extern int wcwidth(wchar_t);
        
       -#define mbrlen(s, n, ps) mbrtowc(NULL, s, n, ps)
        #define putwc(wc, fp) fputwc(wc, fp)
        
        #endif