mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:02:59 +00:00
85 lines
1.9 KiB
C
85 lines
1.9 KiB
C
/**
|
|
* 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 _INC_VADEFS
|
|
#define _INC_VADEFS
|
|
|
|
#ifndef _WIN32
|
|
#error Only Win32 target is supported!
|
|
#endif
|
|
|
|
#include <crtdefs.h>
|
|
|
|
#undef _CRT_PACKING
|
|
#define _CRT_PACKING 8
|
|
#pragma pack(push,_CRT_PACKING)
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifndef _UINTPTR_T_DEFINED
|
|
#define _UINTPTR_T_DEFINED
|
|
#ifndef __uintptr_t_defined
|
|
#define __uintptr_t_defined
|
|
#undef uintptr_t
|
|
#ifdef _WIN64
|
|
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
|
typedef unsigned int uintptr_t __attribute__ ((mode (DI)));
|
|
#else
|
|
typedef unsigned __int64 uintptr_t;
|
|
#endif
|
|
#else
|
|
typedef unsigned long uintptr_t;
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef __GNUC_VA_LIST
|
|
#define __GNUC_VA_LIST
|
|
typedef __builtin_va_list __gnuc_va_list;
|
|
#endif
|
|
|
|
#ifndef _VA_LIST_DEFINED
|
|
#define _VA_LIST_DEFINED
|
|
typedef __gnuc_va_list va_list;
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
#define _ADDRESSOF(v) (&reinterpret_cast<const char &>(v))
|
|
#else
|
|
#define _ADDRESSOF(v) (&(v))
|
|
#endif
|
|
|
|
#if defined(__ia64__)
|
|
#define _VA_ALIGN 8
|
|
#define _SLOTSIZEOF(t) ((sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1))
|
|
|
|
#define _VA_STRUCT_ALIGN 16
|
|
|
|
#define _ALIGNOF(ap) ((((ap)+_VA_STRUCT_ALIGN - 1) & ~(_VA_STRUCT_ALIGN -1)) - (ap))
|
|
#define _APALIGN(t,ap) (__alignof(t) > 8 ? _ALIGNOF((uintptr_t) ap) : 0)
|
|
#else
|
|
#define _SLOTSIZEOF(t) (sizeof(t))
|
|
#define _APALIGN(t,ap) (__alignof(t))
|
|
#endif
|
|
|
|
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
|
|
#define va_copy(d,s) __builtin_va_copy(d,s)
|
|
#endif
|
|
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
|
|
|
#define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
|
|
|
|
#define _crt_va_start(v,l) __builtin_va_start(v,l)
|
|
#define _crt_va_arg(v,l) __builtin_va_arg(v,l)
|
|
#define _crt_va_end(v) __builtin_va_end(v)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#pragma pack(pop)
|
|
#endif
|