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 b34147be5fe..c81c3d42127 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 dd7d48a8629..1773976481f 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 b8ffbbc7581..8072349d8d0 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 15d8fa4be72..a9cf224575a 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 6e361201b05..6feb6c873f0 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 689b3d7c951..05ac3d3427a 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