[Mingw-w64-public] getpid issue

2014-11-06 Thread Dongsheng Song
If we define _POSIX_, then getpid (process.h) was hidden. Is it correct ? PS: MSVC 2012 is the last compiler which use _POSIX_, MSVC 2013 do not use _POSIX_ anymore. MSVC 2012/2013 guard getpid with !__STDC__. --

Re: [Mingw-w64-public] [PATCH] rand_r location

2014-11-06 Thread Dongsheng Song
On Fri, Nov 7, 2014 at 7:03 AM, Martell Malone wrote: > Here is a patch to move rand_r from pthread.h to stdlib.h > Typical POSIX programs expect this to be in stdlib > > Very similar to the previously applied patches in moving localtime_r. > Using the same guards to try best to ensure legacy supp

[Mingw-w64-public] [PATCH] rand_r location

2014-11-06 Thread Martell Malone
Here is a patch to move rand_r from pthread.h to stdlib.h Typical POSIX programs expect this to be in stdlib Very similar to the previously applied patches in moving localtime_r. Using the same guards to try best to ensure legacy support with win32-pthreads. Comments and suggestions are welcome