php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66017
Patch php-5.4.21.patch.solaris_atomic revision 2013-11-04 14:57 UTC by Pete_Wall at Symantec dot com
revision 2013-11-01 21:46 UTC by Pete_Wall at symantec dot com

Patch php-5.4.21.patch.solaris_atomic for Compile Failure Bug #66017

Patch version 2013-11-04 14:57 UTC

Return to Bug #66017 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: Pete_Wall@Symantec.com

--- ext/standard/php_crypt_r.c	2013-10-16 00:39:33.000000000 -0500
+++ ext/standard/php_crypt_r.c.new	2013-11-01 17:11:09.975566000 -0500
@@ -82,7 +82,7 @@ void _crypt_extended_init_r(void)
 #ifdef PHP_WIN32
 	LONG volatile initialized = 0;
 #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
-	volatile unsigned int initialized = 0;
+	volatile uint32_t initialized = 0;
 #else
 	static volatile sig_atomic_t initialized = 0;
 #endif
@@ -97,8 +97,7 @@ void _crypt_extended_init_r(void)
 #elif defined(HAVE_SYNC_FETCH_AND_ADD)
 		__sync_fetch_and_add(&initialized, 1);
 #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */
-		membar_producer();
-		atomic_add_int(&initialized, 1);
+		atomic_add_32(&initialized, 1);
 #endif
 		_crypt_extended_init();
 	}
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 05:01:28 2025 UTC