home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / h.z / VARARGS.H < prev    next >
C/C++ Source or Header  |  1996-07-24  |  1KB  |  50 lines

  1. /*
  2.  *  varargs.h    Variable argument macros (UNIX System V definition)
  3.  *        definitions for use with variable argument lists
  4.  *
  5.  *  Copyright by WATCOM International Corp. 1988-1996.  All rights reserved.
  6.  */
  7. #ifndef _VARARGS_H_INCLUDED
  8. #define _VARARGS_H_INCLUDED
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. #ifndef _COMDEF_H_INCLUDED
  14.  #include <_comdef.h>
  15. #endif
  16. #ifndef _STDARG_H_INCLUDED
  17.  #include <stdarg.h>
  18. #else
  19.  #error stdarg.h has already been included
  20. #endif
  21.  
  22. #undef va_start
  23.  
  24. #if defined(__PPC__)
  25.  extern void *__builtin_va_start(va_list*, ...);
  26.  #pragma intrinsic(__builtin_va_start);
  27.  #define va_alist    void *__alist, ...
  28.  #define va_dcl
  29.  #define va_start(ap)    (__builtin_va_start(&ap,__alist,0))
  30. #elif defined(__AXP__)
  31.  extern void *__builtin_va_start(va_list*, ...);
  32.  #pragma intrinsic(__builtin_va_start);
  33.  #define va_alist    void *__alist, ...
  34.  #define va_dcl
  35.  #define va_start(ap)    (__builtin_va_start(&ap,__alist,0))
  36. #else
  37.  #define va_alist    void *__alist, ...
  38.  #define va_dcl
  39.  #if defined(__HUGE__) || defined(__SW_ZU)
  40.   #define va_start(ap)    ((ap)[0]=(char _WCFAR*)&__alist,(void)0)
  41.  #else
  42.   #define va_start(ap)    ((ap)[0]=(char *)&__alist,(void)0)
  43.  #endif
  44. #endif
  45.  
  46. #ifdef __cplusplus
  47. };
  48. #endif
  49. #endif
  50.