[ntp:hackers] Recent C99-isms

Martin Burnicki martin.burnicki at meinberg.de
Wed Jan 7 08:21:36 UTC 2015

Harlan Stenn wrote:
> 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've found a few other MISSING_ decalarations in config.h for Windows, 
so I just added one more, namely MISSING_C99_INIT_STYLE.

> 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?

As Danny has already mentioned, the advantage of MISSING_ is that you 
can just remove it once you drop support for compilers which need it.

> 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.

With the current solution you don't have to do anything with the 
configure stuff unless a different build environment shows up which also 
needs this workaround.

Martin Burnicki

Senior Software Engineer

MEINBERG Funkuhren GmbH & Co. KG
Email: martin.burnicki at meinberg.de
Phone: +49 (0)5281 9309-14
Fax: +49 (0)5281 9309-30

Lange Wand 9, 31812 Bad Pyrmont, Germany
Amtsgericht Hannover 17HRA 100322
Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg, 
Andre Hartmann, Heiko Gerstung
Web: http://www.meinberg.de

More information about the hackers mailing list