I just finished a small project written in C, where I read a data stream from a serial port and parse the incoming data. The software is written for POSIX systems (using termios) and follows the standard steps to working with serial i/o
- Opening the serial device using open()
- Configuring communication parameters (termios)
- Set blocking mode on file handle (fcntl)
- Perform read() on serial interface.
- Perform close() on serial interface when done.
Other than the socket parts, the code is straight ANSI C.
My question is, how involved would it be to make the code work on a windows platform. The port would not be written by me, I'd only like to give an indication to others who might be interested in porting it (i.e. trivial, not so trivial, rip your eyes out insanity inducing).
Also if someone has Windows with "Windows Services for UNIX", would they be able to use the code without modifying it?
So, if anyone has experience with this could you please share.