mouse@thunder.mcrcim.mcgill.edu (der Mouse) (03/15/91)
In article <MAYER.91Mar11104808@porky.sono.uucp>, sono!mayer@sun.com (Ronald &) writes: > On a sparcstation, SunOS 4.1 I am having a problem using the termio > ioctl TIOCSTI [simulate terminal input] when using gcc. While it > works as expected under cc, under gcc I get an "Inappropriate ioctl > for device" error message. Any ideas what I'm missing? You're missing a correct gcc installation. Someone else has already responded - correctly - that the problem is the non-ANSIness of the quotes trick in #define _IO(x,y) (_IOC_VOID|('x'<<8)|y) and related #defines. But that's only half the answer. The other half is, of course, the answer to "but what do I do about it?". gcc comes with a script, called fixincludes, that builds gcc-private versions of some include files that are known to commonly have this sort of non-ANSIness in them. This is supposed to be run as part of the installation. However, if it isn't run, or is run incorrectly, or breaks for some reason, it is hard to notice, because problems like this one are the only symptom. You should get on the case of whoever installed gcc on your machine and persuade it to run (or rerun) fixincludes. I have a very hazy memory of some versions of gcc having a broken fixincludes. It might be worthwhile checking to make sure you have an up-to-date version.