I'm hitting the same issue with conflicting types for wchar_t that Sagar
Acharya reported on the 24th of July (before I subscribed to the list so I
can't directly reply to the thread).

I'm building on alpine linux, and /usr/include/bits/alltypes.h contains:

#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
typedef unsigned wchar_t;
#define __DEFINED_wchar_t
#endif

If I prefix my c code with

#define __DEFINED_wchar_t 1

then everything is fine (using the wchar_t definition from tcc's
stddef.h).  I can't really change musl's headers, and it seems like a nasty
hack to force the definition of __DEFINED_wchar_t in all my c source files
before anything is included (my actual use case involves dynamically
generated c code compiled just-in-time from a scripting language, on
various architectures and platforms and libc implementations).

What is the right way forward?  It seems like tcc will fail building
anything that includes musl's headers as it is currently.

Thanks

Cyan
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to