This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Fix obsolete autoconf macros in configure.ac
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Apr 2014 10:23:58 +0200
- Subject: Re: [Patch] Fix obsolete autoconf macros in configure.ac
- Authentication-results: sourceware.org; auth=none
- References: <c2056f21-f4f5-4719-a540-881cd78d219b at BAMAIL02 dot ba dot imgtec dot org> <87bnvsroci dot fsf at igel dot home> <1398276355 dot 2803 dot 63 dot camel at ubuntu-sellcey>
On Wed, Apr 23, 2014 at 8:05 PM, Steve Ellcey <sellcey@mips.com> wrote:
> On Wed, 2014-04-23 at 18:40 +0200, Andreas Schwab wrote:
>> "Steve Ellcey " <sellcey@mips.com> writes:
>>
>> > diff --git a/gcc/configure.ac b/gcc/configure.ac
>> > index d789557..98acb1b 100644
>> > --- a/gcc/configure.ac
>> > +++ b/gcc/configure.ac
>> > @@ -1083,8 +1083,8 @@ int main()
>> > fi
>> > fi
>> >
>> > -AC_CHECK_TYPE(ssize_t, int)
>> > -AC_CHECK_TYPE(caddr_t, char *)
>> > +AC_CHECK_TYPES([ssize_t])
>> > +AC_CHECK_TYPES([caddr_t])
>>
>> You also need to handle the no longer supported default definition.
>> Moreover, the two macro calls can be combined into one.
>>
>> Andreas.
>
> OK, if I keep these definitions, where would I put the default
> definitions? I assume I want this in configure.ac:
>
> AC_CHECK_TYPES([ssize_t, caddr_t])
>
> and then something like this in a header file:
>
> #ifndef HAVE_SSIZE_T
> typedef int ssize_t;
> #endif
> #ifndef HAVE_CADDR_T
> typedef char *caddr_t;
> #endif
>
> But I am not sure what header file this code would go in.
In system.h.
> Steve Ellcey
>