[x86/Linux] Fix dangling DoubleToNumber and NumberToDouble (dotnet/coreclr#8446)
authorJonghyun Park <parjong@gmail.com>
Mon, 5 Dec 2016 07:35:52 +0000 (16:35 +0900)
committerJan Kotas <jkotas@microsoft.com>
Mon, 5 Dec 2016 07:35:52 +0000 (23:35 -0800)
This commit enables portable DoubleToNumber and NumberToDouble for
x86/Linux.

Commit migrated from https://github.com/dotnet/coreclr/commit/933073140a0a7ca1f83084943e7516015f7e2ae8

src/coreclr/src/classlibnative/bcltype/number.cpp

index 349bffb..6ca24d8 100644 (file)
@@ -82,7 +82,7 @@ static const char* const negNumberFormats[] = {
 
 static const char posNumberFormat[] = "#";
 
-#if defined(_TARGET_X86_)
+#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
 
 extern "C" void _cdecl /*__stdcall*/ DoubleToNumber(double value, int precision, NUMBER* number);
 extern "C" void _cdecl /*__stdcall*/ NumberToDouble(NUMBER* number, double* value);
@@ -132,7 +132,7 @@ unsigned int Int64DivMod1E9(unsigned __int64* value)
 
 #pragma warning(default:4035)
 
-#else // !(defined(_TARGET_X86_)
+#else // _TARGET_X86_ && !FEATURE_PAL
 
 #pragma warning(disable:4273)
 extern "C" char* __cdecl _ecvt(double, int, int*, int*);
@@ -607,7 +607,7 @@ unsigned int Int64DivMod1E9(unsigned __int64* value)
 
 
 
-#endif // !(defined(_TARGET_X86_)
+#endif // _TARGET_X86_ && !FEATURE_PAL
 
 #if defined(_MSC_VER) && defined(_TARGET_X86_)
 #pragma optimize("y", on)              // Small critical routines, don't put in EBP frame