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] Fix obsolete autoconf macros in configure.ac


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


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