This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Where is random()?
- To: Mumit Khan <khan at xraylith dot wisc dot edu>
- Subject: Re: Where is random()?
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Date: Wed, 16 Dec 1998 03:12:16 +1100
- Cc: Jan Tomasek <xtomasej at fel dot cvut dot cz>, "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>
- References: <3673E58E.93F1B604@fel.cvut.cz> <199812150417.WAA12922@modi.xraylith.wisc.edu>
On 14-Dec-1998, Mumit Khan <khan@xraylith.wisc.edu> wrote:
> Jan Tomasek <xtomasej@fel.cvut.cz> writes:
> > Hi,
> > I'm writing one school project in C and at home I working
> > under CygWin 19.2
> >
> > On my Linux (Debian) is on random() man page writen that it is in
> > defined in stdlib.h
> > * if I compile it with gcc on that linux all is ok
> > * if I compile it with Cygnus gcc port I get warning:
>
> Learning standard from man pages is as full of pitfalls as learning a new
> evolving computer language from a compiler.
This is true. However, if you're going to choose a set of man pages
to learn from, the Debian Linux ones are actually not too bad, because
most of the man pages have a "CONFORMING TO" section which states
which standard(s) support the function(s) in question.
> `random' is not standard ANSI nor is it part of POSIX.
Right. For random(), the Debian Linux man page states the following:
CONFORMING TO
BSD 4.3
Cygwin provides ANSI C, most of POSIX.1/1990, and some other stuff.
For details, see the "What Unix API calls are supported by Cygwin?"
section of the FAQ list.
> The good news for you is that Cygwin comes with libiberty, which contains
> a random function. Just add -liberty at the end of the list of libraries
> when you link and you're set for now.
BTW, the FAQ list says that Cygwin supports random() but doesn't
mention the need to link in libiberty.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh@128.250.37.3 | -- leaked Microsoft memo.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".