summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2020-01-22 15:40:05 +1100
committerTony Cook <tony@develop-help.com>2020-03-04 15:18:56 +1100
commitbf51a9b98151e9c5e1d3b520a785f548a58fb726 (patch)
treea20b6e7de7431c32d8f1dbb1164e902288832a08 /perl.h
parent61656d9bbdc24db0c87d2062a110e0b87515f976 (diff)
downloadperl-bf51a9b98151e9c5e1d3b520a785f548a58fb726.tar.gz
add casts to IV_MAX, UV_MAX so they match the IVdf, UVdf macros
fixes #17338
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl.h b/perl.h
index e527a3ea81..85c87418f5 100644
--- a/perl.h
+++ b/perl.h
@@ -1887,13 +1887,13 @@ typedef UVTYPE UV;
#if defined(USE_64_BIT_INT) && defined(HAS_QUAD)
# if QUADKIND == QUAD_IS_INT64_T && defined(INT64_MAX)
-# define IV_MAX INT64_MAX
-# define IV_MIN INT64_MIN
-# define UV_MAX UINT64_MAX
+# define IV_MAX ((IV)INT64_MAX)
+# define IV_MIN ((IV)INT64_MIN)
+# define UV_MAX ((UV)UINT64_MAX)
# ifndef UINT64_MIN
# define UINT64_MIN 0
# endif
-# define UV_MIN UINT64_MIN
+# define UV_MIN ((UV)UINT64_MIN)
# else
# define IV_MAX PERL_QUAD_MAX
# define IV_MIN PERL_QUAD_MIN
@@ -1904,17 +1904,17 @@ typedef UVTYPE UV;
# define UV_IS_QUAD
#else
# if defined(INT32_MAX) && IVSIZE == 4
-# define IV_MAX INT32_MAX
-# define IV_MIN INT32_MIN
+# define IV_MAX ((IV)INT32_MAX)
+# define IV_MIN ((IV)INT32_MIN)
# ifndef UINT32_MAX_BROKEN /* e.g. HP-UX with gcc messes this up */
-# define UV_MAX UINT32_MAX
+# define UV_MAX ((UV)UINT32_MAX)
# else
-# define UV_MAX 4294967295U
+# define UV_MAX ((UV)4294967295U)
# endif
# ifndef UINT32_MIN
# define UINT32_MIN 0
# endif
-# define UV_MIN UINT32_MIN
+# define UV_MIN ((UV)UINT32_MIN)
# else
# define IV_MAX PERL_LONG_MAX
# define IV_MIN PERL_LONG_MIN