Bug 359716 Fix OS/2 builds ahead of upgrading SeaMonkey and Thunderbird to the latest c-sdk. r=mcs.

git-svn-id: svn://10.0.0.236/trunk@220340 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bugzilla%standard8.demon.co.uk
2007-02-15 21:25:00 +00:00
parent 0070b3eb6f
commit 3425a112cc
2 changed files with 8 additions and 1 deletions

View File

@@ -105,7 +105,6 @@ extern "C" {
#endif /* _WINDOWS */
#ifdef XP_OS2
#include <os2sock.h>
#include <io.h>
#endif /* XP_OS2 */

View File

@@ -380,12 +380,18 @@ nsldapi_initialize_defaults( void )
pthread_mutex_init( &nsldapi_init_mutex, NULL );
#endif /* _WINDOWS */
#if defined(USE_PTHREADS) || defined(_WINDOWS)
pthread_mutex_lock( &nsldapi_init_mutex );
if ( nsldapi_initialized ) {
pthread_mutex_unlock( &nsldapi_init_mutex );
return;
}
#else
if ( nsldapi_initialized ) {
return;
}
#endif /* use_pthreads || _windows */
#ifdef USE_PTHREADS
if ( pthread_key_create(&nsldapi_key, free ) != 0) {
@@ -447,6 +453,8 @@ nsldapi_initialize_defaults( void )
#endif /* _WINDOWS */
nsldapi_initialized = 1;
pthread_mutex_unlock( &nsldapi_init_mutex );
#else
nsldapi_initialized = 1;
#endif /* use_pthreads || _windows */
}