diff options
| author | grischka <grischka> | 2009-07-18 22:06:37 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2009-07-18 22:06:37 +0200 |
| commit | dc251a7d8d8bb4fb57773790152bfe85236f5f12 (patch) | |
| tree | e8dcec8579afbe341a4af7560f0a7e559238f503 /include | |
| parent | 06aed3d171839454648cebd0c58eaf4667e4979a (diff) | |
| download | tinycc-dc251a7d8d8bb4fb57773790152bfe85236f5f12.tar.gz tinycc-dc251a7d8d8bb4fb57773790152bfe85236f5f12.tar.bz2 | |
win64: use new headers from mingw
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdarg.h | 12 | ||||
| -rw-r--r-- | include/varargs.h | 13 |
2 files changed, 16 insertions, 9 deletions
diff --git a/include/stdarg.h b/include/stdarg.h index 86e556c..b5844d0 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -2,6 +2,7 @@ #define _STDARG_H #ifdef __x86_64__ +#ifndef _WIN64 #include <stdlib.h> /* GCC compatible definition of va_list. */ @@ -48,16 +49,21 @@ typedef struct __va_list_struct *va_list; *(dest) = *(src)) #define va_end(ap) __builtin_free(ap) -#else - +#else /* _WIN64 */ typedef char *va_list; +#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7) +#define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7))) +#define va_copy(dest, src) (dest) = (src) +#define va_end(ap) +#endif +#else /* __i386__ */ +typedef char *va_list; /* only correct for i386 */ #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3) #define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3))) #define va_copy(dest, src) (dest) = (src) #define va_end(ap) - #endif /* fix a buggy dependency on GCC in libio.h */ diff --git a/include/varargs.h b/include/varargs.h index daee29e..d614366 100644 --- a/include/varargs.h +++ b/include/varargs.h @@ -1,11 +1,12 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the w64 mingw-runtime package. + * No warranty is given; refer to the file DISCLAIMER within this package. + */ #ifndef _VARARGS_H #define _VARARGS_H -#include <stdarg.h> - -#define va_dcl -#define va_alist __va_alist -#undef va_start -#define va_start(ap) ap = __builtin_varargs_start +#error "TinyCC no longer implements <varargs.h>." +#error "Revise your code to use <stdarg.h>." #endif |
