From 53de256208b56a8faa15a6e23cc1b322e05a35a5 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 3 Sep 2025 21:21:33 -0600 Subject: [PATCH] Fix two flaws in Configure Configure conflated the file 'cppstdin' and the variable $cppstdin, failing to initialize the latter. It also overrode the hints file wrapper for feeding stdin to the C preprocessor. It did this without asking, but ran a simple test, and if it passed, did the override. This behavior dates to the mid 1990s. The problem is that on z/OS the simple test passes, but not all inputs do. Some system header files on z/OS have C trigraphs, which cause modern compilers to warn about them. The hints file wrapper, which dates from the late 1990's, did an "fgrep -v" to get rid of them, but it doesn't end up getting used. The simple test that Configure ends up of course would not think to try trigraphs. (There may be other issues as well, but this one really pops out.) This commit initializes $cppstdin, and doesn't try to override a furnished cppstdin from the hints. --- Configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Configure b/Configure index 1bdc687da191..359c0130280e 100755 --- a/Configure +++ b/Configure @@ -4817,6 +4817,7 @@ else fi chmod 755 cppstdin wrapper=`pwd`/cppstdin +cppstdin=$wrapper ok='false' cd UU @@ -4826,7 +4827,7 @@ if $test "X$cppstdin" != "X" && \ then echo "You used to use $cppstdin $cppminus so we'll use that again." case "$cpprun" in - '') echo "But let's see if we can live without a wrapper..." ;; + '') ok=true;; *) if $cpprun $cpplast testcpp.out 2>&1 && \ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1