summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-15 02:17:06 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-15 02:17:06 +0000
commite8c951909ff48204642537ff8810d8cd16a0dee9 (patch)
tree8b3e817f970e17938eadad89a3bd7d1c57af9b73 /handy.h
parenta7710f8d0d6745c683ad736918bcfa809716a590 (diff)
downloadperl-e8c951909ff48204642537ff8810d8cd16a0dee9.tar.gz
Defined INT64_C() and UINT64_C() unless defined by <inttypes.h>
(a macro to define signed and unsigned integer constants). p4raw-id: //depot/perl@7690
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/handy.h b/handy.h
index 22f6173e2d..ba3a812756 100644
--- a/handy.h
+++ b/handy.h
@@ -133,6 +133,16 @@ typedef U64TYPE U64;
# endif
#endif /* PERL_CORE */
+#ifndef UINT64_C /* usually from <inttypes.h> */
+# ifdef HAS_LONG_LONG
+# define INT64_C(c) CAT2(c,LL)
+# define UINT64_C(c) CAT2(c,ULL)
+# else
+# define INT64_C(c) ((I64TYPE)(c))
+# define UINT64_C(c) ((U64TYPE)(c))
+# endif
+#endif
+
/* Mention I8SIZE, U8SIZE, I16SIZE, U16SIZE, I32SIZE, U32SIZE,
I64SIZE, and U64SIZE here so that metaconfig pulls them in. */