Re: [PATCH] Revise the diagnostic output produced when config.guess fails.

2024-05-13 Thread Jacob Bachmeyer
Zack Weinberg wrote: On Thu, Apr 4, 2024, at 6:50 PM, Jacob Bachmeyer wrote: Zack Weinberg wrote: [...] (N.B. The Savannah URLs look a little too cgit-specific to trust that they will still be good twenty years from now. Can we maybe get the www.gnu.org admins to make /software/???/con

[PATCH v2 2/4] config.guess: Modernize C programs a bit more.

2024-05-13 Thread Zack Weinberg
Specifically, eliminate all uses of implicit function declarations and of old-style function definitions for functions that take arguments. Many of the C programs embedded in config.guess are only used on very old systems that may never have had an ISO C compiler (other than GCC, which we cannot a

[PATCH v2 1/4] config.guess: Avoid implicit int in definitions of main.

2024-05-13 Thread Zack Weinberg
From: Petr Vorel Implicit ‘int’ (e.g. ‘extern foo();’ meaning the same thing as ‘extern int foo();’) was dropped from the C standard in its 1999 edition. Twenty-five years later, free C compilers are finally starting to make this an error by default, so let’s not use it anymore in config.guess p

[PATCH v2 4/4] config.guess: Improve behavior when uname output is not understood.

2024-05-13 Thread Zack Weinberg
If we get to the bottom of the big switch in config.guess without having a guess, we try two things, in this order: - Compiling and running a C program that knows about a bunch of really old systems that did not have a uname command. - A specific test for Apollo systems, which doesn’t require a

[PATCH v2 3/4] config.guess: Revise diagnostic output produced on failure.

2024-05-13 Thread Zack Weinberg
The output now varies based on which of three different situations is detected: 1. If config.guess’s embedded timestamp is more than three years old, we instruct the user to update it from Savannah, and we don’t say anything else. 2. If we tried to use a C compiler but none was found (not j

[PATCH v2 0/4] config.patches improvements

2024-05-13 Thread Zack Weinberg
Round 2 of my and Petr Vorel's patch set to polish up config.guess a little. The first two patches are the most important, as they future-proof config.guess against new C compilers that object to implicit int and/or old-style function definitions. The second two attempt to address a user experien

Re: [PATCH] Revise the diagnostic output produced when config.guess fails.

2024-05-13 Thread Zack Weinberg
On Thu, Apr 4, 2024, at 6:50 PM, Jacob Bachmeyer wrote: > Zack Weinberg wrote: >>The duplicate uname -m/-r/-s/-v output is replaced with >>diagnostics of the availability of uname and a C compiler. > > I would suggest keeping the duplicate uname output; config.guess is > straightforward bu

Re: [PATCH] Modernize more C programs in config.guess.

2024-05-13 Thread Zack Weinberg
On Thu, Apr 4, 2024, at 6:25 PM, Jacob Bachmeyer wrote: > Zack Weinberg wrote: >> -$CC_FOR_BUILD -o "$dummy" "$dummy.c" && >> - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && >> - SYSTEM_NAME=`"$dummy" "$dummyarg"` && >> +SYSTEM_TYPE="`$CC_FOR_BUILD -E - < "$du