php4-beta | 199912
Date: 12/30/99
- Next message: Sascha Schumann: "[PHP4BETA] cvs: /php4/ext Makefile.in"
- Previous message: Sascha Schumann: "[PHP4BETA] cvs: /php4/build build2.mk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
sas Thu Dec 30 01:10:16 1999 EDT
Modified files:
/php4/ext/dba config.m4 dba_db2.c dba_db3.c dba_ndbm.c
Log:
Ease include file selection. Let's see which cpps support this construct.
Index: php4/ext/dba/config.m4
diff -u php4/ext/dba/config.m4:1.5 php4/ext/dba/config.m4:1.6
--- php4/ext/dba/config.m4:1.5 Wed Dec 29 23:51:59 1999
+++ php4/ext/dba/config.m4 Thu Dec 30 01:09:46 1999
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.5 1999/12/30 04:51:59 sas Exp $
+dnl $Id: config.m4,v 1.6 1999/12/30 06:09:46 sas Exp $
dnl config.m4 for extension dba
dnl don't forget to call PHP_EXTENSION(dba)
@@ -82,15 +82,15 @@
for i in /usr/local /usr $withval; do
if test -f "$i/include/db1/ndbm.h" ; then
THIS_PREFIX="$i"
- NDBM_EXTRA="NDBM_DB1_NDBM_H"
+ NDBM_EXTRA="db1/ndbm.h"
elif test -f "$i/include/ndbm.h" ; then
THIS_PREFIX="$i"
- NDBM_EXTRA="NDBM_NDBM_H"
+ NDBM_EXTRA="ndbm.h"
fi
done
if test "$NDBM_EXTRA" != ""; then
- eval "AC_DEFINE($NDBM_EXTRA, 1)"
+ AC_DEFINE_UNQUOTED(NDBM_INCLUDE_FILE, "$NDBM_EXTRA", [ ])
fi
for LIB in db1 ndbm c; do
@@ -116,26 +116,26 @@
DB2_EXTRA="db2"
elif test -f "$i/include/db2/db.h"; then
THIS_PREFIX="$i"
- DB2_EXTRA="DB2_DB2_DB_H"
+ DB2_EXTRA="db2/db.h"
elif test -f "$i/include/db/db2.h"; then
THIS_PREFIX="$i"
- DB2_EXTRA="DB2_DB_DB2_H"
+ DB2_EXTRA="db/db2.h"
elif test -f "$i/include/db2.h"; then
THIS_PREFIX="$i"
- DB2_EXTRA="DB2_DB2_H"
+ DB2_EXTRA="db2.h"
elif test -f "$i/include/db.h" ; then
THIS_PREFIX="$i"
- DB2_EXTRA="DB2_DB_H"
+ DB2_EXTRA="db.h"
fi
done
if test "$DB2_EXTRA" = "db2" ; then
DBA_INCLUDE="$DBA_INCLUDE -I$THIS_PREFIX/db2"
- DB2_EXTRA="DB2_DB_H"
+ DB2_EXTRA="db.h"
fi
if test -n "$DB2_EXTRA"; then
- eval "AC_DEFINE($DB2_EXTRA, 1)"
+ AC_DEFINE_UNQUOTED(DB2_INCLUDE_FILE, "$DB2_EXTRA", [ ])
fi
for LIB in db db2 c; do
@@ -158,12 +158,12 @@
for i in /usr/local /usr $withval; do
if test -f "$i/include/db.h" ; then
THIS_PREFIX="$i"
- DB3_EXTRA="DB3_DB_H"
+ DB3_EXTRA="db.h"
fi
done
if test -n "$DB3_EXTRA"; then
- eval "AC_DEFINE($DB3_EXTRA, 1)"
+ AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ])
fi
for LIB in db; do
Index: php4/ext/dba/dba_db2.c
diff -u php4/ext/dba/dba_db2.c:1.4 php4/ext/dba/dba_db2.c:1.5
--- php4/ext/dba/dba_db2.c:1.4 Sat Dec 4 14:15:46 1999
+++ php4/ext/dba/dba_db2.c Thu Dec 30 01:09:46 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db2.c,v 1.4 1999/12/04 19:15:46 sas Exp $ */
+/* $Id: dba_db2.c,v 1.5 1999/12/30 06:09:46 sas Exp $ */
#include "php.h"
@@ -36,14 +36,8 @@
#include <sys/stat.h>
#include <string.h>
-#if DB2_DB2_DB_H
-#include <db2/db.h>
-#elif DB2_DB_DB2_H
-#include <db/db2.h>
-#elif DB2_DB2_H
-#include <db2.h>
-#elif DB2_DB_H
-#include <db.h>
+#ifdef DB2_INCLUDE_FILE
+#include DB2_INCLUDE_FILE
#endif
#define DB2_DATA dba_db2_data *dba = info->dbf
Index: php4/ext/dba/dba_db3.c
diff -u php4/ext/dba/dba_db3.c:1.2 php4/ext/dba/dba_db3.c:1.3
--- php4/ext/dba/dba_db3.c:1.2 Sat Dec 4 14:15:46 1999
+++ php4/ext/dba/dba_db3.c Thu Dec 30 01:09:46 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db3.c,v 1.2 1999/12/04 19:15:46 sas Exp $ */
+/* $Id: dba_db3.c,v 1.3 1999/12/30 06:09:46 sas Exp $ */
#include "php.h"
@@ -36,14 +36,8 @@
#include <sys/stat.h>
#include <string.h>
-#if DB3_DB3_DB_H
-#include <db3/db.h>
-#elif DB3_DB_DB3_H
-#include <db/db3.h>
-#elif DB3_DB3_H
-#include <db3.h>
-#elif DB3_DB_H
-#include <db.h>
+#ifdef DB3_INCLUDE_FILE
+#include DB3_INCLUDE_FILE
#endif
#define DB3_DATA dba_db3_data *dba = info->dbf
Index: php4/ext/dba/dba_ndbm.c
diff -u php4/ext/dba/dba_ndbm.c:1.3 php4/ext/dba/dba_ndbm.c:1.4
--- php4/ext/dba/dba_ndbm.c:1.3 Sat Dec 4 14:15:46 1999
+++ php4/ext/dba/dba_ndbm.c Thu Dec 30 01:09:46 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_ndbm.c,v 1.3 1999/12/04 19:15:46 sas Exp $ */
+/* $Id: dba_ndbm.c,v 1.4 1999/12/30 06:09:46 sas Exp $ */
#include "php.h"
@@ -35,11 +35,8 @@
#include "php_ndbm.h"
#include <fcntl.h>
-
-#if NDBM_DB1_NDBM_H
-#include <db1/ndbm.h>
-#elif NDBM_NDBM_H
-#include <ndbm.h>
+#ifdef NDBM_INCLUDE_FILE
+#include NDBM_INCLUDE_FILE
#endif
#define NDBM_GKEY datum gkey; gkey.dptr = (char *) key; gkey.dsize = keylen
-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>
- Next message: Sascha Schumann: "[PHP4BETA] cvs: /php4/ext Makefile.in"
- Previous message: Sascha Schumann: "[PHP4BETA] cvs: /php4/build build2.mk"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

