Page MenuHomeFreeBSD

libc: Add WCHAR_WIDTH in <wchar.h> as well
ClosedPublic

Authored by kfv on Fri, Sep 4, 9:59 AM.
Tags
None
Referenced Files
F170576663: D59385.id185912.diff
Sat, Sep 5, 11:51 AM
F170576657: D59385.id185808.diff
Sat, Sep 5, 11:51 AM
F170576656: D59385.id185815.diff
Sat, Sep 5, 11:51 AM
F170576451: D59385.diff
Sat, Sep 5, 11:50 AM
F170463170: D59385.diff
Fri, Sep 4, 10:55 PM
F170463151: D59385.id185815.diff
Fri, Sep 4, 10:55 PM

Details

Summary

Define __WCHAR_WIDTH in sys/_types.h and derive WCHAR_WIDTH from
that, the same way as WCHAR_MIN and WCHAR_MAX, in both <wchar.h>
and <stdint.h> as per C23 §7.31.1 and §7.22.3.4, respectively.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kfv requested review of this revision.Fri, Sep 4, 9:59 AM

If the size is the same on all platforms, it should not be in the platform-specific _types.h files.

If the size is the same on all platforms, it should not be in the platform-specific _types.h files.

I was considering putting it in sys/sys/_types.h, but wasn't sure since the size could differ on other architectures (applies not to any we support, though). I'll take care of it.

Move __WCHAR_WIDTH into sys/sys/_types.h

Well it was previously a platform-independent definition in _stdint.h, so I don't see how it would become platform-dependent in the future. That said, it can always be changed if needed.

Looks good to me.
Approved for commit.

This revision is now accepted and ready to land.Fri, Sep 4, 2:13 PM
This revision was automatically updated to reflect the committed changes.