I'm porting a relatively simple console program written for unix to the Windows platform. (VC++ 2005). All the source files include "unistd.h", which doesn't exist. Removing it, i get complaints about misssing prototypes for 'srandom', 'random', and 'getopt'. I know I can replace the random funcs, and I'm pretty sure I can find/hack-up a getopt implementation.
But I'm sure others have run into the same challenge. My question is: Has someone done a port of "unistd.h" to windows? At least one containg those functions which do have a native windows implementation - I don't need pipes or forking.
EDIT:
I know I can create my very own "unistd.h" which contains replacements for the things I need - especially in this case, since it is a limited set. But since it seems like a common problem, I was wondering if someone had done the work already for a bigger subset of the functionality.
Switching to a different compiler or environment isn't possible at work - I'm stuck with Visual Studio.