[patch] to gcc for an strstr problem

Alexandre Oliva aoliva@redhat.com
Mon Dec 25 15:54:00 GMT 2000


On Dec 25, 2000, msokolov@ivan.Harhan.ORG (Michael Sokolov) wrote:

> Alexandre Oliva <aoliva@redhat.com> wrote:
>> Nope, but you'll find occurrences of `#define HAVE_VFPRINTF', for
>> example, in some configuration files.

> These definitions have any meaning only for C code and have zero
> effect of how the VFPRINTF and DOPRINT Makefile variables get
> set. These are set by configure based on tests done on the host
> system and then used by the Makefile in deciding what to include on
> the link line of programs running on the build system.

Yep.  I guess the assumption is that the build system is at least as
complete as the host system.

> I've added the following macro to gcc-2.95.3's aclocal.m4 modeled after your
> strstr macro for 2.97:

> AC_DEFUN([GCC_FUNC_STRTOL],
>   [AC_CHECK_FUNCS([strtol], [strtol=strtol.o], [strtol=])
>    AC_SUBST([strtol])])

Oops, sorry, I goofed.  We want to set it to empty if the function is
found, and to strtol.o otherwise, as follows:

AC_DEFUN([GCC_FUNC_STRTOL],
  [AC_CHECK_FUNCS([strtol], [strtol=], [strtol=strtol.o])
   AC_SUBST([strtol])])

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Gcc-patches mailing list