File: va-c4x.h

package info (click to toggle)
egcs64 1%3A19980921.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 19,184 kB
  • ctags: 18,081
  • sloc: ansic: 243,395; sh: 12,432; makefile: 3,636; yacc: 2,639; asm: 856; sed: 186; perl: 18
file content (34 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* GNU C varargs support for the TMS320C[34]x  */

/* C[34]x arguments grow in weird ways (downwards) that the standard
   varargs stuff can't handle. */

#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST

typedef void *__gnuc_va_list;

#endif /* not __GNUC_VA_LIST */

/* If this is for internal libc use, don't define anything but
   __gnuc_va_list.  */
#if defined (_STDARG_H) || defined (_VARARGS_H)

#ifdef _STDARG_H /* stdarg.h support */

#define va_start(AP,LASTARG) AP=(__gnuc_va_list) __builtin_next_arg (LASTARG)

#else /* varargs.h support */

#define	__va_ellipsis	...
#define	va_alist	__builtin_va_alist
#define	va_dcl		int __builtin_va_alist; __va_ellipsis
#define va_start(AP)	AP=(__gnuc_va_list) ((int *)&__builtin_va_alist +  1)

#endif /* _STDARG_H */

#define va_end(AP)	((void) 0)
#define va_arg(AP,TYPE)	(AP = (__gnuc_va_list) ((char *) (AP) - sizeof(TYPE)), \
			 *((TYPE *) ((char *) (AP))))

#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */