From 65337c5b2d56c70440f1677f2b175270d77ea0d1 Mon Sep 17 00:00:00 2001 From: shugo Date: Wed, 20 Aug 2008 17:08:36 +0000 Subject: * configure.in: always check timezone(). * strftime.c (rb_strftime): prefer timezone/altzone rather than gettimeofday(). The second argument to gettimeofday() is ignored on Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 0cdc09e214..c05289e140 100644 --- a/configure.in +++ b/configure.in @@ -886,18 +886,16 @@ if test "[$rb_cv_var_]$1" != no; then fi]) RUBY_CHECK_VARTYPE(timezone, [@%:@include ], [long int]) RUBY_CHECK_VARTYPE(altzone, [@%:@include ], [long int]) -if test "$rb_cv_var_timezone" = no; then - AC_CHECK_FUNCS(timezone) - if test "$ac_cv_func_timezone" = yes; then - AC_CACHE_CHECK([whether timezone requires zero arguments], rb_cv_func_timezone_void, - [AC_TRY_COMPILE([@%:@include ], - [(void)timezone(0, 0);], - [rb_cv_func_timezone_void=no], - [rb_cv_func_timezone_void=yes])] - ) - if test $rb_cv_func_timezone_void = yes; then - AC_DEFINE(TIMEZONE_VOID) - fi +AC_CHECK_FUNCS(timezone) +if test "$ac_cv_func_timezone" = yes; then + AC_CACHE_CHECK([whether timezone requires zero arguments], rb_cv_func_timezone_void, + [AC_TRY_COMPILE([@%:@include ], + [(void)timezone(0, 0);], + [rb_cv_func_timezone_void=no], + [rb_cv_func_timezone_void=yes])] + ) + if test $rb_cv_func_timezone_void = yes; then + AC_DEFINE(TIMEZONE_VOID) fi fi -- cgit v1.2.3