From 5dbbd0fdb9a343554112a846b392803f11c13197 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 11 Jan 2018 12:33:22 +0330 Subject: [PATCH] Move the #define of _GNU_SOURCE to the top of hb-private.hh (#697) This fixes the build on Cygwin. --- src/hb-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index 9a1f2c514..9cad56855 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -29,6 +29,8 @@ #ifndef HB_PRIVATE_HH #define HB_PRIVATE_HH +#define _GNU_SOURCE 1 + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -87,8 +89,6 @@ extern "C" void hb_free_impl(void *ptr); #endif // __cplusplus < 201103L -#define _GNU_SOURCE 1 - #if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__) #define likely(expr) (__builtin_expect (!!(expr), 1)) #define unlikely(expr) (__builtin_expect (!!(expr), 0))