%m, #614

Achim Gratz Stromeko at nexgo.de
Thu Aug 29 05:53:23 UTC 2019


Gary E. Miller via devel writes:
>> But this thread is about that exact function.
>
> We'll have to disagree there.  I feel it is much more generic to
> the defines that pull in stuff.

THen change the subject or open your own thread, please.

>> > Not at all what I meant.  Flexible about what NTPsec builds on, not
>> > flexible about the end result.  
>> 
>> You were arguing for defining _GNU_SOURCE, were you not?
>
> Nope.

Yes you were.  You claim Humpty-Dumpty privileges a lot, so just to
remind you of your exact words:

--8<---------------cut here---------------start------------->8---
_GNU_SOURCE should not always be defined, but it does need to be defined
in certain cases.  For example, on glibc < 2.10, you need to define
it to get strnlen() and struct ifreq.

>From glibc 2.10, you instead need _POSIX_C_SOURCE >= 200809L
--8<---------------cut here---------------end--------------->8---

>> Yet you keep arguing that _GNU_SOURCE should or could be defined,
>
> Uh, no.  I'm not sure who you are arguing with on that.  I'm just
> reminding folks of things recently learned on gpsd about the feature
> macro thing.

Well, you can do whatever you want in gpsd.  This is ntpsec and even if
there is an actual need to define _GNU_SOURCE for certain long dead
versions of glibc (which I doubt, that is just the big sledgehammer to
pull in everything at once if you don't know what you actually
wanted/needed), that is no reason to do it in general, exactly because
it is incompatible with the API that ntpsec is supposed to use.  In
summary,

ctx.env.CFLAGS = ["-std=c99", "-D_POSIX_C_SOURCE=202009L", "-D_XOPEN_SOURCE=600", "-D_DEFAULT_SOURCE"] + ctx.env.CFLAGS

in wscript is much closer to the API ntpsec claims to use (the older
non-POSIX API are not explicitly mentioned in the docs, but in use they
are).  The derfinition of _DEFAULT_SOURCE activates a number of BSD and
SVID API and on some older systems you might need to use _BSD_SOURCE and
_SVID_SOURCE instead (in addition should also work).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


More information about the devel mailing list