This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch lto-plugin]: Don't use sys/wait.h for mingw targets


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.

Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]