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

2003-07-23 Thread Zeev Suraski
zeevWed Jul 23 04:53:23 2003 EDT

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  Fix interface
  
  
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.52 php-src/ext/simplexml/simplexml.c:1.53
--- php-src/ext/simplexml/simplexml.c:1.52  Mon Jul  7 08:07:02 2003
+++ php-src/ext/simplexml/simplexml.c   Wed Jul 23 04:53:23 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.52 2003/07/07 12:07:02 zeev Exp $ */
+/* $Id: simplexml.c,v 1.53 2003/07/23 08:53:23 zeev Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -106,7 +106,7 @@
 /* {{{ sxe_property_read()
  */
 static zval *
-sxe_property_read(zval *object, zval *member TSRMLS_DC)
+sxe_property_read(zval *object, zval *member, zend_bool silent TSRMLS_DC)
 {
zval   *return_value;
zval   *value = NULL;
@@ -272,7 +272,7 @@
 
property_ptr = emalloc(sizeof(zval **));
 
-   property = sxe_property_read(object, member TSRMLS_CC);
+   property = sxe_property_read(object, member, 0 TSRMLS_CC);
 
*property_ptr = property;

@@ -1055,7 +1055,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.52 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.53 $);
php_info_print_table_end();
 }
 /* }}} */



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



[PHP-CVS] cvs: CVSROOT / avail

2003-07-23 Thread Sascha Schumann
sas Wed Jul 23 07:06:16 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  pear/PECL - pecl
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.715 CVSROOT/avail:1.716
--- CVSROOT/avail:1.715 Wed Jul 23 07:04:20 2003
+++ CVSROOT/avail   Wed Jul 23 07:06:16 2003
@@ -132,7 +132,7 @@
 avail|steinm,uw|php-src/ext/pdf
 avail|jdonagher,david|php-src/ext/pfpro
 avail|jah|php-src/ext/pgsql
-avail|ostborn|php-src/ext/phpdoc,pear/PECL/phpdoc,pear/PECL/soap
+avail|ostborn|php-src/ext/phpdoc,pecl/phpdoc,pecl/soap
 avail|kk|php-src/ext/posix
 avail|amos|php-src/ext/qtdom
 avail|kk|php-src/ext/recode
@@ -144,7 +144,7 @@
 avail|tommay,vvtk|php-src/ext/sysvsem
 avail|nyenyon,vvtk|php-src/ext/sysvshm
 avail|vvtk|php-src/ext/sysvipc
-avail|david,bbonev,bordavide|pear/PECL/vpopmail
+avail|david,bbonev,bordavide|pecl/vpopmail
 avail|atrak|php-src/ext/yp
 avail|sr|php-src/ext/zlib
 avail|sterling|php-src/ext/zziplib



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



[PHP-CVS] cvs: CVSROOT / avail

2003-07-23 Thread Sascha Schumann
sas Wed Jul 23 07:10:05 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  pear/Net_CVS karma for schst
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.716 CVSROOT/avail:1.717
--- CVSROOT/avail:1.716 Wed Jul 23 07:06:16 2003
+++ CVSROOT/avail   Wed Jul 23 07:10:05 2003
@@ -170,6 +170,7 @@
 avail|momo|php-src/ext/standard
 avail|mbretter|pecl/radius,pecl/mqseries
 avail|mcmontero|pecl/imagick
+avail|schst|pear/Net_CVS
 
 # Curl modules
 
avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www



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



[PHP-CVS] cvs: CVSROOT / avail

2003-07-23 Thread Sascha Schumann
sas Wed Jul 23 07:26:27 2003 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  Net_CVS - Net_Server
  
  http://news.php.net/article.php?group=php.pear.devarticle=18333
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.717 CVSROOT/avail:1.718
--- CVSROOT/avail:1.717 Wed Jul 23 07:10:05 2003
+++ CVSROOT/avail   Wed Jul 23 07:26:27 2003
@@ -170,7 +170,7 @@
 avail|momo|php-src/ext/standard
 avail|mbretter|pecl/radius,pecl/mqseries
 avail|mcmontero|pecl/imagick
-avail|schst|pear/Net_CVS
+avail|schst|pear/Net_Server
 
 # Curl modules
 
avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www



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



[PHP-CVS] cvs: php-src /win32 sendmail.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:03:10 2003 EDT

  Modified files:  
/php-src/win32  sendmail.c 
  Log:
  Fixed bug #23798 (Spaces were not being stripped from Bcc header)
  Fixed bug #24663 (\n. sequences were not being escaped)
  
  
  
  
Index: php-src/win32/sendmail.c
diff -u php-src/win32/sendmail.c:1.54 php-src/win32/sendmail.c:1.55
--- php-src/win32/sendmail.c:1.54   Sat Feb 15 22:48:49 2003
+++ php-src/win32/sendmail.cWed Jul 23 12:03:10 2003
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.54 2003/02/16 03:48:49 wez Exp $ */
+/* $Id: sendmail.c,v 1.55 2003/07/23 16:03:10 iliaa Exp $ */
 
 #include php.h   /*php specific */
 #include stdio.h
@@ -29,6 +29,7 @@
 #endif /* NETWARE */
 #include time.h
 #include string.h
+#include math.h
 #ifndef NETWARE
 #include malloc.h
 #include memory.h
@@ -41,6 +42,8 @@
 #include ext/pcre/php_pcre.h
 #endif
 
+#include ext/standard/php_string.h
+
 /*
extern int _daylight;
extern long _timezone;
@@ -69,6 +72,8 @@
   
 efree(response); \
   
 } \
}
+#define SMTP_SKIP_SPACE(str)   { while (isspace(*str)) { str++; } }
+
 
 #ifndef THREAD_SAFE
 char Buffer[MAIL_BUFFER_SIZE];
@@ -139,6 +144,13 @@
 #define PHP_WIN32_MAIL_RMVDBL_PATTERN  /^\r\n|(\r\n)+$/m
 #define PHP_WIN32_MAIL_RMVDBL_REPLACE  
 
+/* This pattern escapes \n. inside the message body. It prevents
+ * premature end of message if \n.\n or \r\n.\r\n is encountered
+ * and ensures that \n. sequences are properly displayed in the
+ * message body. */
+#define PHP_WIN32_MAIL_DOT_PATTERN \n.
+#define PHP_WIN32_MAIL_DOT_REPLACE \n..
+
 /* This function is meant to unify the headers passed to to mail()
  * This means, use PCRE to transform single occurences of \n or \r in \r\n
  * As a second step we also eleminate all \r\n occurences which are:
@@ -378,6 +390,8 @@
char *tempMailTo, *token, *pos1, *pos2;
char *server_response = NULL;
char *stripped_header  = NULL;
+   char *data_cln;
+   int data_cln_len;
 
/* check for NULL parameters */
if (data == NULL)
@@ -475,6 +489,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
sprintf(Buffer, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS)
return (res);
@@ -496,6 +511,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS) {
efree(tempMailTo);
@@ -529,6 +545,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
sprintf(Buffer, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS) {
return (res);
@@ -597,30 +614,43 @@
return (res);
}
 
+   /* Escape \n. sequences
+* We use php_str_to_str() and not php_str_replace_in_subject(), since the 
latter
+* uses ZVAL as it's parameters */
+   data_cln = php_str_to_str(data, strlen(data), PHP_WIN32_MAIL_DOT_PATTERN, 
sizeof(PHP_WIN32_MAIL_DOT_PATTERN) - 1,
+   PHP_WIN32_MAIL_DOT_REPLACE, 
sizeof(PHP_WIN32_MAIL_DOT_REPLACE) - 1, data_cln_len);
+
/* send message contents in 1024 chunks */
-   if (strlen(data) = 1024) {
-   if ((res = Post(data)) != SUCCESS)
+   if (data_cln_len = 1024) {
+   if ((res = Post(data_cln)) != SUCCESS) {
+   efree(data_cln);
return (res);
+   }
} else {
-   p = data;
-   while (1) {
-   if (*p == '\0')
-   break;
-   if (strlen(p) = 1024)
-   i = 1024;
-   else
-   i = strlen(p);
-
-   /* put next chunk in buffer */
-   strncpy(Buffer, p, i);
-   Buffer[i] = '\0';
-   p += i;
+   int parts = (int) floor(data_cln_len / 1024);
+   p = data_cln;
 
+   for (i = 0; i  parts; i++) {
+   strlcpy(Buffer, p, 1024);
+   Buffer[1024] = '\0';

[PHP-CVS] cvs: php-src(PHP_4_3) /win32 sendmail.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:03:27 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/win32  sendmail.c 
  Log:
  MFH:
  Fixed bug #23798 (Spaces were not being stripped from Bcc header)
  Fixed bug #24663 (\n. sequences were not being escaped)
  
  
Index: php-src/win32/sendmail.c
diff -u php-src/win32/sendmail.c:1.47.2.4 php-src/win32/sendmail.c:1.47.2.5
--- php-src/win32/sendmail.c:1.47.2.4   Sun Feb  2 22:47:00 2003
+++ php-src/win32/sendmail.cWed Jul 23 12:03:27 2003
@@ -17,7 +17,7 @@
  *
  */
 
-/* $Id: sendmail.c,v 1.47.2.4 2003/02/03 03:47:00 pollita Exp $ */
+/* $Id: sendmail.c,v 1.47.2.5 2003/07/23 16:03:27 iliaa Exp $ */
 
 #include php.h   /*php specific */
 #include stdio.h
@@ -25,6 +25,7 @@
 #include winsock.h
 #include time.h
 #include string.h
+#include math.h
 #include malloc.h
 #include memory.h
 #include winbase.h
@@ -35,6 +36,8 @@
 #include ext/pcre/php_pcre.h
 #endif
 
+#include ext/standard/php_string.h
+
 /*
extern int _daylight;
extern long _timezone;
@@ -63,6 +66,8 @@
   
 efree(response); \
   
 } \
}
+#define SMTP_SKIP_SPACE(str)   { while (isspace(*str)) { str++; } }
+
 
 #ifndef THREAD_SAFE
 char Buffer[MAIL_BUFFER_SIZE];
@@ -125,6 +130,13 @@
 #define PHP_WIN32_MAIL_RMVDBL_PATTERN  /^\r\n|(\r\n)+$/m
 #define PHP_WIN32_MAIL_RMVDBL_REPLACE  
 
+/* This pattern escapes \n. inside the message body. It prevents
+ * premature end of message if \n.\n or \r\n.\r\n is encountered
+ * and ensures that \n. sequences are properly displayed in the
+ * message body. */
+#define PHP_WIN32_MAIL_DOT_PATTERN \n.
+#define PHP_WIN32_MAIL_DOT_REPLACE \n..
+
 /* This function is meant to unify the headers passed to to mail()
  * This means, use PCRE to transform single occurences of \n or \r in \r\n
  * As a second step we also eleminate all \r\n occurences which are:
@@ -355,6 +367,8 @@
char *tempMailTo, *token, *pos1, *pos2;
char *server_response = NULL;
char *stripped_header  = NULL;
+   char *data_cln;
+   int data_cln_len;
 
/* check for NULL parameters */
if (data == NULL)
@@ -452,6 +466,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
sprintf(Buffer, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS)
return (res);
@@ -473,6 +488,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS) {
efree(tempMailTo);
@@ -506,6 +522,7 @@
token = strtok(tempMailTo, ,);
while(token != NULL)
{
+   SMTP_SKIP_SPACE(token);
sprintf(Buffer, RCPT TO:%s\r\n, token);
if ((res = Post(Buffer)) != SUCCESS) {
return (res);
@@ -574,30 +591,43 @@
return (res);
}
 
+   /* Escape \n. sequences
+* We use php_str_to_str() and not php_str_replace_in_subject(), since the 
latter
+* uses ZVAL as it's parameters */
+   data_cln = php_str_to_str(data, strlen(data), PHP_WIN32_MAIL_DOT_PATTERN, 
sizeof(PHP_WIN32_MAIL_DOT_PATTERN) - 1,
+   PHP_WIN32_MAIL_DOT_REPLACE, 
sizeof(PHP_WIN32_MAIL_DOT_REPLACE) - 1, data_cln_len);
+
/* send message contents in 1024 chunks */
-   if (strlen(data) = 1024) {
-   if ((res = Post(data)) != SUCCESS)
+   if (data_cln_len = 1024) {
+   if ((res = Post(data_cln)) != SUCCESS) {
+   efree(data_cln);
return (res);
+   }
} else {
-   p = data;
-   while (1) {
-   if (*p == '\0')
-   break;
-   if (strlen(p) = 1024)
-   i = 1024;
-   else
-   i = strlen(p);
-
-   /* put next chunk in buffer */
-   strncpy(Buffer, p, i);
-   Buffer[i] = '\0';
-   p += i;
+   int parts = (int) floor(data_cln_len / 1024);
+   p = data_cln;
 
+   for (i = 0; i  parts; i++) {
+   strlcpy(Buffer, p, 1024);
+  

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/domxml php_domxml.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:44:27 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/domxml php_domxml.c 
  Log:
  MFH: Fixed #24609 (segfault when using replace node across different docs)
  Patch by: Rob Richards
  
  # This patch somehow did not make it into 4.3.X, so on Rob's request in am
  # MFHing it in.
  
  
Index: php-src/ext/domxml/php_domxml.c
diff -u php-src/ext/domxml/php_domxml.c:1.218.2.25 
php-src/ext/domxml/php_domxml.c:1.218.2.26
--- php-src/ext/domxml/php_domxml.c:1.218.2.25  Wed Jun 18 13:43:34 2003
+++ php-src/ext/domxml/php_domxml.c Wed Jul 23 12:44:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_domxml.c,v 1.218.2.25 2003/06/18 17:43:34 rrichards Exp $ */
+/* $Id: php_domxml.c,v 1.218.2.26 2003/07/23 16:44:27 iliaa Exp $ */
 
 /* TODO
  * - Support Notation Nodes
@@ -2384,6 +2384,7 @@
 {
zval *id, *rv = NULL, *node;
xmlNodePtr repnode, nodep, old_repnode;
+   xmlDocPtr tmpdoc;
int ret;
 
DOMXML_GET_THIS_OBJ(nodep, id, le_domxmlnodep);
@@ -2394,7 +2395,17 @@
 
DOMXML_GET_OBJ(repnode, node, le_domxmlnodep);
 
+   tmpdoc = repnode-doc;
+
old_repnode = xmlReplaceNode(nodep, repnode);
+
+   /* ReplaceNode will change the doc for only the first node 
+   so check if doc was changed */
+   if (tmpdoc != repnode-doc) {
+   /* Set doc back to old doc otherwise libxml wont change all sub nodes 
*/
+   repnode-doc = tmpdoc;
+   xmlSetTreeDoc(repnode, old_repnode-doc);
+   }
 
DOMXML_RET_OBJ(rv, old_repnode, ret);
 }



-- 
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 php_mssql.h

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:53:26 2003 EDT

  Modified files:  
/php-src/ext/mssql  php_mssql.c php_mssql.h 
  Log:
  Fixed bug #24752 (Unhandled uniqueidentifier field type)
  Original Patch By: s.sonnenberg[at]coolspot.de
  
  
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.115 php-src/ext/mssql/php_mssql.c:1.116
--- php-src/ext/mssql/php_mssql.c:1.115 Thu Jul  3 12:53:04 2003
+++ php-src/ext/mssql/php_mssql.c   Wed Jul 23 12:53:26 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.115 2003/07/03 16:53:04 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.116 2003/07/23 16:53:26 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -800,6 +800,15 @@
Z_DVAL_P(result) = (double) floatcol8(offset);
Z_TYPE_P(result) = IS_DOUBLE;
break;
+#ifdef SQLUNIQUE
+   case SQLUNIQUE: {
+   char *data = charcol(offset);
+
+   /* uniqueidentifier is a 16-byte binary number */
+   ZVAL_STRINGL(result, data, 16, 1);
+   }
+   break;
+#endif
case SQLVARBINARY:
case SQLBINARY:
case SQLIMAGE: {
@@ -1468,6 +1477,11 @@
case SQLIMAGE:
return image;
break;
+#ifdef SQLUNIQUE
+   case SQLUNIQUE:
+   return uniqueidentifier;
+   break;
+#endif
default:
return unknown;
break;
Index: php-src/ext/mssql/php_mssql.h
diff -u php-src/ext/mssql/php_mssql.h:1.33 php-src/ext/mssql/php_mssql.h:1.34
--- php-src/ext/mssql/php_mssql.h:1.33  Fri Jun 13 23:34:42 2003
+++ php-src/ext/mssql/php_mssql.h   Wed Jul 23 12:53:26 2003
@@ -17,7 +17,7 @@
  */
 
 
-/* $Id: php_mssql.h,v 1.33 2003/06/14 03:34:42 fmk Exp $ */
+/* $Id: php_mssql.h,v 1.34 2003/07/23 16:53:26 iliaa Exp $ */
 
 #ifndef PHP_MSSQL_H
 #define PHP_MSSQL_H
@@ -59,6 +59,9 @@
 #define SQLIMAGE SYBIMAGE
 #define SQLBINARY SYBBINARY
 #define SQLVARBINARY SYBVARBINARY
+#ifdef SQLUNIQUE /* FreeTSD 0.61+ */
+#define SQLUNIQUE SYBUNIQUE
+#endif
 #define DBERRHANDLE(a, b) dberrhandle(b)
 #define DBMSGHANDLE(a, b) dbmsghandle(b)
 #define DBSETOPT(a, b, c) dbsetopt(a, b, c, -1)



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mssql php_mssql.c php_mssql.h

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:53:38 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mssql  php_mssql.c php_mssql.h 
  Log:
  MFH: Fixed bug #24752 (Unhandled uniqueidentifier field type)
  
  
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.86.2.21 php-src/ext/mssql/php_mssql.c:1.86.2.22
--- php-src/ext/mssql/php_mssql.c:1.86.2.21 Thu Jul  3 12:47:10 2003
+++ php-src/ext/mssql/php_mssql.c   Wed Jul 23 12:53:37 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.86.2.21 2003/07/03 16:47:10 fmk Exp $ */
+/* $Id: php_mssql.c,v 1.86.2.22 2003/07/23 16:53:37 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -800,6 +800,15 @@
Z_DVAL_P(result) = (double) floatcol8(offset);
Z_TYPE_P(result) = IS_DOUBLE;
break;
+#ifdef SQLUNIQUE
+   case SQLUNIQUE: {
+   char *data = charcol(offset);
+
+   /* uniqueidentifier is a 16-byte binary number */
+   ZVAL_STRINGL(result, data, 16, 1);
+   }
+   break;
+#endif
case SQLVARBINARY:
case SQLBINARY:
case SQLIMAGE: {
@@ -1470,6 +1479,11 @@
case SQLIMAGE:
return image;
break;
+#ifdef SQLUNIQUE
+   case SQLUNIQUE:
+   return uniqueidentifier;
+   break;
+#endif
default:
return unknown;
break;
Index: php-src/ext/mssql/php_mssql.h
diff -u php-src/ext/mssql/php_mssql.h:1.23.4.8 php-src/ext/mssql/php_mssql.h:1.23.4.9
--- php-src/ext/mssql/php_mssql.h:1.23.4.8  Fri Jun 13 23:36:46 2003
+++ php-src/ext/mssql/php_mssql.h   Wed Jul 23 12:53:38 2003
@@ -17,7 +17,7 @@
  */
 
 
-/* $Id: php_mssql.h,v 1.23.4.8 2003/06/14 03:36:46 fmk Exp $ */
+/* $Id: php_mssql.h,v 1.23.4.9 2003/07/23 16:53:38 iliaa Exp $ */
 
 #ifndef PHP_MSSQL_H
 #define PHP_MSSQL_H
@@ -59,6 +59,9 @@
 #define SQLIMAGE SYBIMAGE
 #define SQLBINARY SYBBINARY
 #define SQLVARBINARY SYBVARBINARY
+#ifdef SQLUNIQUE /* FreeTSD 0.61+ */
+#define SQLUNIQUE SYBUNIQUE
+#endif
 #define DBERRHANDLE(a, b) dberrhandle(b)
 #define DBMSGHANDLE(a, b) dbmsghandle(b)
 #define DBSETOPT(a, b, c) dbsetopt(a, b, c, -1)



-- 
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

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:54:34 2003 EDT

  Modified files:  
/php-src/ext/mssql  php_mssql.c 
  Log:
  Removed unused variables.
  
  
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.116 php-src/ext/mssql/php_mssql.c:1.117
--- php-src/ext/mssql/php_mssql.c:1.116 Wed Jul 23 12:53:26 2003
+++ php-src/ext/mssql/php_mssql.c   Wed Jul 23 12:54:34 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.116 2003/07/23 16:53:26 iliaa Exp $ */
+/* $Id: php_mssql.c,v 1.117 2003/07/23 16:54:34 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -1893,7 +1893,7 @@
mssql_link *mssql_ptr;
mssql_statement *statement;
mssql_bind bind,*bindp;
-   int id = 0, status = 0;
+   int status = 0;
LPBYTE value = NULL;
 
/* BEGIN input validation */
@@ -2052,7 +2052,6 @@
mssql_statement *statement;
mssql_result *result;
int num_fields;
-   int blocks_initialized=1;
int batchsize;
int ac = ZEND_NUM_ARGS();
 



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



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

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:54:54 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/mssql  php_mssql.c 
  Log:
  MFH: Removed unused variables.
  
  
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.86.2.22 php-src/ext/mssql/php_mssql.c:1.86.2.23
--- php-src/ext/mssql/php_mssql.c:1.86.2.22 Wed Jul 23 12:53:37 2003
+++ php-src/ext/mssql/php_mssql.c   Wed Jul 23 12:54:54 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mssql.c,v 1.86.2.22 2003/07/23 16:53:37 iliaa Exp $ */
+/* $Id: php_mssql.c,v 1.86.2.23 2003/07/23 16:54:54 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -1903,7 +1903,7 @@
mssql_link *mssql_ptr;
mssql_statement *statement;
mssql_bind bind,*bindp;
-   int id = 0, status = 0;
+   int status = 0;
LPBYTE value = NULL;
 
/* BEGIN input validation */
@@ -2062,7 +2062,6 @@
mssql_statement *statement;
mssql_result *result;
int num_fields;
-   int blocks_initialized=1;
int batchsize;
int ac = ZEND_NUM_ARGS();
 



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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 12:56:06 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  BFN
  
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.296 php-src/NEWS:1.1247.2.297
--- php-src/NEWS:1.1247.2.296   Wed Jul 23 12:07:00 2003
+++ php-src/NEWSWed Jul 23 12:56:05 2003
@@ -12,9 +12,13 @@
   is used for background color. (Pierre-Alain Joye)
 - Fixed a bug that under certain circumstances could invalidate safe_mode.
   (Ilia)
+- Fixed bug #24752 (Unhandled uniqueidentifier field type). (Ilia, 
+  s.sonnenberg[at]coolspot.de)
 - Fixed bug #24710 (Crash when $obj-{0} is used). (Zeev)
 - Fixed bug #24663 (\n. sequences were not being escaped). (Ilia)
 - Fixed bug #24640 (var_export and var_dump can't output large float). (Marcus)
+- Fixed bug #24609 (segfault when using replace node across different docs).
+  (Rob Richards)
 - Fixed bug #24594 (Rewrite the imagefill function). (Pierre-Alain Joye)
 - Fixed bug #24592 (NULL related crash in session extension). (Sascha)
 - Fixed bug #24573 (debug_backtrace() crashes if $this set to null). (Jani)



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



[PHP-CVS] cvs: php-src /ext/standard dir.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 17:41:44 2003 EDT

  Modified files:  
/php-src/ext/standard   dir.c 
  Log:
  Fixed GLOB_ONLYDIR to work on GNU libc based system.
  
  
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.125 php-src/ext/standard/dir.c:1.126
--- php-src/ext/standard/dir.c:1.125Mon Jul 14 12:23:14 2003
+++ php-src/ext/standard/dir.c  Wed Jul 23 17:41:44 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dir.c,v 1.125 2003/07/14 16:23:14 sniper Exp $ */
+/* $Id: dir.c,v 1.126 2003/07/23 21:41:44 iliaa Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -413,7 +413,14 @@
 
array_init(return_value);
for (n = 0; n  globbuf.gl_pathc; n++) {
-#ifdef GLOB_EMULATE_ONLYDIR
+   /* we need to this everytime since GLOB_ONLYDIR does not guarantee that
+* all directories will be filtered. GNU libc documentation states the
+* following: 
+* If the information about the type of the file is easily available 
+* non-directories will be rejected but no extra work will be done to 
+* determine the information for each file. I.e., the caller must 
still be 
+* able to filter directories out. 
+*/
if (flags  GLOB_ONLYDIR) {
struct stat s;
 
@@ -425,7 +432,6 @@
continue;
}
}
-#endif
add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip, 1);
}
 



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard dir.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 17:41:54 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   dir.c 
  Log:
  MFH: Fixed GLOB_ONLYDIR to work on GNU libc based system.
  
  
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.109.2.9 php-src/ext/standard/dir.c:1.109.2.10
--- php-src/ext/standard/dir.c:1.109.2.9Mon Jul 14 12:23:28 2003
+++ php-src/ext/standard/dir.c  Wed Jul 23 17:41:53 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dir.c,v 1.109.2.9 2003/07/14 16:23:28 sniper Exp $ */
+/* $Id: dir.c,v 1.109.2.10 2003/07/23 21:41:53 iliaa Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -411,7 +411,14 @@
 
array_init(return_value);
for (n = 0; n  globbuf.gl_pathc; n++) {
-#ifdef GLOB_EMULATE_ONLYDIR
+   /* we need to this everytime since GLOB_ONLYDIR does not guarantee that
+* all directories will be filtered. GNU libc documentation states the
+* following: 
+* If the information about the type of the file is easily available 
+* non-directories will be rejected but no extra work will be done to 
+* determine the information for each file. I.e., the caller must 
still be 
+* able to filter directories out. 
+*/
if (flags  GLOB_ONLYDIR) {
struct stat s;
 
@@ -423,7 +430,6 @@
continue;
}
}
-#endif
add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip, 1);
}
 



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/file proc_open01.phpt

2003-07-23 Thread Wez Furlong
wez Wed Jul 23 17:48:50 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard/tests/fileproc_open01.phpt 
  Log:
  Fix this test, at least for Tru 64 where 1 second it just too small an
  interval for the test to succeed.
  
  
Index: php-src/ext/standard/tests/file/proc_open01.phpt
diff -u php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.3 
php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.4
--- php-src/ext/standard/tests/file/proc_open01.phpt:1.1.2.3Tue Jul 15 13:28:54 
2003
+++ php-src/ext/standard/tests/file/proc_open01.phptWed Jul 23 17:48:50 2003
@@ -30,7 +30,7 @@
  break;
}
$read_fds = array($pipes[1]);
-   $retval = stream_select($read_fds, $write_fds = NULL, $exp_fds = NULL, 1);
+   $retval = stream_select($read_fds, $write_fds = NULL, $exp_fds = NULL, 10);
if ($retval === false) {
print select() failed\n;
break;



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



[PHP-CVS] cvs: php-src /ext/zlib zlib_fopen_wrapper.c

2003-07-23 Thread Ilia Alshanetsky
iliaa   Wed Jul 23 20:03:42 2003 EDT

  Modified files:  
/php-src/ext/zlib   zlib_fopen_wrapper.c 
  Log:
  gztell() is not necessary, the return value of gzseek() represents the 
  new position. With zlib 1.1.4 gztell() alse returns 0 when working
  on non-zlib files (test ext/zlib/tests/gzreadgzwriteplain.phpt).
  
  
  
Index: php-src/ext/zlib/zlib_fopen_wrapper.c
diff -u php-src/ext/zlib/zlib_fopen_wrapper.c:1.40 
php-src/ext/zlib/zlib_fopen_wrapper.c:1.41
--- php-src/ext/zlib/zlib_fopen_wrapper.c:1.40  Tue Jun 10 16:03:41 2003
+++ php-src/ext/zlib/zlib_fopen_wrapper.c   Wed Jul 23 20:03:42 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: zlib_fopen_wrapper.c,v 1.40 2003/06/10 20:03:41 imajes Exp $ */
+/* $Id: zlib_fopen_wrapper.c,v 1.41 2003/07/24 00:03:42 iliaa Exp $ */
 
 #define _GNU_SOURCE
 
@@ -56,14 +56,12 @@
 static int php_gziop_seek(php_stream *stream, off_t offset, int whence, off_t 
*newoffs TSRMLS_DC)
 {
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) 
stream-abstract;
-   int ret;
-   
+
assert(self != NULL);
-   
-   ret = gzseek(self-gz_file, offset, whence);
-   *newoffs = gztell(self-gz_file);
-   
-   return (ret  0) ? -1 : 0;
+
+   *newoffs = gzseek(self-gz_file, offset, whence);
+
+   return (*newoffs  0) ? -1 : 0;
 }
 
 static int php_gziop_close(php_stream *stream, int close_handle TSRMLS_DC)



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



[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS

2003-07-23 Thread Jani Taskinen
sniper  Wed Jul 23 21:56:07 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  nitpicking again :)
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.297 php-src/NEWS:1.1247.2.298
--- php-src/NEWS:1.1247.2.297   Wed Jul 23 12:56:05 2003
+++ php-src/NEWSWed Jul 23 21:56:06 2003
@@ -12,23 +12,24 @@
   is used for background color. (Pierre-Alain Joye)
 - Fixed a bug that under certain circumstances could invalidate safe_mode.
   (Ilia)
-- Fixed bug #24752 (Unhandled uniqueidentifier field type). (Ilia, 
-  s.sonnenberg[at]coolspot.de)
+- Fixed bug #24752 (Unhandled uniqueidentifier field type). 
+  (Ilia, s.sonnenberg[at]coolspot.de)
 - Fixed bug #24710 (Crash when $obj-{0} is used). (Zeev)
 - Fixed bug #24663 (\n. sequences were not being escaped). (Ilia)
-- Fixed bug #24640 (var_export and var_dump can't output large float). (Marcus)
-- Fixed bug #24609 (segfault when using replace node across different docs).
-  (Rob Richards)
-- Fixed bug #24594 (Rewrite the imagefill function). (Pierre-Alain Joye)
+- Fixed bug #24640 (var_export() and var_dump() can not output large floats).
+  (Marcus)
+- Fixed bug #24609 (ext/domxml: segfault when using replace node across 
+  different docs). (Rob Richards)
+- Fixed bug #24594 (Rewrite of the imagefill() function). (Pierre-Alain Joye)
 - Fixed bug #24592 (NULL related crash in session extension). (Sascha)
 - Fixed bug #24573 (debug_backtrace() crashes if $this set to null). (Jani)
 - Fixed bug #24560 (parse_url() incorrectly handling certain file:// based 
   schemas). (Ilia)
 - Fixed bug #24537 (apache2 compile misses some include directories). (Jani)
-- Fixed bug #24535 (Crash when retrieving data from unbuffered result after
-  the original connection has been changed). (Ilia)
+- Fixed bug #24535 (ext/mysql: crash when retrieving data from unbuffered
+  result after the original connection has been changed). (Ilia)
 - Fixed bug #24519 (aggregate_methods_by_list() does not increment refcount).
-- Fixed bug #24313 (file_exist() warning on non-existent files when
+- Fixed bug #24313 (file_exists() warning on non-existent files when
   open_basedir is used). (Ilia)
 - Fixed bug #24312 (base64_decode() does not skip 0xF0-0xFF characters).
   (gereon.steffens[at]onvista.de, Ilia)



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



Re: [PHP-CVS] cvs: php-src /ext/pgsql config.m4 pgsql.c php_pgsql.h

2003-07-23 Thread Jani Taskinen

@ does not work. (and editing NEWS is much nicer anyway)

--Jani



On Tue, 22 Jul 2003, Marcus Boerger wrote:

helly  Tue Jul 22 19:05:17 2003 EDT

  Modified files:  
/php-src/ext/pgsql config.m4 php_pgsql.h pgsql.c 
  Log:
  Added pg_version() which returns an associative array of client/protocol/server
  version.
  @Added pg_version() function. (Marcus)
  
  
Index: php-src/ext/pgsql/config.m4
diff -u php-src/ext/pgsql/config.m4:1.34 php-src/ext/pgsql/config.m4:1.35
--- php-src/ext/pgsql/config.m4:1.34   Wed Jun 26 09:07:40 2002
+++ php-src/ext/pgsql/config.m4Tue Jul 22 19:05:17 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.34 2002/06/26 13:07:40 derick Exp $
+dnl $Id: config.m4,v 1.35 2003/07/22 23:05:17 helly Exp $
 dnl
 
 AC_DEFUN(PHP_PGSQL_CHECK_FUNCTIONS,[
@@ -57,6 +57,8 @@
   AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq under 
 windows]))
   AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL]))
   AC_CHECK_LIB(pq, PQclientEncoding,AC_DEFINE(HAVE_PQCLIENTENCODING,1,[PostgreSQL 
 7.0.x or later]))
+  AC_CHECK_LIB(pq, PQparameterStatus,AC_DEFINE(HAVE_PQPARAMETERSTATUS,1,[PostgreSQL 
7.4 or later]))
+  AC_CHECK_LIB(pq, PQprotocolVersion,AC_DEFINE(HAVE_PQPROTOCOLVERSION,1,[PostgreSQL 
7.4 or later]))
   AC_CHECK_LIB(pq, 
 pg_encoding_to_char,AC_DEFINE(HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT,1,[Whether libpq is 
 compiled with --enable-multibye]))
   LIBS=$old_LIBS
   LDFLAGS=$old_LDFLAGS
Index: php-src/ext/pgsql/php_pgsql.h
diff -u php-src/ext/pgsql/php_pgsql.h:1.62 php-src/ext/pgsql/php_pgsql.h:1.63
--- php-src/ext/pgsql/php_pgsql.h:1.62 Tue Jun 10 16:03:35 2003
+++ php-src/ext/pgsql/php_pgsql.h  Tue Jul 22 19:05:17 2003
@@ -17,7 +17,7 @@
+--+
  */
  
-/* $Id: php_pgsql.h,v 1.62 2003/06/10 20:03:35 imajes Exp $ */
+/* $Id: php_pgsql.h,v 1.63 2003/07/22 23:05:17 helly Exp $ */
 
 #ifndef PHP_PGSQL_H
 #define PHP_PGSQL_H
@@ -71,6 +71,7 @@
 PHP_FUNCTION(pg_port);
 PHP_FUNCTION(pg_tty);
 PHP_FUNCTION(pg_options);
+PHP_FUNCTION(pg_version);
 PHP_FUNCTION(pg_ping);
 /* query functions */
 PHP_FUNCTION(pg_query);
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.283 php-src/ext/pgsql/pgsql.c:1.284
--- php-src/ext/pgsql/pgsql.c:1.283Tue Jul 22 18:05:46 2003
+++ php-src/ext/pgsql/pgsql.c  Tue Jul 22 19:05:17 2003
@@ -19,7 +19,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.283 2003/07/22 22:05:46 helly Exp $ */
+/* $Id: pgsql.c,v 1.284 2003/07/22 23:05:17 helly Exp $ */
 
 #include stdlib.h
 
@@ -88,6 +88,7 @@
   PHP_FE(pg_port, NULL)
   PHP_FE(pg_tty,  NULL)
   PHP_FE(pg_options,  NULL)
+  PHP_FE(pg_version,  NULL)
   PHP_FE(pg_ping, NULL)
   /* query functions */
   PHP_FE(pg_query,NULL)
@@ -782,6 +783,7 @@
 #define PHP_PG_PORT 4
 #define PHP_PG_TTY 5
 #define PHP_PG_HOST 6
+#define PHP_PG_VERSION 7
 
 /* {{{ php_pgsql_get_link_info
  */
@@ -831,6 +833,18 @@
   case PHP_PG_HOST:
   Z_STRVAL_P(return_value) = PQhost(pgsql);
   break;
+  case PHP_PG_VERSION:
+  array_init(return_value);
+  add_assoc_string(return_value, client, PG_VERSION, 1);
+#if HAVE_PQPROTOCOLVERSION
+  add_assoc_long(return_value, protocol, 
PQprotocolVersion(pgsql));
+#if HAVE_PQPARAMETERSTATUS
+  if (PQprotocolVersion(pgsql) = 3) {
+  add_assoc_string(return_value, server, 
PQparameterStatus(pgsql, server_version), 1);
+  }
+#endif
+#endif
+  return;
   default:
   RETURN_FALSE;
   }
@@ -890,6 +904,14 @@
 PHP_FUNCTION(pg_host)
 {
   php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_HOST);
+}
+/* }}} */
+
+/* {{{ proto array pg_version([resource connection])
+   Returns an array with client, protocol and server version (when available) */
+PHP_FUNCTION(pg_version)
+{
+  php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_VERSION);
 }
 /* }}} */
 





-- 
https://www.paypal.com/xclick/[EMAIL PROTECTED]no_note=1tax=0currency_code=EUR
 


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



Re: [PHP-CVS] cvs: php-src /ext/sockets sockets.c /ext/standardstreamsfuncs.c

2003-07-23 Thread Jani Taskinen

MFH (to PHP_4_3 branch).
And try to use the bug numbers in the commit messages.
And add news entry in the NEWS file (in PHP_4_3 branch).

--Jani


On Tue, 22 Jul 2003, Jason Greene wrote:

jason  Tue Jul 22 03:20:56 2003 EDT

  Modified files:  
/php-src/ext/sockets   sockets.c 
/php-src/ext/standard  streamsfuncs.c 
  Log:
  Fix EINVAL errors for OS's (Solaris + BSD) that do not appreciate microseconds = 1 
 second
  Patch submitted from [EMAIL PROTECTED]
  
  
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.146 php-src/ext/sockets/sockets.c:1.147
--- php-src/ext/sockets/sockets.c:1.146Tue Jul  8 01:00:13 2003
+++ php-src/ext/sockets/sockets.c  Tue Jul 22 03:20:55 2003
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.146 2003/07/08 05:00:13 pollita Exp $ */
+/* $Id: sockets.c,v 1.147 2003/07/22 07:20:55 jason Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -641,8 +641,16 @@
   convert_to_long(tmp);
   sec = tmp;
   }
-  tv.tv_sec = Z_LVAL_P(sec);
-  tv.tv_usec = usec;
+
+  /* Solaris + BSD do not like microsecond values which are = 1 sec */ 
+  if (usec  99) {
+  tv.tv_sec = Z_LVAL_P(sec) + (usec / 100);
+  tv.tv_usec = usec % 100;
+  } else {
+  tv.tv_sec = Z_LVAL_P(sec);
+  tv.tv_usec = usec;
+  }   
+
   tv_p = tv;
 
   if (sec == tmp) {
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.24 
php-src/ext/standard/streamsfuncs.c:1.25
--- php-src/ext/standard/streamsfuncs.c:1.24   Sat Jun 28 07:24:46 2003
+++ php-src/ext/standard/streamsfuncs.cTue Jul 22 03:20:55 2003
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.24 2003/06/28 11:24:46 wez Exp $ */
+/* $Id: streamsfuncs.c,v 1.25 2003/07/22 07:20:55 jason Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -563,8 +563,16 @@
   /* If seconds is not set to null, build the timeval, else we wait indefinitely 
 */
   if (sec != NULL) {
   convert_to_long_ex(sec);
-  tv.tv_sec = Z_LVAL_P(sec);
-  tv.tv_usec = usec;
+
+  /* Solaris + BSD do not like microsecond values which are = 1 sec */
+  if (usec  99) {
+  tv.tv_sec = Z_LVAL_P(sec) + (usec / 100);
+  tv.tv_usec = usec % 100;
+  } else {
+  tv.tv_sec = Z_LVAL_P(sec);
+  tv.tv_usec = usec;
+  }
+
   tv_p = tv;
   }
 





-- 
https://www.paypal.com/xclick/[EMAIL PROTECTED]no_note=1tax=0currency_code=EUR
 


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



[PHP-CVS] cvs: php-src / NEWS

2003-07-23 Thread Jani Taskinen
sniper  Wed Jul 23 22:11:30 2003 EDT

  Modified files:  
/php-srcNEWS 
  Log:
  Missing entries (ThiesMarcus), some style fixes
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1443 php-src/NEWS:1.1444
--- php-src/NEWS:1.1443 Mon Jul 21 04:20:48 2003
+++ php-src/NEWSWed Jul 23 22:11:30 2003
@@ -3,15 +3,20 @@
 ?? ??? 200?, Version 5.0.0
 
 ?? ??? 2003, PHP 5 Beta 2
-- Added function dbase_get_header_info. (Zak)
+- Added misc. new functions:
+  . pg_version(). (Marcus)
+  . dbase_get_header_info(). (Zak)
+  . snmp_read_mib(). (Jani)
+- Added optional parameter to OCIWriteTemporaryLob() to specify the type of LOB
+  (Patch by Novicky Marek [EMAIL PROTECTED]). (Thies)
 - Added SQLite support to DBX. (Marc)
 - Added reflection API. (Andrei, George, Timm)
-- Added snmp_read_mib() which reads a MIB file into the active MIB tree. (Jani)
 - Fixed support for ![CDATA[]] fields within XML documents in ext/xml. 
   (Sterling)
 - Fixed visibility of __construct and __clone. (Marcus)
 - Fixed bug #24729 ($obj = new $className; causes crash when $className is not 
   set). (Marcus)
+- Fixed bug #24565 (cannot read array elements recived via $_REQUEST). (Zeev)
 - Fixed bug #24445 (get_parent_class() returns different values).
   (Sterling, Stanislav)
 - Fixed bug #24403 (preg_replace() problem: Using $this when not in object 
@@ -29,15 +34,15 @@
 - Switched to Zend Engine 2, which includes numerous engine level improvements.
   A full list is available at http://www.php.net/zend-engine-2.php.
 - Added SQLite (http://www.hwaci.com/sw/sqlite/) extension: (Wez, Marcus, Tal)
-  . Bundled SQLite
-  . Enabled by default 
+  . Includes bundled SQLite library
+  . Enabled by default
 - Completely Overhauled XML support:
-  . New simplexml extension (Sterling)
-  . New DOM extension (Rob, Chregu, Marcus)
-  . New XSL extension (Chregu, Rob)
-  . Moved the old DOM-XML and XSLT extensions to PECL (James, Sterling)
-  . ext/xml can now use both libxml2 and expat to parse XML (Sterling)
-  . Removed bundled expat (Jani)
+  . New simplexml extension. (Sterling)
+  . New DOM extension. (Rob, Chregu, Marcus)
+  . New XSL extension. (Chregu, Rob)
+  . Moved the old DOM-XML and XSLT extensions to PECL. (James, Sterling)
+  . ext/xml can now use either libxml2 or expat to parse XML. (Sterling)
+  . Removed bundled expat library. (Jani)
 - New php.ini options:
   . session.hash_function and session.hash_bits_per_character. (Sascha)
   . mail.force_extra_paramaters. (Derick)



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/interbase interbase.c php_interbase.h /ext/interbase/tests 005.phpt

2003-07-23 Thread Jani Taskinen
sniper  Wed Jul 23 22:47:11 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/interbase  interbase.c php_interbase.h 
/php-src/ext/interbase/tests005.phpt 
  Log:
  - MFH: Sync to HEAD (TSRMLS_FETCH() nukes, pval - zval, php_error_docref)
  
  Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.91.2.11 
php-src/ext/interbase/interbase.c:1.91.2.12
--- php-src/ext/interbase/interbase.c:1.91.2.11 Wed Jul  9 20:17:40 2003
+++ php-src/ext/interbase/interbase.c   Wed Jul 23 22:47:10 2003
@@ -17,8 +17,8 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.91.2.11 2003/07/10 00:17:40 sniper Exp $ */
-  
+/* $Id: interbase.c,v 1.91.2.12 2003/07/24 02:47:10 sniper Exp $ */
+
 
 /* TODO: Arrays, roles?
 A lot... */
@@ -115,8 +115,7 @@
{NULL, NULL, NULL}
 };
 
-zend_module_entry ibase_module_entry =
-{
+zend_module_entry ibase_module_entry = {
STANDARD_MODULE_HEADER,
interbase,
ibase_functions,
@@ -125,23 +124,19 @@
PHP_RINIT(ibase),
PHP_RSHUTDOWN(ibase),
PHP_MINFO(ibase),
-NO_VERSION_YET,
+   NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
 };
 
 #ifdef COMPILE_DL_INTERBASE
 ZEND_GET_MODULE(ibase)
-
 #define DL_MALLOC(size) malloc(size)
 #define DL_STRDUP(str) strdup(str)
 #define DL_FREE(ptr) free(ptr)
-
 #else
-
 #define DL_MALLOC(size) emalloc(size)
 #define DL_STRDUP(str) estrdup(str)
 #define DL_FREE(ptr) efree(ptr)
-
 #endif
 
 /* True globals, no need for thread safety */
@@ -155,9 +150,10 @@
 
 #define IB_STATUS (IBG(status))
 
-/* Fill ib_link and trans_n with the correct database link and transaction slot 
number. */
-
-static void get_link_trans(INTERNAL_FUNCTION_PARAMETERS, zval **link_id, 
ibase_db_link **ib_link, int *trans_n, int *trans_id) {
+/* Fill ib_link and trans_n with the correct database link and transaction slot 
number.
+ */
+static void get_link_trans(INTERNAL_FUNCTION_PARAMETERS, zval **link_id, 
ibase_db_link **ib_link, int *trans_n, int *trans_id)
+{
int type;
void *resource = NULL;
ibase_tr_link *ib_trans;
@@ -184,12 +180,11 @@
 }

 #define RESET_ERRMSG { IBG(errmsg)[0] = '\0';}
-
 #define TEST_ERRMSG ( IBG(errmsg)[0] != '\0')
 
 /* sql variables union
-   used for convert and binding input variables
-*/
+ * used for convert and binding input variables
+ */
 typedef struct {
union {
short sval;
@@ -204,17 +199,16 @@
short sqlind;
 } BIND_BUF;
 
-
 /* get blob identifier from argument
-   on empty unset argument ib_blob set to NULL
-*/
+ * on empty unset argument ib_blob set to NULL
+ */
 #define GET_BLOB_ID_ARG(blob_arg, ib_blob)\
 {\
if (Z_TYPE_P(blob_arg) == IS_STRING  Z_STRLEN_P(blob_arg) == 0) {\
ib_blob = NULL;\
} else if (Z_TYPE_P(blob_arg) != IS_STRING\
 || Z_STRLEN_P(blob_arg) != sizeof(ibase_blob_handle)\
-|| ((ibase_blob_handle *)(Z_STRVAL_P(blob_arg)))-bl_handle 
!= 0){\
+|| ((ibase_blob_handle *)(Z_STRVAL_P(blob_arg)))-bl_handle 
!= 0) {\
_php_ibase_module_error(Invalid blob id);\
RETURN_FALSE;\
} else {\
@@ -222,22 +216,22 @@
}\
 }
 
-
 /* get blob handle from argument
-   note: blob already open when handle active
-*/
+ * note: blob already open when handle active
+ */
 #define GET_BLOB_HANDLE_ARG(blob_arg, blob_ptr) \
 { \
int type; \
-   convert_to_long(blob_arg); \
-   blob_ptr = (ibase_blob_handle *) zend_list_find(Z_LVAL_P(blob_arg), type); \
+   convert_to_long_ex(blob_arg); \
+   blob_ptr = (ibase_blob_handle *) zend_list_find(Z_LVAL_PP(blob_arg), type); \
if (type!=le_blob) { \
-   _php_ibase_module_error(%d is not blob handle, Z_LVAL_P(blob_arg)); \
+   _php_ibase_module_error(%d is not blob handle, Z_LVAL_PP(blob_arg)); 
\
RETURN_FALSE; \
} \
 }
 
-/* blob information struct */
+/* blob information struct
+ */
 typedef struct {
ISC_LONG  max_segment;  /* Length of longest segment */
ISC_LONG  num_segments; /* Total number of segments */
@@ -260,12 +254,13 @@
if (IBG(errmsg[0])) {
RETURN_STRING(IBG(errmsg), 1);
}
+
RETURN_FALSE;
 }
 /* }}} */
 
 /* {{{ _php_ibase_error(TSRMLS_D) 
-print interbase error and save it for ibase_errmsg() */
+   print interbase error and save it for ibase_errmsg() */
 static void _php_ibase_error(TSRMLS_D)
 {
char *s;
@@ -273,16 +268,18 @@
 
s = IBG(errmsg);
statusp = IB_STATUS;
+
while ((s - IBG(errmsg))  MAX_ERRMSG - (IBASE_MSGSIZE + 2)  
isc_interprete(s, statusp)) {
strcat(IBG(errmsg),  );
s = IBG(errmsg) + strlen(IBG(errmsg));
}
-   php_error(E_WARNING, %s(): %s, 

[PHP-CVS] cvs: php-src(PHP_4_3) /ext/tokenizer php_tokenizer.h tokenizer.c /ext/xmlrpc php_xmlrpc.h xmlrpc-epi-php.c

2003-07-23 Thread Jani Taskinen
sniper  Wed Jul 23 22:53:46 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/tokenizer  php_tokenizer.h tokenizer.c 
/php-src/ext/xmlrpc php_xmlrpc.h xmlrpc-epi-php.c 
  Log:
  MFH: missing cvs Id tags, proto fixes
  
  
Index: php-src/ext/tokenizer/php_tokenizer.h
diff -u php-src/ext/tokenizer/php_tokenizer.h:1.4.2.1 
php-src/ext/tokenizer/php_tokenizer.h:1.4.2.2
--- php-src/ext/tokenizer/php_tokenizer.h:1.4.2.1   Tue Dec 31 11:35:40 2002
+++ php-src/ext/tokenizer/php_tokenizer.h   Wed Jul 23 22:53:45 2003
@@ -16,6 +16,8 @@
+--+
  */
 
+/* $Id: php_tokenizer.h,v 1.4.2.2 2003/07/24 02:53:45 sniper Exp $ */
+
 #ifndef PHP_TOKENIZER_H
 #define PHP_TOKENIZER_H
 
Index: php-src/ext/tokenizer/tokenizer.c
diff -u php-src/ext/tokenizer/tokenizer.c:1.12.2.1 
php-src/ext/tokenizer/tokenizer.c:1.12.2.2
--- php-src/ext/tokenizer/tokenizer.c:1.12.2.1  Tue Dec 31 11:35:40 2002
+++ php-src/ext/tokenizer/tokenizer.c   Wed Jul 23 22:53:45 2003
@@ -16,6 +16,8 @@
+--+
 */
 
+/* $Id: tokenizer.c,v 1.12.2.2 2003/07/24 02:53:45 sniper Exp $ */
+
 #ifdef HAVE_CONFIG_H
 #include config.h
 #endif
Index: php-src/ext/xmlrpc/php_xmlrpc.h
diff -u php-src/ext/xmlrpc/php_xmlrpc.h:1.6.4.1 php-src/ext/xmlrpc/php_xmlrpc.h:1.6.4.2
--- php-src/ext/xmlrpc/php_xmlrpc.h:1.6.4.1 Tue Dec 31 11:35:44 2002
+++ php-src/ext/xmlrpc/php_xmlrpc.h Wed Jul 23 22:53:46 2003
@@ -51,6 +51,8 @@
+--+
  */
 
+/* $Id: php_xmlrpc.h,v 1.6.4.2 2003/07/24 02:53:46 sniper Exp $ */
+
 #ifndef _PHP_XMLRPC_H
 #define _PHP_XMLRPC_H
 
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.2 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.3
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.2Tue Dec 31 11:35:44 2002
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Wed Jul 23 22:53:46 2003
@@ -51,6 +51,8 @@
+--+
  */
 
+/* $Id: xmlrpc-epi-php.c,v 1.24.2.3 2003/07/24 02:53:46 sniper Exp $ */
+
 /**
 * BUGS:   *
 *  - when calling a php user function, there appears to be no way to  *
@@ -828,7 +830,7 @@
}
 }
 
-/* {{{ proto void xmlrpc_server_destroy(handle server)
+/* {{{ proto int xmlrpc_server_destroy(handle server)
Destroys server resources */
 PHP_FUNCTION(xmlrpc_server_destroy)
 {
@@ -1478,7 +1480,7 @@
RETURN_STRING((char*) xmlrpc_type_as_str(type, vtype), 1);
 }
 
-/* {{{ proto string xmlrpc_is_fault(array)
+/* {{{ proto bool xmlrpc_is_fault(array)
Determines if an array value represents an XMLRPC fault. */
 PHP_FUNCTION(xmlrpc_is_fault)
 {



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