Martin Storsjo : msvcrt: Implement the remquo family of functions.

Alexandre Julliard julliard at winehq.org
Thu Apr 11 13:10:31 CDT 2019


Module: wine
Branch: master
Commit: de8be4a09c18fabd72f33f7e45b19ff0d735864b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=de8be4a09c18fabd72f33f7e45b19ff0d735864b

Author: Martin Storsjo <martin at martin.st>
Date:   Wed Apr 10 21:14:28 2019 +0300

msvcrt: Implement the remquo family of functions.

Signed-off-by: Martin Storsjo <martin at martin.st>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                                          |  2 ++
 configure.ac                                       |  2 ++
 .../api-ms-win-crt-math-l1-1-0.spec                |  6 ++--
 dlls/msvcr120/msvcr120.spec                        |  6 ++--
 dlls/msvcr120_app/msvcr120_app.spec                |  6 ++--
 dlls/msvcrt/math.c                                 | 38 ++++++++++++++++++++++
 dlls/ucrtbase/ucrtbase.spec                        |  6 ++--
 include/config.h.in                                |  6 ++++
 8 files changed, 60 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index a7c072b..5733ea7 100755
--- a/configure
+++ b/configure
@@ -19163,6 +19163,8 @@ for ac_func in \
 	powl \
 	remainder \
 	remainderf \
+	remquo \
+	remquof \
 	rint \
 	rintf \
 	round \
diff --git a/configure.ac b/configure.ac
index bb02ec4..4dbb7f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2724,6 +2724,8 @@ AC_CHECK_FUNCS(\
 	powl \
 	remainder \
 	remainderf \
+	remquo \
+	remquof \
 	rint \
 	rintf \
 	round \
diff --git a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
index dea5094..a9deec8 100644
--- a/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
@@ -308,9 +308,9 @@
 @ cdecl remainder(double double) ucrtbase.remainder
 @ cdecl remainderf(float float) ucrtbase.remainderf
 @ cdecl remainderl(double double) ucrtbase.remainderl
-@ stub remquo
-@ stub remquof
-@ stub remquol
+@ cdecl remquo(double double ptr) ucrtbase.remquo
+@ cdecl remquof(float float ptr) ucrtbase.remquof
+@ cdecl remquol(double double ptr) ucrtbase.remquol
 @ cdecl rint(double) ucrtbase.rint
 @ cdecl rintf(float) ucrtbase.rintf
 @ cdecl rintl(double) ucrtbase.rintl
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 8cd39ea..618b9bc 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2328,9 +2328,9 @@
 @ cdecl remainderf(float float) MSVCR120_remainderf
 @ cdecl remainderl(double double) MSVCR120_remainderl
 @ cdecl remove(str) MSVCRT_remove
-@ stub remquo
-@ stub remquof
-@ stub remquol
+@ cdecl remquo(double double ptr) MSVCR120_remquo
+@ cdecl remquof(float float ptr) MSVCR120_remquof
+@ cdecl remquol(double double ptr) MSVCR120_remquol
 @ cdecl rename(str str) MSVCRT_rename
 @ cdecl rewind(ptr) MSVCRT_rewind
 @ cdecl rint(double) MSVCR120_rint
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index dc3f3bd..26ffaf7 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1991,9 +1991,9 @@
 @ cdecl remainderf(float float) msvcr120.remainderf
 @ cdecl remainderl(double double) msvcr120.remainderl
 @ cdecl remove(str) msvcr120.remove
-@ stub remquo
-@ stub remquof
-@ stub remquol
+@ cdecl remquo(double double ptr) msvcr120.remquo
+@ cdecl remquof(float float ptr) msvcr120.remquof
+@ cdecl remquol(double double ptr) msvcr120.remquol
 @ cdecl rename(str str) msvcr120.rename
 @ cdecl rewind(ptr) msvcr120.rewind
 @ cdecl rint(double) msvcr120.rint
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 754e46c..c893c83 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -3273,6 +3273,44 @@ LDOUBLE CDECL MSVCR120_remainderl(LDOUBLE x, LDOUBLE y)
 }
 
 /*********************************************************************
+ *      remquo (MSVCR120.@)
+ */
+double CDECL MSVCR120_remquo(double x, double y, int *quo)
+{
+#ifdef HAVE_REMQUO
+    if(!finite(x)) *MSVCRT__errno() = MSVCRT_EDOM;
+    if(isnan(y) || y==0.0) *MSVCRT__errno() = MSVCRT_EDOM;
+    return remquo(x, y, quo);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0;
+#endif
+}
+
+/*********************************************************************
+ *      remquof (MSVCR120.@)
+ */
+float CDECL MSVCR120_remquof(float x, float y, int *quo)
+{
+#ifdef HAVE_REMQUOF
+    if(!finitef(x)) *MSVCRT__errno() = MSVCRT_EDOM;
+    if(isnan(y) || y==0.0f) *MSVCRT__errno() = MSVCRT_EDOM;
+    return remquof(x, y, quo);
+#else
+    FIXME( "not implemented\n" );
+    return 0.0f;
+#endif
+}
+
+/*********************************************************************
+ *      remquol (MSVCR120.@)
+ */
+LDOUBLE CDECL MSVCR120_remquol(LDOUBLE x, LDOUBLE y, int *quo)
+{
+    return MSVCR120_remquo(x, y, quo);
+}
+
+/*********************************************************************
  *      lgamma (MSVCR120.@)
  */
 double CDECL MSVCR120_lgamma(double x)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index d218aa3..1866f1b 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2463,9 +2463,9 @@
 @ cdecl remainderf(float float) MSVCR120_remainderf
 @ cdecl remainderl(double double) MSVCR120_remainderl
 @ cdecl remove(str) MSVCRT_remove
-@ stub remquo
-@ stub remquof
-@ stub remquol
+@ cdecl remquo(double double ptr) MSVCR120_remquo
+@ cdecl remquof(float float ptr) MSVCR120_remquof
+@ cdecl remquol(double double ptr) MSVCR120_remquol
 @ cdecl rename(str str) MSVCRT_rename
 @ cdecl rewind(ptr) MSVCRT_rewind
 @ cdecl rint(double) MSVCR120_rint
diff --git a/include/config.h.in b/include/config.h.in
index 535f43f..aeb571a 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -744,6 +744,12 @@
 /* Define to 1 if you have the `remainderf' function. */
 #undef HAVE_REMAINDERF
 
+/* Define to 1 if you have the `remquo' function. */
+#undef HAVE_REMQUO
+
+/* Define to 1 if you have the `remquof' function. */
+#undef HAVE_REMQUOF
+
 /* Define to 1 if the system has the type `request_sense'. */
 #undef HAVE_REQUEST_SENSE
 




More information about the wine-cvs mailing list