[ntp:hackers] Recent C99-isms

Harlan Stenn stenn at ntp.org
Tue Jan 6 18:54:18 UTC 2015

Martin Burnicki writes:
> Hi Harlan,
> Harlan Stenn wrote:
> > Martin Burnicki writes:
> >> So I think the best way to go is to add a MISSING in config.h for VS
> >> versions before VS2013, and no more action is required for other build
> >> environments unless the same problem occurs.
> >>
> >> I'll submit such patch tomorrow.
> >
> > Sounds good to me.  You're going to handle this "manually" for the
> > config.h in Windows,
> Yep.
> > and I'm going to need a 'configure' test to set the
> > correct value for Unix boxes.  Shouldn't be that hard to do...
> >
> > H
> Are you OK with the MISSING_ approach, or would you prefer the HAVE_=20
> approach as it is used with most other conditionals?
> With the MISSING_ approach it is eventually sufficient to update the=20
> Windows-specific config.h file, and no automake stuff is required unless=20
> there are Unix versions which also need to define MISSING_.
> With the HAVE_ approach you *have to* update the automake stuff to be=20
> sure HAVE_ is defined for most platforms.

I'm not sure how much it matters.  I do know that we use NEED_* in a few
places, if we need to supply something that should exist but doesn't.

I'm still getting some feedback from folks with pretty old gear (mostly
Sun boxes from the last century) - sometimes they have older compilers
that may do C89 but not C90.  I'm not sure that it will matter much
longer, but in that case what should we do about Microsoft not
implementing some C99 features nearly 10 years' later?

I'm OK implementing more configure stuff if needed.  And if we can
responsibly postpone that work, so much the better.  Having said that,
I'd rather the code be "clean" and unsurprising, so I'm game to do more
work "now" so the code is better.

> BTW, I was pretty astonished that Danny agreed with my proposal. I'm
> not sure if that ever happened before. ;-))



More information about the hackers mailing list