PR/15888: Jarkko Teppo: Problems building on HP/UX
1. Compensate for h-pox assert brain damage where it gets confused by the string in: assert(!memcmp(foo, "in", 2)); I miss the h-pox broken compiler, I had not had to work around it for years. 2. Oh, finally h-pox has random() and utimes(). We don't need our own anymore.
This commit is contained in:
parent
a89c6bc776
commit
e7dc83d9f1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: for.c,v 1.11 2001/06/12 23:36:17 sjg Exp $ */
|
||||
/* $NetBSD: for.c,v 1.12 2002/03/12 20:15:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, The Regents of the University of California.
|
||||
@ -34,14 +34,14 @@
|
||||
*/
|
||||
|
||||
#ifdef MAKE_BOOTSTRAP
|
||||
static char rcsid[] = "$NetBSD: for.c,v 1.11 2001/06/12 23:36:17 sjg Exp $";
|
||||
static char rcsid[] = "$NetBSD: for.c,v 1.12 2002/03/12 20:15:15 christos Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)for.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: for.c,v 1.11 2001/06/12 23:36:17 sjg Exp $");
|
||||
__RCSID("$NetBSD: for.c,v 1.12 2002/03/12 20:15:15 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -158,6 +158,7 @@ For_Eval (line)
|
||||
if (forLevel == 0) {
|
||||
Buffer buf;
|
||||
int varlen;
|
||||
static const char instr[] = "in";
|
||||
|
||||
for (ptr++; *ptr && isspace((unsigned char) *ptr); ptr++)
|
||||
continue;
|
||||
@ -210,7 +211,11 @@ For_Eval (line)
|
||||
}
|
||||
|
||||
/* At this point we should be pointing right at the "in" */
|
||||
assert(!memcmp(ptr, "in", 2));
|
||||
/*
|
||||
* compensate for hp/ux's brain damaged assert macro that
|
||||
* does not handle double quotes nicely.
|
||||
*/
|
||||
assert(!memcmp(ptr, instr, 2));
|
||||
ptr += 2;
|
||||
|
||||
while (*ptr && isspace((unsigned char) *ptr))
|
||||
|
@ -1,15 +1,15 @@
|
||||
/* $NetBSD: util.c,v 1.30 2002/03/02 03:56:02 tv Exp $ */
|
||||
/* $NetBSD: util.c,v 1.31 2002/03/12 20:15:15 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Missing stuff from OS's
|
||||
*/
|
||||
|
||||
#ifdef MAKE_BOOTSTRAP
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.30 2002/03/02 03:56:02 tv Exp $";
|
||||
static char rcsid[] = "$NetBSD: util.c,v 1.31 2002/03/12 20:15:15 christos Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: util.c,v 1.30 2002/03/02 03:56:02 tv Exp $");
|
||||
__RCSID("$NetBSD: util.c,v 1.31 2002/03/12 20:15:15 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -173,6 +173,7 @@ killpg(pid, sig)
|
||||
return kill(-pid, sig);
|
||||
}
|
||||
|
||||
#ifndef __hpux__
|
||||
void
|
||||
srandom(seed)
|
||||
long seed;
|
||||
@ -185,6 +186,7 @@ random()
|
||||
{
|
||||
return lrand48();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* turn into bsd signals */
|
||||
void (*
|
||||
@ -206,6 +208,7 @@ signal(s, a)) __P((int))
|
||||
return (osv.sv_handler);
|
||||
}
|
||||
|
||||
#ifndef __hpux__
|
||||
int
|
||||
utimes(file, tvp)
|
||||
char *file;
|
||||
@ -217,6 +220,7 @@ utimes(file, tvp)
|
||||
t.modtime = tvp[1].tv_sec;
|
||||
return(utime(file, &t));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(BSD) && !defined(d_fileno)
|
||||
# define d_fileno d_ino
|
||||
|
Loading…
x
Reference in New Issue
Block a user