diff options
author | Sascha Schumann <sas@php.net> | 1999-11-14 23:03:45 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-11-14 23:03:45 +0000 |
commit | 13582b4fe232a1dde0344c191974fb783f70d29c (patch) | |
tree | 6140adc139f01296cdb40f1f1b8b1fccda234949 /ext | |
parent | 25c56d15cd2621ad399d0e75519b137021564057 (diff) | |
download | php-git-13582b4fe232a1dde0344c191974fb783f70d29c.tar.gz |
Check for db1/ndbm.h and use it in db. Fixes #2647
Diffstat (limited to 'ext')
-rw-r--r-- | ext/db/config.m4 | 2 | ||||
-rw-r--r-- | ext/db/db.c | 4 |
2 files changed, 6 insertions, 0 deletions
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 <db.h> #else +#ifdef HAVE_DB1_NDBM_H +#include <db1/ndbm.h> +#else #include <ndbm.h> #endif +#endif #define DBM_TYPE DBM * #define DBM_MODE_TYPE int |