This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: __* in installed headers


> I don't see how.  

The risks we can't yet see are the ones that should concern us most.

> The stdlib.h used at compile time is only a superset with some more
> prototypes.

If it's maintained properly.

> And problems with not matching prototypes are mostly caught by the
> compiler since at least for C sources it can analyzy the prototype.

One hopes.

The principle is very simple: if it's not the same, it's not the same, and
you can't be absolutely sure that it's going to be enough the same--the
only way to be sure is to make it the same.  If humans might touch it, then
any stated invariants about its contents will be violated; it is only a
question of when, what it breaks, and how long and badly things get broken
before we notice the problem and perhaps are stuck with obscure nastiness
that we must be compatible with for a while.

It is fundamentally bad software engineering practice to have any case
where two things are presumed to work the same, but you don't actually test
it by testing both things in every context.  

The whole point is not about the problems we can imagine, but limiting the
kinds of problems we will never imagine but will still be possible.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]