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/lib zip_dirent.c Log: zts fixes http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite/src/date.c?r1=1.6&r2=1.7&diff_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.6 Mon Aug 14 16:35:23 2006 +++ php-src/ext/pdo_sqlite/sqlite/src/date.c Thu 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.Y<1971 || 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.4&r2=1.5&diff_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.Y<1971 || 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.8&r2=1.9&diff_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.1&r2=1.2&diff_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.1 Mon Jul 24 16:58:58 2006 +++ php-src/ext/zip/lib/zip_dirent.c Thu 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 = ((ddate>>9)&127) + 1980 - 1900; tm->tm_mon = ((ddate>>5)&15) - 1; @@ -520,9 +519,9 @@ static void _zip_u2d_time(time_t time, unsigned short *dtime, unsigned short *ddate) { - struct tm *tm; + struct tm *tm, tmbuf; - tm = localtime(&time); + tm = php_localtime_r(&time, &tmbuf); *ddate = ((tm->tm_year+1900-1980)<<9) + ((tm->tm_mon+1)<<5) + tm->tm_mday; *dtime = ((tm->tm_hour)<<11) + ((tm->tm_min)<<5)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php