Artsize still not quite right in CURRENT

James Ralston qralston+ml.inn-workers at andrew.cmu.edu
Thu Apr 19 21:14:13 UTC 2001


On 18 Apr 2001, Russ Allbery wrote:

> I'd really rather not go down that route.  Feature test macros are
> inherently broken as a concept in my opinion; the problem is that
> when you use them, they have a tendency to hide *other* stuff that
> you end up wanting to use, or changing behavior in odd and
> undocumented ways.

> I seem to recall that this crossed the autoconf lists in the past
> and the conclusion was that it was a bug in glibc that the correct
> symbols weren't visible without needing feature-test macros, but I
> may not be remembering right.

I honestly haven't investigated the feature-test macros (and the
arguments surrounding them) enough to have an informed opinion about
them.

What I *do* know, however, is that if you're on a glibc system, and
you try to take the pragmatic approach of ignoring the feature-test
macros, you are going to experience lots and lots of Pain.

More specifically, you will wind up replicating the feature-test
macros in your own code (or in configure).  Even worse, the solution
you come up with might appear to work at first, but might in fact be
subtly broken.  For example, the tentative solution Alex previously
came up with was dropping "#define pread pread64" into config.h, but
that's not what glibc does, and as a result, there might be some
unexpected side-effects because of that.

If you feel it's a bug that glibc doesn't make certain symbols visible
unless certain feature-test macros are used, then the proper course of
action is to report that bug to the glibc maintainers.  But until the
glibc maintainers change the behavior (if they ever do), on glibc
systems, please take the pragmatic approach of setting the _GNU_SOURCE
macro.  If you don't, based on what I saw from the hour or so I spent
slogging through the glibc feature-test macros, you and the rest of
the active INN developers are going to wind up wasting lots of time
tracking down annoying little bugs--bugs that will all ultimately stem
from the decision to deliberately disdain the feature-test macros on
glibc systems.

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA



More information about the inn-workers mailing list