This is the mail archive of the libc-alpha@sources.redhat.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: Bogus fixinclude of stdio.h from glibc 2.2.3


"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);";
 };


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