1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 01:29:10 +00:00

(svn r2417) - Fix: threads on morphos are apparently unexistent, so implement stubs for them (tokai)

This commit is contained in:
Darkvater
2005-06-06 12:11:44 +00:00
parent 7992e105f9
commit 2bcb41293f
2 changed files with 13 additions and 2 deletions

13
unix.c
View File

@@ -11,7 +11,9 @@
#include <time.h>
#include <pwd.h>
#include <signal.h>
#include <pthread.h>
#if !defined(__MORPHOS__) && !defined(__AMIGA__)
#include <pthread.h>
#endif
#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) || defined(__GLIBC__)
#define HAS_STATVFS
@@ -556,7 +558,16 @@ bool InsertTextBufferClipboard(Textbuf *tb)
return false;
}
/** Dummy stubs as MorphOS/ AmigaOS does not really
* know about a thread concept nor has a working libpthread */
#if defined(__MORPHOS__) || defined(__AMIGA__)
typedef int pthread_t;
#define pthread_create(thread, attr, function, arg) (true)
#define pthread_join(thread, retval) ()
#endif
static pthread_t thread1 = 0;
bool CreateOTTDThread(void *func, void *param)
{
return pthread_create(&thread1, NULL, func, param) == 0;