qt: Add support for Haiku
* OpenAL backend is enabled by default on Haiku * bswap include now makes use of builtins if they exist * Use a local fgetws method for Haiku to avoid crashes * OpenGL renderers are completely disabled on Haiku (they do not work) * Software renderer is a widget, not a window on Haiku (fixes blank screen) * Add option to disable System MIDI at compile time
This commit is contained in:
@@ -73,20 +73,32 @@
|
||||
)
|
||||
#endif /*HAVE_BYTESWAP_H*/
|
||||
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap16)
|
||||
#define bswap16(x) __builtin_bswap16(x)
|
||||
#else
|
||||
static __inline uint16_t bswap16(uint16_t x)
|
||||
{
|
||||
return bswap_16(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap32)
|
||||
#define bswap32(x) __builtin_bswap32(x)
|
||||
#else
|
||||
static __inline uint32_t bswap32(uint32_t x)
|
||||
{
|
||||
return bswap_32(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined __has_builtin && __has_builtin(__builtin_bswap64)
|
||||
#define bswap64(x) __builtin_bswap64(x)
|
||||
#else
|
||||
static __inline uint64_t bswap64(uint64_t x)
|
||||
{
|
||||
return bswap_64(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline void bswap16s(uint16_t *s)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ extern int stricmp(const char* s1, const char* s2);
|
||||
extern int strnicmp(const char* s1, const char* s2, size_t n);
|
||||
#endif
|
||||
|
||||
#if (defined(__unix__) || defined(__APPLE__)) && !defined(__linux__)
|
||||
#if (defined(__HAIKU__) || defined(__unix__) || defined(__APPLE__)) && !defined(__linux__)
|
||||
/* FreeBSD has largefile by default. */
|
||||
# define fopen64 fopen
|
||||
# define fseeko64 fseeko
|
||||
|
||||
Reference in New Issue
Block a user