From 49334f9b509fc15e8baa93d49b86886ca933de04 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 17 Dec 2018 18:27:36 -0500 Subject: [PATCH] Enable system extensions in hb.hh Fixes https://github.com/harfbuzz/harfbuzz/issues/1491 --- configure.ac | 1 - src/hb.hh | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 064946438..4d7348eff 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,6 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.13.0 gnits tar-ustar dist-bzip2 no-dist-gzip -Wall no-define color-tests -Wno-portability]) AM_SILENT_RULES([yes]) AX_CODE_COVERAGE -AC_USE_SYSTEM_EXTENSIONS # Initialize libtool m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) diff --git a/src/hb.hh b/src/hb.hh index 77ef3f86b..a55e92d5d 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -33,6 +33,32 @@ #include "config.h" #endif +/* + * 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 _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #endif