[patch lto-plugin]: Don't use sys/wait.h for mingw targets
Kai Tietz
ktietz70@googlemail.com
Wed Dec 1 16:58:00 GMT 2010
2010/12/1 Richard Guenther <richard.guenther@gmail.com>:
> On Tue, Nov 30, 2010 at 6:53 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2010/11/30 Richard Guenther <richard.guenther@gmail.com>:
>>> On Tue, Nov 30, 2010 at 8:05 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>>>> 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)
>>>
>>> Just append sys/wait.h to config.h here.
>>>
>>> Ok with that change.
>>>
>>> Thanks,
>>> Richard.
>>>
>>>> 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"
>>>>
>>>
>>
>> Hmm, are you sure that this is right? AC_CONFIG_HEADERS and
>> AC_CHECK_HEADERS are two different things, at least as far as I read
>> in documentation about them.
>
> Oh, right. Parse error on my side.
>
> Richard.
>
>> Kai
>>
>> --
>> | (\_/) This is Bunny. Copy and paste
>> | (='.'=) Bunny into your signature to help
>> | (")_(") him gain world domination
>>
>
Applied at revision 167343.
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
More information about the Gcc-patches
mailing list