[Patch] Fix obsolete autoconf macros in configure.ac

Steve Ellcey sellcey@mips.com
Wed Apr 23 18:25:00 GMT 2014


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.

Steve Ellcey



More information about the Gcc-patches mailing list