win64: use new headers from mingw

This commit is contained in:
grischka
2009-07-18 22:06:37 +02:00
parent 06aed3d171
commit dc251a7d8d
91 changed files with 32164 additions and 17354 deletions

View File

@ -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 */

View File

@ -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