This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch lto-plugin]: Don't use sys/wait.h for mingw targets
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Nov 2010 08:05:02 +0100
- Subject: [patch lto-plugin]: Don't use sys/wait.h for mingw targets
Hello,
in lto-plugin.c there is the header sys/wait.h used, which isn't
present for mingw targets. This patch adds check for this header and
make its use conditionally. Rest of the patch is the result of a
'autoreconf -I ../conf'.
2010-11-30 Kai Tietz
* config.h.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* configure.ac (AC_CHECK_HEADERS): Check for sys/wait.h.
* lto-plugin.c: Include sys/wait.h conditionally.
* aclocal.m4: Regenerated.
Tested for x86_64-w64-mingw32, i686-pc-mingw32, and i686-pc-cygwin. Ok
for apply?
Regards,
Kai
--
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
Index: configure.ac
===================================================================
--- configure.ac (revision 167289)
+++ configure.ac (working copy)
@@ -22,6 +22,7 @@
esac
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
+AC_CHECK_HEADERS(sys/wait.h)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_HEADERS(config.h)
AC_OUTPUT
Index: lto-plugin.c
===================================================================
--- lto-plugin.c (revision 167289)
+++ lto-plugin.c (working copy)
@@ -47,7 +47,9 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#include <libiberty.h>
#include <hashtab.h>
#include "../gcc/lto/common.h"