delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/09/06/22:38:45

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw@mail.gmail.com>
References: <CAKObCaogGuK=U2KqsZF3JbBuR6v-afJj0u-arPOuX++H-Wu6Qw AT mail DOT gmail DOT com>
From: Jason Gross <jasongross9 AT gmail DOT com>
Date: Thu, 6 Sep 2012 22:37:50 -0400
Message-ID: <CAKObCaqZ-OofLUPNa6xuAoQmZAfFrz7jSZS+TY2iRbsK-EtZWg@mail.gmail.com>
Subject: Using rand_r and -std=c99 with gcc
To: cygwin <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019