Closed xflouris closed 7 years ago
Imported code from glibc 2.23 to have the re-entrant pseudo-random number generator functions available for MAC and Windows.
@amkozlov : from now on, use the pll_ prefixed functions (srandom_r,random_r,initstate_r,setstate_r). They have the exact same behaviour as the GNUC calls (imported code).
For an example see stepwise.c or the attached example source code, where I use pll_{s}random_r to simulate the non-reentrant random().
thanks Tomas! Does it mean that libpll now compiles on Mac?
On 22.03.2017 15:44, Tomas Flouri wrote:
Imported code from glibc 2.23 to have the re-entrant pseudo-random number generator functions available for MAC and Windows.
@amkozlov https://github.com/amkozlov : from now on, use the pll_ prefixed functions (srandom_r,random_r,initstate_r,setstate_r). They have the exact same behaviour as the GNUC calls (imported code).
For an example see stepwise.c https://github.com/xflouris/libpll/blob/dev/src/stepwise.c or the attached example source code, where I use pll_{s}random_r to simulate the non-reentrant random().
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xflouris/libpll/issues/133#issuecomment-288421149, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXS0hu08n7pLg_3evbIWiEn4p3TJcwIks5roTPhgaJpZM4Mjtlj.
Yes,it compiles fine. There are still some portability issues with the testing framework, but library code and examples work perfectly.
great, thanks!
On 22.03.2017 17:31, Tomas Flouri wrote:
Yes,it compiles fine. There are still some portability issues with the testing framework, but library code and examples work perfectly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xflouris/libpll/issues/133#issuecomment-288457738, or mute the thread https://github.com/notifications/unsubscribe-auth/AFXS0uzdg4_yaNP59c8ZITwaPqFNjdksks5roUzXgaJpZM4Mjtlj.
Implement
random_r
and andsrandom_r
since MAC does not have these functions. Use the version from the GNU libc.