Build error on HP-UX

Ben Lindstrom mouring at etoh.eviladmin.org
Fri Jun 20 06:29:17 EST 2003



On Thu, 19 Jun 2003, Rick Jones wrote:

> Ben Lindstrom wrote:
> >
> > How does HP/UX define utimes?
>
> Thusly on 11.0:
>
>
>  utimes(2)
> utimes(2)
>
>  NAME
>       utimes - set file access and modification times
>
>  SYNOPSIS
>       #include <sys/time.h>
>
>       int utimes(const char *path, const struct timeval times[2]);
>

Interesting enough Linux and OpenBSD at least deinfe it *times instead of
times[2], but the code itself should be fine.

It bothers me that configure.ac generated the wrong check.  What library
is utimes() part of?  Maybe we need additional check besides:

AC_CHECK_FUNC(utimes,
        [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES)
                                        LIBS="$LIBS -lc89"]) ]
)

[..]
> > bsd-misc.c:int utimes(char *filename, struct timeval *tvp)
> > bsd-misc.h:int utimes(char *, struct timeval *);
> >
> > Try in the bsd-misc.h changing it to be exactly as it's defined in the
> > bsd-misc.c.  Maybe your compiler is picky.
>
> Perhaps the use of const in the UX headers is the trigger for this?
>
No it is because the second argument is different  (*tvp vs tvp[2])

> If there is a utimes on the platform, should that bsd-misc.[ch] stuff
> even be included? Or does the configure script for ssh consider utimes
> broken under HP-UX?
>

I'd say something is wrong with configure.ac script.  If you go into
config.h and uncomment "#define HAVE_UTIMES 1" and compile does HP/UX 11
work correctly?

- Ben




More information about the openssh-unix-dev mailing list