summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-07-05 19:40:10 -0500
committerJesse Luehrs <doy@tozt.net>2012-07-05 19:40:10 -0500
commit80524f33baf86baec21f7b20abc94177837e7848 (patch)
treece5cb1eaf127a1f59f90720f5204c139cb855241 /handy.h
parenta64f08cb65ac0431c7922879eb9bdae066e01035 (diff)
downloadperl-80524f33baf86baec21f7b20abc94177837e7848.tar.gz
both INT64_C and UINT64_C should be guarded [perl #76306]
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/handy.h b/handy.h
index 198ea0c708..91ac2bf4ef 100644
--- a/handy.h
+++ b/handy.h
@@ -191,25 +191,29 @@ typedef U64TYPE U64;
#endif /* PERL_CORE */
#if defined(HAS_QUAD) && defined(USE_64_BIT_INT)
-# ifndef UINT64_C /* usually from <inttypes.h> */
-# if defined(HAS_LONG_LONG) && QUADKIND == QUAD_IS_LONG_LONG
-# define INT64_C(c) CAT2(c,LL)
-# define UINT64_C(c) CAT2(c,ULL)
+# if defined(HAS_LONG_LONG) && QUADKIND == QUAD_IS_LONG_LONG
+# define PeRl_INT64_C(c) CAT2(c,LL)
+# define PeRl_UINT64_C(c) CAT2(c,ULL)
+# else
+# if LONGSIZE == 8 && QUADKIND == QUAD_IS_LONG
+# define PeRl_INT64_C(c) CAT2(c,L)
+# define PeRl_UINT64_C(c) CAT2(c,UL)
# else
-# if LONGSIZE == 8 && QUADKIND == QUAD_IS_LONG
-# define INT64_C(c) CAT2(c,L)
-# define UINT64_C(c) CAT2(c,UL)
+# if defined(_WIN64) && defined(_MSC_VER)
+# define PeRl_INT64_C(c) CAT2(c,I64)
+# define PeRl_UINT64_C(c) CAT2(c,UI64)
# else
-# if defined(_WIN64) && defined(_MSC_VER)
-# define INT64_C(c) CAT2(c,I64)
-# define UINT64_C(c) CAT2(c,UI64)
-# else
-# define INT64_C(c) ((I64TYPE)(c))
-# define UINT64_C(c) ((U64TYPE)(c))
-# endif
+# define PeRl_INT64_C(c) ((I64TYPE)(c))
+# define PeRl_UINT64_C(c) ((U64TYPE)(c))
# endif
# endif
# endif
+# ifndef UINT64_C
+# define UINT64_C(c) PeRl_UINT64_C(c)
+# endif
+# ifndef INT64_C
+# define INT64_C(c) PeRl_INT64_C(c)
+# endif
#endif
#if defined(UINT8_MAX) && defined(INT16_MAX) && defined(INT32_MAX)