mesa: fixes for building on Haiku

This commit is contained in:
Tomas Wilhelmsson 2009-02-23 08:11:29 -07:00 committed by Brian Paul
parent d265706cd3
commit 41172c0430
4 changed files with 20 additions and 4 deletions

View File

@ -265,9 +265,21 @@ typedef xmutex_rec _glthread_Mutex;
*/
#ifdef BEOS_THREADS
/* Problem with OS.h and this file on haiku */
#ifndef __HAIKU__
#include <kernel/OS.h>
#endif
#include <support/TLS.h>
/* The only two typedefs required here
* this is cause of the OS.h problem
*/
#ifdef __HAIKU__
typedef int32 thread_id;
typedef int32 sem_id;
#endif
typedef struct {
int32 key;
int initMagic;

View File

@ -36,7 +36,10 @@
#if defined(_WIN32)
#include <windows.h>
#endif
#if defined(__HAIKU__)
/* for NULL */
#include <stdio.h>
#endif
/**
* Wrapper for dlopen().

View File

@ -265,7 +265,8 @@ static INLINE int iround(float f)
}
#define IROUND(x) iround(x)
#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \
(!defined(__BEOS__) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
(!(defined(__BEOS__) || defined(__HAIKU__)) || \
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
static INLINE int iround(float f)
{
int r;

View File

@ -61,7 +61,7 @@ do { \
printf( "\n" ); \
} while (0)
#if defined(__BEOS__) || defined(_LP64)
#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
#define OFFSET( s, t, m ) \
printf( "#define %s\t%ld\n", s, offsetof( t, m ) );
#else
@ -69,7 +69,7 @@ do { \
printf( "#define %s\t%d\n", s, offsetof( t, m ) );
#endif
#if defined(__BEOS__) || defined(_LP64)
#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
#define SIZEOF( s, t ) \
printf( "#define %s\t%ld\n", s, sizeof(t) );
#else