unistd.h

Is there a replacement for unistd.h for Windows (Visual C)?

耗尽温柔 提交于 2019-11-26 02:50:29
I'm porting a relatively simple console program written for Unix to the Windows platform ( Visual C++ 8.0 ). 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 functions, 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: is there 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

Is there a replacement for unistd.h for Windows (Visual C)?

徘徊边缘 提交于 2019-11-26 01:49:00
问题 I\'m porting a relatively simple console program written for Unix to the Windows platform (Visual C++ 8.0). 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 functions, 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: is there a port of \"unistd.h\" to Windows?