ruby-changes:58586
From: Mark <ko1@a...>
Date: Wed, 6 Nov 2019 00:39:53 +0900 (JST)
Subject: [ruby-changes:58586] 07f2062c8f (master): Improve string literal concatenation for C++11
https://git.ruby-lang.org/ruby.git/commit/?id=07f2062c8f From 07f2062c8ffecc774a4ebc1f39ff2c4940592be4 Mon Sep 17 00:00:00 2001 From: Mark Abraham <mark.j.abraham@g...> Date: Tue, 5 Nov 2019 14:31:52 +0100 Subject: Improve string literal concatenation for C++11 Downstream C++ projects that compile with C++11 or newer and include the generated config.h file issue compiler warnings. Both C and C++ compilers do string-literal token pasting regardless of whitespace between the tokens to paste. C++ compilers since C++11 require such spaces, to avoid ambiguity with the new style of string literals introduced then. This change fixes such projects without affecting core Ruby. diff --git a/configure.ac b/configure.ac index 67ce5f9..0435f12 100644 --- a/configure.ac +++ b/configure.ac @@ -3797,8 +3797,8 @@ AS_IF([test "${universal_binary-no}" = yes ], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L3797 AC_SUBST(UNIVERSAL_ARCHNAMES, "${universal_archnames}") AC_SUBST(UNIVERSAL_INTS, "${ints}") AC_DEFINE_UNQUOTED(RUBY_PLATFORM_OS, "${target_os}") - AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-"RUBY_PLATFORM_OS) - AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS) + AC_DEFINE_UNQUOTED(RUBY_ARCH, "universal-" RUBY_PLATFORM_OS) + AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "universal." RUBY_PLATFORM_CPU "-" RUBY_PLATFORM_OS) ], [ arch="${target_cpu}-${target_os}" AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/