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
F173766068: D59385.diff
Mon, Sep 28, 6:06 AM
F173716817: D59385.diff
Sun, Sep 27, 10:16 PM
F173649914: D59385.diff
Sun, Sep 27, 11:23 AM
Unknown Object (File)
Thu, Sep 24, 8:58 PM
Unknown Object (File)
Thu, Sep 24, 10:59 AM
Unknown Object (File)
Wed, Sep 23, 12:20 PM
Unknown Object (File)
Wed, Sep 23, 9:46 AM
Unknown Object (File)
Tue, Sep 22, 10:16 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 76488
Build 73371: arc lint + arc unit

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.