🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1412

portability of InterViews-3.0 to Ultrix: problems and fixes

#1412
From: mcgeer
Date: Fri, 31 May 1991 19:49
26 lines
1804 bytes
I have recently completed an installation of InterViews on a DECstation
5500 under Ultrix.  We used the AT&T 2.1 compiler and we run MIT X11, Release 4.

After the general shakedown, two compile problems remained which
required a patch to the source.  I haven't posted this as a fix, since
I'm not sure that the patches I put in were correct.

(1) Dispatch/dispatcher.c calls select twice.  Arguments 2-4 are
declared as FdMask& 's, which for all practical purposes to the linker
are fd_set * 's.  An fd_set in Sun OS is a structure with a single long
element, which is a bit-vector.  Ultrix uses int *'s for the arguments.
 As nearly as I can tell from the man pages, the int *'s represent the
same things and are similarly encoded.  My fix was simply to cast off
the fd_set *'s to int *'s; e.g:

	/* nfound = select(_nfds, &rmaskret, &wmaskret, &emaskret, howlong); */
        nfound = select(_nfds, (int *)&rmaskret, (int *)&wmaskret, (int *)&emask
ret, howlong);

A better solution, I think, would be to write a Dispatch::selector
which provides a reasonable wrapper to the system calls.

(2) IV-X11/xworld.c, line 591, routine World::inputReady: Under ultrix,
the third argument to ioctl must be a char *.  Solved by casting &pending to char *.

						-- Rick
Technical Details
Message-ID: <9105311949.AA04835@athos.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!stanford.edu!ATHOS.BERKELEY.EDU!mcgeer

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!stanford.edu!ATHOS.BERKELEY.EDU!mcgeer
From: mcgeer@ATHOS.BERKELEY.EDU
Newsgroups: comp.windows.interviews
Subject: portability of InterViews-3.0 to Ultrix: problems and fixes
Message-ID: <9105311949.AA04835@athos.Berkeley.EDU>
Date: 31 May 91 19:49:02 GMT
Article-I.D.: athos.9105311949.AA04835
Sender: news@shelby.stanford.edu (USENET News System)
Organization: Internet-USENET Gateway at Stanford University
Lines: 26