Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Junio C Hamano
On Thu, Jun 4, 2015 at 4:42 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 06/04/2015 10:40 AM, Johannes Sixt wrote: We *certainly* don't require high-quality random numbers for this application. Regarding portability, there is one definite point in favor of rand() (it's available on

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Johannes Sixt
Am 30.05.2015 um 19:12 schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD; admittedly rand/srand are written down in C89 and

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Michael Haggerty
On 06/04/2015 10:40 AM, Johannes Sixt wrote: Am 30.05.2015 um 19:12 schrieb Junio C Hamano: Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD;

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-05-30 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD; admittedly rand/srand are written down in C89 and later, so they might be more portable, but I

[PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-05-30 Thread Johannes Sixt
On Windows, we do not have functions srandom() and random(). Use srand() and rand(). These functions produce random numbers of lesser quality, but for the purpose (a retry time-out) they are still good enough. Signed-off-by: Johannes Sixt j...@kdbg.org --- There you have it: Look the other way