This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Build regression on i386-mingw
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: 20 May 2005 21:58:37 +0200
- Subject: Re: Build regression on i386-mingw
- References: <428E29A3.5010908@gmail.com>
FX Coudert <fxcoudert@gmail.com> writes:
| The following patch causes a build failure on i386-mingw:
|
| 2005-05-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
| * fixincl.c: #include <sys/wait.h>
Thanks for reporting. That header was included in order to get proper
declaration for the wait() function. It seems that i386-mingw has a
special way to provide for that function.
| Build was successful before, but now fails when compiling fixincl.c,
| since MinGW doesn't have a sys/wait.h headers file. With this #include
| statement removed, build is successful.
Please could you try the patch below?
Thanks,
-- Gaby
Index: config.h.in
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/config.h.in,v
retrieving revision 1.3
diff -p -r1.3 config.h.in
*** config.h.in 11 Apr 2005 21:46:21 -0000 1.3
--- config.h.in 20 May 2005 18:45:22 -0000
***************
*** 165,170 ****
--- 165,173 ----
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+ /* Define to 1 if you have the <sys/wait.h> header file. */
+ #undef HAVE_SYS_WAIT_H
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/configure,v
retrieving revision 1.7
diff -p -r1.7 configure
*** configure 11 Apr 2005 21:46:21 -0000 1.7
--- configure 20 May 2005 18:45:22 -0000
*************** done
*** 2943,2950 ****
for ac_header in stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
! sys/stat.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
--- 2943,2951 ----
+
for ac_header in stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
! sys/stat.h sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/configure.ac,v
retrieving revision 1.7
diff -p -r1.7 configure.ac
*** configure.ac 11 Apr 2005 21:46:21 -0000 1.7
--- configure.ac 20 May 2005 18:45:22 -0000
*************** AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeex
*** 65,71 ****
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
! sys/stat.h])
define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
--- 65,71 ----
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
! sys/stat.h sys/wait.h])
define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
Index: fixincl.c
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/fixincl.c,v
retrieving revision 1.7
diff -p -r1.7 fixincl.c
*** fixincl.c 15 May 2005 18:28:36 -0000 1.7
--- fixincl.c 20 May 2005 18:45:22 -0000
*************** Boston, MA 02111-1307, USA. */
*** 24,30 ****
--- 24,32 ----
#include "fixlib.h"
#include <sys/stat.h>
+ #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+ #endif /* HAVE_SYS_WAIT_H */
#if defined( HAVE_MMAP_FILE )
#include <sys/mman.h>