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

ruby-changes:65883

From: Nobuyoshi <ko1@a...>
Date: Sat, 17 Apr 2021 20:06:22 +0900 (JST)
Subject: [ruby-changes:65883] 17c3014bb7 (master): Prefer positive condition to double negative

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

From 17c3014bb7012793553c275f1509b2bb6f82cd50 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 17 Apr 2021 19:08:53 +0900
Subject: Prefer positive condition to double negative

Autoconf 2.70 seems to omit the check for the given CC,
`AC_COMPILE_IFELSE` does not know which is the cause of the
failure.
---
 configure.ac | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 27899f7..ebfd52f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,11 +486,10 @@ done https://github.com/ruby/ruby/blob/trunk/configure.ac#L486
 
 AC_MSG_CHECKING([whether it is Android])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-	@%:@ifdef __ANDROID__
-	@%:@error android
+	@%:@ifndef __ANDROID__
+	@%:@error Not android
 	@%:@endif
 ]], [[]])],
-[AC_MSG_RESULT(no)],
 [
 	AC_MSG_RESULT(yes)
 	target_os=${target_os}-android
@@ -501,7 +500,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ https://github.com/ruby/ruby/blob/trunk/configure.ac#L500
                 AC_MSG_RESULT($rb_android_api)
                 RUBY_APPEND_OPTIONS(CPPFLAGS, -D__ANDROID_API__=$rb_android_api -Wno-macro-redefined)
 	])
-])
+],
+[AC_MSG_RESULT(no)])
 
 AC_SUBST(RM, ['rm -f'])
 AC_SUBST(CP, ['cp'])
-- 
cgit v1.1


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

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