This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Bogus fixinclude of stdio.h from glibc 2.2.3
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>, libc-alpha at sources dot redhat dot com
- Subject: Re: Bogus fixinclude of stdio.h from glibc 2.2.3
- From: Bruce Korb <bkorb at pacbell dot net>
- Date: Sat, 19 May 2001 16:59:51 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: Home
- References: <Pine.LNX.4.33.0105200014360.11595-100000@kern.srcf.societies.cam.ac.uk>
"Joseph S. Myers" wrote:
>
> On Sat, 19 May 2001, Bruce Korb wrote:
>
> > So, I need some more information. Can you help refine
> > the division between those stdio.h headers that need this
> > patch and those that do not?
>
> You could try bypassing on _G_va_list (though I don't guarantee there
> aren't any headers needing the fix but using _G_va_list).
That is probably a glibc question:
Is the token "_G_va_list" a token that one would only find
in header files that are ANSI compliant and therefore not
likely to need the "stdio_va_list" fix, below?
My guess is "yes", but a confirmation would be nice.
=========================
/*
* Don't use or define the name va_list in stdio.h.
* This is for ANSI and also to interoperate properly with gcc's
* varargs.h. Note _BSD_VA_LIST_ is dealt with elsewhere.
*/
fix = {
hackname = stdio_va_list;
files = stdio.h;
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list';
/*
* Use __gnuc_va_list in arg types in place of va_list.
* On 386BSD use __gnuc_va_list instead of _VA_LIST_. We're hoping the
* trailing parentheses and semicolon save all other systems from this.
* Define __not_va_list__ (something harmless and unused)
* instead of va_list.
* Don't claim to have defined va_list.
*/
sed = "s@ va_list @ __gnuc_va_list @\n"
"s@ va_list)@ __gnuc_va_list)@\n"
"s@ _VA_LIST_));@ __gnuc_va_list));@\n"
"s@ va_list@ __not_va_list__@\n"
"s@\\*va_list@*__not_va_list__@\n"
"s@ __va_list)@ __gnuc_va_list)@\n"
"s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
"@typedef \\1 __not_va_list__;@\n"
"s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
"s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
"s@VA_LIST@DUMMY_VA_LIST@\n"
"s@_Va_LIST@_VA_LIST@";
test_text = "extern void mumble( va_list);";
};