* crt/CRT_fp10.c: __attribute__((alias("xxx"))) is for gcc only.
From Amine Khaldi.
* crt/CRT_fp8.c: __attribute__((alias ("xxx"))) is for gcc only.
From Amine Khaldi.
(_fpreset): Add MSVC-compatible version. From Amine Khaldi.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@2908 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/ChangeLog b/mingw-w64-crt/ChangeLog
index 22c2398..bac8d3d 100644
--- a/mingw-w64-crt/ChangeLog
+++ b/mingw-w64-crt/ChangeLog
@@ -1,7 +1,10 @@
-2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
+2010-07-20 Amine Khaldi <amine.khaldi@reactos.org>
+ * crt/CRT_fp10.c: __attribute__((alias("xxx"))) is for gcc only.
+ * crt/CRT_fp8.c: __attribute__((alias ("xxx"))) is for gcc only.
+ (_fpreset): Add MSVC-compatible version.
* crt/crtexe.c (_MINGW_INSTALL_DEBUG_MATHERR): __attribute__((weak))
- is for gcc only. From Amine Khaldi.
+ is for gcc only.
2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
diff --git a/mingw-w64-crt/crt/CRT_fp10.c b/mingw-w64-crt/crt/CRT_fp10.c
index b4da7b5..21a8613 100644
--- a/mingw-w64-crt/crt/CRT_fp10.c
+++ b/mingw-w64-crt/crt/CRT_fp10.c
@@ -7,6 +7,18 @@
void _fpreset (void);
void _fpreset (void)
- { __asm__ ("fninit" ) ;}
+{
+#ifdef __GNUC__
+ __asm__ ("fninit");
+#else /* msvc: */
+ __asm fninit;
+#endif
+}
+#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
+#else
+void fpreset(void) {
+ _fpreset();
+}
+#endif
diff --git a/mingw-w64-crt/crt/CRT_fp8.c b/mingw-w64-crt/crt/CRT_fp8.c
index 368dbd9..4a00b86 100644
--- a/mingw-w64-crt/crt/CRT_fp8.c
+++ b/mingw-w64-crt/crt/CRT_fp8.c
@@ -14,4 +14,10 @@
(* __MINGW_IMP_SYMBOL(_fpreset))();
}
+#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
+#else
+void fpreset(void) {
+ _fpreset();
+}
+#endif