From 2a943828287d2a861930d3facb2333c895ada205 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 13 May 2010 13:43:57 +0000 Subject: 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. --- src/compat/osx.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/compat/osx.h (limited to 'src/compat/osx.h') 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 @@ +/* + * Copyright (C) 2007-2010 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ + +#ifndef OSX_COMPATIBILITY__H +#define OSX_COMPATIBILITY__H + +#ifdef __APPLE__ + +#ifndef TEMP_FAILURE_RETRY +#define TEMP_FAILURE_RETRY(expression) \ + (__extension__ \ + ({ long int __result; \ + do __result = (long int) (expression); \ + while (__result == -1L && errno == EINTR); \ + __result; })) +#endif + +#include + +#define pthread_yield() sched_yield() +#endif /* __APPLE__ */ +#endif + -- cgit v1.2.3