Mail Archives: cygwin/1998/12/15/22:44:34
On 14-Dec-1998, Mumit Khan <khan AT xraylith DOT wisc DOT edu> wrote:
> Jan Tomasek <xtomasej AT fel DOT cvut DOT 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 AT cs DOT mu DOT oz DOT au> | "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh> | but source code lives forever"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- leaked Microsoft memo.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -