%m, #614
Achim Gratz
Stromeko at nexgo.de
Tue Aug 27 20:54:43 UTC 2019
Gary E. Miller via devel writes:
>> In that case, you need to be prepared for changed semantics in several
>> places and I don't think ntpsec is set up to deal with that.
>
> Changed semantics? No. Simple existence of the prototpe is at stake.
Go back to the original thread and/or read the manual page about
strerror_r; the existence of a particular prototype (which in this case
at least differ by their return type, but that's somewhat orthogonal to
the issue being discussed) doesn't tell you about the implemented
semantics. You can't target the XSI interface while defining
_GNU_SOURCE, period. Even if you do (by not defining _GNU_SOURCE), it
wasn't actually POSIX compliant until glibc 2.13, which means you'd have
to deal with the fallout if you still wanted to support older versions
of glibc.
>> > From glibc 2.10, you instead need _POSIX_C_SOURCE >= 200809L
>>
>> Well, if that's the ABI you are de-facto targeting, then make this the
>> requirement.
>
> It is one of the choices. NTPsec, and gpsd, try to be flexible to what
> is available, not the other way around.
If you want to be flexible about bugs, don't call it NTPsec.
You already try to use both the XSI compliant (in msyslog.c) and GNU
extended version of strerror_r (everywhere else), with the inevitable
difference in return type papered over by the IGNORE() macro (not that
this helps). That's just not going to work the way you expect it to
across all the systems you are targeting, no matter how much you wish
it'd do. In fact it's not going to work the same on a single system if
you can't guarantee the same compilation sequence for each build (as Hal
likely found out already the hard way).
You will either need to provide your own implementation that resolves
the differences (Gnulib-style) or otherwise conditionalize on the actual
resolution of the prototype (in which case you _must_ use the return
value when the GNU specific version gets selected).
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
More information about the devel
mailing list