aix: Fix _STDC_FORMAT_MACROS in inttypes.h [PR97044]
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 17 Sep 2020 15:18:48 +0000 (15:18 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sat, 26 Sep 2020 15:59:24 +0000 (15:59 +0000)
commit081b3517b4df826ac917147eb906bbb8fc6528b1
treeabcb85bfed0b493ed8602b013bb146f8173a41ed
parente721d1137fb3f0323d31b767bc64c772086ff868
aix: Fix _STDC_FORMAT_MACROS in inttypes.h [PR97044]

AIX protects the STDC Format Macros in a manner that can prevent the
definition of the macros depending on the order of header inclusion.

The protection of the macros was referenced in C99, removed in C11, and
never specified in any C++ standard. Also, the macros are in the namespace
reserved to the implementation (compiler) so the compiler is permitted to
choose to inject those names.

fixincludes/ChangeLog:

2020-09-17  David Edelsohn  <dje.gcc@gmail.com>

PR target/97044
* inclhack.def (aix_inttypes): New fix.
* fixincl.x: Regenerate.
* tests/base/sys/inttypes.h: New file.
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/sys/inttypes.h [new file with mode: 0644]