The second issue is that in stdlib.h on windows the RAND_MAX is a 16 bit number and is defined as 0x7fff
But for example on openbsd it is defined to be as large as 0x7fffffff
Basically it if runs Cygwin or MSYS2 then the max value it can generate is 16bit.
I explored options online about redefining RAND_MAX but the general consensus was that it was a bad idea.
This is an issue that is as old as time when it comes to random values and stdlib.
In the converter-example.c I can't use JUNKTEST on windows.
First because the method on windows are called rand and srand and not random and srandom
An easy fix for this to just add further macros to converter-example.c
The second issue is that in stdlib.h on windows the RAND_MAX is a 16 bit number and is defined as 0x7fff But for example on openbsd it is defined to be as large as 0x7fffffff
Which means in the file asn_random_fill.c line 47 it will always fail on Windows.
I have made a fix for this that looks like this:
Basically it if runs Cygwin or MSYS2 then the max value it can generate is 16bit. I explored options online about redefining RAND_MAX but the general consensus was that it was a bad idea.
Should I make a pull request on this?