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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 15:13:20 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mime_magic mime_magic.c 
  Log:
  Use thread-safe code
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.42.2.5.2.2r2=1.42.2.5.2.3diff_format=u
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.2 
php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.3
--- php-src/ext/mime_magic/mime_magic.c:1.42.2.5.2.2Sun Nov 26 17:02:13 2006
+++ php-src/ext/mime_magic/mime_magic.c Thu Nov 30 15:13:19 2006
@@ -15,7 +15,7 @@
   | Author: Hartmut Holzgraefe  [EMAIL PROTECTED]   |
   +--+
 
-  $Id: mime_magic.c,v 1.42.2.5.2.2 2006/11/26 17:02:13 iliaa Exp $ 
+  $Id: mime_magic.c,v 1.42.2.5.2.3 2006/11/30 15:13:19 iliaa Exp $ 
 
   This module contains a lot of stuff taken from Apache mod_mime_magic,
   so the license section is a little bit longer than usual:
@@ -1755,12 +1755,15 @@
 case DATE:
 case BEDATE:
 case LEDATE:
-   /* XXX: not multithread safe */
-   pp = ctime((time_t *)  p-l);
-   if ((rt = strchr(pp, '\n')) != NULL)
-   *rt = '\0';
-   (void) magic_rsl_printf(m-desc, pp);
-   return;
+   {
+   char ctimebuf[52];
+   pp = php_ctime_r((time_t *) p-l, ctimebuf);
+   if ((rt = strchr(pp, '\n')) != NULL) {
+   *rt = '\0';
+   }
+   (void) magic_rsl_printf(m-desc, pp);
+   return;
+   }
 default:
{
TSRMLS_FETCH();

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



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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 15:13:33 2006 UTC

  Modified files:  
/php-src/ext/mime_magic mime_magic.c 
  Log:
  MFB: Use thread-safe code
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mime_magic/mime_magic.c?r1=1.51r2=1.52diff_format=u
Index: php-src/ext/mime_magic/mime_magic.c
diff -u php-src/ext/mime_magic/mime_magic.c:1.51 
php-src/ext/mime_magic/mime_magic.c:1.52
--- php-src/ext/mime_magic/mime_magic.c:1.51Sun Nov 26 17:03:15 2006
+++ php-src/ext/mime_magic/mime_magic.c Thu Nov 30 15:13:33 2006
@@ -15,7 +15,7 @@
   | Author: Hartmut Holzgraefe  [EMAIL PROTECTED]   |
   +--+
 
-  $Id: mime_magic.c,v 1.51 2006/11/26 17:03:15 iliaa Exp $ 
+  $Id: mime_magic.c,v 1.52 2006/11/30 15:13:33 iliaa Exp $ 
 
   This module contains a lot of stuff taken from Apache mod_mime_magic,
   so the license section is a little bit longer than usual:
@@ -1755,12 +1755,15 @@
 case DATE:
 case BEDATE:
 case LEDATE:
-   /* XXX: not multithread safe */
-   pp = ctime((time_t *)  p-l);
-   if ((rt = strchr(pp, '\n')) != NULL)
-   *rt = '\0';
-   (void) magic_rsl_printf(m-desc, pp);
-   return;
+   {
+   char ctimebuf[52];
+   pp = php_ctime_r((time_t *) p-l, ctimebuf);
+   if ((rt = strchr(pp, '\n')) != NULL) {
+   *rt = '\0';
+   }
+   (void) magic_rsl_printf(m-desc, pp);
+   return;
+   }
 default:
{
TSRMLS_FETCH();

-- 
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 crypt.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 15:59:53 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   crypt.c 
  Log:
  Use reantrant crypt_r() whenever possible.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt.c?r1=1.62.2.1r2=1.62.2.1.2.1diff_format=u
Index: php-src/ext/standard/crypt.c
diff -u php-src/ext/standard/crypt.c:1.62.2.1 
php-src/ext/standard/crypt.c:1.62.2.1.2.1
--- php-src/ext/standard/crypt.c:1.62.2.1   Sun Jan  1 12:50:14 2006
+++ php-src/ext/standard/crypt.cThu Nov 30 15:59:53 2006
@@ -17,7 +17,7 @@
|  Rasmus Lerdorf [EMAIL PROTECTED] |
+--+
  */
-/* $Id: crypt.c,v 1.62.2.1 2006/01/01 12:50:14 sniper Exp $ */
+/* $Id: crypt.c,v 1.62.2.1.2.1 2006/11/30 15:59:53 iliaa Exp $ */
 #include stdlib.h
 
 #include php.h
@@ -145,8 +145,15 @@
salt[2] = '\0';
 #endif
}
-
-   RETVAL_STRING(crypt(str, salt), 1);
+#ifdef HAVE_CRYPT_R
+   {
+   struct crypt_data buffer;
+   memset(buffer, 0, sizeof(buffer));
+   RETURN_STRING(crypt_r(str, salt, buffer));
+   }
+#else
+   RETURN_STRING(crypt(str, salt), 1);
+#endif
 }
 /* }}} */
 #endif

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



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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:00:05 2006 UTC

  Modified files:  
/php-src/ext/standard   crypt.c 
  Log:
  MFB: Use reantrant crypt_r() whenever possible.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt.c?r1=1.64r2=1.65diff_format=u
Index: php-src/ext/standard/crypt.c
diff -u php-src/ext/standard/crypt.c:1.64 php-src/ext/standard/crypt.c:1.65
--- php-src/ext/standard/crypt.c:1.64   Mon Sep 25 01:33:57 2006
+++ php-src/ext/standard/crypt.cThu Nov 30 16:00:05 2006
@@ -17,7 +17,7 @@
|  Rasmus Lerdorf [EMAIL PROTECTED] |
+--+
  */
-/* $Id: crypt.c,v 1.64 2006/09/25 01:33:57 pollita Exp $ */
+/* $Id: crypt.c,v 1.65 2006/11/30 16:00:05 iliaa Exp $ */
 #include stdlib.h
 
 #include php.h
@@ -145,8 +145,15 @@
salt[2] = '\0';
 #endif
}
-
-   RETVAL_STRING(crypt(str, salt), 1);
+#ifdef HAVE_CRYPT_R
+   {
+   struct crypt_data buffer;
+   memset(buffer, 0, sizeof(buffer));
+   RETURN_STRING(crypt_r(str, salt, buffer));
+   }
+#else
+   RETURN_STRING(crypt(str, salt), 1);
+#endif
 }
 /* }}} */
 #endif

-- 
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) /main php_scandir.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:10:38 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   php_scandir.c 
  Log:
  Thread-safety issues
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.c?r1=1.12.2.1r2=1.12.2.1.2.1diff_format=u
Index: php-src/main/php_scandir.c
diff -u php-src/main/php_scandir.c:1.12.2.1 
php-src/main/php_scandir.c:1.12.2.1.2.1
--- php-src/main/php_scandir.c:1.12.2.1 Sun Jan  1 12:50:17 2006
+++ php-src/main/php_scandir.c  Thu Nov 30 16:10:38 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_scandir.c,v 1.12.2.1 2006/01/01 12:50:17 sniper Exp $ */
+/* $Id: php_scandir.c,v 1.12.2.1.2.1 2006/11/30 16:10:38 iliaa Exp $ */
 
 #include php_scandir.h
 
@@ -62,6 +62,8 @@
struct dirent *dp = NULL;
int vector_size = 0;
int nfiles = 0;
+   char entry[sizeof(struct dirent)+MAXPATHLEN];
+   struct dirent *result = (struct dirent *)entry;
 
if (namelist == NULL) {
return -1;
@@ -71,7 +73,7 @@
return -1;
}
 
-   while ((dp = readdir(dirp)) != NULL) {
+   while ((dp = php_readdir_r(dirp, (struct dirent *)entry, result)) == 0 
 result) {
int dsize = 0;
struct dirent *newdp = NULL;
 

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



[PHP-CVS] cvs: php-src /main php_scandir.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:10:48 2006 UTC

  Modified files:  
/php-src/main   php_scandir.c 
  Log:
  MFB: Thread-safety issues
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_scandir.c?r1=1.13r2=1.14diff_format=u
Index: php-src/main/php_scandir.c
diff -u php-src/main/php_scandir.c:1.13 php-src/main/php_scandir.c:1.14
--- php-src/main/php_scandir.c:1.13 Sun Jan  1 13:09:57 2006
+++ php-src/main/php_scandir.c  Thu Nov 30 16:10:48 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_scandir.c,v 1.13 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: php_scandir.c,v 1.14 2006/11/30 16:10:48 iliaa Exp $ */
 
 #include php_scandir.h
 
@@ -62,6 +62,8 @@
struct dirent *dp = NULL;
int vector_size = 0;
int nfiles = 0;
+   char entry[sizeof(struct dirent)+MAXPATHLEN];
+   struct dirent *result = (struct dirent *)entry;
 
if (namelist == NULL) {
return -1;
@@ -71,7 +73,7 @@
return -1;
}
 
-   while ((dp = readdir(dirp)) != NULL) {
+   while ((dp = php_readdir_r(dirp, (struct dirent *)entry, result)) == 0 
 result) {
int dsize = 0;
struct dirent *newdp = NULL;
 

-- 
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/interbase ibase_query.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:21:24 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/interbase  ibase_query.c 
  Log:
  Thread safety fixes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_query.c?r1=1.23.2.1r2=1.23.2.1.2.1diff_format=u
Index: php-src/ext/interbase/ibase_query.c
diff -u php-src/ext/interbase/ibase_query.c:1.23.2.1 
php-src/ext/interbase/ibase_query.c:1.23.2.1.2.1
--- php-src/ext/interbase/ibase_query.c:1.23.2.1Sun Jan  1 12:50:08 2006
+++ php-src/ext/interbase/ibase_query.c Thu Nov 30 16:21:24 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ibase_query.c,v 1.23.2.1 2006/01/01 12:50:08 sniper Exp $ */
+/* $Id: ibase_query.c,v 1.23.2.1.2.1 2006/11/30 16:21:24 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -669,14 +669,13 @@
var-sqldata = (void*)buf[i].val;
 
switch (var-sqltype  ~1) {
-   struct tm t;
+   struct tm *t, tmbuf;
 
case SQL_TIMESTAMP:
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
if (Z_TYPE_P(b_var) == IS_LONG) {
-   /* insert timestamp directly */
-   t = *gmtime(Z_LVAL_P(b_var));
+   t = php_gmtime_r(Z_LVAL_P(b_var), 
tmbuf);
} else {
 #ifdef HAVE_STRPTIME
char *format = 
INI_STR(ibase.timestampformat);
@@ -690,7 +689,7 @@
case SQL_TYPE_TIME:
format = 
INI_STR(ibase.timeformat);
}
-   if (! strptime(Z_STRVAL_P(b_var), 
format, t)) {
+   if (!strptime(Z_STRVAL_P(b_var), 
format, t)) {
/* strptime() cannot handle it, 
so let IB have a try */
break;
}
@@ -701,13 +700,13 @@
 
switch (var-sqltype  ~1) {
default: /* == case SQL_TIMESTAMP */
-   isc_encode_timestamp(t, 
buf[i].val.tsval);
+   isc_encode_timestamp(t, 
buf[i].val.tsval);
break;
case SQL_TYPE_DATE:
-   isc_encode_sql_date(t, 
buf[i].val.dtval);
+   isc_encode_sql_date(t, 
buf[i].val.dtval);
break;
case SQL_TYPE_TIME:
-   isc_encode_sql_time(t, 
buf[i].val.tmval);
+   isc_encode_sql_time(t, 
buf[i].val.tmval);
break;
}
continue;

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



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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:21:36 2006 UTC

  Modified files:  
/php-src/ext/interbase  ibase_query.c 
  Log:
  MFB: Thread safety fixes.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_query.c?r1=1.25r2=1.26diff_format=u
Index: php-src/ext/interbase/ibase_query.c
diff -u php-src/ext/interbase/ibase_query.c:1.25 
php-src/ext/interbase/ibase_query.c:1.26
--- php-src/ext/interbase/ibase_query.c:1.25Wed Mar  8 00:43:28 2006
+++ php-src/ext/interbase/ibase_query.c Thu Nov 30 16:21:36 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ibase_query.c,v 1.25 2006/03/08 00:43:28 pajoye Exp $ */
+/* $Id: ibase_query.c,v 1.26 2006/11/30 16:21:36 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -669,14 +669,13 @@
var-sqldata = (void*)buf[i].val;
 
switch (var-sqltype  ~1) {
-   struct tm t;
+   struct tm *t, tmbuf;
 
case SQL_TIMESTAMP:
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
if (Z_TYPE_P(b_var) == IS_LONG) {
-   /* insert timestamp directly */
-   t = *gmtime(Z_LVAL_P(b_var));
+   t = php_gmtime_r(Z_LVAL_P(b_var), 
tmbuf);
} else {
 #ifdef HAVE_STRPTIME
char *format = 
INI_STR(ibase.timestampformat);
@@ -690,7 +689,7 @@
case SQL_TYPE_TIME:
format = 
INI_STR(ibase.timeformat);
}
-   if (! strptime(Z_STRVAL_P(b_var), 
format, t)) {
+   if (!strptime(Z_STRVAL_P(b_var), 
format, t)) {
/* strptime() cannot handle it, 
so let IB have a try */
break;
}
@@ -701,13 +700,13 @@
 
switch (var-sqltype  ~1) {
default: /* == case SQL_TIMESTAMP */
-   isc_encode_timestamp(t, 
buf[i].val.tsval);
+   isc_encode_timestamp(t, 
buf[i].val.tsval);
break;
case SQL_TYPE_DATE:
-   isc_encode_sql_date(t, 
buf[i].val.dtval);
+   isc_encode_sql_date(t, 
buf[i].val.dtval);
break;
case SQL_TYPE_TIME:
-   isc_encode_sql_time(t, 
buf[i].val.tmval);
+   isc_encode_sql_time(t, 
buf[i].val.tmval);
break;
}
continue;

-- 
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/pdo_sqlite/sqlite/src date.c /ext/sqlite/libsqlite/src date.c /ext/xmlrpc/libxmlrpc xmlrpc.c /ext/zip/lib zip_dirent.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:38:37 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_sqlite/sqlite/src  date.c 
/php-src/ext/sqlite/libsqlite/src   date.c 
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
/php-src/ext/zip/libzip_dirent.c 
  Log:
  last set of zts fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/date.c?r1=1.3.2.2.2.1r2=1.3.2.2.2.2diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite/src/date.c
diff -u php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.1 
php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.2
--- php-src/ext/pdo_sqlite/sqlite/src/date.c:1.3.2.2.2.1Mon Aug 14 
16:15:28 2006
+++ php-src/ext/pdo_sqlite/sqlite/src/date.cThu Nov 30 16:38:37 2006
@@ -53,6 +53,7 @@
 #include stdlib.h
 #include assert.h
 #include time.h
+#include main/php_reentrancy.h
 
 #ifndef SQLITE_OMIT_DATETIME_FUNCS
 
@@ -393,7 +394,7 @@
 static double localtimeOffset(DateTime *p){
   DateTime x, y;
   time_t t;
-  struct tm *pTm;
+  struct tm *pTm, tmbuf;
   x = *p;
   computeYMD_HMS(x);
   if( x.Y1971 || x.Y=2038 ){
@@ -412,7 +413,8 @@
   computeJD(x);
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqlite3OsEnterMutex();
-  pTm = localtime(t);
+  pTm = php_localtime_r
+(t, tmbuf);
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/libsqlite/src/date.c?r1=1.3.4.1r2=1.3.4.1.2.1diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/date.c
diff -u php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1 
php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1.2.1
--- php-src/ext/sqlite/libsqlite/src/date.c:1.3.4.1 Wed Sep  7 15:11:32 2005
+++ php-src/ext/sqlite/libsqlite/src/date.c Thu Nov 30 16:38:37 2006
@@ -16,7 +16,7 @@
 ** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.3.4.1 2005/09/07 15:11:32 iliaa Exp $
+** $Id: date.c,v 1.3.4.1.2.1 2006/11/30 16:38:37 iliaa Exp $
 **
 ** NOTES:
 **
@@ -53,6 +53,7 @@
 #include stdlib.h
 #include assert.h
 #include time.h
+#include main/php_reentrancy.h
 
 #ifndef SQLITE_OMIT_DATETIME_FUNCS
 
@@ -397,7 +398,7 @@
 static double localtimeOffset(DateTime *p){
   DateTime x, y;
   time_t t;
-  struct tm *pTm;
+  struct tm *pTm, tmbuf;
   x = *p;
   computeYMD_HMS(x);
   if( x.Y1971 || x.Y=2038 ){
@@ -416,7 +417,7 @@
   computeJD(x);
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqliteOsEnterMutex();
-  pTm = localtime(t);
+  pTm = php_localtime_r(t, tmbuf);
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.8r2=1.8.4.1diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.1
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8   Mon Mar 28 00:07:24 2005
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Thu Nov 30 16:38:37 2006
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.8 2005/03/28 00:07:24 
edink Exp $;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.8.4.1 2006/11/30 16:38:37 
iliaa Exp $;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.8.4.1  2006/11/30 16:38:37  iliaa
+ *   last set of zts fixes
+ *
  *   Revision 1.8  2005/03/28 00:07:24  edink
  *   Reshufle includes to make it compile on windows
  *
@@ -126,6 +129,7 @@
  ***/
 
 #include ext/xml/expat_compat.h
+#include main/php_reentrancy.h
 #ifdef _WIN32
 #include xmlrpc_win32.h
 #endif
@@ -230,8 +234,8 @@
 }
 
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
-   struct tm *tm;
-   tm = localtime(value);
+   struct tm *tm, tmbuf;
+   tm = php_localtime_r(value, tmbuf);
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, %Y-%m-%dT%H:%M:%SZ, tm);
 #else
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_dirent.c?r1=1.1r2=1.1.2.1diff_format=u
Index: php-src/ext/zip/lib/zip_dirent.c
diff -u php-src/ext/zip/lib/zip_dirent.c:1.1 
php-src/ext/zip/lib/zip_dirent.c:1.1.2.1
--- php-src/ext/zip/lib/zip_dirent.c:1.1Mon Jul 24 16:58:58 2006
+++ php-src/ext/zip/lib/zip_dirent.cThu Nov 30 16:38:37 2006
@@ -33,8 +33,6 @@
   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-
-
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -47,6 +45,7 @@
 
 #include zip.h
 #include zipint.h
+#include main/php_reentrancy.h
 
 static time_t _zip_d2u_time(int, int);
 static char *_zip_readfpstr(FILE *, unsigned int, int, struct zip_error *);
@@ -391,11 +390,11 @@
 static time_t
 _zip_d2u_time(int dtime, int ddate)
 {
-struct tm *tm;
+struct tm *tm, tmbuf;
 time_t now;
 
 now = time(NULL);
-tm = localtime(now);
+tm = php_localtime_r(now, tmbuf);
 
 tm-tm_year = ((ddate9)127) + 1980 - 1900;
 tm-tm_mon = 

[PHP-CVS] cvs: php-src /ext/pdo_sqlite/sqlite/src date.c /ext/sqlite/libsqlite/src date.c /ext/xmlrpc/libxmlrpc xmlrpc.c /ext/zip/lib zip_dirent.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:38:53 2006 UTC

  Modified files:  
/php-src/ext/pdo_sqlite/sqlite/src  date.c 
/php-src/ext/sqlite/libsqlite/src   date.c 
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
/php-src/ext/zip/libzip_dirent.c 
  Log:
  zts fixes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/date.c?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/pdo_sqlite/sqlite/src/date.c
diff -u php-src/ext/pdo_sqlite/sqlite/src/date.c:1.6 
php-src/ext/pdo_sqlite/sqlite/src/date.c:1.7
--- php-src/ext/pdo_sqlite/sqlite/src/date.c:1.6Mon Aug 14 16:35:23 2006
+++ php-src/ext/pdo_sqlite/sqlite/src/date.cThu Nov 30 16:38:53 2006
@@ -53,6 +53,7 @@
 #include stdlib.h
 #include assert.h
 #include time.h
+#include main/php_reentrancy.h
 
 #ifndef SQLITE_OMIT_DATETIME_FUNCS
 
@@ -393,7 +394,7 @@
 static double localtimeOffset(DateTime *p){
   DateTime x, y;
   time_t t;
-  struct tm *pTm;
+  struct tm *pTm, tmbuf;
   x = *p;
   computeYMD_HMS(x);
   if( x.Y1971 || x.Y=2038 ){
@@ -412,7 +413,8 @@
   computeJD(x);
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqlite3OsEnterMutex();
-  pTm = localtime(t);
+  pTm = php_localtime_r
+(t, tmbuf);
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/libsqlite/src/date.c?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/sqlite/libsqlite/src/date.c
diff -u php-src/ext/sqlite/libsqlite/src/date.c:1.4 
php-src/ext/sqlite/libsqlite/src/date.c:1.5
--- php-src/ext/sqlite/libsqlite/src/date.c:1.4 Wed Sep  7 15:10:09 2005
+++ php-src/ext/sqlite/libsqlite/src/date.c Thu Nov 30 16:38:53 2006
@@ -16,7 +16,7 @@
 ** sqliteRegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.4 2005/09/07 15:10:09 iliaa Exp $
+** $Id: date.c,v 1.5 2006/11/30 16:38:53 iliaa Exp $
 **
 ** NOTES:
 **
@@ -53,6 +53,7 @@
 #include stdlib.h
 #include assert.h
 #include time.h
+#include main/php_reentrancy.h
 
 #ifndef SQLITE_OMIT_DATETIME_FUNCS
 
@@ -397,7 +398,7 @@
 static double localtimeOffset(DateTime *p){
   DateTime x, y;
   time_t t;
-  struct tm *pTm;
+  struct tm *pTm, tmbuf;
   x = *p;
   computeYMD_HMS(x);
   if( x.Y1971 || x.Y=2038 ){
@@ -416,7 +417,7 @@
   computeJD(x);
   t = (x.rJD-2440587.5)*86400.0 + 0.5;
   sqliteOsEnterMutex();
-  pTm = localtime(t);
+  pTm = php_localtime_r(t, tmbuf);
   y.Y = pTm-tm_year + 1900;
   y.M = pTm-tm_mon + 1;
   y.D = pTm-tm_mday;
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.9
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8   Mon Mar 28 00:07:24 2005
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Thu Nov 30 16:38:53 2006
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.8 2005/03/28 00:07:24 
edink Exp $;
+static const char rcsid[] = #(@) $Id: xmlrpc.c,v 1.9 2006/11/30 16:38:53 
iliaa Exp $;
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,9 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.9  2006/11/30 16:38:53  iliaa
+ *   zts fixes
+ *
  *   Revision 1.8  2005/03/28 00:07:24  edink
  *   Reshufle includes to make it compile on windows
  *
@@ -126,6 +129,7 @@
  ***/
 
 #include ext/xml/expat_compat.h
+#include main/php_reentrancy.h
 #ifdef _WIN32
 #include xmlrpc_win32.h
 #endif
@@ -230,8 +234,8 @@
 }
 
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
-   struct tm *tm;
-   tm = localtime(value);
+   struct tm *tm, tmbuf;
+   tm = php_localtime_r(value, tmbuf);
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, %Y-%m-%dT%H:%M:%SZ, tm);
 #else
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/lib/zip_dirent.c?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/zip/lib/zip_dirent.c
diff -u php-src/ext/zip/lib/zip_dirent.c:1.1 
php-src/ext/zip/lib/zip_dirent.c:1.2
--- php-src/ext/zip/lib/zip_dirent.c:1.1Mon Jul 24 16:58:58 2006
+++ php-src/ext/zip/lib/zip_dirent.cThu Nov 30 16:38:53 2006
@@ -33,8 +33,6 @@
   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-
-
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -47,6 +45,7 @@
 
 #include zip.h
 #include zipint.h
+#include main/php_reentrancy.h
 
 static time_t _zip_d2u_time(int, int);
 static char *_zip_readfpstr(FILE *, unsigned int, int, struct zip_error *);
@@ -391,11 +390,11 @@
 static time_t
 _zip_d2u_time(int dtime, int ddate)
 {
-struct tm *tm;
+struct tm *tm, tmbuf;
 time_t now;
 
 now = time(NULL);
-tm = localtime(now);
+tm = php_localtime_r(now, tmbuf);
 
 tm-tm_year = ((ddate9)127) + 1980 - 1900;
 tm-tm_mon = ((ddate5)15) - 1;
@@ -520,9 +519,9 @@
 static void
 _zip_u2d_time(time_t time, unsigned short *dtime, unsigned short *ddate)
 {
-struct tm *tm;
+ 

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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:48:04 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/posix  config.m4 
  Log:
  Added missing function checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.12.4.1r2=1.12.4.2diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.12.4.1 
php-src/ext/posix/config.m4:1.12.4.2
--- php-src/ext/posix/config.m4:1.12.4.1Mon Jun 19 02:19:13 2006
+++ php-src/ext/posix/config.m4 Thu Nov 30 16:48:03 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.12.4.1 2006/06/19 02:19:13 iliaa Exp $
+dnl $Id: config.m4,v 1.12.4.2 2006/11/30 16:48:03 iliaa Exp $
 dnl
 
 PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -11,5 +11,5 @@
 
   AC_CHECK_HEADERS(sys/mkdev.h)
 
-  AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo 
mknod getrlimit getlogin getgroups makedev initgroups)
+  AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo 
mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
 fi

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



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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 16:48:27 2006 UTC

  Modified files:  
/php-src/ext/posix  config.m4 
  Log:
  MFB: Added missing function checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/posix/config.m4?r1=1.13r2=1.14diff_format=u
Index: php-src/ext/posix/config.m4
diff -u php-src/ext/posix/config.m4:1.13 php-src/ext/posix/config.m4:1.14
--- php-src/ext/posix/config.m4:1.13Mon Jun 19 02:19:45 2006
+++ php-src/ext/posix/config.m4 Thu Nov 30 16:48:27 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.13 2006/06/19 02:19:45 iliaa Exp $
+dnl $Id: config.m4,v 1.14 2006/11/30 16:48:27 iliaa Exp $
 dnl
 
 PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
@@ -11,5 +11,5 @@
 
   AC_CHECK_HEADERS(sys/mkdev.h)
 
-  AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo 
mknod getrlimit getlogin getgroups makedev initgroups)
+  AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo 
mknod getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
 fi

-- 
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) / configure.in

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 17:10:46 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcconfigure.in 
  Log:
  Added check for crypt_r()
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.26r2=1.579.2.52.2.27diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.26 
php-src/configure.in:1.579.2.52.2.27
--- php-src/configure.in:1.579.2.52.2.26Wed Nov 29 23:34:49 2006
+++ php-src/configure.inThu Nov 30 17:10:46 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.26 2006/11/29 23:34:49 iliaa Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.27 2006/11/30 17:10:46 iliaa Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -466,6 +466,7 @@
 ctime_r \
 cuserid \
 crypt \
+crypt_r \
 flock \
 ftok \
 funopen \

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



[PHP-CVS] cvs: php-src / configure.in

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 17:10:55 2006 UTC

  Modified files:  
/php-srcconfigure.in 
  Log:
  MFB: Added check for crypt_r()
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.614r2=1.615diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.614 php-src/configure.in:1.615
--- php-src/configure.in:1.614  Mon Sep 25 11:05:29 2006
+++ php-src/configure.inThu Nov 30 17:10:55 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.614 2006/09/25 11:05:29 tony2001 Exp $ -*- autoconf 
-*-
+ ## $Id: configure.in,v 1.615 2006/11/30 17:10:55 iliaa Exp $ -*- autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -464,6 +464,7 @@
 ctime_r \
 cuserid \
 crypt \
+crypt_r \
 flock \
 ftok \
 funopen \
@@ -478,6 +479,8 @@
 getrusage \
 gettimeofday \
 gmtime_r \
+getpwnam_r \
+getgrnam_r \
 grantpt \
 inet_ntoa \
 inet_ntop \

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 18:32:59 2006 UTC

  Modified files:  
/php-src/ext/standard   quot_print.c 
  Log:
  Make quoted_printable_decode() take only ASCII strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/quot_print.c?r1=1.31r2=1.32diff_format=u
Index: php-src/ext/standard/quot_print.c
diff -u php-src/ext/standard/quot_print.c:1.31 
php-src/ext/standard/quot_print.c:1.32
--- php-src/ext/standard/quot_print.c:1.31  Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/quot_print.c   Thu Nov 30 18:32:59 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: quot_print.c,v 1.31 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: quot_print.c,v 1.32 2006/11/30 18:32:59 andrei Exp $ */
 
 #include stdlib.h
 
@@ -147,26 +147,24 @@
 * Decoding  Quoted-printable string.
 *
 */
-/* {{{ proto string quoted_printable_decode(string str)
+/* {{{ proto binary quoted_printable_decode(string str) U
Convert a quoted-printable string to an 8 bit string */
 PHP_FUNCTION(quoted_printable_decode)
 {
-   zval **arg1;
char *str_in, *str_out;
+   int str_in_len;
int i = 0, j = 0, k;
 
-   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg1) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, str_in, 
str_in_len, UG(ascii_conv)) == FAILURE) {
+   return;
}
-   convert_to_string_ex(arg1);
 
-   if (Z_STRLEN_PP(arg1) == 0) {
+   if (str_in_len == 0) {
/* shortcut */
RETURN_EMPTY_STRING();
}
 
-   str_in = Z_STRVAL_PP(arg1);
-   str_out = emalloc(Z_STRLEN_PP(arg1) + 1);
+   str_out = emalloc(str_in_len + 1);
while (str_in[i]) {
switch (str_in[i]) {
case '=':

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 21:18:22 2006 UTC

  Modified files:  
/php-src/ext/standard   pack.c 
  Log:
  Mark pack()/unpack() as Unicode-safe. They will accept Unicode strings
  but convert them to binary. We can revisit supporting something like 'U'
  format in the future, if it's needed.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/pack.c?r1=1.63r2=1.64diff_format=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.63 php-src/ext/standard/pack.c:1.64
--- php-src/ext/standard/pack.c:1.63Sun Nov 19 18:21:50 2006
+++ php-src/ext/standard/pack.c Thu Nov 30 21:18:22 2006
@@ -15,7 +15,7 @@
| Author: Chris Schneider [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: pack.c,v 1.63 2006/11/19 18:21:50 iliaa Exp $ */
+/* $Id: pack.c,v 1.64 2006/11/30 21:18:22 andrei Exp $ */
 
 #include php.h
 
@@ -98,7 +98,7 @@
 /* pack() idea stolen from Perl (implemented formats behave the same as there)
  * Implemented formats are A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, 
X, @.
  */
-/* {{{ proto string pack(string format, mixed arg1 [, mixed arg2 [, mixed 
...]])
+/* {{{ proto string pack(string format, mixed arg1 [, mixed arg2 [, mixed 
...]]) U
Takes one or more arguments and packs them into a binary string according 
to the format argument */
 PHP_FUNCTION(pack)
 {
@@ -113,27 +113,15 @@
int outputpos = 0, outputsize = 0;
char *output;
 
-   argc = ZEND_NUM_ARGS();
-
-   if (argc  1) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s*, format,
+ formatlen, 
UG(ascii_conv), argv, argc) == FAILURE) {
+   return;
}
 
-   argv = safe_emalloc(argc, sizeof(zval **), 0);
-
-   if (zend_get_parameters_array_ex(argc, argv) == FAILURE) {
-   efree(argv);
-   WRONG_PARAM_COUNT;
-   }
-
-   convert_to_string_ex(argv[0]);
-   format = Z_STRVAL_PP(argv[0]);
-   formatlen = Z_STRLEN_PP(argv[0]);
-
/* We have a maximum of formatlen format codes to deal with */
formatcodes = safe_emalloc(formatlen, sizeof(*formatcodes), 0);
formatargs = safe_emalloc(formatlen, sizeof(*formatargs), 0);
-   currentarg = 1;
+   currentarg = 0;
 
/* Preprocess format into formatcodes and formatargs */
for (i = 0; i  formatlen; formatcount++) {
@@ -303,7 +291,7 @@
 
output = emalloc(outputsize + 1);
outputpos = 0;
-   currentarg = 1;
+   currentarg = 0;
 
/* Do actual packing */
for (i = 0; i  formatcount; i++) {
@@ -506,30 +494,21 @@
  * f and d will return doubles.
  * Implemented formats are A, a, h, H, c, C, s, S, i, I, l, L, n, N, f, d, x, 
X, @.
  */
-/* {{{ proto array unpack(string format, string input)
+/* {{{ proto array unpack(string format, string input) U
Unpack binary string into named array elements according to format argument 
*/
 PHP_FUNCTION(unpack)
 {
-   zval **formatarg;
-   zval **inputarg;
char *format;
char *input;
int formatlen;
int inputpos, inputlen;
int i;
 
-   if (ZEND_NUM_ARGS() != 2 || 
-zend_get_parameters_ex(2, formatarg, inputarg) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, format,
+ formatlen, 
UG(ascii_conv), input, inputlen) == FAILURE) {
+   return;
}
 
-   convert_to_string_ex(formatarg);
-   convert_to_string_ex(inputarg);
-
-   format = Z_STRVAL_PP(formatarg);
-   formatlen = Z_STRLEN_PP(formatarg);
-   input = Z_STRVAL_PP(inputarg);
-   inputlen = Z_STRLEN_PP(inputarg);
inputpos = 0;
 
array_init(return_value);

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 21:20:56 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Mark strtr() as Unicode-safe.
  
  # Right, Derick?
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.614r2=1.615diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.614 php-src/ext/standard/string.c:1.615
--- php-src/ext/standard/string.c:1.614 Fri Nov 24 21:57:31 2006
+++ php-src/ext/standard/string.c   Thu Nov 30 21:20:56 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.614 2006/11/24 21:57:31 tony2001 Exp $ */
+/* $Id: string.c,v 1.615 2006/11/30 21:20:56 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -4174,7 +4174,7 @@
 }
 /* }}} */
 
-/* {{{ proto string strtr(string str, string from[, string to])
+/* {{{ proto string strtr(string str, string from[, string to]) U
Translates characters in str using given translation tables */
 PHP_FUNCTION(strtr)
 {

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 21:23:07 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Forgot to mark import_request_variables() as Unicode-safe.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.826r2=1.827diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.826 
php-src/ext/standard/basic_functions.c:1.827
--- php-src/ext/standard/basic_functions.c:1.826Wed Nov 22 19:13:19 2006
+++ php-src/ext/standard/basic_functions.c  Thu Nov 30 21:23:07 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.826 2006/11/22 19:13:19 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.827 2006/11/30 21:23:07 andrei Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6258,7 +6258,7 @@
return 0;
 }
 
-/* {{{ proto bool import_request_variables(string types [, string prefix])
+/* {{{ proto bool import_request_variables(string types [, string prefix]) U
Import GET/POST/Cookie variables into the global scope */
 PHP_FUNCTION(import_request_variables)
 {

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 21:46:54 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Mark setlocale() as Unicode-safe. It shouldn't be used in
  unicode.semantics=on mode anyway.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.615r2=1.616diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.615 php-src/ext/standard/string.c:1.616
--- php-src/ext/standard/string.c:1.615 Thu Nov 30 21:20:56 2006
+++ php-src/ext/standard/string.c   Thu Nov 30 21:46:54 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.615 2006/11/30 21:20:56 andrei Exp $ */
+/* $Id: string.c,v 1.616 2006/11/30 21:46:54 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6006,7 +6006,7 @@
 }
 /* }}} */
 
-/* {{{ proto string setlocale(mixed category, string locale [, string ...])
+/* {{{ proto string setlocale(mixed category, string locale [, string ...]) U
Set locale information */
 PHP_FUNCTION(setlocale)
 {



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



[PHP-CVS] cvs: php-src(PHP_4_4) / acinclude.m4 configure.in

2006-11-30 Thread Antony Dovgal
tony2001Thu Nov 30 22:13:59 2006 UTC

  Modified files:  (Branch: PHP_4_4)
/php-srcacinclude.m4 configure.in 
  Log:
  MFH missing fixes required by autoconf 2.6x
  fixes bug #39696
  
  
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.218.2.50.2.8r2=1.218.2.50.2.9diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.218.2.50.2.8 php-src/acinclude.m4:1.218.2.50.2.9
--- php-src/acinclude.m4:1.218.2.50.2.8 Mon Oct  2 20:53:05 2006
+++ php-src/acinclude.m4Thu Nov 30 22:13:56 2006
@@ -1,4 +1,4 @@
-dnl $Id: acinclude.m4,v 1.218.2.50.2.8 2006/10/02 20:53:05 tony2001 Exp $ -*- 
autoconf -*-
+dnl $Id: acinclude.m4,v 1.218.2.50.2.9 2006/11/30 22:13:56 tony2001 Exp $ -*- 
autoconf -*-
 dnl
 dnl This file contains local autoconf functions.
 
@@ -591,6 +591,7 @@
   done
   echo '[$]@'  $1
   chmod +x $1
+  PHP_SUBST_OLD(CONFIGURE_COMMAND)
 ])
 
 AC_DEFUN([PHP_TIME_R_TYPE],[
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.396.2.164.2.30r2=1.396.2.164.2.31diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.396.2.164.2.30 
php-src/configure.in:1.396.2.164.2.31
--- php-src/configure.in:1.396.2.164.2.30   Tue Aug 15 12:23:08 2006
+++ php-src/configure.inThu Nov 30 22:13:57 2006
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.396.2.164.2.30 2006/08/15 12:23:08 derick Exp $ 
-*- sh -*-
+dnl ## $Id: configure.in,v 1.396.2.164.2.31 2006/11/30 22:13:57 tony2001 Exp $ 
-*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -31,9 +31,6 @@
 AC_INIT(README.CVS-RULES)
 
 PHP_CONFIG_NICE(config.nice)
-for arg in $0 $@; do
-  CONFIGURE_COMMAND=$CONFIGURE_COMMAND '$arg'
-done
 
 PHP_CANONICAL_HOST
 AC_CONFIG_HEADER(main/php_config.h)

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



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

2006-11-30 Thread Andrei Zmievski
andrei  Thu Nov 30 22:26:27 2006 UTC

  Modified files:  
/php-src/ext/standard   url.c 
  Log:
  get_headers() will keep headers as binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url.c?r1=1.102r2=1.103diff_format=u
Index: php-src/ext/standard/url.c
diff -u php-src/ext/standard/url.c:1.102 php-src/ext/standard/url.c:1.103
--- php-src/ext/standard/url.c:1.102Thu Oct 26 17:59:53 2006
+++ php-src/ext/standard/url.c  Thu Nov 30 22:26:27 2006
@@ -15,7 +15,7 @@
| Author: Jim Winstead [EMAIL PROTECTED]  
|
+--+
  */
-/* $Id: url.c,v 1.102 2006/10/26 17:59:53 andrei Exp $ */
+/* $Id: url.c,v 1.103 2006/11/30 22:26:27 andrei Exp $ */
 
 #include stdlib.h
 #include string.h
@@ -653,7 +653,7 @@
 }
 /* }}} */
 
-/* {{{ proto array get_headers(string url[, int format])
+/* {{{ proto array get_headers(string url[, int format]) U
fetches all the headers sent by the server in response to a HTTP request */
 PHP_FUNCTION(get_headers)
 {

-- 
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/soap php_sdl.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Thu Nov 30 23:51:24 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_sdl.c 
  Log:
  Small hash table optimization
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.88.2.12.2.3r2=1.88.2.12.2.4diff_format=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.88.2.12.2.3 
php-src/ext/soap/php_sdl.c:1.88.2.12.2.4
--- php-src/ext/soap/php_sdl.c:1.88.2.12.2.3Wed Sep 20 13:42:50 2006
+++ php-src/ext/soap/php_sdl.c  Thu Nov 30 23:51:24 2006
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_sdl.c,v 1.88.2.12.2.3 2006/09/20 13:42:50 dmitry Exp $ */
+/* $Id: php_sdl.c,v 1.88.2.12.2.4 2006/11/30 23:51:24 iliaa Exp $ */
 
 #include php_soap.h
 #include ext/libxml/php_libxml.h
@@ -1863,7 +1863,7 @@
sdlTypePtr *tmp;
 
  tmp_elements = emalloc(sizeof(HashTable));
- zend_hash_init(tmp_elements, 0, NULL, NULL, 0);
+ zend_hash_init(tmp_elements, zend_hash_num_elements(type-elements), 
NULL, NULL, 0);
 
zend_hash_internal_pointer_reset(type-elements);
while (zend_hash_get_current_data(type-elements, (void**)tmp) 
== SUCCESS) {

-- 
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/session session.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Fri Dec  1 00:27:20 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c 
  Log:
  Disallow \0 chars inside session.save_path
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.17r2=1.417.2.8.2.18diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.17 
php-src/ext/session/session.c:1.417.2.8.2.18
--- php-src/ext/session/session.c:1.417.2.8.2.17Fri Nov  3 14:46:48 2006
+++ php-src/ext/session/session.c   Fri Dec  1 00:27:20 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.17 2006/11/03 14:46:48 bjori Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.18 2006/12/01 00:27:20 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -153,6 +153,10 @@
if (stage == PHP_INI_STAGE_RUNTIME) {
char *p;
 
+   if (memchr(new_value, '\0', new_value_length) != NULL) {
+   return FAILURE;
+   }
+
if ((p = zend_memrchr(new_value, ';', new_value_length))) {
p++;
} else {

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



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

2006-11-30 Thread Ilia Alshanetsky
iliaa   Fri Dec  1 00:27:33 2006 UTC

  Modified files:  
/php-src/ext/sessionsession.c 
  Log:
  MFB: Disallow \0 chars inside session.save_path
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.455r2=1.456diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.455 php-src/ext/session/session.c:1.456
--- php-src/ext/session/session.c:1.455 Sun Oct  8 13:34:23 2006
+++ php-src/ext/session/session.c   Fri Dec  1 00:27:33 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.455 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: session.c,v 1.456 2006/12/01 00:27:33 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -150,6 +150,10 @@
if (stage == PHP_INI_STAGE_RUNTIME) {
char *p;
 
+   if (memchr(new_value, '\0', new_value_length) != NULL) {
+   return FAILURE;
+   }
+
if ((p = zend_memrchr(new_value, ';', new_value_length))) {
p++;
} else {

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/session session.c

2006-11-30 Thread Ilia Alshanetsky
iliaa   Fri Dec  1 00:28:43 2006 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/sessionsession.c 
  Log:
  MFH: Disallow \0 chars inside session.save_path
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.336.2.53.2.7r2=1.336.2.53.2.8diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.53.2.7 
php-src/ext/session/session.c:1.336.2.53.2.8
--- php-src/ext/session/session.c:1.336.2.53.2.7Tue Aug  1 08:33:13 2006
+++ php-src/ext/session/session.c   Fri Dec  1 00:28:43 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.53.2.7 2006/08/01 08:33:13 tony2001 Exp $ */
+/* $Id: session.c,v 1.336.2.53.2.8 2006/12/01 00:28:43 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -120,6 +120,10 @@
 static PHP_INI_MH(OnUpdateSaveDir) {
/* Only do the safemode/open_basedir check at runtime */
if(stage == PHP_INI_STAGE_RUNTIME) {
+   if (memchr(new_value, '\0', new_value_length) != NULL) {
+   return FAILURE;
+   }
+
if (PG(safe_mode)  (!php_checkuid(new_value, NULL, 
CHECKUID_ALLOW_ONLY_DIR))) {
return FAILURE;
}



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