Message-Id: <199801231051.MAA01299@ankara.duzen.com.tr> Comments: Authenticated sender is From: "S. M. Halloran" 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 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: random numbers? References: <199801212339 DOT PAA05833 AT adit DOT ap DOT net> In-reply-to: Precedence: bulk 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 , but > > inside "#ifdef __USE_BSD". > > > > 4.4 BSD (FreeBSD 2.0.5, i386) has them in 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