

I'm not a rank beginner at C coding, but I've never personally had to use this function before. Please note that the 'slash' character is used to denote a choice between multiple 'variable types', not a requirement for both variable types, to be used. One question is what function(s) and header file(s) should I be looking at to code around not having said header file? A second question is can I obtain an 'ioctl.h' header file that works with VC++? The recalitrant function, I believe, is ' int ioctl( int, TCGETA/TCSETA, &struct termio foo )'.

Other than numerous warnings about conversions from type 'double' to type 'int' (the program is an old one, it relies heavily on implicit type-casting), this so far port-resistant code snippet is the real show-stopper. One other source file contains the same preprocessor line to include 'ioctl.h'.

In each file that has these include preeprocessor commands, it appears that the function getch() is either defined, or redefined. I then tried modifying the line to look like this:īoth preprocessor lines generate the following fatal error in the build of the project:ĭ:\shared downloads\sstsrc\os2.c(5) : fatal error C1083: Cannot open include file: 'ioctl.h': No such file or directory The original preprocessor line reads as follows: I vaguely remember reading that there is a substitute header file along with it's functions that Microsoft uses that do the same thing, but they are called by different names. Nor does the latest PSDK contain such a file. However, the source code calls for a header file named 'ioctl.h' to be included, which does not appear to be part of the available header files in VC++ Express. the program is actually a game, but being so old, I thought it would be easier to learn something by playing around with it to try to figure out what is going on behind the scenes. I recently found an old C console program that was originally Unix-based that I wanted to play with using VC++ 2005 Express.
