@@ -27,11 +27,11 @@ #import "OFDate.h" #import "OFString.h" #import "OFDictionary.h" #import "OFXMLElement.h" -#ifdef OF_THREADS +#ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" @@ -42,11 +42,11 @@ #import "autorelease.h" #import "macros.h" #import "of_strptime.h" #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ - defined(OF_THREADS) + defined(OF_HAVE_THREADS) static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R # define GMTIME_RET(field) \ @@ -74,11 +74,11 @@ @throw [OFOutOfRangeException \ exceptionWithClass: [self class]]; \ \ return tm.field; #else -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS # define GMTIME_RET(field) \ time_t seconds_ = (time_t)seconds; \ struct tm *tm; \ \ if (seconds_ != floor(seconds)) \ @@ -160,11 +160,11 @@ 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, }; @implementation OFDate #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ - defined(OF_THREADS) + defined(OF_HAVE_THREADS) + (void)initialize { if (self == [OFDate class]) mutex = [[OFMutex alloc] init]; } @@ -523,11 +523,11 @@ #ifdef HAVE_GMTIME_R if (gmtime_r(&seconds_, &tm) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #else -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS [mutex lock]; @try { # endif struct tm *tmp; @@ -535,11 +535,11 @@ if ((tmp = gmtime(&seconds_)) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; tm = *tmp; -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS } @finally { [mutex unlock]; } # endif #endif @@ -573,11 +573,11 @@ #ifdef HAVE_LOCALTIME_R if (localtime_r(&seconds_, &tm) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; #else -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS [mutex lock]; @try { # endif struct tm *tmp; @@ -585,11 +585,11 @@ if ((tmp = localtime(&seconds_)) == NULL) @throw [OFOutOfRangeException exceptionWithClass: [self class]]; tm = *tmp; -# ifdef OF_THREADS +# ifdef OF_HAVE_THREADS } @finally { [mutex unlock]; } # endif #endif