mirror of
https://github.com/reactos/reactos.git
synced 2025-01-13 01:22:03 +00:00
modified include/crt/stdarg.h
modified include/crt/vadefs.h Our headers suck so hard. More Visual C++ compatibility svn path=/trunk/; revision=41429
This commit is contained in:
parent
792cd5130f
commit
8f85d133fc
2 changed files with 32 additions and 6 deletions
|
@ -44,15 +44,18 @@ Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
/* Define __gnuc_va_list. */
|
/* Define __gnuc_va_list. */
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
#ifndef __GNUC_VA_LIST
|
#ifndef __GNUC_VA_LIST
|
||||||
#define __GNUC_VA_LIST
|
#define __GNUC_VA_LIST
|
||||||
typedef __builtin_va_list __gnuc_va_list;
|
typedef __builtin_va_list __gnuc_va_list;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define the standard macros for the user,
|
/* Define the standard macros for the user,
|
||||||
if this invocation was from the user program. */
|
if this invocation was from the user program. */
|
||||||
#ifdef _STDARG_H
|
#ifdef _STDARG_H
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
#define va_start(v,l) __builtin_va_start(v,l)
|
#define va_start(v,l) __builtin_va_start(v,l)
|
||||||
#define va_end(v) __builtin_va_end(v)
|
#define va_end(v) __builtin_va_end(v)
|
||||||
#define va_arg(v,l) __builtin_va_arg(v,l)
|
#define va_arg(v,l) __builtin_va_arg(v,l)
|
||||||
|
@ -60,6 +63,7 @@ typedef __builtin_va_list __gnuc_va_list;
|
||||||
#define va_copy(d,s) __builtin_va_copy(d,s)
|
#define va_copy(d,s) __builtin_va_copy(d,s)
|
||||||
#endif
|
#endif
|
||||||
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define va_list, if desired, from __gnuc_va_list. */
|
/* Define va_list, if desired, from __gnuc_va_list. */
|
||||||
/* We deliberately do not define va_list when called from
|
/* We deliberately do not define va_list when called from
|
||||||
|
@ -88,7 +92,9 @@ typedef __builtin_va_list __gnuc_va_list;
|
||||||
#define _VA_LIST va_list
|
#define _VA_LIST va_list
|
||||||
#endif
|
#endif
|
||||||
#endif /* __i860__ */
|
#endif /* __i860__ */
|
||||||
|
#ifdef __GNUC__
|
||||||
typedef __gnuc_va_list va_list;
|
typedef __gnuc_va_list va_list;
|
||||||
|
#endif
|
||||||
#ifdef _SCO_DS
|
#ifdef _SCO_DS
|
||||||
#define __VA_LIST
|
#define __VA_LIST
|
||||||
#endif
|
#endif
|
||||||
|
@ -108,7 +114,9 @@ typedef __gnuc_va_list va_list;
|
||||||
#ifndef _VA_LIST_T_H
|
#ifndef _VA_LIST_T_H
|
||||||
/* The macro __va_list__ is used by BeOS. */
|
/* The macro __va_list__ is used by BeOS. */
|
||||||
#ifndef __va_list__
|
#ifndef __va_list__
|
||||||
|
#ifdef __GNUC__
|
||||||
typedef __gnuc_va_list va_list;
|
typedef __gnuc_va_list va_list;
|
||||||
|
#endif
|
||||||
#endif /* not __va_list__ */
|
#endif /* not __va_list__ */
|
||||||
#endif /* not _VA_LIST_T_H */
|
#endif /* not _VA_LIST_T_H */
|
||||||
#endif /* not _VA_LIST */
|
#endif /* not _VA_LIST */
|
||||||
|
|
|
@ -37,14 +37,20 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
#ifndef __GNUC_VA_LIST
|
#ifndef __GNUC_VA_LIST
|
||||||
#define __GNUC_VA_LIST
|
#define __GNUC_VA_LIST
|
||||||
typedef __builtin_va_list __gnuc_va_list;
|
typedef __builtin_va_list __gnuc_va_list;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _VA_LIST_DEFINED
|
#ifndef _VA_LIST_DEFINED
|
||||||
#define _VA_LIST_DEFINED
|
#define _VA_LIST_DEFINED
|
||||||
|
#if defined(__GNUC__)
|
||||||
typedef __gnuc_va_list va_list;
|
typedef __gnuc_va_list va_list;
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
typedef char * va_list;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -66,16 +72,28 @@ extern "C" {
|
||||||
#define _APALIGN(t,ap) (__alignof(t))
|
#define _APALIGN(t,ap) (__alignof(t))
|
||||||
#endif
|
#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 _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
#define _crt_va_start(v,l) __builtin_va_start(v,l)
|
#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_arg(v,l) __builtin_va_arg(v,l)
|
||||||
#define _crt_va_end(v) __builtin_va_end(v)
|
#define _crt_va_end(v) __builtin_va_end(v)
|
||||||
|
#define __va_copy(d,s) __builtin_va_copy(d,s)
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
|
||||||
|
#if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_CEE)
|
||||||
|
#error Please implement me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _crt_va_start(v,l) ((void)((v) = (va_list)_ADDRESSOF(l) + _INTSIZEOF(l)))
|
||||||
|
#define _crt_va_arg(v,l) (*(l *)(((v) += _INTSIZEOF(l)) - _INTSIZEOF(l)))
|
||||||
|
#define _crt_va_end(v) ((void)((v) = (va_list)0))
|
||||||
|
#define __va_copy(d,s) ((void)((d) = (s)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
|
||||||
|
#define va_copy(d,s) __va_copy((d),(s))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue