aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dir.c6
-rw-r--r--ext/bigdecimal/missing.h2
-rw-r--r--ext/psych/yaml/yaml_private.h2
-rw-r--r--gc.c4
-rw-r--r--random.c2
-rw-r--r--signal.c2
-rw-r--r--siphash.c4
-rw-r--r--strftime.c2
-rw-r--r--thread_pthread.c4
9 files changed, 14 insertions, 14 deletions
diff --git a/dir.c b/dir.c
index fb31bd4f22..b122b2cb90 100644
--- a/dir.c
+++ b/dir.c
@@ -50,13 +50,13 @@
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# define HAVE_DIRENT_NAMLEN 1
-# if HAVE_SYS_NDIR_H
+# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
-# if HAVE_SYS_DIR_H
+# ifdef HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
-# if HAVE_NDIR_H
+# ifdef HAVE_NDIR_H
# include <ndir.h>
# endif
# ifdef _WIN32
diff --git a/ext/bigdecimal/missing.h b/ext/bigdecimal/missing.h
index 11b58c099d..7969849158 100644
--- a/ext/bigdecimal/missing.h
+++ b/ext/bigdecimal/missing.h
@@ -45,7 +45,7 @@ extern "C" {
# if __has_builtin(__builtin_unreachable)
# define UNREACHABLE __builtin_unreachable()
-# elif HAVE___ASSUME
+# elif defined(HAVE___ASSUME)
# define UNREACHABLE __assume(0)
# else
diff --git a/ext/psych/yaml/yaml_private.h b/ext/psych/yaml/yaml_private.h
index 6c674de147..266a6bd3a7 100644
--- a/ext/psych/yaml/yaml_private.h
+++ b/ext/psych/yaml/yaml_private.h
@@ -2,7 +2,7 @@
#include RUBY_EXTCONF_H
#endif
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
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
diff --git a/random.c b/random.c
index eec017cfd5..2c9fe0c906 100644
--- a/random.c
+++ b/random.c
@@ -428,7 +428,7 @@ random_init(int argc, VALUE *argv, VALUE obj)
# define USE_DEV_URANDOM 0
#endif
-#if HAVE_GETENTROPY
+#ifdef HAVE_GETENTROPY
# define MAX_SEED_LEN_PER_READ 256
static int
fill_random_bytes_urandom(void *seed, size_t size)
diff --git a/signal.c b/signal.c
index 2ebd1196fa..46ac6c26cc 100644
--- a/signal.c
+++ b/signal.c
@@ -29,7 +29,7 @@
# include <ucontext.h>
#endif
-#if HAVE_PTHREAD_H
+#ifdef HAVE_PTHREAD_H
# include <pthread.h>
#endif
diff --git a/siphash.c b/siphash.c
index ddf8ee245d..2c48fa8496 100644
--- a/siphash.c
+++ b/siphash.c
@@ -180,7 +180,7 @@ int_sip_dump(sip_state *state)
int v;
for (v = 0; v < 4; v++) {
-#if HAVE_UINT64_T
+#ifdef HAVE_UINT64_T
printf("v%d: %" PRIx64 "\n", v, state->v[v]);
#else
printf("v%d: %" PRIx32 "%.8" PRIx32 "\n", v, state->v[v].hi, state->v[v].lo);
@@ -447,7 +447,7 @@ sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len)
OR_BYTE(4);
case 4:
#if BYTE_ORDER == LITTLE_ENDIAN && UNALIGNED_WORD_ACCESS
- #if HAVE_UINT64_T
+ #ifdef HAVE_UINT64_T
last |= (uint64_t) ((uint32_t *) end)[0];
#else
last.lo |= ((uint32_t *) end)[0];
diff --git a/strftime.c b/strftime.c
index d963038d94..17cfed1dda 100644
--- a/strftime.c
+++ b/strftime.c
@@ -59,7 +59,7 @@
#endif
#if defined(TM_IN_SYS_TIME) || !defined(GAWK)
#include <sys/types.h>
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#endif
diff --git a/thread_pthread.c b/thread_pthread.c
index 8149ee57f5..3e0c78b256 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -20,9 +20,9 @@
#ifdef HAVE_THR_STKSEGMENT
#include <thread.h>
#endif
-#if HAVE_FCNTL_H
+#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
-#elif HAVE_SYS_FCNTL_H
+#elif defined(HAVE_SYS_FCNTL_H)
#include <sys/fcntl.h>
#endif
#ifdef HAVE_SYS_PRCTL_H