summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 15:12:44 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commit0764d323d8908c1682f3ab654c48783438a88a54 (patch)
treee335e7f8f9c3a4d8a6c14bdce81af07102244ad7 /gc.c
parentfa7a712d460dc904f8a836bb22b54d457d95ba8e (diff)
Fix -Wundef warnings for patterns `#if HAVE`
* See [Feature #17752] * Using this to detect them: git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 4eb5488463..9fdcbb4897 100644
--- a/gc.c
+++ b/gc.c
@@ -45,7 +45,7 @@
#ifdef HAVE_MALLOC_USABLE_SIZE
# ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
# include RUBY_ALTERNATIVE_MALLOC_HEADER
-# elif HAVE_MALLOC_H
+# elif defined(HAVE_MALLOC_H)
# include <malloc.h>
# elif defined(HAVE_MALLOC_NP_H)
# include <malloc_np.h>
@@ -381,7 +381,7 @@ static ruby_gc_params_t gc_params = {
#endif
#if RGENGC_DEBUG < 0 && !defined(_MSC_VER)
# define RGENGC_DEBUG_ENABLED(level) (-(RGENGC_DEBUG) >= (level) && ruby_rgengc_debug >= (level))
-#elif HAVE_VA_ARGS_MACRO
+#elif defined(HAVE_VA_ARGS_MACRO)
# define RGENGC_DEBUG_ENABLED(level) ((RGENGC_DEBUG) >= (level))
#else
# define RGENGC_DEBUG_ENABLED(level) 0