diff --git a/ChangeLog b/ChangeLog index 7114ed5aef..b60f041a9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 19 13:57:43 2007 Nobuyoshi Nakada + + * configure.in (TIMEZONE_VOID): check whether timezone requires zero + arguments. [ruby-dev:32631] + Wed Dec 19 13:22:14 2007 NARUSE, Yui * ext/nkf/nkf.c (NKF::_ENCODING): removed. diff --git a/configure.in b/configure.in index 2ac140e334..1fd0097303 100644 --- a/configure.in +++ b/configure.in @@ -657,6 +657,17 @@ 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 + fi fi AC_CACHE_CHECK(for negative time_t for gmtime(3), rb_cv_negative_time_t,