]> granicus.if.org Git - php/commitdiff
- #51424, silent warnings on win
authorPierre Joye <pajoye@php.net>
Tue, 15 Jun 2010 13:43:15 +0000 (13:43 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 15 Jun 2010 13:43:15 +0000 (13:43 +0000)
ext/standard/php_crypt_r.c

index 91063003e76b54a3853934a1d60840e6312bcd17..2fee5feb0ff9e5e07be7d4408db34dad1ba13f94 100644 (file)
@@ -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