home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / unix / sysvr3 / stdarg.h < prev    next >
C/C++ Source or Header  |  1994-10-23  |  606b  |  29 lines

  1. /*
  2.  * stdarg.h
  3.  *
  4.  * defines ANSI style macros for accessing arguments of a function which takes
  5.  * a variable number of arguments
  6.  *
  7.  */
  8.  
  9. #if !defined(__STDARG_H__)
  10. #define __STDARG_H__
  11.  
  12. #ifdef _AIX
  13. #define _ANSI_C_SOURCE
  14. #include </usr/include/stdarg.h>
  15. #define va_dcl int va_alist
  16. #else
  17. #if !defined(_VA_LIST_) && !defined(_VA_LIST)
  18. #define _VA_LIST_
  19. #define _VA_LIST
  20. typedef char *va_list;
  21. #endif
  22.  
  23. #define va_dcl int va_alist
  24. #define va_start(ap,v)  ap = (va_list)&va_alist
  25. #define va_arg(ap,t)    ((t*)(ap += sizeof(t)))[-1]
  26. #define va_end(ap)      ap = NULL
  27. #endif
  28. #endif
  29.