This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Symbol management in header files
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 18 Oct 2016 10:58:55 +0200
- Subject: Symbol management in header files
- Authentication-results: sourceware.org; auth=none
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