summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 15:17:49 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commitf108bc32af99b0802614c680e43013d828a68d29 (patch)
tree3fee1d4712f9055da3baf83fddbccc052ce0d613 /include
parent0764d323d8908c1682f3ab654c48783438a88a54 (diff)
HAVE_* macros should not be defined with value 0
* See [Feature #17752]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'include')
-rw-r--r--include/ruby/backward/2/attributes.h4
-rw-r--r--include/ruby/ruby.h2
2 files changed, 1 insertions, 5 deletions
diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h
index eaff9e3381..0389f82190 100644
--- a/include/ruby/backward/2/attributes.h
+++ b/include/ruby/backward/2/attributes.h
@@ -90,16 +90,12 @@
#define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x
#if RBIMPL_HAS_ATTRIBUTE(error)
# define HAVE_ATTRIBUTE_ERRORFUNC 1
-#else
-# define HAVE_ATTRIBUTE_ERRORFUNC 0
#endif
#undef WARNINGFUNC
#define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x
#if RBIMPL_HAS_ATTRIBUTE(warning)
# define HAVE_ATTRIBUTE_WARNINGFUNC 1
-#else
-# define HAVE_ATTRIBUTE_WARNINGFUNC 0
#endif
/*
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index ce5f6c652d..341a716953 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -72,7 +72,7 @@ VALUE rb_get_path_no_checksafe(VALUE);
((argc) == 0 ? (vargc) <= 1 : /* [ruby-core:85266] [Bug #14425] */ \
(argc) == (vargc))
# if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-# if HAVE_ATTRIBUTE_ERRORFUNC
+# ifdef HAVE_ATTRIBUTE_ERRORFUNC
ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int));
# else
# define rb_varargs_bad_length(argc, vargc) \