Page MenuHomeFreeBSD

amd64: reduce header pollution in _stdint.h
ClosedPublic

Authored by brooks on Mar 21 2023, 11:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 4:22 PM
Unknown Object (File)
Mon, Mar 25, 11:39 AM
Unknown Object (File)
Dec 23 2023, 10:32 AM
Unknown Object (File)
Dec 20 2023, 3:39 AM
Unknown Object (File)
Dec 13 2023, 5:20 AM
Unknown Object (File)
Sep 5 2023, 9:36 AM
Unknown Object (File)
Jul 9 2023, 3:47 PM
Unknown Object (File)
Jun 20 2023, 4:21 PM
Subscribers
None

Details

Summary

In 38d1ac34ff82bd2aeb308b52a65b686060e52873 SIGATOMIC_{MIN,MAX} were
defined in terms of LONG_{MIN,MAX}. Later, the were switched to
__LONG_{MIN,MAX} in 78fe75bc280264e7471b3069e148cae32e8ae211 where an
include of machine/_limits.h was added. Switch to using fixed width
INT64_{MIN,MAX} and remove the header pollution.

No functional change.

Sponsored by: DARPA

Diff Detail

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

Event Timeline

brooks created this revision.

This is fine with me, but I'd like to give @theraven a little time to comment

This revision is now accepted and ready to land.Mar 21 2023, 11:48 PM

This looks fine to me. Assuming I'm reading the code correctly, this change is only for targets where int64_t is long, so there should be no change in any C++ / ObjC name mangling as a result of this. It's a bit curious that we explicitly define it as a fixed-width type for 32-bit targets but long for 64-bit prior to this change, did I do that?

This looks fine to me. Assuming I'm reading the code correctly, this change is only for targets where int64_t is long, so there should be no change in any C++ / ObjC name mangling as a result of this. It's a bit curious that we explicitly define it as a fixed-width type for 32-bit targets but long for 64-bit prior to this change, did I do that?

Yeah, that came in with your fix. There's some argument for using __LONG_* this way to avoid the #ifdef __LP64__ branches, but for now I'd just like to remove the exception.

There's also an argument that most of this isn't MI at all and we should just nail types we don't think are a mistake down in sys/_stdint.h.

This revision was automatically updated to reflect the committed changes.