[前][次][番号順一覧][スレッド一覧]

ruby-changes:68210

From: Rei <ko1@a...>
Date: Sun, 3 Oct 2021 11:27:54 +0900 (JST)
Subject: [ruby-changes:68210] ceeae31901 (master): Avoid using the altzone variable in AIX

https://git.ruby-lang.org/ruby.git/commit/?id=ceeae31901

From ceeae31901275c9a3fde19aa05b343fbcf6187d1 Mon Sep 17 00:00:00 2001
From: Rei Odaira <rodaira@u...>
Date: Sat, 2 Oct 2021 21:22:37 -0500
Subject: Avoid using the altzone variable in AIX

In AIX, altzone exists in the standard library but is not declared
in time.h.  By 524513be399e81bb170ec88aa0d501f33cbde8c3, have_var
and try_var in mkmf recognizes a variable that exists in a library
even when it is not declared.  As a result, in AIX, HAVE_ALTZONE
is defined, but compile fails due to the lack of the declaration.
---
 ext/date/date_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index 4a2225fd2c..146f60fef6 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -7797,7 +7797,7 @@ datetime_s_now(int argc, VALUE *argv, VALUE klass) https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L7797
 #ifdef HAVE_STRUCT_TM_TM_GMTOFF
     of = tm.tm_gmtoff;
 #elif defined(HAVE_TIMEZONE)
-#ifdef HAVE_ALTZONE
+#if defined(HAVE_ALTZONE) && !defined(_AIX)
     of = (long)-((tm.tm_isdst > 0) ? altzone : timezone);
 #else
     of = (long)-timezone;
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]