delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/05/13/03:59:39

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 13 May 2008 09:59:07 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: initstate/setstate
Message-ID: <20080513075907.GA22677@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4827A1F6 DOT 7020908 AT users DOT sourceforge DOT net>
MIME-Version: 1.0
In-Reply-To: <4827A1F6.7020908@users.sourceforge.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
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

On May 11 20:48, Yaakov (Cygwin Ports) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Apparently cygwin has exported initstate and setstate for over ten years
> (see winsup/cygwin/ChangeLog-1997), but I can't find a header definition
> for it in 1.5.25-11.  POSIX requires these to be declared in <stdlib.h>.

stdlib.h is a newlib file.  You could just send a patch to the newlib
mailing list.

> Also, the signatures seem to differ slightly.  winsup/cygwin/random.cc
> declares these as:
>
> char *initstate(unsigned long seed, char *arg_state, long n);	
> char *setstate(char *state);
>
> but POSIX requires:
>
> char *initstate(unsigned seed, char *state, size_t size);
> char *setstate(const char *state);
>
> Could someone please clarify?

I'll align the Cygwin functions with POSIX.


Thanks for the report,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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