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

ruby-changes:70913

From: Nobuyoshi <ko1@a...>
Date: Sun, 23 Jan 2022 01:02:40 +0900 (JST)
Subject: [ruby-changes:70913] 355bc37196 (master): Reuse the default `AC_LANG_PROGRAM(C)` definition

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

From 355bc371962e57f5e4b5365a2db752cbb8d673ee Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 23 Jan 2022 00:37:55 +0900
Subject: Reuse the default `AC_LANG_PROGRAM(C)` definition

---
 tool/m4/ruby_try_cflags.m4 | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/tool/m4/ruby_try_cflags.m4 b/tool/m4/ruby_try_cflags.m4
index 228fe65245d..672f4f8e512 100644
--- a/tool/m4/ruby_try_cflags.m4
+++ b/tool/m4/ruby_try_cflags.m4
@@ -3,15 +3,7 @@ dnl https://github.com/ruby/ruby/blob/trunk/tool/m4/ruby_try_cflags.m4#L3
 dnl Autoconf 2.67 fails to detect `-Werror=old-style-definition` due
 dnl to the old style definition of `main`.
 m4_version_prereq([2.70], [], [
-m4_define([AC_LANG_PROGRAM(C)],
-[$1
-int
-main (void)
-{
-$2
-  ;
-  return 0;
-}])
+m4_defun([AC_LANG_PROGRAM(C)], m4_bpatsubst(m4_defn([AC_LANG_PROGRAM(C)]), [main ()], [main (void)]))
 ])dnl
 dnl
 AC_DEFUN([RUBY_TRY_CFLAGS], [
-- 
cgit v1.2.1


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

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