[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/README.SVN-RULES trunk/README.SVN-RULES

2011-06-15 Thread Stanislav Malyshev
stas Wed, 15 Jun 2011 23:19:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312197

Log:
update the branches list

Changed paths:
U   php/php-src/branches/PHP_5_4/README.SVN-RULES
U   php/php-src/trunk/README.SVN-RULES

Modified: php/php-src/branches/PHP_5_4/README.SVN-RULES
===
--- php/php-src/branches/PHP_5_4/README.SVN-RULES   2011-06-15 22:08:30 UTC 
(rev 312196)
+++ php/php-src/branches/PHP_5_4/README.SVN-RULES   2011-06-15 23:19:30 UTC 
(rev 312197)
@@ -43,14 +43,18 @@

 Currently we have the following branches in use::

-  trunk Will become PHP 6.0. This CVS branch is for active 
development.
+  trunk The active development branch.

-  branches/PHP_5_3  Is used to release the PHP 5.3.x series. It still allows 
for
+  branches/PHP_5_4  Is used to release the PHP 5.4.x series. It still allows 
for
 larger enhancements.

-  branches/PHP_5_2  Is used to release the PHP 5.2.x series. Only bugfixes are 
permitted
-on this branch (Consult the releasemaster prior to commit).
+  branches/PHP_5_3  Is used to release the PHP 5.3.x series. This is current
+stable version and is open for bugfixes and small
+improvements (check with RMs if in doubt).

+  branches/PHP_5_2  Is used to release the PHP 5.2.x series. It is closed for
+changes now.
+
   branches/PHP_5_1  This branch is closed.

   branches/PHP_4_4  This branch is closed.

Modified: php/php-src/trunk/README.SVN-RULES
===
--- php/php-src/trunk/README.SVN-RULES  2011-06-15 22:08:30 UTC (rev 312196)
+++ php/php-src/trunk/README.SVN-RULES  2011-06-15 23:19:30 UTC (rev 312197)
@@ -43,14 +43,18 @@

 Currently we have the following branches in use::

-  trunk Will become PHP 6.0. This CVS branch is for active 
development.
+  trunk The active development branch.

-  branches/PHP_5_3  Is used to release the PHP 5.3.x series. It still allows 
for
+  branches/PHP_5_4  Is used to release the PHP 5.4.x series. It still allows 
for
 larger enhancements.

-  branches/PHP_5_2  Is used to release the PHP 5.2.x series. Only bugfixes are 
permitted
-on this branch (Consult the releasemaster prior to commit).
+  branches/PHP_5_3  Is used to release the PHP 5.3.x series. This is current
+stable version and is open for bugfixes and small
+improvements (check with RMs if in doubt).

+  branches/PHP_5_2  Is used to release the PHP 5.2.x series. It is closed for
+changes now.
+
   branches/PHP_5_1  This branch is closed.

   branches/PHP_4_4  This branch is closed.

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/session/config.w32 branches/PHP_5_4/ext/session/config.w32 trunk/ext/session/config.w32

2011-06-15 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 01:21:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312200

Log:
- install extra headers

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/session/config.w32
U   php/php-src/branches/PHP_5_4/ext/session/config.w32
U   php/php-src/trunk/ext/session/config.w32

Modified: php/php-src/branches/PHP_5_3/ext/session/config.w32
===
--- php/php-src/branches/PHP_5_3/ext/session/config.w32 2011-06-16 00:37:23 UTC 
(rev 312199)
+++ php/php-src/branches/PHP_5_3/ext/session/config.w32 2011-06-16 01:21:01 UTC 
(rev 312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

Modified: php/php-src/branches/PHP_5_4/ext/session/config.w32
===
--- php/php-src/branches/PHP_5_4/ext/session/config.w32 2011-06-16 00:37:23 UTC 
(rev 312199)
+++ php/php-src/branches/PHP_5_4/ext/session/config.w32 2011-06-16 01:21:01 UTC 
(rev 312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

Modified: php/php-src/trunk/ext/session/config.w32
===
--- php/php-src/trunk/ext/session/config.w322011-06-16 00:37:23 UTC (rev 
312199)
+++ php/php-src/trunk/ext/session/config.w322011-06-16 01:21:01 UTC (rev 
312200)
@@ -6,5 +6,5 @@
 if (PHP_SESSION == yes) {
EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, false 
/* never shared */);
AC_DEFINE(HAVE_PHP_SESSION, 1, Session support);
-   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h);
+   PHP_INSTALL_HEADERS(ext/session/, mod_mm.h php_session.h mod_files.h 
mod_user.h);
 }

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/main.c branches/PHP_5_3/win32/winutil.c branches/PHP_5_3/win32/winutil.h branches/PHP_5_4/main/main.c branches/PHP_5_4/win32/winutil.c branches/PHP_5

2011-06-15 Thread Pierre Joye
pajoye   Thu, 16 Jun 2011 01:31:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312201

Log:
- init win32 rng context once per process

Changed paths:
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/branches/PHP_5_3/win32/winutil.c
U   php/php-src/branches/PHP_5_3/win32/winutil.h
U   php/php-src/branches/PHP_5_4/main/main.c
U   php/php-src/branches/PHP_5_4/win32/winutil.c
U   php/php-src/branches/PHP_5_4/win32/winutil.h
U   php/php-src/trunk/main/main.c
U   php/php-src/trunk/win32/winutil.c
U   php/php-src/trunk/win32/winutil.h

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/main/main.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -32,6 +32,7 @@
 #include win32/time.h
 #include win32/signal.h
 #include win32/php_win32_globals.h
+#include win32/winutil.h
 #include process.h
 #elif defined(NETWARE)
 #include sys/timeval.h
@@ -1829,6 +1830,10 @@
 	tsrm_ls = ts_resource(0);
 #endif

+#ifdef PHP_WIN32
+	php_win32_init_rng_lock();
+#endif
+
 	module_shutdown = 0;
 	module_startup = 1;
 	sapi_initialize_empty_request(TSRMLS_C);
@@ -2148,6 +2153,10 @@
 	WSACleanup();
 #endif

+#ifdef PHP_WIN32
+	php_win32_free_rng_lock();
+#endif
+
 	sapi_flush(TSRMLS_C);

 	zend_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_3/win32/winutil.c
===
--- php/php-src/branches/PHP_5_3/win32/winutil.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/win32/winutil.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -49,26 +49,61 @@
 	}
 }

+HCRYPTPROV   hCryptProv;
+unsigned int has_crypto_ctx = 0;
+
+#ifdef ZTS
+MUTEX_T php_lock_win32_cryptoctx;
+void php_win32_init_rng_lock()
+{
+	php_lock_win32_cryptoctx = tsrm_mutex_alloc();
+}
+
+void php_win32_free_rng_lock()
+{
+	tsrm_mutex_lock(php_lock_win32_cryptoctx);
+	CryptReleaseContext(hCryptProv, 0);
+	has_crypto_ctx = 0;
+	tsrm_mutex_unlock(php_lock_win32_cryptoctx);
+	tsrm_mutex_free(php_lock_win32_cryptoctx);
+
+}
+#else
+#define php_win32_init_rng_lock();
+#define php_win32_free_rng_lock();
+#endif
+
+
+
 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size) {  /* {{{ */
-	HCRYPTPROV   hCryptProv;
-	int has_context = 0;
+
+	unsigned int has_contextg = 0;
+
 	BOOL ret;
 	size_t i = 0;

-	if (!CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) {
-		/* Could mean that the key container does not exist, let try
-		   again by asking for a new one */
-		if (GetLastError() == NTE_BAD_KEYSET) {
-			if (CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
-has_context = 1;
-			} else {
-return FAILURE;
+	tsrm_mutex_lock(php_lock_win32_cryptoctx);
+	if (has_crypto_ctx == 0) {
+		if (!CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET)) {
+			/* Could mean that the key container does not exist, let try
+ again by asking for a new one */
+			if (GetLastError() == NTE_BAD_KEYSET) {
+if (CryptAcquireContext(hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
+	has_crypto_ctx = 1;
+} else {
+	has_crypto_ctx = 0;
+}
 			}
 		}
 	}
+	tsrm_mutex_unlock(php_lock_win32_cryptoctx);

+	if (has_crypto_ctx == 0) {
+		return FAILURE;
+	}
+
 	ret = CryptGenRandom(hCryptProv, size, buf);
-	CryptReleaseContext(hCryptProv, 0);
+
 	if (ret) {
 		return SUCCESS;
 	} else {

Modified: php/php-src/branches/PHP_5_3/win32/winutil.h
===
--- php/php-src/branches/PHP_5_3/win32/winutil.h	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_3/win32/winutil.h	2011-06-16 01:31:10 UTC (rev 312201)
@@ -21,3 +21,11 @@
 #define php_win_err()	php_win_err(GetLastError())
 int php_win32_check_trailing_space(const char * path, const int path_len);
 PHPAPI php_win32_get_random_bytes(unsigned char *buf, size_t size);
+
+#ifdef ZTS
+void php_win32_init_rng_lock();
+void php_win32_free_rng_lock();
+#else
+#define php_win32_init_rng_lock();
+#define php_win32_free_rng_lock();
+#endif

Modified: php/php-src/branches/PHP_5_4/main/main.c
===
--- php/php-src/branches/PHP_5_4/main/main.c	2011-06-16 01:21:01 UTC (rev 312200)
+++ php/php-src/branches/PHP_5_4/main/main.c	2011-06-16 01:31:10 UTC (rev 312201)
@@ -1871,6 +1871,10 @@
 	tsrm_ls = ts_resource(0);
 #endif

+#ifdef PHP_WIN32
+	php_win32_init_rng_lock();
+#endif
+
 	module_shutdown = 0;
 	module_startup = 1;
 	sapi_initialize_empty_request(TSRMLS_C);
@@ -2220,6 +2224,10 @@
 	WSACleanup();
 #endif

+#ifdef PHP_WIN32
+	php_win32_free_rng_lock();
+#endif
+
 	sapi_flush(TSRMLS_C);

 	zend_shutdown(TSRMLS_C);

Modified: php/php-src/branches/PHP_5_4/win32/winutil.c

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2011-06-15 Thread Felipe Pena
felipe   Thu, 16 Jun 2011 01:41:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=312202

Log:
- Removed win debug stuff

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2011-06-16 01:31:10 UTC (rev 312201)
+++ php/php-src/trunk/main/main.c   2011-06-16 01:41:34 UTC (rev 312202)
@@ -1885,13 +1885,7 @@
 #else
php_os=PHP_OS;
 #endif
-   {
-   char dll_dir[MAX_PATH];
-   sprintf(dll_dir, %s\\%s, module_path, ..\\..\\deps\\bin);
-   SetDllDirectory(dll_dir);
-   }
-// GetModuleFileName (NULL, module_path, MAX_PATH);
-//__debugbreak();
+
 #ifdef ZTS
tsrm_ls = ts_resource(0);
 #endif

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