Enable system extensions in hb.hh

Fixes https://github.com/harfbuzz/harfbuzz/issues/1491
This commit is contained in:
Behdad Esfahbod 2018-12-17 18:27:36 -05:00
parent 37c14bc745
commit 49334f9b50
2 changed files with 26 additions and 1 deletions

View File

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

View File

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