]> granicus.if.org Git - php/commitdiff
Fix build with Win32 Interbase 5.x
authorArd Biesheuvel <abies@php.net>
Fri, 6 Feb 2004 15:11:17 +0000 (15:11 +0000)
committerArd Biesheuvel <abies@php.net>
Fri, 6 Feb 2004 15:11:17 +0000 (15:11 +0000)
ext/interbase/config.w32
ext/interbase/interbase.c

index 95f9069dff479c3d1bcc706940ea2dd93dee18ec..9eab6a4599d635beb5cef9e11621e9e16ec5e624 100644 (file)
@@ -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");
        }
index d4e6b89b91ec641241f61f3e538ac07c5e197d0c..68a2cad68e5a879c49998eb2ed96063c201c5633 100644 (file)
@@ -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 */