brad@lsr-vax.UUCP (Brad Zoltick - LMO) (06/13/90)
In article <uunet!mcnc.org!thorin!glycine!taylor> Russell Taylor writes: > > We have an IRIS 4D running OS 3.2.2. I am trying to find the > include file that defines 'struct sgttyb'. I know it must be there > somewhere, because /usr/include/curses.h makes use of the structure > in one of its definitions. However, I have done : > find /usr/include -name \*.h -exec grep -l sgttyb {} \; > and none of the include files that show up define this structure. The ioctl and fcntl(SYSV) system calls differ significantly between SYSV and bsd and between different versions. This makes writing portable code rather difficult. Anyone who has ported an editor from one Unix system to another encounters problems with different ioctl usage. The structure you require, 'struct sgttyb' is defined under SUNOS in /usr/include/sys/ttold.h. You will probably need 'struct tchars' from this header also. Brad Zoltick Mail addresses for 'brad' at lsr-vax: UUCP: ...uunet!lsr-vax!brad INTERNET: lsr-vax!brad@uunet.uu.net or brad%lsr-vax.UUCP@uunet.uu.net BITNET: At present, must use the INTERNET address through a BITNET-to-Internet gateway.
guy@auspex.auspex.com (Guy Harris) (06/15/90)
>The structure you require, 'struct sgttyb' is defined under SUNOS in >/usr/include/sys/ttold.h. That's only because SunOS (4.x, which is the version to which you're referring) supports the BSD "ioctl"s for backwards compatibility. Irix may not do so, in which case getting the structure won't help you one bit.... (If it *does* do so, they presumably have it defined in a standard include file, for source compatibility.)