From 762f44cf49e92b13420de97ee99d4bc050aab24e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 27 Aug 2018 05:39:09 +0000 Subject: configure.ac: printf prifix for int64_t git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 3 +++ include/ruby/ruby.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 0cbdc4c7f6..92713f3a3b 100644 --- a/configure.ac +++ b/configure.ac @@ -1558,6 +1558,9 @@ RUBY_DEFINT(uint128_t, 16, unsigned) RUBY_DEFINT(intptr_t, void*) RUBY_DEFINT(uintptr_t, void*, unsigned) RUBY_DEFINT(ssize_t, size_t, [], [@%:@include ]) dnl may differ from int, so not use AC_TYPE_SSIZE_T. +AS_IF([test "x$rb_cv_type_int64_t" != xno], [ + RUBY_CHECK_PRINTF_PREFIX(int64_t, ll I64 l, 64) +]) AC_CACHE_CHECK(for stack end address, rb_cv_stack_end_address, [rb_cv_stack_end_address=no diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index a654cddb7e..b1ac0c60c4 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -124,11 +124,13 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1]; #define PRI_SHORT_PREFIX "h" #endif +#ifndef PRI_64_PREFIX #if SIZEOF_LONG == 8 #define PRI_64_PREFIX PRI_LONG_PREFIX #elif SIZEOF_LONG_LONG == 8 #define PRI_64_PREFIX PRI_LL_PREFIX #endif +#endif #define RUBY_PRI_VALUE_MARK "\v" #if defined PRIdPTR && !defined PRI_VALUE_PREFIX -- cgit v1.2.3