diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2007-07-18 20:27:44 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2007-07-18 20:27:44 +0000 |
| commit | 2fa07d96be7176c2b3d1d255edfea99c49e836e7 (patch) | |
| tree | 46db2c077ade13cdc331e767240226620f41faeb /src | |
| parent | 162525457320b5dba9a4e736759f840757635231 (diff) | |
| download | libbu++-2fa07d96be7176c2b3d1d255edfea99c49e836e7.tar.gz libbu++-2fa07d96be7176c2b3d1d255edfea99c49e836e7.tar.bz2 libbu++-2fa07d96be7176c2b3d1d255edfea99c49e836e7.tar.xz libbu++-2fa07d96be7176c2b3d1d255edfea99c49e836e7.zip | |
Now the whole OSX patch is applied.
Diffstat (limited to 'src')
| -rw-r--r-- | src/osx_compatibility.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/osx_compatibility.h b/src/osx_compatibility.h new file mode 100644 index 0000000..a4f3924 --- /dev/null +++ b/src/osx_compatibility.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef OSX_COMPATIBILITY__H | ||
| 2 | #define OSX_COMPATIBILITY__H | ||
| 3 | |||
| 4 | #ifdef __APPLE__ | ||
| 5 | |||
| 6 | #ifndef TEMP_FAILURE_RETRY | ||
| 7 | #define TEMP_FAILURE_RETRY(expression) \ | ||
| 8 | (__extension__ \ | ||
| 9 | ({ long int __result; \ | ||
| 10 | do __result = (long int) (expression); \ | ||
| 11 | while (__result == -1L && errno == EINTR); \ | ||
| 12 | __result; })) | ||
| 13 | #endif | ||
| 14 | |||
| 15 | #include <sched.h> | ||
| 16 | |||
| 17 | #define pthread_yield() sched_yield() | ||
| 18 | #endif /* __APPLE__ */ | ||
| 19 | #endif | ||
| 20 | |||
