summaryrefslogtreecommitdiff
path: root/ext/standard/php_crypt_r.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-06-15 13:43:15 +0000
committerPierre Joye <pajoye@php.net>2010-06-15 13:43:15 +0000
commitf27e17d18c4a224b9dfc6c861c555759cd69240c (patch)
tree0b75f2be98d287aebba69544fde8ae8bbea39093 /ext/standard/php_crypt_r.c
parent675a0539db1b44621df6d80d70ee076486ac7066 (diff)
downloadphp-git-f27e17d18c4a224b9dfc6c861c555759cd69240c.tar.gz
- #51424, silent warnings on win
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r--ext/standard/php_crypt_r.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index 91063003e7..2fee5feb0f 100644
--- a/ext/standard/php_crypt_r.c
+++ b/ext/standard/php_crypt_r.c
@@ -75,7 +75,11 @@ void php_shutdown_crypt_r()
void _crypt_extended_init_r(void)
{
+#ifdef PHP_WIN32
+ LONG volatile initialized = 0;
+#else
static volatile sig_atomic_t initialized = 0;
+#endif
#ifdef ZTS
tsrm_mutex_lock(php_crypt_extended_init_lock);
@@ -83,7 +87,7 @@ void _crypt_extended_init_r(void)
if (!initialized) {
#ifdef PHP_WIN32
- InterlockedIncrement(initialized);
+ InterlockedIncrement(&initialized);
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
__sync_fetch_and_add(&initialized, 1);
#endif