Alexandre Julliard : msvcrt: Avoid msvcrt-specific types in the Unix library interface.

Alexandre Julliard julliard at winehq.org
Fri Nov 20 14:54:31 CST 2020


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Nov 20 11:20:04 2020 +0100

msvcrt: Avoid msvcrt-specific types in the Unix library interface.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/unixlib.c | 18 +++++++++---------
 dlls/msvcrt/unixlib.h | 20 +++++++++-----------
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/dlls/msvcrt/unixlib.c b/dlls/msvcrt/unixlib.c
index b64355ebf16..3913d61048a 100644
--- a/dlls/msvcrt/unixlib.c
+++ b/dlls/msvcrt/unixlib.c
@@ -443,7 +443,7 @@ static double CDECL unix_jn(int n, double num)
 /*********************************************************************
  *      ldexp
  */
-static double CDECL unix_ldexp(double num, MSVCRT_long exp)
+static double CDECL unix_ldexp(double num, int exp)
 {
     return ldexp( num, exp );
 }
@@ -477,7 +477,7 @@ static float CDECL unix_lgammaf(float x)
 /*********************************************************************
  *      llrint
  */
-static MSVCRT_longlong CDECL unix_llrint(double x)
+static __int64 CDECL unix_llrint(double x)
 {
     return llrint(x);
 }
@@ -485,7 +485,7 @@ static MSVCRT_longlong CDECL unix_llrint(double x)
 /*********************************************************************
  *      llrintf
  */
-static MSVCRT_longlong CDECL unix_llrintf(float x)
+static __int64 CDECL unix_llrintf(float x)
 {
     return llrintf(x);
 }
@@ -589,7 +589,7 @@ static float CDECL unix_logbf( float x )
 /*********************************************************************
  *      lrint
  */
-static MSVCRT_long CDECL unix_lrint(double x)
+static int CDECL unix_lrint(double x)
 {
     return lrint(x);
 }
@@ -597,7 +597,7 @@ static MSVCRT_long CDECL unix_lrint(double x)
 /*********************************************************************
  *      lrintf
  */
-static MSVCRT_long CDECL unix_lrintf(float x)
+static int CDECL unix_lrintf(float x)
 {
     return lrintf(x);
 }
@@ -795,7 +795,7 @@ static float CDECL unix_roundf(float x)
 /*********************************************************************
  *      lround
  */
-static MSVCRT_long CDECL unix_lround(double x)
+static int CDECL unix_lround(double x)
 {
 #ifdef HAVE_LROUND
     return lround(x);
@@ -807,7 +807,7 @@ static MSVCRT_long CDECL unix_lround(double x)
 /*********************************************************************
  *      lroundf
  */
-static MSVCRT_long CDECL unix_lroundf(float x)
+static int CDECL unix_lroundf(float x)
 {
 #ifdef HAVE_LROUNDF
     return lroundf(x);
@@ -819,7 +819,7 @@ static MSVCRT_long CDECL unix_lroundf(float x)
 /*********************************************************************
  *      llround
  */
-static MSVCRT_longlong CDECL unix_llround(double x)
+static __int64 CDECL unix_llround(double x)
 {
 #ifdef HAVE_LLROUND
     return llround(x);
@@ -831,7 +831,7 @@ static MSVCRT_longlong CDECL unix_llround(double x)
 /*********************************************************************
  *      llroundf
  */
-static MSVCRT_longlong CDECL unix_llroundf(float x)
+static __int64 CDECL unix_llroundf(float x)
 {
 #ifdef HAVE_LLROUNDF
     return llroundf(x);
diff --git a/dlls/msvcrt/unixlib.h b/dlls/msvcrt/unixlib.h
index cfad08aee0b..b506151664f 100644
--- a/dlls/msvcrt/unixlib.h
+++ b/dlls/msvcrt/unixlib.h
@@ -21,8 +21,6 @@
 #ifndef __UNIXLIB_H
 #define __UNIXLIB_H
 
-#include "msvcrt.h"
-
 struct unix_funcs
 {
     double          (CDECL *acosh)(double x);
@@ -62,13 +60,13 @@ struct unix_funcs
     double          (CDECL *j0)(double num);
     double          (CDECL *j1)(double num);
     double          (CDECL *jn)(int n, double num);
-    double          (CDECL *ldexp)(double x, MSVCRT_long exp);
+    double          (CDECL *ldexp)(double x, int exp);
     double          (CDECL *lgamma)(double x);
     float           (CDECL *lgammaf)(float x);
-    MSVCRT_longlong (CDECL *llrint)(double x);
-    MSVCRT_longlong (CDECL *llrintf)(float x);
-    MSVCRT_longlong (CDECL *llround)(double x);
-    MSVCRT_longlong (CDECL *llroundf)(float x);
+    __int64         (CDECL *llrint)(double x);
+    __int64         (CDECL *llrintf)(float x);
+    __int64         (CDECL *llround)(double x);
+    __int64         (CDECL *llroundf)(float x);
     double          (CDECL *log)(double x);
     float           (CDECL *logf)(float x);
     double          (CDECL *log10)(double x);
@@ -79,10 +77,10 @@ struct unix_funcs
     float           (CDECL *log2f)(float x);
     double          (CDECL *logb)(double x);
     float           (CDECL *logbf)(float x);
-    MSVCRT_long     (CDECL *lrint)(double x);
-    MSVCRT_long     (CDECL *lrintf)(float x);
-    MSVCRT_long     (CDECL *lround)(double x);
-    MSVCRT_long     (CDECL *lroundf)(float x);
+    int             (CDECL *lrint)(double x);
+    int             (CDECL *lrintf)(float x);
+    int             (CDECL *lround)(double x);
+    int             (CDECL *lroundf)(float x);
     double          (CDECL *modf)(double x, double *iptr);
     float           (CDECL *modff)(float x, float *iptr);
     double          (CDECL *nearbyint)(double num);




More information about the wine-cvs mailing list