From f6f1cfcbe7b15fa834de17ae014718b9e0bde3c7 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 2 Jan 2018 06:41:43 +0000 Subject: string literal longer than 509 characters is a C99ism Should avoid such thing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_assert.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ruby_assert.h') diff --git a/ruby_assert.h b/ruby_assert.h index 3383e4fc6c..185d2e5f5f 100644 --- a/ruby_assert.h +++ b/ruby_assert.h @@ -33,8 +33,14 @@ NORETURN(void rb_assert_failure(const char *, int, const char *, const char *)); #define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(!RUBY_NDEBUG+0, expr, #expr) #define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr) +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) +/* C89 compilers are required to support strings of only 509 chars. */ +/* can't use RUBY_ASSERT for such compilers. */ +#include +#else #undef assert #define assert RUBY_ASSERT +#endif #ifndef RUBY_NDEBUG # ifdef NDEBUG -- cgit v1.2.1