@@ -41,11 +41,11 @@ #endif #import "OFFile.h" #import "OFString.h" #import "OFArray.h" -#ifdef OF_THREADS +#ifdef OF_HAVE_THREADS # import "threading.h" #endif #import "OFDate.h" #import "OFApplication.h" #import "OFSystemInfo.h" @@ -99,11 +99,11 @@ OFStream *of_stdin = nil; OFStream *of_stdout = nil; OFStream *of_stderr = nil; -#if defined(OF_THREADS) && !defined(_WIN32) +#if defined(OF_HAVE_THREADS) && !defined(_WIN32) static of_mutex_t mutex; #endif static int parse_mode(const char *mode) { @@ -160,11 +160,11 @@ @interface OFFileSingleton: OFFile @end @implementation OFFile -#if defined(OF_THREADS) && !defined(_WIN32) +#if defined(OF_HAVE_THREADS) && !defined(_WIN32) + (void)initialize { if (self != [OFFile class]) return; @@ -473,11 +473,11 @@ if (owner == nil && group == nil) @throw [OFInvalidArgumentException exceptionWithClass: self selector: _cmd]; -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS if (!of_mutex_lock(&mutex)) @throw [OFLockFailedException exceptionWithClass: self]; @try { # endif @@ -506,11 +506,11 @@ owner: owner group: group]; gid = group_->gr_gid; } -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS } @finally { if (!of_mutex_unlock(&mutex)) @throw [OFUnlockFailedException exceptionWithClass: self]; }