Search code examples
cwindowscygwin

CYGWIN: why va_list is declared in wchar


In cygwin I stumbled on something weird (from my perspective). va_list type is declared in wchar.h. In linux and mingw it is declared elsewhere more explicit (vadefs.h for mingw for example). Can anyone point out why this choice was made ?

Thanks


Solution

  • stdarg.h is provided by the compiler:

    $ cygcheck -l gcc-core | grep stdarg
    /usr/lib/gcc/x86_64-pc-cygwin/10/include/cross-stdarg.h
    /usr/lib/gcc/x86_64-pc-cygwin/10/include/stdarg.h
    

    there is

    typedef __gnuc_va_list va_list