delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/23/15:41:23

Date: Fri, 23 Jan 1998 12:40:30 -0800 (PST)
Message-Id: <199801232040.MAA27066@adit.ap.net>
Mime-Version: 1.0
To: "S. M. Halloran" <mitch AT duzen DOT com DOT tr>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: random numbers?

At 12:52  1/23/1998 +0200, S. M. Halloran wrote:
>On 22 Jan 98, Eli Zaretskii was found to have commented thusly:
>
>> 
>> On Wed, 21 Jan 1998, Nate Eldredge wrote:
>> 
>> > >All C library functions I have used until now can be declared
>> > >using a provided header file.  I find it reassuring, 
>> > >because errors in copying the prototypes locally
>> > >can be avoided by using such header files.  
>> > It does seem strange.
>> > 
>> > On other systems:
>> > 
>> > Linux (i386, libc 5) declares `random' and `srandom' in <stdlib.h>, but
>> > inside "#ifdef __USE_BSD".
>> > 
>> > 4.4 BSD (FreeBSD 2.0.5, i386) has them in <stdlib.h> also, but inside
>> > 
>> > #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
>> 
>> In my experience, void functions and functions which return an int
>> and are not ANSI/POSIX, usually have *no* prototypes on Unix
>> systems.
>> 
>
>All functions in the C language can be prototyped, whether ISO/ANSI 
>or POSIX has given them their blessing or not.  My headers on a SVR4 
>Unix have both prototypes and no prototypes, namely:
Right, obviously they *can*. But it seems the Unices with which Eli has
experienced, don't bother to do it. Why they would not is beyond me, unless
it's pure laziness. It does work without them, but who knows...

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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