wez             Sun Sep  4 00:51:25 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/mysql  config.m4 package.xml php_mysql.c 
  Log:
  Allow ext/mysql to build against PHP 4 again; update package.xml ready for
  release via PECL.
  
  
http://cvs.php.net/diff.php/php-src/ext/mysql/config.m4?r1=1.67&r2=1.67.2.1&ty=u
Index: php-src/ext/mysql/config.m4
diff -u php-src/ext/mysql/config.m4:1.67 php-src/ext/mysql/config.m4:1.67.2.1
--- php-src/ext/mysql/config.m4:1.67    Thu Jun 30 10:15:51 2005
+++ php-src/ext/mysql/config.m4 Sun Sep  4 00:51:23 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.67 2005/06/30 14:15:51 sniper Exp $
+dnl $Id: config.m4,v 1.67.2.1 2005/09/04 04:51:23 wez Exp $
 dnl
 
 AC_DEFUN([MYSQL_LIB_CHK], [
@@ -93,6 +93,11 @@
       ;;
   esac
 
+  dnl for compat with PHP 4 build system
+  if test -z "$PHP_LIBDIR"; then
+    PHP_LIBDIR=lib
+  fi
+
   for i in $PHP_LIBDIR $PHP_LIBDIR/mysql; do
     MYSQL_LIB_CHK($i)
   done
http://cvs.php.net/diff.php/php-src/ext/mysql/package.xml?r1=1.1&r2=1.1.4.1&ty=u
Index: php-src/ext/mysql/package.xml
diff -u php-src/ext/mysql/package.xml:1.1 php-src/ext/mysql/package.xml:1.1.4.1
--- php-src/ext/mysql/package.xml:1.1   Tue Mar 23 14:46:05 2004
+++ php-src/ext/mysql/package.xml       Sun Sep  4 00:51:23 2005
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "../pear/package.dtd">
 <package>
- <name>mysqli</name>
+ <name>mysql</name>
  <summary>MySQL database access functions</summary>
  <maintainers>
   <maintainer>
@@ -28,11 +28,12 @@
  </description>
  <license>PHP</license>
  <release>
-  <state>beta</state>
-  <version>5.0.0rc1</version>
-  <date>2004-03-19</date>
+  <state>stable</state>
+  <version>5.1</version>
+  <date>2005-09-04</date>
   <notes>
-package.xml added to support intallation using pear installer
+This is the MySQL driver, taken from the PHP 5.1 release.
+It can also be built against PHP 4.
   </notes>
   <configureoptions>
     <configureoption name="with-mysql" default="autodetect" prompt="mysql 
installation dir?"/>
@@ -54,7 +55,7 @@
    <file role="test" name="tests/skipif.inc"/>
   </filelist>
   <deps>
-   <dep type="php" rel="ge" version="5" />
+   <dep type="php" rel="ge" version="4" />
   </deps>
  </release>
 </package>
http://cvs.php.net/diff.php/php-src/ext/mysql/php_mysql.c?r1=1.213&r2=1.213.2.1&ty=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213 
php-src/ext/mysql/php_mysql.c:1.213.2.1
--- php-src/ext/mysql/php_mysql.c:1.213 Wed Aug  3 10:07:29 2005
+++ php-src/ext/mysql/php_mysql.c       Sun Sep  4 00:51:23 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
  
-/* $Id: php_mysql.c,v 1.213 2005/08/03 14:07:29 sniper Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.1 2005/09/04 04:51:23 wez Exp $ */
 
 /* TODO:
  *
@@ -33,7 +33,14 @@
 #include "php_globals.h"
 #include "ext/standard/info.h"
 #include "ext/standard/php_string.h"
-#include "zend_exceptions.h"
+
+#ifdef ZEND_ENGINE_2
+# include "zend_exceptions.h"
+#else
+  /* PHP 4 compat */
+# define OnUpdateLong  OnUpdateInt
+# define E_STRICT              E_NOTICE
+#endif
 
 #if HAVE_MYSQL
 
@@ -1904,6 +1911,7 @@
        zval            *res, *ctor_params = NULL;
        zend_class_entry *ce;
 
+#ifdef ZEND_ENGINE_2
        if (into_object) {
                char *class_name;
                int class_name_len;
@@ -1922,7 +1930,9 @@
                        return;
                }
                result_type = MYSQL_ASSOC;
-       } else {
+       } else
+#endif
+       {
                if (ZEND_NUM_ARGS() > expected_args) {
                        WRONG_PARAM_COUNT;
                }
@@ -1997,6 +2007,7 @@
                }
        }
 
+#ifdef ZEND_ENGINE_2
        if (into_object) {
                zval dataset = *return_value;
                zend_fcall_info fci;
@@ -2060,6 +2071,8 @@
                        zend_throw_exception_ex(zend_exception_get_default(), 0 
TSRMLS_CC, "Class %s does not have a constructor hence you cannot use 
ctor_params", ce->name);
                }
        }
+#endif
+
 }
 /* }}} */
 

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

Reply via email to