Author: tkreuzer Date: Thu May 29 23:43:19 2014 New Revision: 63499
URL: http://svn.reactos.org/svn/reactos?rev=63499&view=rev Log: [INCLUDE] - rewrite msvctarget.h to define all native MSVC architecture macros and do not define x86 sub-architecture numbers, they are deprecated - basetsd.h: Fix header guard, include msvctarget.h instead of adding some custom defines, add missing FIRMWARE_PTR definition, fix POINTER_64 definition
Modified: trunk/reactos/include/psdk/basetsd.h trunk/reactos/include/psdk/ras.h trunk/reactos/include/psdk/winnls.h trunk/reactos/include/reactos/idl/ms-dtyp.idl trunk/reactos/include/reactos/msvctarget.h
Modified: trunk/reactos/include/psdk/basetsd.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/basetsd.h?rev=... ============================================================================== --- trunk/reactos/include/psdk/basetsd.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/basetsd.h [iso-8859-1] Thu May 29 23:43:19 2014 @@ -1,5 +1,8 @@ -#ifndef _BASETSD_H -#define _BASETSD_H +#ifndef _BASETSD_H_ +#define _BASETSD_H_ +#pragma once + +#include <msvctarget.h>
#ifndef _M_AMD64 #if !defined(__ROS_LONG64__) @@ -23,30 +26,7 @@ #error Not supported. #endif
-#if !defined(_X86_) && !defined(_AMD64_) && !defined(_IA64_) && !defined(_ALPHA_) && \ - !defined(_ARM_) && !defined(_PPC_) && !defined(_MIPS_) && !defined(_68K_) - -#if defined(_M_AMD64) || defined(__x86_64__) -#define _AMD64_ -#elif defined(_M_IX86) || defined(__i386__) -#define _X86_ -#elif defined(_M_IA64) || defined(__ia64__) -#define _IA64_ -#elif defined(_M_ALPHA) || defined(__alpha__) -#define _ALPHA_ -#elif defined(_M_ARM) || defined(__arm__) -#define _ARM_ -#elif defined(_M_PPC) || defined(__powerpc__) -#define _PPC_ -#elif defined(_M_MRX000) || defined(__mips__) -#define _MIPS_ -#elif defined(_M_M68K) || defined(__68k__) -#define _68K_ -#endif - -#endif - -#if !defined(MIDL_PASS) && !defined(RC_INVOKED) +#if defined(_MSC_VER) && !defined(MIDL_PASS) && !defined(RC_INVOKED) #define POINTER_64 __ptr64 #if defined(_WIN64) #define POINTER_32 __ptr32 @@ -56,12 +36,18 @@ #else #define POINTER_64 #define POINTER_32 -#endif /* !defined(MIDL_PASS) && !defined(RC_INVOKED) */ +#endif /* defined(_MSC_VER) && !defined(MIDL_PASS) && !defined(RC_INVOKED) */
#if defined(_M_MRX000) || defined(_M_AMD64) || defined(_M_IA64) typedef unsigned __int64 POINTER_64_INT; #else typedef unsigned long POINTER_64_INT; +#endif + +#if defined(_IA64_) || defined(_AMD64_) + #define FIRMWARE_PTR +#else + #define FIRMWARE_PTR POINTER_32 #endif
#if 0 /* Not supported yet */ @@ -214,4 +200,4 @@ #endif #endif /* !RC_INVOKED */
-#endif /* _BASETSD_H */ +#endif /* _BASETSD_H_ */
Modified: trunk/reactos/include/psdk/ras.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ras.h?rev=6349... ============================================================================== --- trunk/reactos/include/psdk/ras.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ras.h [iso-8859-1] Thu May 29 23:43:19 2014 @@ -13,7 +13,7 @@ /* TODO include <basetsd.h> from winnt.h so that this typedef is not necessary */ -#ifndef _BASETSD_H +#ifndef _BASETSD_H_ typedef unsigned long ULONG_PTR, *PULONG_PTR; #endif
@@ -787,7 +787,7 @@ typedef DWORD (WINAPI *PFNRASSETCOMMSETTINGS) (HANDLE hPort,RASCOMMSETTINGS *pRasCommSettings,PVOID pvReserved); typedef struct tagRASCUSTOMSCRIPTEXTENSIONS { - DWORD dwSize; + DWORD dwSize; PFNRASSETCOMMSETTINGS pfnRasSetCommSettings; } RASCUSTOMSCRIPTEXTENSIONS; #endif /*(WINVER >= 0x501)*/
Modified: trunk/reactos/include/psdk/winnls.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnls.h?rev=6... ============================================================================== --- trunk/reactos/include/psdk/winnls.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/winnls.h [iso-8859-1] Thu May 29 23:43:19 2014 @@ -473,7 +473,7 @@ #define VS_ALLOW_LATIN 0x1 #define GSS_ALLOW_INHERITED_COMMON 0x1 #endif -#ifndef _BASETSD_H +#ifndef _BASETSD_H_ typedef long LONG_PTR; #endif
Modified: trunk/reactos/include/reactos/idl/ms-dtyp.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/ms-dtyp... ============================================================================== --- trunk/reactos/include/reactos/idl/ms-dtyp.idl [iso-8859-1] (original) +++ trunk/reactos/include/reactos/idl/ms-dtyp.idl [iso-8859-1] Thu May 29 23:43:19 2014 @@ -7,7 +7,7 @@ typedef unsigned char BYTE, *PBYTE, *LPBYTE; typedef unsigned long DWORD, *PDWORD, *LPDWORD; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") typedef unsigned int DWORD32; typedef unsigned __int64 DWORD64; cpp_quote("#endif") @@ -15,13 +15,13 @@ cpp_quote("#ifndef _WINDEF_H") typedef int INT, *LPINT; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") typedef signed char INT8; typedef signed short INT16; typedef signed int INT32; typedef signed __int64 INT64; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") typedef signed int LONG32; typedef signed __int64 LONG64; cpp_quote("#endif") @@ -37,7 +37,7 @@ cpp_quote("#ifndef _WINDEF_H") typedef unsigned int UINT; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned int UINT32; @@ -46,7 +46,7 @@ cpp_quote("#ifndef _WINNT_") typedef unsigned long ULONG, *PULONG; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") typedef unsigned int ULONG32; typedef unsigned __int64 ULONG64; cpp_quote("#endif") @@ -77,7 +77,7 @@ cpp_quote("#ifndef _WINNT_") typedef BYTE BOOLEAN, *PBOOLEAN; cpp_quote("#endif") -cpp_quote("#ifndef _BASETSD_H") +cpp_quote("#ifndef _BASETSD_H_") #ifdef _WIN64 typedef __int64 LONG_PTR; typedef unsigned __int64 ULONG_PTR;
Modified: trunk/reactos/include/reactos/msvctarget.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/msvctarget.... ============================================================================== --- trunk/reactos/include/reactos/msvctarget.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/msvctarget.h [iso-8859-1] Thu May 29 23:43:19 2014 @@ -1,19 +1,52 @@ -#ifndef _MSC_VER -#ifndef __GNUC__ -#error Unsupported compiler -#endif + +#pragma once
/* translate GCC target defines to MS equivalents. */ -#if defined(__i686__) && !defined(_M_IX86) -#define _M_IX86 600 -#undef __i686__ -#elif defined(__i586__) && !defined(_M_IX86) -#define _M_IX86 500 -#undef __i586__ -#elif defined(__i486__) && !defined(_M_IX86) -#define _M_IX86 400 -#undef __i486__ -#elif defined(__i386__) && !defined(_M_IX86) -#define _M_IX86 300 +#if defined(__i386__) + #if !defined(_X86_) + #define _X86_ 1 + #endif + #if !defined(_M_IX86) + #define _M_IX86 1 + #endif +#elif defined(__x86_64__) || defined(__x86_64) + #if !defined(_AMD64_) + #define _AMD64_ 1 + #endif + #if !defined(_M_AMD64) + #define _M_AMD64 1 + #endif + #if !defined(_M_X64) + #define _M_X64 1 + #endif +#elif defined(__arm__) + #if !defined(_ARM_) + #define _ARM_ 1 + #endif + #if !defined(_M_ARM) + #define _M_ARM 1 + #endif +#elif defined(__ia64__) + #if !defined(_IA64_) + #define _IA64_ 1 + #endif + #if !defined(_M_IA64) + #define _M_IA64 1 + #endif +#elif defined(__alpha__) + #if !defined(_ALPHA_) + #define _ALPHA_ 1 + #endif + #if !defined(_M_ALPHA) + #define _M_ALPHA 1 + #endif +#elif defined(__powerpc__) + #if !defined(_PPC_) + #define _PPC_ 1 + #endif + #if !defined(_M_PPC) + #define _M_PPC 1 + #endif +#else +#error Unknown architecture #endif -#endif