Allows using additional macros like __arm64ec__ or __SIZEOF_LONG_DOUBLE__.
---
 mingw-w64-crt/Makefile.am                     | 16 +++++------
 mingw-w64-crt/def-include/crt-aliases.def.in  |  2 +-
 mingw-w64-crt/def-include/func.def.in         | 10 +++----
 .../api-ms-win-crt-math-l1-1-0.def.in         |  6 ++--
 mingw-w64-crt/lib-common/msvcr120_app.def.in  |  6 ++--
 mingw-w64-crt/lib-common/msvcrt.def.in        | 24 ++++++++--------
 mingw-w64-crt/lib-common/ntdll.def.in         | 28 +++++++++----------
 mingw-w64-crt/lib-common/ntdllcrt.def.in      |  8 +++---
 .../lib-common/ucrtbase-common.def.in         |  4 +--
 9 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 15642b3ff..217c0325f 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -4167,28 +4167,28 @@ endif
        $(RANLIB) $@
 
 lib32/%.def: lib32/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_I386 > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS32) $< -Wp,-w -P 
-I$(top_srcdir)/def-include > $@
 
 lib64/%.def: lib64/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_X64 > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS64) $< -Wp,-w -P 
-I$(top_srcdir)/def-include > $@
 
 libarm32/%.def: libarm32/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_ARM32 > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGSARM32) $< -Wp,-w -P 
-I$(top_srcdir)/def-include > $@
 
 libarm64/%.def: libarm64/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_ARM64 > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -P 
-I$(top_srcdir)/def-include -DDEF_ARM64 > $@
 
 lib32/%.def: lib-common/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_I386 > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS32) $< -Wp,-w -P 
-I$(top_srcdir)/def-include > $@
 
 lib64/%.def: lib-common/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_X64 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' 
> $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGS64) $< -Wp,-w -P 
-I$(top_srcdir)/def-include | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@
 
 libarm32/%.def: lib-common/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_ARM32 | sed -E 's/^([^ ]+)@[0-9]+( 
|$$)/\1\2/' > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $(CPPFLAGSARM32) $< -Wp,-w -P 
-I$(top_srcdir)/def-include | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@
 
 libarm64/%.def: lib-common/%.def.in
-       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P 
-I$(top_srcdir)/def-include -DDEF_ARM64 | sed -E 's/^([^ ]+)@[0-9]+( 
|$$)/\1\2/' > $@
+       $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -P 
-I$(top_srcdir)/def-include -DDEF_ARM64 | sed -E 's/^([^ ]+)@[0-9]+( 
|$$)/\1\2/' > $@
 
 # Don't compile these, but install as is:
 #
diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in 
b/mingw-w64-crt/def-include/crt-aliases.def.in
index be873c0df..bfa3bed28 100644
--- a/mingw-w64-crt/def-include/crt-aliases.def.in
+++ b/mingw-w64-crt/def-include/crt-aliases.def.in
@@ -247,7 +247,7 @@ wcstok == wcstok_s
 ADD_UNDERSCORE(nextafter)
 #endif
 
-#if defined(DEF_ARM32) || defined(DEF_ARM64)
+#if defined(__arm__) || defined(__aarch64__)
 ; This is list of symbol aliases for C99 ARM long double functions
 ; They are defined as aliases to regular double symbols as on ARM, long double 
is equal to regular double
 acosl == acos
diff --git a/mingw-w64-crt/def-include/func.def.in 
b/mingw-w64-crt/def-include/func.def.in
index 0b45da35a..77540bb31 100644
--- a/mingw-w64-crt/def-include/func.def.in
+++ b/mingw-w64-crt/def-include/func.def.in
@@ -12,26 +12,26 @@
 // F_NON_I386  - function available on everything but i386
 // F_NON_X64   - function available on everything but x86_64
 // F_NON_ARM64 - function available on everything but arm64
-#if defined(DEF_X64)
+#if defined(__x86_64__)
 #define F64(x) x
 #define F_X64(x) x
 #define F_X86_ANY(x) x
 #define F_NON_I386(x) x
 #define F_NON_ARM64(x) x
-#elif defined(DEF_I386)
+#elif defined(__i386__)
 #define F32(x) x
 #define F_I386(x) x
 #define F_X86_ANY(x) x
 #define F_NON_X64(x) x
 #define F_NON_ARM64(x) x
-#elif defined(DEF_ARM32)
+#elif defined(__arm__)
 #define F32(x) x
 #define F_ARM32(x) x
 #define F_ARM_ANY(x) x
 #define F_NON_I386(x) x
 #define F_NON_X64(x) x
 #define F_NON_ARM64(x) x
-#elif defined(DEF_ARM64)
+#elif defined(__aarch64__)
 #define F64(x) x
 #define F_ARM64(x) x
 #define F_ARM_ANY(x) x
@@ -75,7 +75,7 @@
 #define F_NON_ARM64(x)
 #endif
 
-#if defined(DEF_I386)
+#if defined(__i386__)
 #define STDCALL_DECORATED_EXPORT(symbol) symbol == _ ## symbol
 #define FASTCALL_DECORATED_EXPORT(symbol) symbol == symbol
 #endif
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in 
b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
index a63d00fb1..7fdd2f0c3 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
@@ -4,7 +4,7 @@ EXPORTS
 
 #include "func.def.in"
 
-#ifdef DEF_I386
+#ifdef __i386__
 _CIacos
 _CIasin
 _CIatan
@@ -31,7 +31,7 @@ _FCmulcr
 _LCbuild
 _LCmulcc
 _LCmulcr
-#ifdef DEF_I386
+#ifdef __i386__
 __libm_sse2_acos
 __libm_sse2_acosf
 __libm_sse2_asin
@@ -118,7 +118,7 @@ _ldsign
 _ldsin
 _ldtest
 _ldunscale
-#ifdef DEF_I386
+#ifdef __i386__
 _libm_sse2_acos_precise
 _libm_sse2_asin_precise
 _libm_sse2_atan_precise
diff --git a/mingw-w64-crt/lib-common/msvcr120_app.def.in 
b/mingw-w64-crt/lib-common/msvcr120_app.def.in
index c207c442f..86747ec4e 100644
--- a/mingw-w64-crt/lib-common/msvcr120_app.def.in
+++ b/mingw-w64-crt/lib-common/msvcr120_app.def.in
@@ -8,7 +8,7 @@ EXPORTS
 
 #include "func.def.in"
 
-#ifdef DEF_X64
+#ifdef __x86_64__
 ??0?$_SpinWait@$00@details@Concurrency@@QEAA@P6AXXZ@Z
 ??0?$_SpinWait@$0A@@details@Concurrency@@QEAA@P6AXXZ@Z
 ??0SchedulerPolicy@Concurrency@@QEAA@AEBV01@@Z
@@ -331,7 +331,7 @@ EXPORTS
 ?what@exception@std@@UEBAPEBDXZ
 #endif
 
-#ifdef DEF_I386
+#ifdef __i386__
 ??0?$_SpinWait@$00@details@Concurrency@@QAE@P6AXXZ@Z ; has WINAPI (@4)
 ??0?$_SpinWait@$0A@@details@Concurrency@@QAE@P6AXXZ@Z ; has WINAPI (@4)
 ??0SchedulerPolicy@Concurrency@@QAA@IZZ
@@ -657,7 +657,7 @@ EXPORTS
 ?what@exception@std@@UBEPBDXZ
 #endif
 
-#ifdef DEF_ARM32
+#ifdef __arm__
 ??0?$_SpinWait@$00@details@Concurrency@@QAA@P6AXXZ@Z
 ??0?$_SpinWait@$0A@@details@Concurrency@@QAA@P6AXXZ@Z
 ??0SchedulerPolicy@Concurrency@@QAA@ABV01@@Z
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in 
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 0d1223af5..ff9e6a635 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -3,7 +3,7 @@ EXPORTS
 
 #include "func.def.in"
 
-#ifdef DEF_I386
+#ifdef __i386__
 ; List of I386 C++ mangled symbols which matches the first I386 version of 
msvcrt.dll (Microsoft Visual C++ 4.2)
 ; public: __thiscall __non_rtti_object::__non_rtti_object(class 
__non_rtti_object const &)
 ??0__non_rtti_object@@QAE@ABV0@@Z ; has WINAPI (@4)
@@ -103,7 +103,7 @@ EXPORTS
 ?what@exception@@UBEPBDXZ
 #endif
 
-#ifdef DEF_X64
+#ifdef __x86_64__
 ; List of X64 C++ mangled symbols which matches the first X64 version of 
msvcrt.dll (Windows Server 2003 SP1 / Windows XP x64)
 ; public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object 
const & __ptr64) __ptr64
 ; GCC = __ZN17__non_rtti_objectC2ERKS_
@@ -217,7 +217,7 @@ EXPORTS
 ?what@exception@@UEBAPEBDXZ
 #endif
 
-#ifdef DEF_ARM32
+#ifdef __arm__
 ; List of ARM32 C++ mangled symbols which matches the first ARM32 version of 
msvcrt.dll (Windows RT 8.0)
 ; public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object 
const &)
 ??0__non_rtti_object@@QAA@ABV0@@Z
@@ -313,7 +313,7 @@ EXPORTS
 ?what@exception@@UBAPBDXZ
 #endif
 
-#ifdef DEF_ARM64
+#ifdef __aarch64__
 ; List of ARM64 C++ mangled symbols which matches the first ARM64 version of 
msvcrt.dll (Windows 10 Fall Creators Update)
 ; public: __cdecl __non_rtti_object::__non_rtti_object(class __non_rtti_object 
const &__ptr64 )__ptr64
 ??0__non_rtti_object@@QEAA@AEBV0@@Z
@@ -1144,7 +1144,7 @@ F_I386(_chkesp)
 
 
 ; These symbols were added in Windows ME and Windows 2000 OS system versions 
of msvcrt.dll
-#ifdef DEF_I386
+#ifdef __i386__
 ; void *__cdecl operator new[](unsigned int)
 ??_U@YAPAXI@Z
 ; void __cdecl operator delete[](void *)
@@ -1173,7 +1173,7 @@ _wutime64
 F_X86_ANY(_get_heap_handle) ; _get_heap_handle is not available in Windows XP 
and Windows XP SP1 OS system versions of msvcrt.dll, but is in XP SP3
 
 ; These symbols were added in Windows XP OS system version of msvcrt.dll
-#ifdef DEF_I386
+#ifdef __i386__
 ; private: __thiscall bad_cast::bad_cast(char const *const *)
 ??0bad_cast@@AAE@PBQBD@Z ; has WINAPI (@4)
 ; public: __thiscall bad_cast::bad_cast(char const *)
@@ -1245,7 +1245,7 @@ _wctype DATA
 
 ; These symbols were added in Windows Server 2003 SP1 and Windows XP x64 OS 
system version of msvcrt.dll
 ; This is the first X64 version of msvcrt.dll, all symbols in this section and 
also above this section are present in all X64 versions of msvcrt.dll
-#ifdef DEF_I386
+#ifdef __i386__
 ; public: __thiscall exception::exception(char const *const &,int)
 ??0exception@@QAE@ABQBDH@Z ; has WINAPI (@8)
 #endif
@@ -1283,13 +1283,13 @@ F_NON_I386(sqrtf DATA) ; i386 sqrtf provided by emu
 F_NON_I386(tanf F_X86_ANY(DATA)) ; i386 tanf provided by emu
 
 ; These symbols were added in Windows Vista OS system version of msvcrt.dll
-#ifdef DEF_I386
+#ifdef __i386__
 ; void *__cdecl operator new(unsigned int,int,char const *,int)
 ??2@YAPAXIHPBDH@Z
 ; void *__cdecl operator new[](unsigned int,int,char const *,int)
 ??_U@YAPAXIHPBDH@Z
 #endif
-#ifdef DEF_X64
+#ifdef __x86_64__
 ; private: __thiscall bad_cast::bad_cast(char const *const *)
 ??0bad_cast@@AAE@PBQBD@Z
 ; public: __thiscall bad_cast::bad_cast(char const *const &)
@@ -1910,7 +1910,7 @@ F_I386(_libm_sse2_tan_precise)
 #define NO_TIME_ALIAS
 #define NO_STRCMPI_ALIAS
 #define WITH_NEXTAFTER_ALIAS
-#ifdef DEF_I386
+#ifdef __i386__
 ; i386 __iob_func replaced by alias
 #define WITH_IOB_FUNC_ALIAS
 #define WITH_TZ_ALIASES
@@ -1918,13 +1918,13 @@ F_I386(_libm_sse2_tan_precise)
 #define WITH_ATOLL_ALIAS
 #define WITH_ATOLL_L_ALIAS
 #define WITH_STRTO64_L_ALIAS
-#ifndef DEF_I386
+#ifndef __i386__
 ; i386 llabs and imaxabs alias provided by emu
 #define WITH_LLABS_ALIAS
 ; i386 strtoll, strtoull, strtoimax, strtoumax, wcstoll, wcstoull, wcstoimax 
and wcstoumax aliases provided by emu
 #define WITH_STRTO64_ALIAS
 #endif
-#if defined(DEF_ARM32) || defined(DEF_ARM64)
+#if defined(__arm__) || defined(__aarch64__)
 #define USE_WCSTOK_S_FOR_WCSTOK
 #endif
 #include "crt-aliases.def.in"
diff --git a/mingw-w64-crt/lib-common/ntdll.def.in 
b/mingw-w64-crt/lib-common/ntdll.def.in
index 8d91bb547..ee002c868 100644
--- a/mingw-w64-crt/lib-common/ntdll.def.in
+++ b/mingw-w64-crt/lib-common/ntdll.def.in
@@ -2,7 +2,7 @@
 
 LIBRARY "ntdll.dll"
 EXPORTS
-#ifdef DEF_X64
+#ifdef __x86_64__
 PropertyLengthAsVariant
 RtlConvertPropertyToVariant
 RtlConvertVariantToProperty
@@ -38,7 +38,7 @@ CsrClientConnectToServer
 CsrFreeCaptureBuffer
 CsrGetProcessId
 CsrIdentifyAlertableThread
-#if defined(DEF_I386) || defined(DEF_X64)
+#if defined(__i386__) || defined(__x86_64__)
 CsrNewThread
 CsrProbeForRead
 CsrProbeForWrite
@@ -65,12 +65,12 @@ DbgUiStopDebugging
 DbgUiWaitStateChange
 DbgUserBreakPoint
 EtwCheckCoverage
-#ifdef DEF_X64
+#ifdef __x86_64__
 EtwControlTraceA
 EtwControlTraceW
 #endif
 EtwCreateTraceInstanceId
-#ifdef DEF_X64
+#ifdef __x86_64__
 EtwEnableTrace
 EtwEnumerateTraceGuids
 EtwFlushTraceA
@@ -95,7 +95,7 @@ EtwEventWriteTransfer
 EtwGetTraceEnableFlags
 EtwGetTraceEnableLevel
 EtwGetTraceLoggerHandle
-#ifdef DEF_X64
+#ifdef __x86_64__
 EtwNotificationRegistrationA
 EtwNotificationRegistrationW
 EtwQueryAllTracesA
@@ -112,7 +112,7 @@ EtwProcessPrivateLoggerRequest
 EtwRegisterSecurityProvider
 EtwRegisterTraceGuidsA
 EtwRegisterTraceGuidsW
-#ifdef DEF_X64
+#ifdef __x86_64__
 EtwStartTraceA
 EtwStartTraceW
 EtwStopTraceA
@@ -126,7 +126,7 @@ EtwTraceEventInstance
 EtwTraceMessage
 EtwTraceMessageVa
 EtwUnregisterTraceGuids
-#ifdef DEF_X64
+#ifdef __x86_64__
 EtwUpdateTraceA
 EtwUpdateTraceW
 EtwpGetTraceBuffer
@@ -138,7 +138,7 @@ EtwpGetCpuSpeed
 F_X64(EtwpNotificationThread)
 EvtIntReportAuthzEventAndSourceAsync
 EvtIntReportEventAndSourceAsync
-#ifndef DEF_ARM32
+#ifndef __arm__
 ExpInterlockedPopEntrySListEnd
 F_X64(ExpInterlockedPopEntrySListEnd16)
 ExpInterlockedPopEntrySListFault
@@ -729,7 +729,7 @@ NtWaitForWorkViaWorkerFactory
 NtWaitHighEventPair
 NtWaitLowEventPair
 NtWorkerFactoryWorkerReady
-#ifdef DEF_ARM32
+#ifdef __arm__
 NtWow64AllocateVirtualMemory64
 NtWow64CallFunction64
 NtWow64CsrAllocateCaptureBuffer
@@ -946,7 +946,7 @@ RtlCreateSystemVolumeInformationFolder
 RtlCreateTagHeap
 RtlCreateTimer
 RtlCreateTimerQueue
-#ifdef DEF_X64
+#ifdef __x86_64__
 RtlCreateUmsCompletionList
 RtlCreateUmsThread
 RtlCreateUmsThreadContext
@@ -995,7 +995,7 @@ RtlDeleteSecurityObject
 RtlDeleteTimer
 RtlDeleteTimerQueue
 RtlDeleteTimerQueueEx
-#ifdef DEF_X64
+#ifdef __x86_64__
 RtlDeleteUmsCompletionList
 RtlDeleteUmsThreadContext
 RtlDequeueUmsCompletionListItems
@@ -1732,7 +1732,7 @@ F64(RtlWow64GetThreadContext)
 F64(RtlWow64GetThreadSelectorEntry)
 RtlWow64IsWowGuestMachineSupported
 RtlWow64LogMessageInEventLogger
-#if defined(DEF_X64) || defined(DEF_ARM64)
+#if defined(__x86_64__) || defined(__aarch64__)
 RtlWow64PopAllCrossProcessWorkFromWorkList
 RtlWow64PopCrossProcessWorkFromFreeList
 RtlWow64PushCrossProcessWorkOntoFreeList
@@ -1794,7 +1794,7 @@ F_X64(RtlpUmsThreadYield)
 RtlpUnWaitCriticalSection
 RtlpVerifyAndCommitUILanguageSettings
 RtlpWaitForCriticalSection
-#ifdef DEF_X64
+#ifdef __x86_64__
 RtlpWow64CtxFromAmd64
 RtlpWow64GetContextOnAmd64
 RtlpWow64SetContextOnAmd64
@@ -2388,7 +2388,7 @@ ZwWaitForWorkViaWorkerFactory
 ZwWaitHighEventPair
 ZwWaitLowEventPair
 ZwWorkerFactoryWorkerReady
-#ifdef DEF_ARM32
+#ifdef __arm__
 ZwWow64AllocateVirtualMemory64
 ZwWow64CallFunction64
 ZwWow64CsrAllocateCaptureBuffer
diff --git a/mingw-w64-crt/lib-common/ntdllcrt.def.in 
b/mingw-w64-crt/lib-common/ntdllcrt.def.in
index 879585e9a..b1f365e96 100644
--- a/mingw-w64-crt/lib-common/ntdllcrt.def.in
+++ b/mingw-w64-crt/lib-common/ntdllcrt.def.in
@@ -2,7 +2,7 @@
 
 LIBRARY "ntdll.dll"
 EXPORTS
-#ifdef DEF_I386
+#ifdef __i386__
 _CIcos
 _CIlog
 _CIpow
@@ -17,7 +17,7 @@ __iscsymf
 F_X64(__misaligned_access)
 F_ARM32(__jump_unwind)
 __toascii
-#ifdef DEF_I386
+#ifdef __i386__
 _alldiv
 _alldvrm@16
 _allmul@16
@@ -29,7 +29,7 @@ _allshl
 _allshr
 #endif
 _atoi64
-#ifdef DEF_I386
+#ifdef __i386__
 _aulldiv@16
 _aulldvrm@16
 _aullrem@16
@@ -39,7 +39,7 @@ _aullshr
 _errno
 F_I386(_except_handler4_common)
 _fltused DATA
-#ifdef DEF_I386
+#ifdef __i386__
 _ftol
 _ftol2
 _ftol2_sse
diff --git a/mingw-w64-crt/lib-common/ucrtbase-common.def.in 
b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
index 69052d686..7af5acde8 100644
--- a/mingw-w64-crt/lib-common/ucrtbase-common.def.in
+++ b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
@@ -218,7 +218,7 @@ __threadid
 __timezone
 __toascii
 __tzname
-#if !defined(DEF_DEBUG) || !defined(DEF_ARM64)
+#if !defined(DEF_DEBUG) || !defined(__aarch64__)
 ; symbols __unDName and __unDNameEx are available in all versions except ARM64 
ucrtbased.dll
 __unDName
 __unDNameEx
@@ -493,7 +493,7 @@ F_DEBUG(_invalid_parameter)
 _invalid_parameter_noinfo
 _invalid_parameter_noinfo_noreturn
 _invoke_watson
-#if !defined(DEF_DEBUG) || !defined(DEF_ARM64)
+#if !defined(DEF_DEBUG) || !defined(__aarch64__)
 ; symbol _is_exception_typeof is available in all versions except ARM64 
ucrtbased.dll
 _is_exception_typeof
 #endif
-- 
2.48.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to