diff options
author | Benoit Daloze <[email protected]> | 2021-04-29 15:12:44 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2021-05-04 14:56:55 +0200 |
commit | 0764d323d8908c1682f3ab654c48783438a88a54 (patch) | |
tree | e335e7f8f9c3a4d8a6c14bdce81af07102244ad7 /gc.c | |
parent | fa7a712d460dc904f8a836bb22b54d457d95ba8e (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |