OV
Change the struct size based on current architecture
this implementation can be found here
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
102 replies
Change the struct size based on current architecture
and here is the preprocessor or constant implementation
<Is64Bit Condition="'$(Platform)' == 'arm64' or '$(Platform)' == 'x64' or '$(Platform)' == 's390x' or '$(Platform)' == 'loongarch64' or '$(Platform)' == 'ppc64le' or '$(Platform)' == 'riscv64'">true</Is64Bit>
<DefineConstants Condition="'$(Is64Bit)' != 'true'">$(DefineConstants);TARGET_32BIT</DefineConstants>
<DefineConstants Condition="'$(Is64Bit)' == 'true'">$(DefineConstants);TARGET_64BIT</DefineConstants>
102 replies
Change the struct size based on current architecture
so the IntPtr struct has 2 preprocessor like TARGET_64BIT and TARGET_32BIT now when i copy their preprocessor it does not work for any cpu configuration. but when microsoft use it for the Intptr struct how does that working
102 replies