casaroli opened a new pull request, #20529: URL: https://github.com/apache/nuttx/pull/20529
## Summary `stddef.h` includes `sys/types.h`, which includes `stdint.h`. If a program provides its own `stdint.h` that includes `inttypes.h`, the include of `stddef.h` in `inttypes.h` is skipped by its include guard before `wchar_t` is defined, and the program does not compile: ``` include/inttypes.h:382:31: error: unknown type name 'wchar_t' ``` `wcstoimax()` and `wcstoumax()` are now declared with `_wchar_t`, the type that `wchar_t` is defined as (from `arch/types.h`). The declarations then do not depend on the order of the includes. ## Impact `include/inttypes.h` only. The declared types do not change. ## Testing A program whose own `stdint.h` includes `inttypes.h` failed with the error above before the change and compiles with it. Builds: `qemu-armv8a:knsh`, `qemu-armv8a:nsh`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
