Differences From Artifact [3d7fca1f63]:
- File
src/OFThread.m
— part of check-in
[30f95ecdf5]
at
2014-02-23 21:04:32
on branch trunk
— Increase _POSIX_C_SOURCE and _XOPEN_SOURCE
FreeBSD needs this. (user: js, size: 7464) [annotate] [blame] [check-ins using]
To Artifact [b62a944b3a]:
- File src/OFThread.m — part of check-in [54a34ebd9c] at 2014-03-05 00:12:36 on branch trunk — Fix compilation for Wii (user: js, size: 7669) [annotate] [blame] [check-ins using]
︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + + + + + + | #ifdef OF_HAVE_SCHED_YIELD # include <sched.h> #endif #if defined(OF_HAVE_THREADS) && defined(__HAIKU__) # include <kernel/OS.h> #endif #ifdef __wii__ # define BOOL OGC_BOOL # define asm __asm__ # include <ogcsys.h> # undef BOOL # undef asm #endif #import "OFThread.h" #import "OFThread+Private.h" #import "OFRunLoop.h" #import "OFList.h" #import "OFDate.h" #import "OFDictionary.h" |
︙ | |||
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | + + + + + | rqtp.tv_sec = (time_t)timeInterval; rqtp.tv_nsec = lrint((timeInterval - rqtp.tv_sec) * 1000000000); if (rqtp.tv_sec != floor(timeInterval)) @throw [OFOutOfRangeException exception]; # ifndef __wii__ nanosleep(&rqtp, NULL); # else /* Wii has an incompatible nanosleep */ nanosleep(&rqtp); # endif #else if (timeInterval > UINT_MAX) @throw [OFOutOfRangeException exception]; sleep((unsigned int)timeInterval); usleep((useconds_t)lrint( (timeInterval - floor(timeInterval)) * 1000000)); |
︙ |