[93] in Zephyr Mailing List
building zephyr for HP9000/715 running hp-ux 9.01
daemon@ATHENA.MIT.EDU (tom palka)
Fri Aug 13 14:44:35 1993
Date: Fri, 13 Aug 93 14:41:11 -0400
To: zephyr@Athena.MIT.EDU
Cc: tompalka@mit.edu
From: tom palka <tompalka@mit.edu>
Hi,
Has anyone done this? I attempted doing it last night and managed to
get a mostly clean build, after writing a few hacks (the HP libBSD.a
doesn't provide insque, remque, and getdtablesize). Does anyone have
nice versions on those three procedures? Here are the things that I
changed, should I do something else?
I'd appreciate any comments,
tom palka
tompalka@mit.edu
---------------- snip snip ----------------
1. missing getdtablesize -> ben wrote this one (in ./server)
2. missing insque remque -> tom wrote this one (in ./server)
3. missing TIOCNOTTY. inserted one manually from sys/ioctl.h
(it's ifdefed for the 800 series).
4. need to define random and srandom to be rand and srand
5. use -DUSE_PUTENV, since no setenv exists. not documented in makefile.
6. lib/Imakefile uses "install" instead of $(RAWINSTALL), that's a bug.
7. X_driver.c in zwgc references some dpy-> directly. don't know the
HP fix, but it compiled fine with X11R5.
--------------- que.c
#include <stdio.h>
struct qelem {
struct qelem *q_forw;
struct qelem *q_back;
char *q_data;
};
void insque(elem, pred)
struct qelem *elem, *pred;
{
pred->q_forw = elem;
elem->q_back = pred;
}
void remque(elem)
struct qelem *elem;
{
struct qelem *pred;
if( elem == (struct qelem*)NULL )
return;
pred = elem->q_back;
if( pred == (struct qelem*)NULL )
return;
pred->q_forw = elem->q_forw;
pred->q_forw->q_back = pred;
}
----------------- getdtablesize.c
#include <assert.h>
#include <sys/resource.h>
int getdtablesize( )
{
int resource = RLIMIT_NOFILE;
struct rlimit rlp;
int status;
rlp.rlim_cur = 0;
status = getrlimit( resource, &rlp );
assert(!status);
return rlp.rlim_cur;
}
--------------------------