[comp.unix.questions] TERMIO under the SUN

deutsch@jplcwp.UUCP (Michael Deutsch) (04/30/87)

I am trying to port a package to the SUN-3 a program
that provides various screen handling features.

I've ported this package to several UNIX - SYS-V machines
as well as various machines running BSD-4.2/4.3.

I used the version from Ultrix-1.2 which I believe
should be close to that what should compile on the
SUN.
The problem "termio"
In my C program I have a line:
#include <sys/termio.h>

to which the SUN-3 compiler answered:

"Include file "sys/termio.h" not found.

I've checked for termio.h in /usr/include
and in the /usr/include/sys and of course
it is not there.  
On the other hand there is a complete "man"
entry for "termio" and it has no synopsis
for termio - i.e. I assumed that termio is
included automatically.  I've tried it that
way as well and of course the structure:

struct termio io_1, io_2;

are flagged as undefined as well as constants
such as  TCSETA etc.

If you know the solution especially all the
sharp folks at SUN please respond ASAP.
You can even call me collect: at: (818) 895-2605.

Thanks in Advance;	{Michael Deutsch}

mkhaw@teknowledge-vaxc.UUCP (05/01/87)

In article <214@jplcwp.UUCP> deutsch@jplcwp.UUCP (Michael Deutsch) writes:
>I am trying to port a package to the SUN-3 a program
>that provides various screen handling features.
>
>I've ported this package to several UNIX - SYS-V machines
>as well as various machines running BSD-4.2/4.3.
>
>I used the version from Ultrix-1.2 which I believe
>should be close to that what should compile on the
>SUN.
>The problem "termio"
>In my C program I have a line:
>#include <sys/termio.h>
>
>to which the SUN-3 compiler answered:
>
>"Include file "sys/termio.h" not found.
>
>I've checked for termio.h in /usr/include
>and in the /usr/include/sys and of course
>it is not there.  
>On the other hand there is a complete "man"
>entry for "termio" and it has no synopsis
>for termio - i.e. I assumed that termio is
>included automatically.  I've tried it that
>way as well and of course the structure:
>


The Sys V specific (and 4bsd incompatible) files are in /usr/5include,
/usr/5lib, /usr/5bin.  There is a /usr/5include/termio.h.  To compile
for Sys V, use /usr/5bin/cc instead of (the default) /bin/cc.  It will
know to look in /usr/5include for "<...>" header files and in /usr/5lib
for Sys V libraries to link in.

Mike Khaw





(empty lines for inews)













-- 
internet:  mkhaw@teknowledge-vaxc.arpa
usenet:	   {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa
USnail:	   Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303

guy@gorodish.UUCP (05/01/87)

> The problem "termio"
> In my C program I have a line:
> #include <sys/termio.h>
> 
> to which the SUN-3 compiler answered:
> 
> "Include file "sys/termio.h" not found.
> 
> I've checked for termio.h in /usr/include
> and in the /usr/include/sys and of course
> it is not there.  

Try looking in "/usr/5include/termio.h".  In the current release, the
"termio" stuff is only available if you install the "System V
optional software" package and use "/usr/5bin/cc" rather than
"/bin/cc" to compile your software.  (If that program was originally
intended to run on a System V system, you want to use "/usr/5bin/cc"
anyway, so it picks up the System V versions of things like
"sprintf", "signal", etc., etc..)

> On the other hand there is a complete "man"
> entry for "termio" and it has no synopsis
> for termio - i.e. I assumed that termio is
> included automatically.

Bad assumption.  There is no synopsis for "termio" in the System V
Release 2 man page either, and our "termio" man page is derived from
that one.

schwartz@swatsun (Scott Schwartz) (05/06/87)

To use system V features, compile with /usr/5bin/cc
This will cause the compiler to search the directories /usr/5include
and /usr/5lib for needed stuff (termio, in particular).

-- 
# Scott Schwartz
# UUCP: ...{{seismo,ihnp4}!bpa, cbmvax!vu-vlsi, sun!liberty}!swatsun!schwartz
# AT&T: (215)-328-8610	/* lab phone */