Symbol management in header files
Florian Weimer
fweimer@redhat.com
Tue Oct 18 08:59:00 GMT 2016
Historically, -D_GNU_SOURCE turns out all optional features in header
files. All in all, this is a good thing because it makes simple for
programmers, and something like this is needed for using glibc features
in header-only libraries. No one wants repeats of strerror_r, basename,
or snprintf.
However, TS 18661-1 added âiszeroâ to <math.h>, and this causes some
build failures. Apparently, the main problem here is that it is a
macro, which means it is not subject to scoping (which helps C++ in
particular to cope with definitions of nextup/nextdown/fsub/canonincalize).
Is there anything we can do about this? Do we need some guidance for
dealing with standards which define macros with generic names?
(Let's keep the discussion here focused on source-code compatibility; I
will start another thread about symbol management at the ELF level.)
Thanks,
Florian
More information about the Libc-alpha
mailing list