Build error on HP-UX

Jim Knoble jmknoble at pobox.com
Fri Jun 20 11:22:57 EST 2003


Circa 2003-06-19 17:05:28 -0700 dixit Rick Jones:

: Ben Lindstrom wrote:
: > Interesting enough Linux and OpenBSD at least deinfe it *times
: > instead of times[2], but the code itself should be fine.
: 
: I wonder what Posix/X/Open say about it, if anything.

POSIX doesn't have utimes(), only utime():

  int utime(const char *path, const struct utimbuf *timep);

where:

  struct utimbuf {
    time_t actime;
    time_t modtime;
  };

'time_t' has a precision of seconds, which is likely why it's been
obsoleted by utimes() under OpenBSD.

: > Maybe we need additional check besides:
  [...]

: Likely - if I try to compile my foo.c with a -lc89:
: 
: $ cc foo.c -lc89
: /usr/ccs/bin/ld: Can't find library: "c89"

If you want HP's compiler to grok POSIX, you should call it as 'c89';
for example:

  c89 foo.c

Don't know what the default compiler mode is (i.e., when called as
merely 'cc') under HP-UX 11; under 10.20 it was equivalent to K&R C
with -D_HPUX_SOURCE.  If you wanted ANSI C with X/Open or SVR4, you had
to do:

  cc -Ae

or:

  cc -Aa -D_HPUX_SOURCE +e

which are equivalent.

-- 
jim knoble  |  jmknoble at pobox.com  |  http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)
"We have guided missiles and misguided men." --Martin Luther King, Jr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 256 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20030619/b1cf208a/attachment.bin 


More information about the openssh-unix-dev mailing list