Mail Archives: djgpp/1998/01/23/05:53:55
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 -