diff --git a/src/include/compat/endian.h b/src/include/compat/endian.h index 96b41d57..c0e988e2 100644 --- a/src/include/compat/endian.h +++ b/src/include/compat/endian.h @@ -20,10 +20,10 @@ #define ENDIAN_H_COMPAT_SHIM #pragma once -#if defined(HAVE_ENDIAN_H) +#if __has_include_next() # pragma GCC system_header // Silence "warning: #include_next is a GCC extension" # include_next -#elif defined(HAVE_SYS_ENDIAN_H) +#elif __has_include() # include # if !defined(be16toh) # define be16toh(x) betoh16(x) diff --git a/src/include/compat/getopt.h b/src/include/compat/getopt.h index ed2a87d6..be34d7ab 100644 --- a/src/include/compat/getopt.h +++ b/src/include/compat/getopt.h @@ -21,7 +21,7 @@ #ifndef GETOPT_H_COMPAT_SHIM #define GETOPT_H_COMPAT_SHIM -#if defined(HAVE_GETOPT_H) +#if __has_include_next() #pragma GCC system_header // Silence "warning: #include_next is a GCC extension" #include_next #else diff --git a/src/include/compat/stdint.h b/src/include/compat/stdint.h index 34c176e2..d3a25c6e 100644 --- a/src/include/compat/stdint.h +++ b/src/include/compat/stdint.h @@ -45,7 +45,7 @@ #pragma GCC system_header // Silence "warning: #include_next is a GCC extension" -#if defined(HAVE_STDINT_H) || !defined(HAVE_INTTYPES_H) +#if __has_include() || !__has_include() #include_next #else #include_next diff --git a/src/include/compat/unistd.h b/src/include/compat/unistd.h index f5499f89..bd73997a 100644 --- a/src/include/compat/unistd.h +++ b/src/include/compat/unistd.h @@ -19,7 +19,7 @@ #ifndef UNISTD_H_COMPAT_SHIM #define UNISTD_H_COMPAT_SHIM -#if defined(HAVE_UNISTD_H) +#if __has_include_next() #pragma GCC system_header // Silence "warning: #include_next is a GCC extension" #include_next #endif diff --git a/src/libespeak-ng/readclause.c b/src/libespeak-ng/readclause.c index d287e028..dedf6c8b 100644 --- a/src/libespeak-ng/readclause.c +++ b/src/libespeak-ng/readclause.c @@ -38,7 +38,6 @@ #include "readclause.h" #include "common.h" // for GetFileLength, strncpy0 -#include "config.h" // for HAVE_MKSTEMP #include "dictionary.h" // for LookupDictList, DecodePhonemes, Set... #include "error.h" // for create_file_error_context #include "phoneme.h" // for phonSWITCH diff --git a/src/libespeak-ng/speech.h b/src/libespeak-ng/speech.h index 4d2f3684..ce039e89 100644 --- a/src/libespeak-ng/speech.h +++ b/src/libespeak-ng/speech.h @@ -31,7 +31,7 @@ #endif #ifndef MAKE_MEM_UNDEFINED -# ifdef HAVE_VALGRIND_MEMCHECK_H +# if __has_include() # include # define MAKE_MEM_UNDEFINED(addr, len) VALGRIND_MAKE_MEM_UNDEFINED(addr, len) # else