source: trunk/src/emx/include/varargs.h@ 18

Last change on this file since 18 was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 705 bytes
Line 
1/* varargs.h (emx+gcc) */
2
3#ifndef _VARARGS_H
4#define _VARARGS_H
5
6#if !defined (NULL)
7#if defined (__cplusplus)
8#define NULL 0
9#else
10#define NULL ((void *)0)
11#endif
12#endif
13
14#define _VA_LIST
15
16#define _VA_ROUND(type) ((sizeof (type) + 3) & -4)
17
18#define va_alist __builtin_va_alist
19#define va_dcl int __builtin_va_alist;
20#define va_list char *
21
22#define va_start(alist) alist = (char *)&__builtin_va_alist
23#define va_end(alist) (alist = 0, (void)0)
24#define __std_va_arg(alist,t) (alist += _VA_ROUND (t), \
25 *((t *)(alist - _VA_ROUND (t))))
26
27#ifdef __BOUNDS_CHECKING_ON
28#include <fix-args.h>
29#else
30#define va_arg(alist,t) __std_va_arg(alist,t)
31#endif
32
33#endif /* not _VARARGS_H */
Note: See TracBrowser for help on using the repository browser.