This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Untangle the IV_IS_QUAD jungle by introduding
[perl5.git] / perl.h
diff --git a/perl.h b/perl.h
index 48765ee..1119ba9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1932,6 +1932,22 @@ typedef I32 CHECKPOINT;
 #   endif
 #endif
 
+#ifdef IV_IS_QUAD
+#  define UVuf PERL_PRIu64
+#  define IVdf PERL_PRId64
+#  define UVof PERL_PRIo64
+#  define UVxf PERL_PRIx64
+#else
+#   if LONGSIZE == 4
+#       define UVuf "lu"
+#       define IVdf "ld"
+#       define UVof "lo"
+#       define UVxf "lx"
+#   else
+        /* Any good ideas? */
+#   endif
+#endif
+
 /* Used with UV/IV arguments: */
                                        /* XXXX: need to speed it up */
 #define CLUMP_2UV(iv)  ((iv) < 0 ? 0 : (UV)(iv))