#ifndef HB_NO_PRAGMA_GCC_DIAGNOSTIC #ifdef _MSC_VER #pragma warning( disable: 4068 ) /* Unknown pragma */ #endif #ifdefined(__GNUC__) || defined(__clang__) /* Rules: * * - All pragmas are declared GCC even if they are clang ones. Otherwise GCC * nags, even though we instruct it to ignore -Wunknown-pragmas. ¯\_(ツ)_/¯ * * - Within each category, keep sorted. * * - Warnings whose scope can be expanded in future compiler versions shall * be declared as "warning". Otherwise, either ignored or error.
*/
/* * Following added based on what AC_USE_SYSTEM_EXTENSIONS adds to * config.h.in. Copied here for the convenience of those embedding * HarfBuzz and not using our build system.
*/ /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif
#ifndef HB_INTERNAL # if !defined(HB_NO_VISIBILITY) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(_MSC_VER) && !defined(__SUNPRO_CC) # define HB_INTERNAL __attribute__((__visibility__("hidden"))) # elif defined(__MINGW32__) /* We use -export-symbols on mingw32, since it does not support visibility attributes. */ # define HB_INTERNAL # elif defined (_MSC_VER) && defined (HB_DLL_EXPORT) /* We do not try to export internal symbols on Visual Studio */ # define HB_INTERNAL #else # define HB_INTERNAL # define HB_NO_VISIBILITY 1 # endif #endif
/* * Borrowed from https://bugzilla.mozilla.org/show_bug.cgi?id=1215411 * HB_FALLTHROUGH is an annotation to suppress compiler warnings about switch * cases that fall through without a break or return statement. HB_FALLTHROUGH * is only needed on cases that have code: * * switch (foo) { * case 1: // These cases have no code. No fallthrough annotations are needed. * case 2: * case 3: * foo = 4; // This case has code, so a fallthrough annotation is needed: * HB_FALLTHROUGH; * default: * return foo; * }
*/ #ifdefined(__clang__) && __cplusplus >= 201103L /* clang's fallthrough annotations are only available starting in C++11. */ # define HB_FALLTHROUGH [[clang::fallthrough]] #elifdefined(__GNUC__) && (__GNUC__ >= 7) /* GNU fallthrough attribute is available from GCC7 */ # define HB_FALLTHROUGH __attribute__((fallthrough)) #elifdefined(_MSC_VER) /* * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis): * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
*/ # include <sal.h> # define HB_FALLTHROUGH __fallthrough #else # define HB_FALLTHROUGH /* FALLTHROUGH */ #endif
/* A tag to enforce use of return value for a function */ #if __cplusplus >= 201703L # define HB_NODISCARD [[nodiscard]] #elifdefined(__GNUC__) || defined(__clang__) # define HB_NODISCARD __attribute__((warn_unused_result)) #elifdefined(_MSC_VER) # define HB_NODISCARD _Check_return_ #else # define HB_NODISCARD #endif
#ifdef _WIN32 /* We need Windows Vista for both Uniscribe backend and for * MemoryBarrier. We don't support compiling on Windows XP,
* though we run on it fine. */ # ifdefined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600 # undef _WIN32_WINNT # endif # ifndef _WIN32_WINNT # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define _WIN32_WINNT 0x0600 # endif # endif # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN 1 # endif # ifndef STRICT # define STRICT 1 # endif
# ifdefined(_WIN32_WCE) /* Some things not defined on Windows CE. */ # define vsnprintf _vsnprintf # ifndef HB_NO_GETENV # define HB_NO_GETENV # endif # if _WIN32_WCE < 0x800 # define HB_NO_SETLOCALE # define HB_NO_ERRNO # endif # elif !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # ifndef HB_NO_GETENV # define HB_NO_GETENV # endif # endif # ifdefined(_MSC_VER) && _MSC_VER < 1900 # define snprintf _snprintf # endif #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.