delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/23/05:53:55

Message-Id: <199801231051.MAA01299@ankara.duzen.com.tr>
Comments: Authenticated sender is <mitch AT ankara DOT duzen DOT com DOT tr>
From: "S. M. Halloran" <mitch AT duzen DOT com DOT tr>
Organization: User RFC 822- and 1123-Compliant
To: djgpp AT delorie DOT com
Date: Fri, 23 Jan 1998 12:52:27 +0200
MIME-Version: 1.0
Subject: Re: random numbers?
References: <199801212339 DOT PAA05833 AT adit DOT ap DOT net>
In-reply-to: <Pine.SUN.3.91.980122183331.1427E-100000@is>

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:

#ifdef __STDC__  /* <--the traditional macro for ANSI C-conforming 
code */
unsigned myprototypedfunction(int, int, struct dumb *);
#else
unsigned myrealKandRfunction();
#endif

And this goes for all the functions in all the libraries this system 
offers.  I have come to admit that function prototyping is the one 
useful thing ANSI C took from C++, but I insist on *defining* my 
functions with old-style parameter lists, and only the most worthless 
compilers will refuse to accept such a style.

Mitch Halloran
Research (Bio)chemist
Duzen Laboratories Group
Ankara   TURKEY
mitch AT duzen DOT com DOT tr

other job title:  Sequoia's (dob 12-20-95) daddy

- Raw text -


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