From c530b9d60a2bbbd6841797f6a6f980cdbc413771 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 1 Apr 2010 03:06:07 +0000 Subject: * include/ruby/ruby.h (PRE_TIMET_PREFIX): define if configure doesn't defines it. [ruby-core:29190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 26bd2ee065..7b482ccb17 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -129,6 +129,16 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1]; # define PRI_VALUE_PREFIX "" #endif +#ifndef PRI_TIMET_PREFIX +# if SIZEOF_TIME_T == SIZEOF_INT +# define PRI_TIMET_PREFIX +# elif SIZEOF_TIME_T == SIZEOF_LONG +# define PRI_TIMET_PREFIX "l" +# elif SIZEOF_TIME_T == SIZEOF_LONG_LONG +# define PRI_TIMET_PREFIX "ll" +# endif +#endif + #if defined PRIdPTR # define PRI_PTRDIFF_PREFIX "t" #elif SIZEOF_PTRDIFF_T == SIZEOF_INT -- cgit v1.2.3