From: Andrew P. <at...@pi...> - 2014-09-17 23:26:20
|
On Windows with the VC 2012 compiler I get this error, which seems to then break a lot of other important stuff downstream: thread.c(55) : error C2061: syntax error : identifier 'pid_t' Is pid_t defined anywhere for Windows? AFAICT it is not. Adding this in an appropriate spot in nsthread.h makes the error go away: #ifndef pid_t typedef int pid_t; #endif But I don't know whether that's actually a correct fix for the various places that use pid_t. Interestingly, in nsd/exec.c Ns_WaitForProcess uses pid_t ONLY on Unix, and has a completely different implementation for Windows, which uses a HANDLE type instead of pid_t. And winthread.c definitely uses HANDLE. So it looks like use of the Unix-only pid_t crept into a few of the nominally cross-platform files over time. But what's the correct fix? -- Andrew Piskorski <at...@pi...> |