IRIX compilation and openbsd-compat/basename.h

Ben Lindstrom mouring at etoh.eviladmin.org
Thu Apr 10 00:55:36 EST 2003


On Wed, 9 Apr 2003, Ayamura KIKUCHI wrote:

> > I was trying to compile openssh-3.6.1p1 on IRIX and ran across this
> > error while compiling progressmeter.c:
> >
> > "/usr/include/libgen.h", line 35: error(1143): declaration is incompatible
> >            with "char *basename(const char *)" (declared at line 9 of
> >            "openbsd-compat/basename.h")
> >    extern char *basename(char *);
> >                 ^
>
> IRIX has the basename() function in libgen.  Autoconf script under
> current cvs tree is not yet modified to detect it.
>
> --- openssh-3.6.1p/configure.ac.orig	2003-03-21 10:18:09.000000000 +0900
> +++ openssh-3.6.1p/configure.ac	2003-04-09 23:12:09.041843000 +0900
> @@ -619,6 +619,9 @@
>
>  AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
>
> +dnl IRIX has basename() in libgen
> +AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
> +

This is not right... Nor has any other solution I've seen is right.

basename needs to be checked in multiple places.  We need to check libc
and gen at this point.

Otherwise it will break for other platforms.

- Ben




More information about the openssh-unix-dev mailing list