From: Sascha Schumann Date: Sun, 14 Nov 1999 23:03:45 +0000 (+0000) Subject: Check for db1/ndbm.h and use it in db. Fixes #2647 X-Git-Tag: PRE_USED_RETURN_VALUE_PATCH~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13582b4fe232a1dde0344c191974fb783f70d29c;p=php Check for db1/ndbm.h and use it in db. Fixes #2647 --- diff --git a/ext/db/config.m4 b/ext/db/config.m4 index a87dbef89d..319174dd51 100644 --- a/ext/db/config.m4 +++ b/ext/db/config.m4 @@ -4,6 +4,8 @@ dnl don't forget to call PHP_EXTENSION(db) divert(1) +AC_CHECK_HEADERS(db1/ndbm.h) + # Checks for libraries. # Prefer gdbm, Berkeley DB and ndbm/dbm, in that order AC_DEFUN(AC_PREFERRED_DB_LIB,[ diff --git a/ext/db/db.c b/ext/db/db.c index c246d6bf35..527e2c665b 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -79,8 +79,12 @@ #define DB_DBM_HSEARCH 1 #include #else +#ifdef HAVE_DB1_NDBM_H +#include +#else #include #endif +#endif #define DBM_TYPE DBM * #define DBM_MODE_TYPE int