[v3] Fix / clean-up config vs crosses (2/n)
Mark Mitchell
mark@codesourcery.com
Sat Aug 16 17:17:00 GMT 2008
Paolo Carlini wrote:
> Yeah, now I remember why Joseph introduced AC_TRY_COMPILE_OR_LINK, for
> some C99 functions... I think we already said that the practice isn't
> really nice, for users too, not just for our configury... Anyway, can I
> ask to you and Joseph to double check whether those
> declared-but-not-defined tricks are common also for functions like
> writev, pool, LFS I/O... Certainly you know those systems much better
> than me...
Actually, I don't know much about them, except from a very high-level
perspective. I could go dive into it, of course, but for me this is
more theory than practice, I'm afraid. There are so many systems out
there that I just think it pays to be paranoid.
Concretely, I have no evidence of a system which puts writev in headers
without guaranteeing it appears in the C library, but I can imagine it.
Even with Newlib, for example, people building freestanding systems
leave out libgloss (or requivalent) -- but the headers don't change.
So, the entire I/O subsystem (open, read, write, etc.) might be missing.
On the other hand, in such a situation, there's still nothing wrong
with having libstdc++ I/O (cout, etc.) use the libc I/O routines; if the
end user fills in the low-level I/O routines, then libstdc++ will work,
and if they don't, then libstdc++ I/O isn't going to work no matter
what. So, the issue is really about "optional" I/O routines that
libstdc++ could live without.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Libstdc++
mailing list