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

This fixes the build on Cygwin.
pull/700/head
Ebrahim Byagowi 7 years ago committed by GitHub
parent 90e3c9e69e
commit 5dbbd0fdb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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))

Loading…
Cancel
Save