Move the #define of _GNU_SOURCE to the top of hb-private.hh (#697)

This fixes the build on Cygwin.
This commit is contained in:
Ebrahim Byagowi 2018-01-11 12:33:22 +03:30 committed by GitHub
parent 90e3c9e69e
commit 5dbbd0fdb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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))