home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
dmake40.zip
/
unix
/
sysvr4
/
stdarg.h
< prev
Wrap
C/C++ Source or Header
|
1994-10-23
|
970b
|
39 lines
/* Some V.4 systems aren't ansi, just to make matters ugly.
If the dmake sources used another name for this include file,
then this wouldn't be quite so awful. */
#if defined(__STDC__) || defined(_VA_LIST)
#include </usr/include/stdarg.h>
#ifdef va_dcl
#undef va_dcl
#endif
#define va_dcl int va_alist
#else
/*
* stdarg.h
*
* defines ANSI style macros for accessing arguments of a function which takes
* a variable number of arguments
*
*/
typedef char *va_list;
#if defined(sparc)
# define va_alist __builtin_va_alist
#endif
# define va_start(list,v) list = (char *)&va_alist
# define va_end(list) list = NULL
#if defined(mips)
#define va_arg(list, mode) ((mode *)(list = \
(char *) (sizeof(mode) > 4 ? ((int)list + 2*8 - 1) & -8 \
: ((int)list + 2*4 - 1) & -4)))[-1]
#else
# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
#endif
#ifndef va_dcl
# define va_dcl int va_alist
#endif
#endif