This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: initstate/setstate
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 13 May 2008 09:59:07 +0200
- Subject: Re: initstate/setstate
- References: <4827A1F6.7020908@users.sourceforge.net>
- Reply-to: 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/