PSI_CHECK_NDBM() {
- PSI_CONFIG_POSIX(ndbm, ndbm.h)
-
+ PSI_CONFIG_POSIX(ndbm, ndbm.h gdbm-ndbm.h)
+
PHP_CHECK_FUNC_LIB(dbm_open, gdbm_compat)
-
+
PSI_STRUCT(datum, [
void *dptr,
int dsize]
)
-
+
PSI_OPAQUE_TYPE(DBM)
-
+
PSI_CONST(DBM_INSERT, int)
PSI_CONST(DBM_REPLACE, int)
-
+
PSI_DECL(void dbm_clearerr, [(DBM *db)])
PSI_DECL(void dbm_close, [(DBM *db)])
PSI_DECL(int dbm_delete, [(DBM *db, datum key)])
AS_TR_SH([psi_config_posix_]$1)=false
case "$PHP_PSI_POSIX" in
yes|all)
- AS_TR_SH([psi_config_posix_]$1)=true
+ AS_TR_SH([psi_config_posix_]$1)=true
;;
*)
if expr "$PHP_PSI_POSIX" : '\b$1\b' >/dev/null; then
dnl PSI_INCLUDES()
dnl Expands to a complete list of include statements including
dnl AC_INCLUDES_DEFAULT().
-AC_DEFUN(PSI_INCLUDES, [AC_INCLUDES_DEFAULT()
+AC_DEFUN(PSI_INCLUDES, [#define PSI_INCLUDES
+#define _GNU_SOURCE 1
+#define _POSIX_C_SOURCE 200809L
+#define _XOPEN_SOURCE 700
+AC_INCLUDES_DEFAULT()
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
#endif
#ifdef HAVE_NDBM_H
# include <ndbm.h>
+#elif HAVE_GDBM_NDBM_H
+# include <gdbm-ndbm.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
# Add a function redirection to $PSI_REDIRS.
psi_add_redir() {
cat >>$PSI_REDIRS <<EOF
- {"$1", (psi_func_ptr) $2},
+ {"$1", (psi_func_ptr) $2},
EOF
}
;;
*vararg*)
cat >>$PSI_VA_DECLS <<EOF
- $1, {0},
+ $1, {0},
EOF
;;
*)
cat >>$PSI_DECLS <<EOF
- $1, {0},
+ $1, {0},
EOF
;;
esac
dnl PSI_DECL(type func, args, flags)
dnl Check for a function or macro declaration and a possible asm redirection.
dnl Adds a pre-defined (vararg) decl to $PSI_VA_DECLS/$PSI_DECLS.
-dnl Calls PSI_MACRO if PSI_FUNC fails.
+dnl Calls PSI_MACRO if PSI_FUNC fails.
AC_DEFUN(PSI_DECL, [
AC_REQUIRE([PSI_FUNC_LIBC_MAIN])
PSI_DECL_ARGS($1, $2)
-
+
psi_symbol="PSI_VAR_NAME($1)"
AC_CACHE_CHECK(for PSI_VAR_NAME($1), [psi_cv_fn_]PSI_VAR_NAME($1), [
psi_symbol_redirect=
;;
"")
ifelse([$3], vararg, [
- AC_MSG_ERROR(varargs macro support is not implemented)
+ AC_MSG_WARN(varargs macro support is not implemented)
],[
PSI_MACRO($1, $2, [
psi_add_decl "$psi_decl_args"