2010-06-12 Ozkan Sezer <sezeroz@gmail.com>

Kill definitions of I_X86_ macro and adjust places it was used:
	* windows.h: Remove I_X86_ definition. Adjust and tweak _AMD64_
	and _IA64_ macro definitions to use _X86_ and/or __i386__.
	* winnt.h: Likewise as in windows.h. Replace checks against I_X86_
	by checks against _X86_. Replace checks against _X86_ which were
	already under I_X86_ ifdefs by checks against __i386__.
	* mapidbg.h: Replace checks against I_X86_ by checks against _X86_.
	* mapiutil.h: Likewise.
	* mapival.h: Likewise.
	* netmon.h: Likewise.
	* stralign.h: Likewise.
	* tapi3if.h: Likewise.
	* uastrfnc.h: Likewise.
	* vdmdbg.h: Likewise.
	* wabutil.h: Likewise.
	* winbase.h: Likewise.


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@2497 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
Ozkan Sezer 2010-06-12 14:01:27 +00:00
parent 3b6fd3feea
commit ffd2f3157d
13 changed files with 63 additions and 40 deletions

View File

@ -1,3 +1,22 @@
2010-06-12 Ozkan Sezer <sezeroz@gmail.com>
Kill definitions of I_X86_ macro and adjust places it was used:
* windows.h: Remove I_X86_ definition. Adjust and tweak _AMD64_
and _IA64_ macro definitions to use _X86_ and/or __i386__.
* winnt.h: Likewise as in windows.h. Replace checks against I_X86_
by checks against _X86_. Replace checks against _X86_ which were
already under I_X86_ ifdefs by checks against __i386__.
* mapidbg.h: Replace checks against I_X86_ by checks against _X86_.
* mapiutil.h: Likewise.
* mapival.h: Likewise.
* netmon.h: Likewise.
* stralign.h: Likewise.
* tapi3if.h: Likewise.
* uastrfnc.h: Likewise.
* vdmdbg.h: Likewise.
* wabutil.h: Likewise.
* winbase.h: Likewise.
2010-06-09 Ozkan Sezer <sezeroz@gmail.com>
* sdkddkver.h: Sync'ed with ReactOS version to add new macros

View File

@ -141,7 +141,7 @@ SCODE EXPORTDBG __cdecl ScodeFromSzFn(char *psz);
void *EXPORTDBG __cdecl DBGMEM_EncapsulateFn(void *pmalloc,char *pszSubsys,int fCheckOften);
void EXPORTDBG __cdecl DBGMEM_ShutdownFn(void *pmalloc);
void EXPORTDBG __cdecl DBGMEM_CheckMemFn(void *pmalloc,int fReportOrphans);
#ifdef I_X86_
#ifdef _X86_
void EXPORTDBG __cdecl DBGMEM_LeakHook(FARPROC pfn);
void EXPORTDBG __cdecl GetCallStack(DWORD *,int,int);
#endif

View File

@ -211,7 +211,7 @@ extern "C" {
STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
STDAPI_(VOID) DeinitMapiUtil(VOID);
#ifdef I_X86_
#ifdef _X86_
#define szHrDispatchNotifications "_HrDispatchNotifications@4"
#elif defined(_IA64_)
#define szHrDispatchNotifications "HrDispatchNotifications"
@ -220,7 +220,7 @@ extern "C" {
typedef HRESULT (WINAPI DISPATCHNOTIFICATIONS)(ULONG ulFlags);
typedef DISPATCHNOTIFICATIONS *LPDISPATCHNOTIFICATIONS;
#ifdef I_X86_
#ifdef _X86_
#define szScCreateConversationIndex "_ScCreateConversationIndex@16"
#elif defined(_IA64_)
#define szScCreateConversationIndex "ScCreateConversationIndex"

View File

@ -53,7 +53,7 @@ extern "C" {
MAKE_ENUM(Commit,IStream),MAKE_ENUM(Revert,IStream),MAKE_ENUM(LockRegion,IStream),MAKE_ENUM(UnlockRegion,IStream),MAKE_ENUM(Stat,IStream),
MAKE_ENUM(Clone,IStream),MAKE_ENUM(OnNotify,IMAPIAdviseSink)
} METHODS;
#if defined(I_X86_)
#if defined(_X86_)
#ifdef __cplusplus
#define ValidateParameters(eMethod,First) { HRESULT _hr_; _hr_ = __CPPValidateParameters(eMethod,(LPVOID) &First); if (HR_FAILED(_hr_)) return (_hr_); }
#define UlValidateParameters(eMethod,First) { HRESULT _hr_; _hr_ = __CPPValidateParameters(eMethod,&First); if (HR_FAILED(_hr_)) return (ULONG) (_hr_); }
@ -103,7 +103,7 @@ extern "C" {
HRESULT WINAPI __CPPValidateParameters(METHODS eMethod,const LPVOID ppFirst);
HRESULT WINAPI __ValidateParameters(METHODS eMethod,LPVOID ppThis);
#if defined(I_X86_)
#if defined(_X86_)
#define ArgSize(T) ((sizeof(T)+3)/4)
#define MakeArg1(idx,a1) memcpy(__rgArgs+idx,&a1,ArgSize(a1)*4)
#define MakeArg2(idx,a1,a2) MakeArg1(idx,a1); MakeArg1(idx+ArgSize(a1),a2)
@ -799,7 +799,7 @@ extern "C" {
#define UlValidate_IMAPIAdviseSink_OnNotify(a1,a2,a3) UlValidateParameters3(IMAPIAdviseSink_OnNotify,a1,a2,a3)
#define CheckParameters_IMAPIAdviseSink_OnNotify(a1,a2,a3) CheckParameters3(IMAPIAdviseSink_OnNotify,a1,a2,a3)
#if defined(I_X86_)
#if defined(_X86_)
STDAPI HrValidateParameters(METHODS eMethod,LPVOID *ppFirstArg);
#else
STDAPIV HrValidateParametersV(METHODS eMethod,...);

View File

@ -54,7 +54,7 @@ extern "C"{
#pragma pack(1)
#ifdef I_X86_
#ifdef _X86_
#pragma pack(1)
#else
#pragma pack()

View File

@ -14,7 +14,7 @@
extern "C" {
#endif
#if defined(I_X86_)
#if defined(_X86_)
#define WSTR_ALIGNED(s) TRUE
#define ua_CharUpperW CharUpperW
#define ua_lstrcmpiW lstrcmpiW
@ -31,7 +31,9 @@ extern "C" {
#else
#define ua_wcscpy wcscpy
#endif
#else
#else /* not _X86_ : */
#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0)
/* TODO: This method seems to be not present for amd64. */
@ -52,7 +54,7 @@ extern "C" {
return uaw_CharUpperW(String);
}
#endif /* !__CRT__NO_INLINE */
#endif
#endif /* _X86_ */
#ifdef lstrcmp
int ua_lstrcmpW(LPCUWSTR String1,LPCUWSTR String2);
@ -154,7 +156,7 @@ extern "C" {
#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
#ifdef I_X86_
#ifdef _X86_
#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
#else
#define WSTR_ALIGNED_STACK_COPY(d,s) { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }
@ -162,7 +164,7 @@ extern "C" {
#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
#ifndef I_X86_
#ifndef _X86_
#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
#else

View File

@ -450,7 +450,7 @@ extern "C" {
void __RPC_API MIDL_user_free(void *);
#endif
#ifdef I_X86_
#ifdef _X86_
typedef long TAPIHWND;
#else
typedef LONGLONG TAPIHWND;

View File

@ -10,7 +10,7 @@
extern "C" {
#endif
#ifndef I_X86_
#ifndef _X86_
#define ALIGNMENT_MACHINE
#endif

View File

@ -59,7 +59,7 @@ extern "C" {
#define VDMCONTEXT_FULL (VDMCONTEXT_CONTROL | VDMCONTEXT_INTEGER | VDMCONTEXT_SEGMENTS)
#ifdef I_X86_
#ifdef _X86_
typedef struct _CONTEXT VDMCONTEXT;
typedef struct _LDT_ENTRY VDMLDT_ENTRY;

View File

@ -201,14 +201,14 @@ extern "C" {
STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
STDAPI_(VOID) DeinitMapiUtil(VOID);
#ifdef I_X86_
#ifdef _X86_
#define szHrDispatchNotifications "_HrDispatchNotifications@4"
#endif
typedef HRESULT (WINAPI DISPATCHNOTIFICATIONS)(ULONG ulFlags);
typedef DISPATCHNOTIFICATIONS *LPDISPATCHNOTIFICATIONS;
#ifdef I_X86_
#ifdef _X86_
#define szScCreateConversationIndex "_ScCreateConversationIndex@16"
#endif

View File

@ -199,7 +199,7 @@ extern "C" {
WINBASEAPI PVOID WINAPI EncodeSystemPointer(PVOID Ptr);
WINBASEAPI PVOID WINAPI DecodeSystemPointer(PVOID Ptr);
#ifdef I_X86_
#ifdef _X86_
typedef PLDT_ENTRY LPLDT_ENTRY;
#else
typedef LPVOID LPLDT_ENTRY;

View File

@ -40,19 +40,19 @@
#define NOMCX
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
#define I_X86_
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
#if defined(__x86_64) && \
!(defined(_X86_) || defined(__i386__) || defined(_IA64_))
#if !defined(_AMD64_)
#define _AMD64_
#endif
#endif /* _AMD64_ */
#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
#if defined(__ia64__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_))
#if !defined(_IA64_)
#define _IA64_
#endif
#endif
#endif /* _IA64_ */
#ifndef RC_INVOKED
#include <excpt.h>

View File

@ -33,19 +33,19 @@ extern "C" {
#define UNALIGNED64
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && (defined(_X86_) && !defined(__x86_64))
#define I_X86_
#endif
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(__x86_64)
#if defined(__x86_64) && \
!(defined(_X86_) || defined(__i386__) || defined(_IA64_))
#if !defined(_AMD64_)
#define _AMD64_
#endif
#endif /* _AMD64_ */
#if !defined(I_X86_) && !(defined(_X86_) && !defined(__x86_64)) && !defined(_AMD64_) && defined(__ia64__)
#if defined(__ia64__) && \
!(defined(_X86_) || defined(__x86_64) || defined(_AMD64_))
#if !defined(_IA64_)
#define _IA64_
#endif
#endif
#endif /* _IA64_ */
#ifdef _WIN64
@ -94,7 +94,7 @@ extern "C" {
#endif
#ifndef SYSTEM_CACHE_ALIGNMENT_SIZE
#if defined(_AMD64_) || defined(I_X86_)
#if defined(_AMD64_) || defined(_X86_)
#define SYSTEM_CACHE_ALIGNMENT_SIZE 64
#else
#define SYSTEM_CACHE_ALIGNMENT_SIZE 128
@ -1720,8 +1720,10 @@ typedef DWORD LCID;
#endif /* end of _AMD64_ */
#ifdef I_X86_
#if(defined(_X86_) && !defined(__x86_64)) && !defined(RC_INVOKED)
#ifdef _X86_
#if defined(__i386__) && !defined(__x86_64) && !defined(RC_INVOKED)
#ifdef __cplusplus
extern "C" {
#endif
@ -1794,9 +1796,9 @@ typedef DWORD LCID;
#ifdef __cplusplus
}
#endif
#endif /* (defined(_X86_) && !defined(__x86_64)) && !defined(RC_INVOKED) */
#endif /* defined(__i386__) && !defined(__x86_64) && !defined(RC_INVOKED) */
#if(defined(_X86_) && !defined(__x86_64))
#if defined(__i386__) && !defined(__x86_64)
#define YieldProcessor() __asm__ __volatile__("rep; nop");
@ -1852,7 +1854,7 @@ typedef DWORD LCID;
return ret;
}
#endif /* !__CRT__NO_INLINE */
#endif /* (defined(_X86_) && !defined(__x86_64)) */
#endif /* defined(__i386__) && !defined(__x86_64) */
#define EXCEPTION_READ_FAULT 0
#define EXCEPTION_WRITE_FAULT 1
@ -1924,7 +1926,7 @@ typedef DWORD LCID;
typedef CONTEXT *PCONTEXT;
#endif /* end of I_X86_ */
#endif /* end of _X86_ */
#ifndef _LDT_ENTRY_DEFINED
#define _LDT_ENTRY_DEFINED
@ -3226,7 +3228,7 @@ typedef DWORD LCID;
DWORD64 Self;
} NT_TIB64,*PNT_TIB64;
#if !defined(I_X86_) && !defined(_IA64_) && !defined(_AMD64_)
#if !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_)
#define WX86
#endif