summaryrefslogtreecommitdiff
path: root/src/compat/osx.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-13 13:43:57 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-13 13:43:57 +0000
commit2a943828287d2a861930d3facb2333c895ada205 (patch)
tree9e0cbd81f0b2e9f0d5739275507aea2ecb9115b8 /src/compat/osx.h
parent9a30a663e472774a45b78b3240f6a399637992fc (diff)
downloadlibbu++-2a943828287d2a861930d3facb2333c895ada205.tar.gz
libbu++-2a943828287d2a861930d3facb2333c895ada205.tar.bz2
libbu++-2a943828287d2a861930d3facb2333c895ada205.tar.xz
libbu++-2a943828287d2a861930d3facb2333c895ada205.zip
Finally rearranged the system to put all compatability files in a directory
called compat. I've updated the linux and windows builds and it looks pretty good. I also added a config.h file which we have to edit by hand until I can work on build some more. Linux File operations now use 64 bit mode, windows can't, or at least, I don't feel like researching it right now.
Diffstat (limited to 'src/compat/osx.h')
-rw-r--r--src/compat/osx.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/compat/osx.h b/src/compat/osx.h
new file mode 100644
index 0000000..7169d7e
--- /dev/null
+++ b/src/compat/osx.h
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
8#ifndef OSX_COMPATIBILITY__H
9#define OSX_COMPATIBILITY__H
10
11#ifdef __APPLE__
12
13#ifndef TEMP_FAILURE_RETRY
14#define TEMP_FAILURE_RETRY(expression) \
15 (__extension__ \
16 ({ long int __result; \
17 do __result = (long int) (expression); \
18 while (__result == -1L && errno == EINTR); \
19 __result; }))
20#endif
21
22#include <sched.h>
23
24#define pthread_yield() sched_yield()
25#endif /* __APPLE__ */
26#endif
27