File:  [Research Unix] / researchv10dc / cmd / gcc / varargs.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:33 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

#ifndef __GNUC__
/* Use the system's macros with the system's compiler.  */
#include <varargs.h>
#else

/* These macros implement traditional (non-ANSI) varargs
   for GNU C.  */

#define va_alist  _varargs
#define va_dcl    int _varargs;
#define va_list   char *

#define va_start(AP)  AP=(char *) &_varargs
#define va_end(AP)

#define _va_rounded_size(TYPE)  \
  (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))

#define va_arg(AP, TYPE)						\
 (AP += _va_rounded_size (TYPE),					\
  *((TYPE *) (AP - _va_rounded_size (TYPE))))

#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.