Skip to content

Commit

Permalink
Move the #define of _GNU_SOURCE to the top of hb-private.hh (#697)
Browse files Browse the repository at this point in the history
This fixes the build on Cygwin.
  • Loading branch information
ebraminio committed Jan 11, 2018
1 parent 90e3c9e commit 5dbbd0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hb-private.hh
Expand Up @@ -29,6 +29,8 @@
#ifndef HB_PRIVATE_HH
#define HB_PRIVATE_HH

#define _GNU_SOURCE 1

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
Expand Down Expand Up @@ -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))
Expand Down

1 comment on commit 5dbbd0f

@ebraminio
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch is provided by @kbrow1i on #693 but GitHub PR squashing removed the detail.

Please sign in to comment.