[ntp:questions] Re: Issues w/ 4.2.0a, multicast, and porting 4.2.2 to Fedora Core

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Sep 6 16:18:20 UTC 2006

Harlan Stenn wrote:

>Philip> why not just change the prototype of doquery(), for instance?
>Philip> (As a side note, why would NULL ever need to be cast to (char *)?
>Philip> (void *)0 is an untyped pointer, and hence implicitly casts to
>Philip> whatever pointer the receiving parameter from the prototype takes...
>Philip> Unless this needs to work not just with ISO/ANSI compilers, but with
>Philip> K&R as well...  is anyone still using pre-C99 compilers?)
>Bing!  We are still using K&R as the "base" compiler level.
>I believe we had agreed that we would "upgrade" to ANSI C around now, and
>I'm going to make sure about this with Dave in my next email to him.  There
>is something to be said for doing this for 4.2.4, and something to be said
>for doing this as of 4.3.0.

After a cursory stare (that's what that blinking thing was!) at the
code, I was wondering
why there's some duplication of macros, external declarations, and even
definitions (like doquery()).

I didn't have a chance yet to do a side-by-side comparison of the two
versions of the
function, but I'm wondering if we might be better off coming up with a
library that
provides both client and server functionality and then just having both
the server
and the utilities link against it.

Maybe moving declarations and macros (like P()) into a common header as

I was trying to clean up some warnings with doquery(), and only hit one
of the
places it was declared... which caused a conflicting definition in the
other place
it was declared... Life is a lot simpler when functions are declared in
one and
only one place, and defined in one and only one place... especially when
compiler doesn't have strict prototypes.

I might try to compile with -std=c99 just for fun...


More information about the questions mailing list