Date: Sun, 27 Feb 2000 17:53:38 -0500
   From: Harlan Stenn <[EMAIL PROTECTED]>

   The biggest reason NTP is going for correct prototypes is that the NTP code
   is kinda widely used, and we make sure the code will compile on a number of
   C compilers.

I'm tolerably familiar with the problems.  My UUCP code compiles on
everything I know of from SVR2 on up.

   We also like to crank up as many warnings as we can stand, and do our best
   to make the code "correct".

I do that during development, but not in shipping code.  In fact, my
standard compilation options during development are
    -O2 -pedantic -ansi -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wconversion -Wmissing-prototypes -Wnested-externs -Werror -g

But that only works on systems with proper header files.  On other
systems I'm willing to accept a few declarations without complete
prototypes.

   There are a number of "longian" problems out there, and we have to take some
   pains to make sure that network packets are the right length.

I guess I'm not sure what a longian problem is.  I get network packets
right by building them in arrays of unsigned char.  Otherwise you have
to worry about precise type sizes and alignments, and I don't think
it's worth it.  (Well, it's worth it when you not trying for
portability and can assume gcc; then you can use gcc extensions to
control them yourself.)

Ian

Reply via email to