public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jason Gross <jasongross9@gmail.com>
To: cygwin <cygwin@cygwin.com>
Subject: Using rand_r and -std=c99 with gcc
Date: Fri, 07 Sep 2012 03:23:00 -0000	[thread overview]
Message-ID: <CAKObCaqZ-OofLUPNa6xuAoQmZAfFrz7jSZS+TY2iRbsK-EtZWg@mail.gmail.com> (raw)
In-Reply-To: <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw@mail.gmail.com>

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

       reply	other threads:[~2012-09-07  2:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw@mail.gmail.com>
2012-09-07  3:23 ` Jason Gross [this message]
2012-09-07  5:55   ` Larry Hall (Cygwin)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKObCaqZ-OofLUPNa6xuAoQmZAfFrz7jSZS+TY2iRbsK-EtZWg@mail.gmail.com \
    --to=jasongross9@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).