@@ -74,7 +74,7 @@ int tsrm_error(int level, const char *format, ...);
74
74
static int tsrm_error_level ;
75
75
static FILE * tsrm_error_file ;
76
76
77
- #if TSRM_DEBUG
77
+ #ifdef TSRM_DEBUG
78
78
#define TSRM_ERROR (args ) tsrm_error args
79
79
#define TSRM_SAFE_RETURN_RSRC (array , offset , range ) \
80
80
{ \
@@ -102,7 +102,7 @@ static FILE *tsrm_error_file;
102
102
}
103
103
#endif
104
104
105
- #if defined( TSRM_WIN32 )
105
+ #ifdef TSRM_WIN32
106
106
static DWORD tls_key ;
107
107
# define tsrm_tls_set (what ) TlsSetValue(tls_key, (void*)(what))
108
108
# define tsrm_tls_get () TlsGetValue(tls_key)
@@ -118,7 +118,7 @@ TSRM_TLS uint8_t is_thread_shutdown = 0;
118
118
/* Startup TSRM (call once for the entire process) */
119
119
TSRM_API int tsrm_startup (int expected_threads , int expected_resources , int debug_level , char * debug_filename )
120
120
{/*{{{*/
121
- #if defined( TSRM_WIN32 )
121
+ #ifdef TSRM_WIN32
122
122
tls_key = TlsAlloc ();
123
123
#else
124
124
pthread_key_create (& tls_key , 0 );
@@ -209,7 +209,7 @@ TSRM_API void tsrm_shutdown(void)
209
209
if (tsrm_error_file != stderr ) {
210
210
fclose (tsrm_error_file );
211
211
}
212
- #if defined( TSRM_WIN32 )
212
+ #ifdef TSRM_WIN32
213
213
TlsFree (tls_key );
214
214
#else
215
215
pthread_setspecific (tls_key , 0 );
@@ -677,7 +677,7 @@ TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler)
677
677
* Debug support
678
678
*/
679
679
680
- #if TSRM_DEBUG
680
+ #ifdef TSRM_DEBUG
681
681
int tsrm_error (int level , const char * format , ...)
682
682
{/*{{{*/
683
683
if (level <=tsrm_error_level ) {
@@ -702,7 +702,7 @@ void tsrm_error_set(int level, char *debug_filename)
702
702
{/*{{{*/
703
703
tsrm_error_level = level ;
704
704
705
- #if TSRM_DEBUG
705
+ #ifdef TSRM_DEBUG
706
706
if (tsrm_error_file != stderr ) { /* close files opened earlier */
707
707
fclose (tsrm_error_file );
708
708
}
@@ -758,7 +758,7 @@ TSRM_API uint8_t tsrm_is_shutdown(void)
758
758
759
759
TSRM_API const char * tsrm_api_name (void )
760
760
{/*{{{*/
761
- #if defined( TSRM_WIN32 )
761
+ #ifdef TSRM_WIN32
762
762
return "Windows Threads" ;
763
763
#else
764
764
return "POSIX Threads" ;
0 commit comments