abies           Fri Feb  6 10:11:18 2004 EDT

  Modified files:              
    /php-src/ext/interbase      config.w32 interbase.c 
  Log:
  Fix build with Win32 Interbase 5.x
  
http://cvs.php.net/diff.php/php-src/ext/interbase/config.w32?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/interbase/config.w32
diff -u php-src/ext/interbase/config.w32:1.4 php-src/ext/interbase/config.w32:1.5
--- php-src/ext/interbase/config.w32:1.4        Sun Feb  1 12:42:26 2004
+++ php-src/ext/interbase/config.w32    Fri Feb  6 10:11:17 2004
@@ -1,16 +1,20 @@
-// $Id: config.w32,v 1.4 2004/02/01 17:42:26 abies Exp $
+// $Id: config.w32,v 1.5 2004/02/06 15:11:17 abies Exp $
 // 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");
        }
http://cvs.php.net/diff.php/php-src/ext/interbase/interbase.c?r1=1.198&r2=1.199&ty=u
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.198 php-src/ext/interbase/interbase.c:1.199
--- php-src/ext/interbase/interbase.c:1.198     Mon Feb  2 09:57:20 2004
+++ php-src/ext/interbase/interbase.c   Fri Feb  6 10:11:17 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: interbase.c,v 1.198 2004/02/02 14:57:20 abies Exp $ */
+/* $Id: interbase.c,v 1.199 2004/02/06 15:11:17 abies Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -26,7 +26,7 @@
 
 #include "php.h"
 
-#define FILE_REVISION "$Revision: 1.198 $"
+#define FILE_REVISION "$Revision: 1.199 $"
 
 #if HAVE_IBASE
 
@@ -514,6 +514,7 @@
 }
 /* }}} */
 
+#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 @@
        efree(sv);
 }
 /* }}} */
+#endif
 
 /* {{{ startup, shutdown and info functions */
 PHP_INI_BEGIN()
@@ -569,7 +571,9 @@
        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 */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to