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
F170822780: D59385.id.diff
Sun, Sep 6, 8:40 PM
Unknown Object (File)
Sun, Sep 6, 4:04 AM
Unknown Object (File)
Sun, Sep 6, 3:21 AM
Unknown Object (File)
Sat, Sep 5, 11:51 AM
Unknown Object (File)
Sat, Sep 5, 11:51 AM
Unknown Object (File)
Sat, Sep 5, 11:51 AM
Unknown Object (File)
Sat, Sep 5, 11:50 AM
Unknown Object (File)
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 76491
Build 73374: 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.