summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorArd Biesheuvel <abies@php.net>2004-02-06 15:11:17 +0000
committerArd Biesheuvel <abies@php.net>2004-02-06 15:11:17 +0000
commit9415013456c3022c39f1ac0f679acff28eab6051 (patch)
tree3760e69b706104aed38659a185976923483b8f60 /ext
parentb8e6cde6c6bf9b063106f031b64aaab5ac83eea6 (diff)
downloadphp-git-9415013456c3022c39f1ac0f679acff28eab6051.tar.gz
Fix build with Win32 Interbase 5.x
Diffstat (limited to 'ext')
-rw-r--r--ext/interbase/config.w328
-rw-r--r--ext/interbase/interbase.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/ext/interbase/config.w32 b/ext/interbase/config.w32
index 95f9069dff..9eab6a4599 100644
--- a/ext/interbase/config.w32
+++ b/ext/interbase/config.w32
@@ -2,15 +2,19 @@
// vim:ft=javascript
ARG_WITH("interbase", "InterBase support", "no");
+ARG_WITH("interbase5", "InterBase 5.x support", "no");
-if (PHP_INTERBASE != "no") {
+if (PHP_INTERBASE != "no" || PHP_INTERBASE5 != "no") {
if (CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_INTERBASE", PHP_PHP_BUILD + "\\interbase\\include;" + PHP_INTERBASE) &&
(CHECK_LIB("fbclient_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE) ||
CHECK_LIB("gds32_ms.lib", "interbase", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_INTERBASE))) {
EXTENSION("interbase", "interbase.c ibase_service.c ibase_events.c ibase_blobs.c");
AC_DEFINE('HAVE_IBASE', 1, 'Have interbase library');
- AC_DEFINE('HAVE_IBASE6_API', 1, 'Have interbase version 6 API library');
+
+ if (PHP_INTERBASE != "no") {
+ AC_DEFINE('HAVE_IBASE6_API', 1, 'Have interbase version 6 API library');
+ }
} else {
WARNING("interbase not enabled; libraries and headers not found");
}
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index d4e6b89b91..68a2cad68e 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -514,6 +514,7 @@ static void _php_ibase_free_event(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ *
}
/* }}} */
+#if HAVE_IBASE6_API
static void _php_ibase_free_service(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */
{
ibase_service *sv = (ibase_service *) rsrc->ptr;
@@ -534,6 +535,7 @@ static void _php_ibase_free_service(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{
efree(sv);
}
/* }}} */
+#endif
/* {{{ startup, shutdown and info functions */
PHP_INI_BEGIN()
@@ -569,7 +571,9 @@ PHP_MINIT_FUNCTION(ibase)
le_plink = zend_register_list_destructors_ex(php_ibase_commit_link_rsrc, _php_ibase_close_plink, "interbase link persistent", module_number);
le_trans = zend_register_list_destructors_ex(_php_ibase_free_trans, NULL, "interbase transaction", module_number);
le_event = zend_register_list_destructors_ex(_php_ibase_free_event, NULL, "interbase event", module_number);
+#if HAVE_IBASE6_API
le_service = zend_register_list_destructors_ex(_php_ibase_free_service, NULL, "interbase service manager handle", module_number);
+#endif
REGISTER_LONG_CONSTANT("IBASE_DEFAULT", PHP_IBASE_DEFAULT, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IBASE_TEXT", PHP_IBASE_FETCH_BLOBS, CONST_PERSISTENT); /* deprecated, for BC only */