Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clar: support compilation without support for wchar_t #108

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

pks-t
Copy link
Member

@pks-t pks-t commented Oct 21, 2024

Some implementations of libc do not have proper support for wchar_t. One such library is uClibc, which only has optional support for this type. When not enabled, then the <wchar.h> header will be a mere stub that only contains a typedef for wchar_t, but nothing else.

Drop our use of wchar_t on such platforms.

@pks-t pks-t self-assigned this Oct 21, 2024
Some implementations of libc do not have proper support for `wchar_t`.
One such library is uClibc, which only has optional support for this
type. When not enabled, then the <wchar.h> header will be a mere stub
that only contains a typedef for `wchar_t`, but nothing else.

Drop our use of `wchar_t` on such platforms.

Reported-by: Bagas Sanjaya <[email protected]>
Helped-by: Edgar Bonet <[email protected]>
@pks-t
Copy link
Member Author

pks-t commented Oct 21, 2024

@pks-t pks-t requested a review from ethomson October 21, 2024 06:36
@ethomson ethomson merged commit 206accb into clar-test:main Oct 21, 2024
5 checks passed
Comment on lines +28 to +32
/*
* uClibc can optionally be built without wchar support, in which case
* the installed <wchar.h> is a stub that only defines the `whar_t`
* type but none of the functions typically declared by it.
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this wchar.h stub does not define wchar_t. It only defines wint_t and WEOF.

Copy link
Member Author

@pks-t pks-t Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, right, thanks for the clarification!

@pks-t pks-t deleted the pks-uclibc-without-wchar branch October 21, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants