model-writtenrun 4779 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund reported that an inline clock_gettime() reference exposed an AIX PL/Python build failure caused by undefining _POSIX_C_SOURCE; he considered restoring strict header ordering, adopting Python's feature-test values, or removing the undefines, and also questioned several older compatibility workarounds #1.
- Tom Lane initially favored restoring the header-order rule because mismatched feature-test macros could cause warnings or worse, while Andres argued that the rule was difficult to enforce and reported successful builds without the undefines across Linux, BSD systems, macOS, and Windows #2 #3.
- For the separate printf cleanup, Andres proposed defining HAVE_SNPRINTF instead of undefining and restoring PostgreSQL's macros; Tom checked Python 3.2, endorsed the approach, and requested the value 1 to avoid redefinition warnings, while also identifying older Python feature-test values as a portability concern #3 #4.
- Andres extended testing to Solaris and AIX, separating unrelated AIX large-file and linking problems from the macro change and correcting his shared-library linking workaround; after the remaining test passed, he submitted both header cleanups together #5 #6 #7.
- Tom explicitly approved the printf patch and cautiously accepted trying removal of the feature-test undefines; Andres promised a commit-message warning about possible reversal, and Robert Haas supported the experiment because historical platform issues might no longer apply and the change was readily reversible #8 #9 #10.
- Andres committed the printf cleanup unchanged as 23c12329a7 and the feature-test cleanup as 642e8821d7, both from #7; the latter retained the submitted code and added the promised portability and revert caveat to its commit message #9.
- The thread ended with both patches landed, hoverfly recovered, and no new warnings observed on tested Illumos, Solaris, older OpenBSD, and AIX buildfarm animals, although Andres was still awaiting results from a few remaining animals #11.