Date: Sun, 27 Feb 2000 17:48:40 -0500
From: Harlan Stenn <[EMAIL PROTECTED]>
NTP only uses the DECL_ stuff for cases where the system headers do not
provide the declarations.
I'm surprised. Personally, I've never seen a case where the system
headers do not provide a declaration, and the correct declaration does
not just involve ints. You showed an example using setpriority; is it
really true there is a system which does not declare setpriority in
any system header file, and in which the type of the second parameter
is id_t, and in which passing the second parameter as int will not
work correctly?
I'm pointing out that depending on the functions involved, the binutils
solution will not work because you are only stating that a declaration is
needed, and there are times there are multiple conflicting possible
declarations. The correct one must be chosen.
It's only necessary to use the correct one when it makes a difference.
In my experience, either the system declares the function in some
header file, or it does not make a difference. Specifically, if the
function is not a varargs function, it is always safe to declare it as
extern int foo ();
In some well known cases, it is necessary to declare the return type
as a pointer:
extern void *malloc ();
If that were not true, then it would be rather difficult for ordinary
code to call the function: there would be no header file, yet some
complex declaration would be required.
Ian