diff -r b35668cd8b3e -r 6649d6caecf2 platform/unix.c --- a/platform/unix.c Thu Jul 25 16:58:00 2002 +0000 +++ b/platform/unix.c Thu Jul 25 17:13:03 2002 +0000 @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -28,6 +27,10 @@ #include #include +#if (!defined PHYSFS_NO_PTHREADS_SUPPORT) +#include +#endif + #ifdef PHYSFS_HAVE_SYS_UCRED_H # ifdef PHYSFS_HAVE_MNTENT_H # undef PHYSFS_HAVE_MNTENT_H /* don't do both... */ @@ -256,12 +259,6 @@ } /* __PHYSFS_platformCalcBaseDir */ -PHYSFS_uint64 __PHYSFS_platformGetThreadID(void) -{ - return((PHYSFS_uint64) pthread_self()); -} /* __PHYSFS_platformGetThreadID */ - - /* Much like my college days, try to sleep for 10 milliseconds at a time... */ void __PHYSFS_platformTimeslice(void) { @@ -283,6 +280,22 @@ } /* __PHYSFS_platformRealPath */ +#if (!defined PHYSFS_NO_PTHREADS_SUPPORT) + +PHYSFS_uint64 __PHYSFS_platformGetThreadID(void) { return(0x0001); } +void *__PHYSFS_platformCreateMutex(void) { return((void *) 0x0001); } +void __PHYSFS_platformDestroyMutex(void *mutex) {} +int __PHYSFS_platformGrabMutex(void *mutex) { return(1); } +void __PHYSFS_platformReleaseMutex(void *mutex) {} + +#else + +PHYSFS_uint64 __PHYSFS_platformGetThreadID(void) +{ + return((PHYSFS_uint64) pthread_self()); +} /* __PHYSFS_platformGetThreadID */ + + void *__PHYSFS_platformCreateMutex(void) { int rc; @@ -317,6 +330,9 @@ pthread_mutex_unlock((pthread_mutex_t *) mutex); } /* __PHYSFS_platformReleaseMutex */ +#endif /* !PHYSFS_NO_PTHREADS_SUPPORT */ + + #endif /* !defined __BEOS__ && !defined WIN32 */ /* end of unix.c ... */