This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

VA_LIST problem on OSR5....



According to the comment associated with the hack
that changes:

> #ifndef _VA_LIST
> #define _VA_LIST char *
> #endif
> 
> #if !defined(__VA_LIST)
> #define __VA_LIST
> typedef _VA_LIST	va_list;
> #endif

into:

> #ifndef _DUMMY_VA_LIST
> #define _DUMMY_VA_LIST char *
> #endif
> 
> #if !defined(__DUMMY_VA_LIST)
> #define __DUMMY_VA_LIST
> typedef _DUMMY_VA_LIST  va_list;
> #endif

we see in the stdio_va_list hack:

  /*
   * 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.
   */

and this doesn't work for SCO's OSR5:

    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@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@";

Does anyone see a problem with adding:

          "s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
           "@typedef \\1 __not_va_list__;@\n"

to this ugly thing?  It produces the right thing for my box....

Regards,
	Bruce

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