Subject: SCO Unix compatibility
To: None <tech-userlevel@NetBSD.ORG>
From: Lucio de Re <lucio@proxima.alt.za>
List: tech-userlevel
Date: 05/09/1997 19:10:36
Soemtime I wonder about my sanity: I'm neither sure this question 
belongs
here, nor whether I can remember all the details I need to formulate the
question properly.

Anyways, this is it:

I attempted to use the RM Cobol Runtime (believe it or not, COBOL still
exists :-) using the SCO Unix emulation capabilities of NetBSD and 
everything
except console handling worked like a charm.

The problem?  When ICANON is turned off and timeout is used to return 
from
a read(2), SCO Unix, or, more accurately, the curses library, does not
expect an error return.  Errno is set to EAGAIN and, presumably, the 
called
function returns -1 instead of zero (or whatever, I honestly don't have 
all
the documentation handy), causing the RM Cobol Runtime to fail when 
handling
multi-keystroke sequences (like function keys).

This is rather sad, as my client would dearly like to have a stand by 
machine
running NetBSD rather than buying another copy of SCO Unix for the job.

What I am not convinced about is how the problem should be surmounted.  
Would
it be expedient to hack the NetBSD kernel so that its behaviour changes 
when
emulating SCO, or is this pushing the emulation too far?  I have little 
idea
how the emulations are implemented, so this seems a good opportunity to 
ask
(rather than trying to read the source for the details :-)

In the same vein, Lucent have released a Linux-based version of their 
rather
cute Inferno environment, which I am somewhat fond of.  They make it 
clear
that it is compiled with the Redhat 4.0 platform (if memory serves) as
the target: would this run reliably under Linux emulation in -1.2.1
or -current?

-- 
Lucio de Re (lucio@proxima.alt.za)
Disclaimer: I'm working at getting my opinions to agree with me.