Subject: bug#70889: 29.3; GCC14.1 MinGW compilation error

From: Cyril Arnould <[email-masked]>
Date: Sun, 12 May 2024 14:52:12 +0200

> So please try to figure out how come HAVE_SYS_WAIT_H is not defined in
 > your case.  It should be.

I see, I was not aware that HAVE_SYS_WAIT_H should be defined. It's
the ./configure test that fails, the log is as follows:

configure:11647: checking for sys/wait.h that is POSIX.1 compatible
configure:11674: gcc -I ./nt/inc -c -g3 -O2 -gdwarf-2 -mtune=generic   
conftest.c >&5
conftest.c: In function 'main':
conftest.c:69:3: error: implicit declaration of function 'wait' 
[-Wimplicit-function-declaration]
    69 |   wait (&s);
       |   ^~~~
configure:11674: $? = 1
configure: failed program was:
| /* confdefs.h */

Is this an issue that should be solved by GNU autoconf? Or should the
'wait' function be added to nt/inc/sys/wait.h?

More worrying, I've checked through the config.log and found 28
occurences of the "implicit declaration of function XY" error. The
<sys/wait.h> test might not be the only one that works under GCC 13
but fails under GCC 14.

To ease reproducibility of the issue, I've switched to the emacs-29.3
tag. I've attached the config.log so you can see the other errors.