[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2008-10-04 Thread changelog
changelog   Sun Oct  5 01:32:04 2008 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3188r2=1.3189diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.3188 php-src/ChangeLog:1.3189
--- php-src/ChangeLog:1.3188Sat Oct  4 01:32:37 2008
+++ php-src/ChangeLog   Sun Oct  5 01:32:03 2008
@@ -1,3 +1,42 @@
+2008-10-04  Felipe Pena  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/mssql/config.m4
+  ext/pdo_dblib/config.m4:
+  MFH:
+  - Fixed bug #44991 (Compile Failure With freetds0.82)
+patch by:
+- jklowden at freetds dot org (ext/mssql)
+- matthias at dsx dot at (ext/pdo_dblib)
+
+* (PHP_5_2)
+  ext/standard/var_unserializer.c
+  ext/standard/var_unserializer.re:
+  - Fixed compiler warning
+
+* (PHP_5_3)
+  ext/mssql/config.m4:
+  - MFH: Fixed bug #44991 (Compile Failure With freetds0.82) (patch by
+  jklowden at freetds dot org)
+
+* ext/mssql/config.m4:
+  - Fixed bug #44991 (Compile Failure With freetds0.82) (patch by jklowden 
at
+  freetds dot org)
+
+* (PHP_5_3)
+  ext/pdo_dblib/config.m4:
+  - MFH: Fixed bug #44991 (Compile Failure With freetds0.82) (patch by
+  matthias at dsx dot at)
+
+* ext/pdo_dblib/config.m4:
+  - Fixed bug #44991 (Compile Failure With freetds0.82) (patch by matthias 
at
+  dsx dot at)
+  - MFB: Fix #35032; pdo_dblib doesn't find includes on some systems
+
+* ext/pdo_dblib/dblib_driver.c:
+  - Fix build
+
 2008-10-03  Felipe Pena  [EMAIL PROTECTED]
 
 * (PHP_5_3)
@@ -7027,7 +7066,7 @@
 
 * sapi/litespeed/lsapi_main.c
   sapi/litespeed/lsapilib.c:
-  - Added missing $Id: ChangeLog,v 1.3188 2008/10/04 01:32:37 changelog 
Exp $ tags and nuked c++ comments
+  - Added missing $Id: ChangeLog,v 1.3189 2008/10/05 01:32:03 changelog 
Exp $ tags and nuked c++ comments
 
 * (PHP_5_3)
   ext/intl/locale/locale.c




[PHP-CVS] cvs: php-src /ext/pdo_dblib dblib_driver.c

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 12:44:58 2008 UTC

  Modified files:  
/php-src/ext/pdo_dblib  dblib_driver.c 
  Log:
  - Fix build
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_driver.c?r1=1.15r2=1.16diff_format=u
Index: php-src/ext/pdo_dblib/dblib_driver.c
diff -u php-src/ext/pdo_dblib/dblib_driver.c:1.15 
php-src/ext/pdo_dblib/dblib_driver.c:1.16
--- php-src/ext/pdo_dblib/dblib_driver.c:1.15   Mon Dec 31 07:12:13 2007
+++ php-src/ext/pdo_dblib/dblib_driver.cSat Oct  4 12:44:58 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: dblib_driver.c,v 1.15 2007/12/31 07:12:13 sebastian Exp $ */
+/* $Id: dblib_driver.c,v 1.16 2008/10/04 12:44:58 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -249,7 +249,7 @@
dbh-driver_data = H;
 
if (!ret) {
-   zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 
TSRMLS_CC,
+   zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC,
SQLSTATE[%s] %s (severity %d),
DBLIB_G(err).sqlstate,
DBLIB_G(err).dberrstr,



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



[PHP-CVS] cvs: php-src /ext/pdo_dblib config.m4

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 12:51:51 2008 UTC

  Modified files:  
/php-src/ext/pdo_dblib  config.m4 
  Log:
  - Fixed bug #44991 (Compile Failure With freetds0.82) (patch by matthias at 
dsx dot at)
  - MFB: Fix #35032; pdo_dblib doesn't find includes on some systems
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/config.m4?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/pdo_dblib/config.m4
diff -u php-src/ext/pdo_dblib/config.m4:1.6 php-src/ext/pdo_dblib/config.m4:1.7
--- php-src/ext/pdo_dblib/config.m4:1.6 Fri Jul 25 13:38:40 2008
+++ php-src/ext/pdo_dblib/config.m4 Sat Oct  4 12:51:51 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.6 2008/07/25 13:38:40 jani Exp $
+dnl $Id: config.m4,v 1.7 2008/10/04 12:51:51 felipe Exp $
 dnl
 
 PHP_ARG_WITH(pdo-dblib, for PDO_DBLIB support via FreeTDS,
@@ -11,13 +11,17 @@
 AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure 
line.])
   fi
 
-  PDO_FREETDS_INSTALLATION_DIR=
   if test $PHP_PDO_DBLIB = yes; then
 
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 PDO_FREETDS_INSTALLATION_DIR=$i
+PDO_FREETDS_INCLUDE_DIR=$i/include
 break
+  elif test -f $i/include/freetds/sybdb.h; then
+PDO_FREETDS_INSTALLATION_DIR=$i
+PDO_FREETDS_INCLUDE_DIR=$i/include/freetds
+break;
   fi
 done
 
@@ -27,8 +31,12 @@
 
   elif test $PHP_PDO_DBLIB != no; then
 
-if test -f $PHP_PDO_DBLIB/include/tds.h; then
+if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
+  PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
+  PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
+elif test -f $PHP_PDO_DBLIB/include/freetds/sybdb.h; then
   PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
+  PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
 else
   AC_MSG_ERROR(Directory $PHP_PDO_DBLIB is not a FreeTDS installation 
directory)
 fi
@@ -38,15 +46,13 @@
 PHP_LIBDIR=lib
   fi
 
-  if test ! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! 
-r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a  test 
! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then
+ AC_MSG_ERROR(Could not find 
$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
   fi
 
-  PDO_DBLIB_INCDIR=$PDO_FREETDS_INSTALLATION_DIR/include
-  PDO_DBLIB_LIBDIR=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR
+  PHP_ADD_INCLUDE($PDO_FREETDS_INCLUDE_DIR)
+  PHP_ADD_LIBRARY_WITH_PATH(sybdb, $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR, 
PDO_DBLIB_SHARED_LIBADD)
 
-  PHP_ADD_INCLUDE($PDO_DBLIB_INCDIR)
-  PHP_ADD_LIBRARY_WITH_PATH(sybdb, $PDO_DBLIB_LIBDIR, PDO_DBLIB_SHARED_LIBADD)
   ifdef([PHP_CHECK_PDO_INCLUDES],
   [
 PHP_CHECK_PDO_INCLUDES



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo_dblib config.m4

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 12:52:58 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pdo_dblib  config.m4 
  Log:
  - MFH: Fixed bug #44991 (Compile Failure With freetds0.82) (patch by matthias 
at dsx dot at)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/config.m4?r1=1.2.2.2.2.1.2.1r2=1.2.2.2.2.1.2.2diff_format=u
Index: php-src/ext/pdo_dblib/config.m4
diff -u php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.1.2.1 
php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.1.2.2
--- php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.1.2.1 Fri Jul 25 13:46:23 2008
+++ php-src/ext/pdo_dblib/config.m4 Sat Oct  4 12:52:58 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.2.2.2.2.1.2.1 2008/07/25 13:46:23 jani Exp $
+dnl $Id: config.m4,v 1.2.2.2.2.1.2.2 2008/10/04 12:52:58 felipe Exp $
 dnl
 
 PHP_ARG_WITH(pdo-dblib, for PDO_DBLIB support via FreeTDS,
@@ -14,11 +14,11 @@
   if test $PHP_PDO_DBLIB = yes; then
 
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 PDO_FREETDS_INSTALLATION_DIR=$i
 PDO_FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/tds.h; then
+  elif test -f $i/include/freetds/sybdb.h; then
 PDO_FREETDS_INSTALLATION_DIR=$i
 PDO_FREETDS_INCLUDE_DIR=$i/include/freetds
 break;
@@ -31,10 +31,10 @@
 
   elif test $PHP_PDO_DBLIB != no; then
 
-if test -f $PHP_PDO_DBLIB/include/tds.h; then
+if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
   PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
   PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
-elif test -f $PHP_PDO_DBLIB/include/freetds/tds.h; then
+elif test -f $PHP_PDO_DBLIB/include/freetds/sybdb.h; then
   PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
   PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
 else
@@ -46,8 +46,8 @@
 PHP_LIBDIR=lib
   fi
 
-  if test ! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! 
-r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a  test 
! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then
+ AC_MSG_ERROR(Could not find 
$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
   fi
 
   PHP_ADD_INCLUDE($PDO_FREETDS_INCLUDE_DIR)



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



[PHP-CVS] cvs: php-src /ext/mssql config.m4

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 12:54:32 2008 UTC

  Modified files:  
/php-src/ext/mssql  config.m4 
  Log:
  - Fixed bug #44991 (Compile Failure With freetds0.82) (patch by jklowden at 
freetds dot org)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/config.m4?r1=1.13r2=1.14diff_format=u
Index: php-src/ext/mssql/config.m4
diff -u php-src/ext/mssql/config.m4:1.13 php-src/ext/mssql/config.m4:1.14
--- php-src/ext/mssql/config.m4:1.13Tue Jul  3 17:24:36 2007
+++ php-src/ext/mssql/config.m4 Sat Oct  4 12:54:32 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.13 2007/07/03 17:24:36 sniper Exp $
+dnl $Id: config.m4,v 1.14 2008/10/04 12:54:32 felipe Exp $
 dnl
 
 PHP_ARG_WITH(mssql,for MSSQL support via FreeTDS,
@@ -10,11 +10,11 @@
 
   if test $PHP_MSSQL = yes; then
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/tds.h; then
+  elif test -f $i/include/freetds/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include/freetds
 break
@@ -27,10 +27,10 @@
 
   elif test $PHP_MSSQL != no; then
 
-if test -f $PHP_MSSQL/include/tds.h; then
+if test -f $PHP_MSSQL/include/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include
-elif test -f $PHP_MSSQL/include/freetds/tds.h; then
+elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds
 else
@@ -38,8 +38,8 @@
 fi
   fi  
 
-  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then
+ AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
   fi
 
   PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mssql config.m4

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 12:55:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mssql  config.m4 
  Log:
  - MFH: Fixed bug #44991 (Compile Failure With freetds0.82) (patch by jklowden 
at freetds dot org)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/config.m4?r1=1.9.2.2.2.1r2=1.9.2.2.2.1.2.1diff_format=u
Index: php-src/ext/mssql/config.m4
diff -u php-src/ext/mssql/config.m4:1.9.2.2.2.1 
php-src/ext/mssql/config.m4:1.9.2.2.2.1.2.1
--- php-src/ext/mssql/config.m4:1.9.2.2.2.1 Tue Jul  3 17:25:34 2007
+++ php-src/ext/mssql/config.m4 Sat Oct  4 12:55:21 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.9.2.2.2.1 2007/07/03 17:25:34 sniper Exp $
+dnl $Id: config.m4,v 1.9.2.2.2.1.2.1 2008/10/04 12:55:21 felipe Exp $
 dnl
 
 PHP_ARG_WITH(mssql,for MSSQL support via FreeTDS,
@@ -10,11 +10,11 @@
 
   if test $PHP_MSSQL = yes; then
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/tds.h; then
+  elif test -f $i/include/freetds/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include/freetds
 break
@@ -27,10 +27,10 @@
 
   elif test $PHP_MSSQL != no; then
 
-if test -f $PHP_MSSQL/include/tds.h; then
+if test -f $PHP_MSSQL/include/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include
-elif test -f $PHP_MSSQL/include/freetds/tds.h; then
+elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds
 else
@@ -38,8 +38,8 @@
 fi
   fi  
 
-  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then
+ AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
   fi
 
   PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard var_unserializer.c var_unserializer.re

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 13:11:36 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   var_unserializer.c var_unserializer.re 
  Log:
  - Fixed compiler warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.c?r1=1.70.2.4.2.9r2=1.70.2.4.2.10diff_format=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.70.2.4.2.9 
php-src/ext/standard/var_unserializer.c:1.70.2.4.2.10
--- php-src/ext/standard/var_unserializer.c:1.70.2.4.2.9Wed Jul 16 
14:26:30 2008
+++ php-src/ext/standard/var_unserializer.c Sat Oct  4 13:11:36 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed Jul 16 17:25:51 2008 */
+/* Generated by re2c 0.13.5 on Sat Oct  4 10:07:18 2008 */
 #line 1 ext/standard/var_unserializer.re
 /*
   +--+
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.c,v 1.70.2.4.2.9 2008/07/16 14:26:30 jani Exp $ */
+/* $Id: var_unserializer.c,v 1.70.2.4.2.10 2008/10/04 13:11:36 felipe Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -334,7 +334,7 @@
(*p) += 2;
 
if (datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, (long)(max - (*p)));
return 0;
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.52.2.2.2.7r2=1.52.2.2.2.8diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.52.2.2.2.7 
php-src/ext/standard/var_unserializer.re:1.52.2.2.2.8
--- php-src/ext/standard/var_unserializer.re:1.52.2.2.2.7   Wed Mar 19 
03:00:40 2008
+++ php-src/ext/standard/var_unserializer.reSat Oct  4 13:11:36 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: var_unserializer.re,v 1.52.2.2.2.7 2008/03/19 03:00:40 felipe Exp $ */
+/* $Id: var_unserializer.re,v 1.52.2.2.2.8 2008/10/04 13:11:36 felipe Exp $ */
 
 #include php.h
 #include ext/standard/php_var.h
@@ -338,7 +338,7 @@
(*p) += 2;
 
if (datalen  0 || (*p) + datalen = max) {
-   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, max - (*p));
+   zend_error(E_WARNING, Insufficient data for unserializing - 
%ld required, %ld present, datalen, (long)(max - (*p)));
return 0;
}
 



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/mssql config.m4 /ext/pdo_dblib config.m4

2008-10-04 Thread Felipe Pena
felipe  Sat Oct  4 13:19:22 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/mssql  config.m4 
/php-src/ext/pdo_dblib  config.m4 
  Log:
  MFH: 
  - Fixed bug #44991 (Compile Failure With freetds0.82) 
patch by:
- jklowden at freetds dot org (ext/mssql)
- matthias at dsx dot at (ext/pdo_dblib)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1239r2=1.2027.2.547.2.1240diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1239 php-src/NEWS:1.2027.2.547.2.1240
--- php-src/NEWS:1.2027.2.547.2.1239Fri Oct  3 14:52:52 2008
+++ php-src/NEWSSat Oct  4 13:19:21 2008
@@ -99,6 +99,8 @@
   and hash()). (Tony)
 - Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
   (Ilia)
+- Fixed bug #44991 (Compile Failure With freetds0.82). 
+  (jklowden at freetds dot org, matthias at dsx dot at)
 - Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
 - Fixed bug #44891 Memory leak using registerPHPFunctions and XSLT Variable 
   as function parameter. (Rob)
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/config.m4?r1=1.9.2.2.2.1r2=1.9.2.2.2.2diff_format=u
Index: php-src/ext/mssql/config.m4
diff -u php-src/ext/mssql/config.m4:1.9.2.2.2.1 
php-src/ext/mssql/config.m4:1.9.2.2.2.2
--- php-src/ext/mssql/config.m4:1.9.2.2.2.1 Tue Jul  3 17:25:34 2007
+++ php-src/ext/mssql/config.m4 Sat Oct  4 13:19:22 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.9.2.2.2.1 2007/07/03 17:25:34 sniper Exp $
+dnl $Id: config.m4,v 1.9.2.2.2.2 2008/10/04 13:19:22 felipe Exp $
 dnl
 
 PHP_ARG_WITH(mssql,for MSSQL support via FreeTDS,
@@ -10,11 +10,11 @@
 
   if test $PHP_MSSQL = yes; then
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/tds.h; then
+  elif test -f $i/include/freetds/sybdb.h; then
 FREETDS_INSTALLATION_DIR=$i
 FREETDS_INCLUDE_DIR=$i/include/freetds
 break
@@ -27,10 +27,10 @@
 
   elif test $PHP_MSSQL != no; then
 
-if test -f $PHP_MSSQL/include/tds.h; then
+if test -f $PHP_MSSQL/include/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include
-elif test -f $PHP_MSSQL/include/freetds/tds.h; then
+elif test -f $PHP_MSSQL/include/freetds/sybdb.h; then
   FREETDS_INSTALLATION_DIR=$PHP_MSSQL
   FREETDS_INCLUDE_DIR=$PHP_MSSQL/include/freetds
 else
@@ -38,8 +38,8 @@
 fi
   fi  
 
-  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! -r $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a  test ! -r 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so; then
+ AC_MSG_ERROR(Could not find 
$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
   fi
 
   PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/config.m4?r1=1.2.2.2.2.1r2=1.2.2.2.2.2diff_format=u
Index: php-src/ext/pdo_dblib/config.m4
diff -u php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.1 
php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.2
--- php-src/ext/pdo_dblib/config.m4:1.2.2.2.2.1 Tue Jul  3 17:25:34 2007
+++ php-src/ext/pdo_dblib/config.m4 Sat Oct  4 13:19:22 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.2.2.2.2.1 2007/07/03 17:25:34 sniper Exp $
+dnl $Id: config.m4,v 1.2.2.2.2.2 2008/10/04 13:19:22 felipe Exp $
 dnl
 
 if test $PHP_PDO != no; then
@@ -13,11 +13,11 @@
   if test $PHP_PDO_DBLIB = yes; then
 
 for i in /usr/local /usr; do
-  if test -f $i/include/tds.h; then
+  if test -f $i/include/sybdb.h; then
 PDO_FREETDS_INSTALLATION_DIR=$i
 PDO_FREETDS_INCLUDE_DIR=$i/include
 break
-  elif test -f $i/include/freetds/tds.h; then
+  elif test -f $i/include/freetds/sybdb.h; then
 PDO_FREETDS_INSTALLATION_DIR=$i
 PDO_FREETDS_INCLUDE_DIR=$i/include/freetds
 break;
@@ -30,10 +30,10 @@
 
   elif test $PHP_PDO_DBLIB != no; then
 
-if test -f $PHP_PDO_DBLIB/include/tds.h; then
+if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
   PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
   PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
-elif test -f $PHP_PDO_DBLIB/include/freetds/tds.h; then
+elif test -f $PHP_PDO_DBLIB/include/freetds/sybdb.h; then
   PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
   PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
 else
@@ -45,8 +45,8 @@
 PHP_LIBDIR=lib
   fi
 
-  if test ! -r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a  test ! 
-r $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so; then
- AC_MSG_ERROR(Could not find 
$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
+  if test ! 

[PHP-CVS] cvs: php-src /ext/standard user_filters.c /ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt

2008-10-04 Thread Arnaud Le Blanc
lbarnaudSun Oct  5 01:40:02 2008 UTC

  Added files: 
/php-src/ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt 

  Modified files:  
/php-src/ext/standard   user_filters.c 
  Log:
  Fixed #46164 (stream_filter_remove() closes the stream)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.54r2=1.55diff_format=u
Index: php-src/ext/standard/user_filters.c
diff -u php-src/ext/standard/user_filters.c:1.54 
php-src/ext/standard/user_filters.c:1.55
--- php-src/ext/standard/user_filters.c:1.54Thu May  8 17:22:07 2008
+++ php-src/ext/standard/user_filters.c Sun Oct  5 01:40:02 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: user_filters.c,v 1.54 2008/05/08 17:22:07 felipe Exp $ */
+/* $Id: user_filters.c,v 1.55 2008/10/05 01:40:02 lbarnaud Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -183,12 +183,14 @@
zval *retval = NULL;
zval **args[4];
zval *zclosing, *zconsumed, *zin, *zout, *zstream;
+   zval zpropname;
int call_result;
 
if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), stream, 
sizeof(stream), (void**)zstream)) {
/* Give the userfilter class a hook back to the stream */
ALLOC_INIT_ZVAL(zstream);
php_stream_to_zval(stream, zstream);
+   zval_copy_ctor(zstream);
add_property_zval(obj, stream, zstream);
/* add_property_zval increments the refcount which is unwanted 
here */
zval_ptr_dtor(zstream);
@@ -247,6 +249,13 @@
}
}
 
+   /* filter resources are cleaned up by the stream destructor,
+* keeping a reference to the stream resource here would prevent it
+* from being destroyed properly */
+   INIT_ZVAL(zpropname);
+   ZVAL_STRINGL(zpropname, stream, sizeof(stream)-1, 0);
+   Z_OBJ_HANDLER_P(obj, unset_property)(obj, zpropname TSRMLS_CC);
+
zval_ptr_dtor(zclosing);
zval_ptr_dtor(zconsumed);
zval_ptr_dtor(zout);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-1.phpt
+++ php-src/ext/standard/tests/filters/bug46164-1.phpt
--TEST--
Bug #46164 - 1 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
stream_filter_remove($filter);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-2.phpt
+++ php-src/ext/standard/tests/filters/bug46164-2.phpt
--TEST--
Bug #46164 - 2 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
unset($this-stream);
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
fwrite($fd, bfoo);
fflush($fd);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard user_filters.c /ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt

2008-10-04 Thread Arnaud Le Blanc
lbarnaudSun Oct  5 01:40:19 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt 

  Modified files:  
/php-src/ext/standard   user_filters.c 
  Log:
  MFH: Fixed #46164 (stream_filter_remove() closes the stream)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.4.2.9.2.5r2=1.31.2.4.2.9.2.6diff_format=u
Index: php-src/ext/standard/user_filters.c
diff -u php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.5 
php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.6
--- php-src/ext/standard/user_filters.c:1.31.2.4.2.9.2.5Thu May  8 
18:28:25 2008
+++ php-src/ext/standard/user_filters.c Sun Oct  5 01:40:19 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: user_filters.c,v 1.31.2.4.2.9.2.5 2008/05/08 18:28:25 felipe Exp $ */
+/* $Id: user_filters.c,v 1.31.2.4.2.9.2.6 2008/10/05 01:40:19 lbarnaud Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -180,12 +180,14 @@
zval *retval = NULL;
zval **args[4];
zval *zclosing, *zconsumed, *zin, *zout, *zstream;
+   zval zpropname;
int call_result;
 
if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), stream, 
sizeof(stream), (void**)zstream)) {
/* Give the userfilter class a hook back to the stream */
ALLOC_INIT_ZVAL(zstream);
php_stream_to_zval(stream, zstream);
+   zval_copy_ctor(zstream);
add_property_zval(obj, stream, zstream);
/* add_property_zval increments the refcount which is unwanted 
here */
zval_ptr_dtor(zstream);
@@ -247,6 +249,13 @@
}
}
 
+   /* filter resources are cleaned up by the stream destructor,
+* keeping a reference to the stream resource here would prevent it
+* from being destroyed properly */
+   INIT_ZVAL(zpropname);
+   ZVAL_STRINGL(zpropname, stream, sizeof(stream)-1, 0);
+   Z_OBJ_HANDLER_P(obj, unset_property)(obj, zpropname TSRMLS_CC);
+
zval_ptr_dtor(zclosing);
zval_ptr_dtor(zconsumed);
zval_ptr_dtor(zout);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-1.phpt
+++ php-src/ext/standard/tests/filters/bug46164-1.phpt
--TEST--
Bug #46164 - 1 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
stream_filter_remove($filter);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-2.phpt
+++ php-src/ext/standard/tests/filters/bug46164-2.phpt
--TEST--
Bug #46164 - 2 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
unset($this-stream);
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
fwrite($fd, bfoo);
fflush($fd);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard user_filters.c /ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt

2008-10-04 Thread Arnaud Le Blanc
lbarnaudSun Oct  5 01:40:38 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filters bug46164-1.phpt bug46164-2.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   user_filters.c 
  Log:
  MFH: Fixed #46164 (stream_filter_remove() closes the stream)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1240r2=1.2027.2.547.2.1241diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1240 php-src/NEWS:1.2027.2.547.2.1241
--- php-src/NEWS:1.2027.2.547.2.1240Sat Oct  4 13:19:21 2008
+++ php-src/NEWSSun Oct  5 01:40:38 2008
@@ -21,6 +21,7 @@
 - Fixed bug #46215 (json_encode mutates its parameter and has some 
   class-specific state). (Felipe)
 - Fixed bug #46191 (BC break: DOMDocument saveXML() doesn't accept null). (Rob)
+- Fixed bug #46164 (stream_filter_remove() closes the stream). (Arnaud)
 - Fixed bug #46157 (PDOStatement::fetchObject prototype error). (Felipe)
 - Fixed bug #46147 (after stream seek, appending stream filter reads 
   incorrect data). (Greg)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.4.2.10r2=1.31.2.4.2.11diff_format=u
Index: php-src/ext/standard/user_filters.c
diff -u php-src/ext/standard/user_filters.c:1.31.2.4.2.10 
php-src/ext/standard/user_filters.c:1.31.2.4.2.11
--- php-src/ext/standard/user_filters.c:1.31.2.4.2.10   Mon Dec 31 07:20:13 2007
+++ php-src/ext/standard/user_filters.c Sun Oct  5 01:40:38 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: user_filters.c,v 1.31.2.4.2.10 2007/12/31 07:20:13 sebastian Exp $ */
+/* $Id: user_filters.c,v 1.31.2.4.2.11 2008/10/05 01:40:38 lbarnaud Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -180,12 +180,14 @@
zval *retval = NULL;
zval **args[4];
zval *zclosing, *zconsumed, *zin, *zout, *zstream;
+   zval zpropname;
int call_result;
 
if (FAILURE == zend_hash_find(Z_OBJPROP_P(obj), stream, 
sizeof(stream), (void**)zstream)) {
/* Give the userfilter class a hook back to the stream */
ALLOC_INIT_ZVAL(zstream);
php_stream_to_zval(stream, zstream);
+   zval_copy_ctor(zstream);
add_property_zval(obj, stream, zstream);
/* add_property_zval increments the refcount which is unwanted 
here */
zval_ptr_dtor(zstream);
@@ -247,6 +249,13 @@
}
}
 
+   /* filter resources are cleaned up by the stream destructor,
+* keeping a reference to the stream resource here would prevent it
+* from being destroyed properly */
+   INIT_ZVAL(zpropname);
+   ZVAL_STRINGL(zpropname, stream, sizeof(stream)-1, 0);
+   Z_OBJ_HANDLER_P(obj, unset_property)(obj, zpropname TSRMLS_CC);
+
zval_ptr_dtor(zclosing);
zval_ptr_dtor(zconsumed);
zval_ptr_dtor(zout);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-1.phpt
+++ php-src/ext/standard/tests/filters/bug46164-1.phpt
--TEST--
Bug #46164 - 1 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
stream_filter_remove($filter);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/filters/bug46164-2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/filters/bug46164-2.phpt
+++ php-src/ext/standard/tests/filters/bug46164-2.phpt
--TEST--
Bug #46164 - 2 (stream_filter_remove() closes the stream)
--FILE--
?php
class user_filter extends php_user_filter {
function filter($in, $out, $consumed, $closing) {
while($bucket = stream_bucket_make_writeable($in)) {
$consumed += $bucket-datalen;
stream_bucket_append($out, $bucket);
}
unset($this-stream);
return PSFS_PASS_ON;
}
}
stream_filter_register('user_filter','user_filter');

$fd = fopen('php://memory','w');
$filter = stream_filter_append($fd, 'user_filter');
fwrite($fd, bfoo);
fflush($fd);
var_dump(fclose($fd));
?
--EXPECT--
bool(true)



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



[PHP-CVS] cvs: php-src /ext/msql php_msql.c

2008-10-04 Thread Felipe Pena
felipe  Sun Oct  5 04:36:17 2008 UTC

  Modified files:  
/php-src/ext/msql   php_msql.c 
  Log:
  - Initialize variable
  
http://cvs.php.net/viewvc.cgi/php-src/ext/msql/php_msql.c?r1=1.73r2=1.74diff_format=u
Index: php-src/ext/msql/php_msql.c
diff -u php-src/ext/msql/php_msql.c:1.73 php-src/ext/msql/php_msql.c:1.74
--- php-src/ext/msql/php_msql.c:1.73Fri Oct  3 17:18:30 2008
+++ php-src/ext/msql/php_msql.c Sun Oct  5 04:36:17 2008
@@ -16,7 +16,7 @@
+--+
  */
  
-/* $Id: php_msql.c,v 1.73 2008/10/03 17:18:30 felipe Exp $ */
+/* $Id: php_msql.c,v 1.74 2008/10/05 04:36:17 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -689,7 +689,7 @@
 {
zval *msql_link = NULL;
char *query;
-   int id, msql, query_len, af_rows;
+   int id = -1, msql, query_len, af_rows;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|r, query, 
query_len, msql_link) == FAILURE) {
return;
@@ -697,10 +697,6 @@

if (ZEND_NUM_ARGS() == 1) {
id = msql_globals.default_link;
-   
-   if (id == -1) {
-   RETURN_FALSE;
-   }
}

ZEND_FETCH_RESOURCE2(msql, int, msql_link, id, mSQL-Link, 
msql_globals.le_link, msql_globals.le_plink);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/msql php_msql.c

2008-10-04 Thread Felipe Pena
felipe  Sun Oct  5 04:38:00 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/msql   php_msql.c 
  Log:
  - MFH: Initialize variable
  
http://cvs.php.net/viewvc.cgi/php-src/ext/msql/php_msql.c?r1=1.60.2.4.2.2.2.6r2=1.60.2.4.2.2.2.7diff_format=u
Index: php-src/ext/msql/php_msql.c
diff -u php-src/ext/msql/php_msql.c:1.60.2.4.2.2.2.6 
php-src/ext/msql/php_msql.c:1.60.2.4.2.2.2.7
--- php-src/ext/msql/php_msql.c:1.60.2.4.2.2.2.6Fri Oct  3 17:21:49 2008
+++ php-src/ext/msql/php_msql.c Sun Oct  5 04:38:00 2008
@@ -16,7 +16,7 @@
+--+
  */
  
-/* $Id: php_msql.c,v 1.60.2.4.2.2.2.6 2008/10/03 17:21:49 felipe Exp $ */
+/* $Id: php_msql.c,v 1.60.2.4.2.2.2.7 2008/10/05 04:38:00 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -689,7 +689,7 @@
 {
zval *msql_link = NULL;
char *query;
-   int id, msql, query_len, af_rows;
+   int id = -1, msql, query_len, af_rows;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|r, query, 
query_len, msql_link) == FAILURE) {
return;
@@ -697,10 +697,6 @@

if (ZEND_NUM_ARGS() == 1) {
id = msql_globals.default_link;
-   
-   if (id == -1) {
-   RETURN_FALSE;
-   }
}

ZEND_FETCH_RESOURCE2(msql, int, msql_link, id, mSQL-Link, 
msql_globals.le_link, msql_globals.le_plink);



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



[PHP-CVS] cvs: php-src /ext/mssql php_mssql.c

2008-10-04 Thread Kalle Sommer Nielsen
kalle   Sun Oct  5 04:55:33 2008 UTC

  Modified files:  
/php-src/ext/mssql  php_mssql.c 
  Log:
  New parameter parsing API (with lots of help from Felipe)
  http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.176r2=1.177diff_format=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.176 php-src/ext/mssql/php_mssql.c:1.177
--- php-src/ext/mssql/php_mssql.c:1.176 Sat Jul  5 20:10:41 2008
+++ php-src/ext/mssql/php_mssql.c   Sun Oct  5 04:55:33 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.176 2008/07/05 20:10:41 felipe Exp $ */
+/* $Id: php_mssql.c,v 1.177 2008/10/05 04:55:33 kalle Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -164,6 +164,8 @@
 ZEND_END_ARG_INFO()
 /* }}} */
 
+/* {{{ mssql_functions
+*/
 const zend_function_entry mssql_functions[] = {
PHP_FE(mssql_connect,   arginfo_mssql_connect)
PHP_FE(mssql_pconnect,  arginfo_mssql_connect)
@@ -197,10 +199,13 @@
PHP_FE(mssql_guid_string,   
arginfo_mssql_guid_string)
{NULL, NULL, NULL}
 };
+/* }}} */
 
 ZEND_DECLARE_MODULE_GLOBALS(mssql)
 static PHP_GINIT_FUNCTION(mssql);
 
+/* {{{ mssql_module_entry
+*/
 zend_module_entry mssql_module_entry = 
 {
STANDARD_MODULE_HEADER,
@@ -218,6 +223,7 @@
NULL,
STANDARD_MODULE_PROPERTIES_EX
 };
+/* }}} */
 
 #ifdef COMPILE_DL_MSSQL
 ZEND_GET_MODULE(mssql)
@@ -225,6 +231,8 @@
 
 #define CHECK_LINK(link) { if (link==-1) { php_error_docref(NULL TSRMLS_CC, 
E_WARNING, A link to the server could not be established); RETURN_FALSE; } }
 
+/* {{{ PHP_INI_DISP
+*/
 static PHP_INI_DISP(display_text_size)
 {
char *value;
@@ -244,7 +252,10 @@
php_printf(%s, value);
}
 }
+/* }}} */
 
+/* {{{ PHP_INI
+*/
 PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN(mssql.allow_persistent,   1,
PHP_INI_SYSTEM, OnUpdateBool,   allow_persistent,   
zend_mssql_globals, mssql_globals)
STD_PHP_INI_ENTRY_EX(mssql.max_persistent,-1,   
PHP_INI_SYSTEM, OnUpdateLong,   max_persistent, 
zend_mssql_globals, mssql_globals,  display_link_numbers)
@@ -264,6 +275,7 @@
STD_PHP_INI_ENTRY(mssql.charset,  
, PHP_INI_ALL,OnUpdateString, charset,
zend_mssql_globals, mssql_globals)
 #endif
 PHP_INI_END()
+/* }}} */
 
 /* error handler */
 static int php_mssql_error_handler(DBPROCESS *dbproc, int severity, int dberr, 
int oserr, char *dberrstr, char *oserrstr)
@@ -276,6 +288,8 @@
return INT_CANCEL;  
 }
 
+/* {{{ php_mssql_message_handler
+*/
 /* message handler */
 static int php_mssql_message_handler(DBPROCESS *dbproc, DBINT msgno,int 
msgstate, int severity,char *msgtext,char *srvname, char *procname,DBUSMALLINT 
line)
 {
@@ -291,7 +305,10 @@
MS_SQL_G(server_message) = estrdup(msgtext);
return 0;
 }
+/* }}} */
 
+/* {{{ _clean_invalid_results
+*/
 static int _clean_invalid_results(zend_rsrc_list_entry *le TSRMLS_DC)
 {
if (Z_TYPE_P(le) == le_result) {
@@ -303,7 +320,10 @@
}
return 0;
 }
+/* }}} */
 
+/* {{{ _free_result
+*/
 static void _free_result(mssql_result *result, int free_fields) 
 {
int i,j;
@@ -330,7 +350,10 @@
efree(result-fields);
}
 }
+/* }}} */
 
+/* {{{ _free_mssql_statement
+*/
 static void _free_mssql_statement(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
mssql_statement *statement = (mssql_statement *)rsrc-ptr;
@@ -342,7 +365,10 @@

efree(statement);
 }
+/* }}} */
 
+/* {{{ _free_mssql_result
+*/
 static void _free_mssql_result(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
mssql_result *result = (mssql_result *)rsrc-ptr;
@@ -351,7 +377,10 @@
dbcancel(result-mssql_ptr-link);
efree(result);
 }
+/* }}} */
 
+/* {{{ php_mssql_set_defaullt_link
+*/
 static void php_mssql_set_default_link(int id TSRMLS_DC)
 {
if (MS_SQL_G(default_link)!=-1) {
@@ -360,7 +389,10 @@
MS_SQL_G(default_link) = id;
zend_list_addref(id);
 }
+/* }}} */
 
+/* {{{ _close_mssql_link
+*/
 static void _close_mssql_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
mssql_link *mssql_ptr = (mssql_link *)rsrc-ptr;
@@ -372,8 +404,10 @@
efree(mssql_ptr);
MS_SQL_G(num_links)--;
 }
+/* }}} */
 
-
+/* {{{ _close_mssql_plink
+*/
 static void _close_mssql_plink(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
mssql_link *mssql_ptr = (mssql_link *)rsrc-ptr;
@@ -384,14 +418,20 @@
MS_SQL_G(num_persistent)--;
MS_SQL_G(num_links)--;
 }
+/* }}} */
 
+/* {{{ _mssql_bind_hash_dtor
+*/
 static void _mssql_bind_hash_dtor(void *data)
 {
mssql_bind *bind= (mssql_bind *) data;