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,

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

Re: Using rand_r

2009-05-14 Thread Greg Chicares
On 2009-05-14 05:49Z, Nicholas Sherlock wrote: David Billinghurst wrote: Nicholas Sherlock wrote: Hey everyone, I'm trying to use the function rand_r with gcc-4 in Cygwin 1.7, all my packages are up to date. It's supposed to be defined in stdlib.h, and I can see it there. But if I

Using rand_r

2009-05-13 Thread Nicholas Sherlock
Hey everyone, I'm trying to use the function rand_r with gcc-4 in Cygwin 1.7, all my packages are up to date. It's supposed to be defined in stdlib.h, and I can see it there. But if I compile a program which uses it, I get: warning: implicit declaration of function 'rand_r'. The reason

Re: Using rand_r

2009-05-13 Thread Nicholas Sherlock
David Billinghurst wrote: Nicholas Sherlock wrote: Hey everyone, I'm trying to use the function rand_r with gcc-4 in Cygwin 1.7, all my packages are up to date. It's supposed to be defined in stdlib.h, and I can see it there. But if I compile a program which uses it, I get: warning: