Re: Using rand_r and -std=c99 with gcc

2012-09-06 Thread Larry Hall (Cygwin)
On 9/6/2012 10:37 PM, Jason Gross wrote: Hi, If I try to compile a C program which uses rand_r with gcc 4.5.3, with -std=c99, I get warning: implicit declaration of function 'rand_r'. Google gave me http://cygwin.com/ml/cygwin/2009-05/msg00417.html and http://sourceware.org/ml/newlib/2007/msg00

Using rand_r and -std=c99 with gcc

2012-09-06 Thread Jason Gross
Hi, If I try to compile a C program which uses rand_r with gcc 4.5.3, with -std=c99, I get warning: implicit declaration of function 'rand_r'. Google gave me http://cygwin.com/ml/cygwin/2009-05/msg00417.html and http://sourceware.org/ml/newlib/2007/msg00800.html, which explains why this happens,