mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
[VCRUNTIME] Move some definitions from crtdefs.h to vcruntime.h
This reflects what native headers do. TODO: Move _CRT_ALIGN to corecrt.h
This commit is contained in:
parent
ff2c7c8720
commit
1d01b8c6f0
2 changed files with 114 additions and 119 deletions
|
@ -28,8 +28,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef _CRT_PACKING
|
|
||||||
#define _CRT_PACKING 8
|
|
||||||
#pragma pack(push,_CRT_PACKING)
|
#pragma pack(push,_CRT_PACKING)
|
||||||
|
|
||||||
/* Disable non-ANSI C definitions if compiling with __STDC__ */
|
/* Disable non-ANSI C definitions if compiling with __STDC__ */
|
||||||
|
@ -50,20 +48,11 @@
|
||||||
|
|
||||||
/** Properties ***************************************************************/
|
/** Properties ***************************************************************/
|
||||||
|
|
||||||
#ifndef _CRT_STRINGIZE
|
|
||||||
#define __CRT_STRINGIZE(_Value) #_Value
|
|
||||||
#define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CRT_DEFER_MACRO
|
#ifndef _CRT_DEFER_MACRO
|
||||||
#define _CRT_DEFER_MACRO(M,...) M(__VA_ARGS__)
|
#define _CRT_DEFER_MACRO(M,...) M(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CRT_WIDE
|
|
||||||
#define __CRT_WIDE(_String) L ## _String
|
|
||||||
#define _CRT_WIDE(_String) __CRT_WIDE(_String)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _W64
|
#ifndef _W64
|
||||||
#if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
|
#if !defined(_midl) && defined(_X86_) && _MSC_VER >= 1300
|
||||||
#define _W64 __w64
|
#define _W64 __w64
|
||||||
|
@ -72,16 +61,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CRTIMP
|
|
||||||
#ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */
|
|
||||||
#define _CRTIMP
|
|
||||||
#elif defined(_DLL)
|
|
||||||
#define _CRTIMP __declspec(dllimport)
|
|
||||||
#else /* !CRTDLL && !_DLL */
|
|
||||||
#define _CRTIMP
|
|
||||||
#endif /* CRTDLL || _DLL */
|
|
||||||
#endif /* !_CRTIMP */
|
|
||||||
|
|
||||||
//#define _CRT_ALTERNATIVE_INLINES
|
//#define _CRT_ALTERNATIVE_INLINES
|
||||||
|
|
||||||
#ifndef _CRTIMP_ALT
|
#ifndef _CRTIMP_ALT
|
||||||
|
@ -150,37 +129,14 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CRT_ALIGN
|
|
||||||
#if defined (__midl) || defined(__WIDL__)
|
|
||||||
#define _CRT_ALIGN(x)
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define _CRT_ALIGN(x) __declspec(align(x))
|
|
||||||
#else
|
|
||||||
#define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CRTNOALIAS
|
#ifndef _CRTNOALIAS
|
||||||
#define _CRTNOALIAS
|
#define _CRTNOALIAS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __CRTDECL
|
|
||||||
#define __CRTDECL __cdecl
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CRT_UNUSED
|
#ifndef _CRT_UNUSED
|
||||||
#define _CRT_UNUSED(x) (void)x
|
#define _CRT_UNUSED(x) (void)x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CONST_RETURN
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define _CONST_RETURN const
|
|
||||||
#define _CRT_CONST_CORRECT_OVERLOADS
|
|
||||||
#else
|
|
||||||
#define _CONST_RETURN
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __crt_typefix(ctype)
|
#define __crt_typefix(ctype)
|
||||||
|
|
||||||
#ifndef _STATIC_ASSERT
|
#ifndef _STATIC_ASSERT
|
||||||
|
@ -195,27 +151,10 @@
|
||||||
|
|
||||||
/** Deprecated ***************************************************************/
|
/** Deprecated ***************************************************************/
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
|
|
||||||
#else
|
|
||||||
#define _CRT_DEPRECATE_TEXT(_Text)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __STDC_WANT_SECURE_LIB__
|
#ifndef __STDC_WANT_SECURE_LIB__
|
||||||
#define __STDC_WANT_SECURE_LIB__ 1
|
#define __STDC_WANT_SECURE_LIB__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CRT_INSECURE_DEPRECATE
|
|
||||||
# ifdef _CRT_SECURE_NO_DEPRECATE
|
|
||||||
# define _CRT_INSECURE_DEPRECATE(_Replacement)
|
|
||||||
# else
|
|
||||||
# define _CRT_INSECURE_DEPRECATE(_Replacement) \
|
|
||||||
_CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CRT_INSECURE_DEPRECATE_CORE
|
#ifndef _CRT_INSECURE_DEPRECATE_CORE
|
||||||
# ifdef _CRT_SECURE_NO_DEPRECATE_CORE
|
# ifdef _CRT_SECURE_NO_DEPRECATE_CORE
|
||||||
# define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
|
# define _CRT_INSECURE_DEPRECATE_CORE(_Replacement)
|
||||||
|
@ -234,10 +173,6 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _CRT_INSECURE_DEPRECATE_MEMORY
|
|
||||||
#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
|
#ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
|
||||||
#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
|
#define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
|
||||||
#endif
|
#endif
|
||||||
|
@ -276,37 +211,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _SIZE_T_DEFINED
|
|
||||||
#define _SIZE_T_DEFINED
|
|
||||||
#undef size_t
|
|
||||||
#ifdef _WIN64
|
|
||||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
|
||||||
typedef unsigned int size_t __attribute__ ((mode (DI)));
|
|
||||||
#else
|
|
||||||
__MINGW_EXTENSION typedef unsigned __int64 size_t;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
typedef unsigned int size_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _INTPTR_T_DEFINED
|
|
||||||
#define _INTPTR_T_DEFINED
|
|
||||||
#ifndef __intptr_t_defined
|
|
||||||
#define __intptr_t_defined
|
|
||||||
#undef intptr_t
|
|
||||||
#ifdef _WIN64
|
|
||||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
|
||||||
typedef int intptr_t __attribute__ ((mode (DI)));
|
|
||||||
#else
|
|
||||||
__MINGW_EXTENSION typedef __int64 intptr_t;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
typedef int intptr_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _UINTPTR_T_DEFINED
|
#ifndef _UINTPTR_T_DEFINED
|
||||||
#define _UINTPTR_T_DEFINED
|
#define _UINTPTR_T_DEFINED
|
||||||
#ifndef __uintptr_t_defined
|
#ifndef __uintptr_t_defined
|
||||||
|
@ -324,29 +228,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _PTRDIFF_T_DEFINED
|
|
||||||
#define _PTRDIFF_T_DEFINED
|
|
||||||
#ifndef _PTRDIFF_T_
|
|
||||||
#undef ptrdiff_t
|
|
||||||
#ifdef _WIN64
|
|
||||||
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
|
||||||
typedef int ptrdiff_t __attribute__ ((mode (DI)));
|
|
||||||
#else
|
|
||||||
__MINGW_EXTENSION typedef __int64 ptrdiff_t;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
typedef int ptrdiff_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WCHAR_T_DEFINED
|
|
||||||
#define _WCHAR_T_DEFINED
|
|
||||||
#if defined(_MSC_VER) || !defined(__cplusplus)
|
|
||||||
typedef unsigned short wchar_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WCTYPE_T_DEFINED
|
#ifndef _WCTYPE_T_DEFINED
|
||||||
#define _WCTYPE_T_DEFINED
|
#define _WCTYPE_T_DEFINED
|
||||||
typedef unsigned short wint_t;
|
typedef unsigned short wint_t;
|
||||||
|
|
|
@ -4,3 +4,117 @@
|
||||||
#include <_mingw.h>
|
#include <_mingw.h>
|
||||||
#include <sal.h>
|
#include <sal.h>
|
||||||
#include <vadefs.h>
|
#include <vadefs.h>
|
||||||
|
|
||||||
|
#define _CRT_STRINGIZE_(_Value) #_Value
|
||||||
|
#define _CRT_STRINGIZE(_Value) _CRT_STRINGIZE_(_Value)
|
||||||
|
|
||||||
|
#define _CRT_WIDE_(_String) L ## _String
|
||||||
|
#define _CRT_WIDE(_String) _CRT_WIDE_(_String)
|
||||||
|
|
||||||
|
#ifndef _CRTIMP
|
||||||
|
#ifdef CRTDLL /* Defined for ntdll, crtdll, msvcrt, etc */
|
||||||
|
#define _CRTIMP
|
||||||
|
#elif defined(_DLL)
|
||||||
|
#define _CRTIMP __declspec(dllimport)
|
||||||
|
#else /* !CRTDLL && !_DLL */
|
||||||
|
#define _CRTIMP
|
||||||
|
#endif /* CRTDLL || _DLL */
|
||||||
|
#endif /* !_CRTIMP */
|
||||||
|
|
||||||
|
#ifndef __CRTDECL
|
||||||
|
#define __CRTDECL __cdecl
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _CONST_RETURN
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define _CONST_RETURN const
|
||||||
|
#define _CRT_CONST_CORRECT_OVERLOADS
|
||||||
|
#else
|
||||||
|
#define _CONST_RETURN
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define _CRT_DEPRECATE_TEXT(_Text) __attribute__ ((deprecated))
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
|
||||||
|
#else
|
||||||
|
#define _CRT_DEPRECATE_TEXT(_Text)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _CRT_INSECURE_DEPRECATE
|
||||||
|
# ifdef _CRT_SECURE_NO_DEPRECATE
|
||||||
|
# define _CRT_INSECURE_DEPRECATE(_Replacement)
|
||||||
|
# else
|
||||||
|
# define _CRT_INSECURE_DEPRECATE(_Replacement) \
|
||||||
|
_CRT_DEPRECATE_TEXT("This may be unsafe, Try " #_Replacement " instead!")
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _CRT_INSECURE_DEPRECATE_MEMORY
|
||||||
|
#define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SIZE_T_DEFINED
|
||||||
|
#define _SIZE_T_DEFINED
|
||||||
|
#undef size_t
|
||||||
|
#ifdef _WIN64
|
||||||
|
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||||
|
typedef unsigned int size_t __attribute__ ((mode (DI)));
|
||||||
|
#else
|
||||||
|
typedef unsigned __int64 size_t;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
typedef unsigned int size_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _INTPTR_T_DEFINED
|
||||||
|
#define _INTPTR_T_DEFINED
|
||||||
|
#ifndef __intptr_t_defined
|
||||||
|
#define __intptr_t_defined
|
||||||
|
#undef intptr_t
|
||||||
|
#ifdef _WIN64
|
||||||
|
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||||
|
typedef int intptr_t __attribute__ ((mode (DI)));
|
||||||
|
#else
|
||||||
|
typedef __int64 intptr_t;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
typedef int intptr_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PTRDIFF_T_DEFINED
|
||||||
|
#define _PTRDIFF_T_DEFINED
|
||||||
|
#ifndef _PTRDIFF_T_
|
||||||
|
#undef ptrdiff_t
|
||||||
|
#ifdef _WIN64
|
||||||
|
#if defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||||
|
typedef int ptrdiff_t __attribute__ ((mode (DI)));
|
||||||
|
#else
|
||||||
|
__MINGW_EXTENSION typedef __int64 ptrdiff_t;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
typedef int ptrdiff_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WCHAR_T_DEFINED
|
||||||
|
#define _WCHAR_T_DEFINED
|
||||||
|
#if defined(_MSC_VER) || !defined(__cplusplus)
|
||||||
|
typedef unsigned short wchar_t;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _CRT_ALIGN
|
||||||
|
#if defined (__midl) || defined(__WIDL__)
|
||||||
|
#define _CRT_ALIGN(x)
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define _CRT_ALIGN(x) __declspec(align(x))
|
||||||
|
#else
|
||||||
|
#define _CRT_ALIGN(x) __attribute__ ((aligned(x)))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue