mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-12 16:58:52 +00:00
code cleanup: header detection with has_include
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
#define ENDIAN_H_COMPAT_SHIM
|
||||
#pragma once
|
||||
|
||||
#if defined(HAVE_ENDIAN_H)
|
||||
#if __has_include_next(<endian.h>)
|
||||
# pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
|
||||
# include_next <endian.h>
|
||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
#elif __has_include(<sys/endian.h>)
|
||||
# include <sys/endian.h>
|
||||
# if !defined(be16toh)
|
||||
# define be16toh(x) betoh16(x)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#ifndef GETOPT_H_COMPAT_SHIM
|
||||
#define GETOPT_H_COMPAT_SHIM
|
||||
|
||||
#if defined(HAVE_GETOPT_H)
|
||||
#if __has_include_next(<getopt.h>)
|
||||
#pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
|
||||
#include_next <getopt.h>
|
||||
#else
|
||||
|
||||
@@ -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(<stdint.h>) || !__has_include(<inttypes.h>)
|
||||
#include_next <stdint.h>
|
||||
#else
|
||||
#include_next <inttypes.h>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef UNISTD_H_COMPAT_SHIM
|
||||
#define UNISTD_H_COMPAT_SHIM
|
||||
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
#if __has_include_next(<unistd.h>)
|
||||
#pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
|
||||
#include_next <unistd.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user