* Using rand_r and -std=c99 with gcc [not found] <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw@mail.gmail.com> @ 2012-09-07 3:23 ` Jason Gross 2012-09-07 5:55 ` Larry Hall (Cygwin) 0 siblings, 1 reply; 2+ messages in thread From: Jason Gross @ 2012-09-07 3:23 UTC (permalink / raw) To: cygwin 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, but these messages are 3 years old. Additionally, http://linux.die.net/man/3/rand_r suggests that rand_r is c99. Are there plans to update stdlib.h to account for c99? If I look through the http://linux.die.net/man pages and figure out which things are c99 and submit a patch, will it get checked in? Thanks. -Jason -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using rand_r and -std=c99 with gcc 2012-09-07 3:23 ` Using rand_r and -std=c99 with gcc Jason Gross @ 2012-09-07 5:55 ` Larry Hall (Cygwin) 0 siblings, 0 replies; 2+ messages in thread From: Larry Hall (Cygwin) @ 2012-09-07 5:55 UTC (permalink / raw) To: 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/msg00800.html, which explains why > this happens, but these messages are 3 years old. Additionally, > http://linux.die.net/man/3/rand_r suggests that rand_r is c99. Are > there plans to update stdlib.h to account for c99? If I look through > the http://linux.die.net/man pages and figure out which things are c99 > and submit a patch, will it get checked in? The Linux man page you point to has this to say about rand_r's conformance: The function rand_r() is from POSIX.1-2001. POSIX.1-2008 marks rand_r() as obsolete. The fact that rand_r doesn't list c99 and is obsoleted in POSIX.1-2008 makes me dubious that newlib folks are going to jump at a patch to add it to c99. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-07 3:23 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw@mail.gmail.com> 2012-09-07 3:23 ` Using rand_r and -std=c99 with gcc Jason Gross 2012-09-07 5:55 ` Larry Hall (Cygwin)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).