mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
- #51424, silent warnings on win
This commit is contained in:
parent
675a0539db
commit
f27e17d18c
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ void php_shutdown_crypt_r()
|
||||||
|
|
||||||
void _crypt_extended_init_r(void)
|
void _crypt_extended_init_r(void)
|
||||||
{
|
{
|
||||||
|
#ifdef PHP_WIN32
|
||||||
|
LONG volatile initialized = 0;
|
||||||
|
#else
|
||||||
static volatile sig_atomic_t initialized = 0;
|
static volatile sig_atomic_t initialized = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
tsrm_mutex_lock(php_crypt_extended_init_lock);
|
tsrm_mutex_lock(php_crypt_extended_init_lock);
|
||||||
|
@ -83,7 +87,7 @@ void _crypt_extended_init_r(void)
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
#ifdef PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
InterlockedIncrement(initialized);
|
InterlockedIncrement(&initialized);
|
||||||
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
|
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
|
||||||
__sync_fetch_and_add(&initialized, 1);
|
__sync_fetch_and_add(&initialized, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue