Myah Caron : msvcr120: Add imaxabs.

Alexandre Julliard julliard at winehq.org
Mon Sep 14 14:58:23 CDT 2020


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

Author: Myah Caron <qsniyg at protonmail.com>
Date:   Fri Sep 11 15:38:59 2020 +0000

msvcr120: Add imaxabs.

Signed-off-by: Myah Caron <qsniyg at protonmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 .../api-ms-win-crt-utility-l1-1-0.spec                         |  2 +-
 dlls/msvcr120/msvcr120.spec                                    |  2 +-
 dlls/msvcr120_app/msvcr120_app.spec                            |  2 +-
 dlls/msvcrt/math.c                                             | 10 ++++++++++
 dlls/msvcrt/msvcrt.h                                           |  1 +
 dlls/ucrtbase/ucrtbase.spec                                    |  2 +-
 6 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec b/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec
index b34147be5f..c81c3d4212 100644
--- a/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec
@@ -17,7 +17,7 @@
 @ cdecl bsearch(ptr ptr long long ptr) ucrtbase.bsearch
 @ cdecl bsearch_s(ptr ptr long long ptr ptr) ucrtbase.bsearch_s
 @ cdecl -ret64 div(long long) ucrtbase.div
-@ stub imaxabs
+@ cdecl -ret64 imaxabs(int64) ucrtbase.imaxabs
 @ stub imaxdiv
 @ cdecl labs(long) ucrtbase.labs
 @ cdecl -ret64 ldiv(long long) ucrtbase.ldiv
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index dd7d48a862..1773976481 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -2210,7 +2210,7 @@
 @ cdecl ilogb(double) MSVCR120_ilogb
 @ cdecl ilogbf(float) MSVCR120_ilogbf
 @ cdecl ilogbl(double) MSVCR120_ilogbl
-@ stub imaxabs
+@ cdecl -ret64 imaxabs(int64) MSVCRT_imaxabs
 @ stub imaxdiv
 @ cdecl is_wctype(long long) MSVCRT_iswctype
 @ cdecl isalnum(long) MSVCRT_isalnum
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index b8ffbbc758..8072349d8d 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1874,7 +1874,7 @@
 @ cdecl ilogb(double) msvcr120.ilogb
 @ cdecl ilogbf(float) msvcr120.ilogbf
 @ cdecl ilogbl(double) msvcr120.ilogbl
-@ stub imaxabs
+@ cdecl -ret64 imaxabs(int64) msvcr120.imaxabs
 @ stub imaxdiv
 @ cdecl isalnum(long) msvcr120.isalnum
 @ cdecl isalpha(long) msvcr120.isalpha
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c
index 15d8fa4be7..a9cf224575 100644
--- a/dlls/msvcrt/math.c
+++ b/dlls/msvcrt/math.c
@@ -1502,6 +1502,16 @@ MSVCRT_longlong CDECL MSVCRT_llabs( MSVCRT_longlong n )
 }
 #endif
 
+#if _MSVCR_VER>=120
+/*********************************************************************
+ *		imaxabs (MSVCR120.@)
+ */
+MSVCRT_intmax_t CDECL MSVCRT_imaxabs( MSVCRT_intmax_t n )
+{
+    return n >= 0 ? n : -n;
+}
+#endif
+
 /*********************************************************************
  *		_abs64 (MSVCRT.@)
  */
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 6e361201b0..6feb6c873f 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -77,6 +77,7 @@ typedef unsigned int   MSVCRT__fsize_t;
 typedef int            MSVCRT_long;
 typedef unsigned int   MSVCRT_ulong;
 typedef __int64        MSVCRT_longlong;
+typedef long long      MSVCRT_intmax_t;
 #ifdef _WIN64
 typedef unsigned __int64 MSVCRT_size_t;
 typedef __int64 MSVCRT_intptr_t;
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 689b3d7c95..05ac3d3427 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2344,7 +2344,7 @@
 @ cdecl ilogb(double) MSVCR120_ilogb
 @ cdecl ilogbf(float) MSVCR120_ilogbf
 @ cdecl ilogbl(double) MSVCR120_ilogbl
-@ stub imaxabs
+@ cdecl -ret64 imaxabs(int64) MSVCRT_imaxabs
 @ stub imaxdiv
 @ cdecl is_wctype(long long) MSVCRT_iswctype
 @ cdecl isalnum(long) MSVCRT_isalnum




More information about the wine-cvs mailing list