From 5e240548ba570610ce0dbc248a2b7654a0e080fa Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 25 Oct 2016 14:45:10 +0200 Subject: [PATCH] flush --- config.m4 | 16 +++++++++++++++- m4/psi/psi.m4 | 2 +- psi.d/getopt.psi | 5 +++-- tests/getopt/getopt001.phpt | 2 ++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/config.m4 b/config.m4 index 2c7af0b..98c0648 100644 --- a/config.m4 +++ b/config.m4 @@ -48,7 +48,7 @@ PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support, if test "$PHP_PSI" != no; then PHP_CONFIGURE_PART(Configuring PSI) - + PHP_ARG_ENABLE(psi-posix, whether to pre-define POSIX decls, [ --enable-psi-posix=... PSI: pre-define POSIX decls], [ ], [ ]) @@ -60,6 +60,20 @@ if test "$PHP_PSI" != no; then AC_HEADER_ASSERT dnl # adds --disable-assert to define NDEBUG + dnl we cannot use AC_USE_SYSTEM_EXTENSIONS here, because we're way too late + dnl in the game, and we're currently only targeting _GNU_SOURCE for now + AC_MSG_CHECKING([for _GNU_SOURCE]) + AC_EGREP_CPP([gnu_source_defined], [ + #ifndef _GNU_SOURCE + gnu_source_not_defined + #endif + ], [ + AC_MSG_RESULT([needs define]) + AC_DEFINE([_GNU_SOURCE], [], [ ]) + ], [ + AC_MSG_RESULT([already defined]) + ]) + psi_save_LIBS=$LIBS LIBS= diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index b0bbbf3..ff112d7 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -15,7 +15,7 @@ dnl PSI_CONFIG_INIT() dnl Creates stubs of the headers with pre-defined types etc. dnl These headers are included by src/context.c. dnl This macro must be called prior any checks for a type, struct, decl etc. -AC_DEFUN(PSI_CONFIG_INIT, [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])dnl +AC_DEFUN(PSI_CONFIG_INIT, [ for i in $PSI_STDTYPES $PSI_TYPES $PSI_STRUCTS $PSI_UNIONS $PSI_CONSTS $PSI_REDIRS $PSI_MACROS $PSI_DECLS $PSI_VA_DECLS $PSI_FN_DECLS; do cat >$i <