Commit 5427ab02 authored by Sam Lantinga's avatar Sam Lantinga

NetBSD support

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401387
parent d702fdf4
...@@ -287,7 +287,7 @@ AC_HELP_STRING([--enable-oss], [support the OSS audio API [default=yes]]), ...@@ -287,7 +287,7 @@ AC_HELP_STRING([--enable-oss], [support the OSS audio API [default=yes]]),
# OpenBSD needs linking with ossaudio emulation library # OpenBSD needs linking with ossaudio emulation library
case "$target" in case "$target" in
*-*-openbsd*) *-*-openbsd*|*-*-netbsd*)
BUILD_LIBS="$BUILD_LIBS -lossaudio";; BUILD_LIBS="$BUILD_LIBS -lossaudio";;
esac esac
fi fi
...@@ -1483,7 +1483,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [default=yes]]), ...@@ -1483,7 +1483,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [default=yes]]),
pthread_lib="-pthread" pthread_lib="-pthread"
;; ;;
*-*-netbsd*) *-*-netbsd*)
pthread_cflags="-I/usr/include -D_REENTRANT -D_THREAD_SAFE -D_POSIX_THREAD_SYSCALL_SOFT=1" pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-L/usr/lib -lpthread" pthread_lib="-L/usr/lib -lpthread"
;; ;;
*-*-openbsd*) *-*-openbsd*)
...@@ -1976,7 +1976,7 @@ case "$target" in ...@@ -1976,7 +1976,7 @@ case "$target" in
SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c" SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
have_cdrom=yes have_cdrom=yes
;; ;;
*netbsd*|*openbsd*) *openbsd*|*netbsd*)
AC_DEFINE(SDL_CDROM_OPENBSD) AC_DEFINE(SDL_CDROM_OPENBSD)
SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c" SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
have_cdrom=yes have_cdrom=yes
...@@ -2014,12 +2014,8 @@ case "$target" in ...@@ -2014,12 +2014,8 @@ case "$target" in
fi fi
# Do any final platform setup # Do any final platform setup
case $ARCH in case $ARCH in
netbsd) openbsd|netbsd)
# NetBSD does not define "unix" # OpenBSD and NetBSD do not define "unix"
BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
;;
openbsd)
# OpenBSD does not define "unix"
BUILD_CFLAGS="$BUILD_CFLAGS -Dunix" BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
;; ;;
esac esac
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
#undef uint16_t #undef uint16_t
#undef int32_t #undef int32_t
#undef uint32_t #undef uint32_t
#undef SDL_HAS_64BIT_TYPE
#undef int64_t #undef int64_t
#undef uint64_t #undef uint64_t
#undef uintptr_t #undef uintptr_t
#undef SDL_HAS_64BIT_TYPE
/* Endianness */ /* Endianness */
#undef SDL_BYTEORDER #undef SDL_BYTEORDER
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
#if SDL_THREAD_PTH #if SDL_THREAD_PTH
#include <pth.h> #include <pth.h>
#elif _POSIX_THREAD_SYSCALL_SOFT
#include <pthread.h>
#endif #endif
#if SDL_THREADS_DISABLED #if SDL_THREADS_DISABLED
...@@ -111,9 +109,6 @@ void SDL_Delay (Uint32 ms) ...@@ -111,9 +109,6 @@ void SDL_Delay (Uint32 ms)
do { do {
errno = 0; errno = 0;
#if _POSIX_THREAD_SYSCALL_SOFT
pthread_yield_np();
#endif
#if HAVE_NANOSLEEP #if HAVE_NANOSLEEP
tv.tv_sec = elapsed.tv_sec; tv.tv_sec = elapsed.tv_sec;
tv.tv_nsec = elapsed.tv_nsec; tv.tv_nsec = elapsed.tv_nsec;
......
...@@ -146,6 +146,7 @@ void WSCONS_InitOSKeymap(_THIS) ...@@ -146,6 +146,7 @@ void WSCONS_InitOSKeymap(_THIS)
} }
switch (private->kbdType) { switch (private->kbdType) {
#ifdef WSKBD_TYPE_ZAURUS
case WSKBD_TYPE_ZAURUS: case WSKBD_TYPE_ZAURUS:
/* top row */ /* top row */
keymap[2] = SDLK_1; keymap[2] = SDLK_1;
...@@ -219,6 +220,7 @@ void WSCONS_InitOSKeymap(_THIS) ...@@ -219,6 +220,7 @@ void WSCONS_InitOSKeymap(_THIS)
keymap[77] = SDLK_RIGHT; keymap[77] = SDLK_RIGHT;
keymap[80] = SDLK_DOWN; keymap[80] = SDLK_DOWN;
break; break;
#endif /* WSKBD_TYPE_ZAURUS */
default: default:
WSCONS_ReportError("Unable to map keys for keyboard type %u", WSCONS_ReportError("Unable to map keys for keyboard type %u",
......
...@@ -191,10 +191,12 @@ int WSCONS_VideoInit(_THIS, SDL_PixelFormat *vformat) ...@@ -191,10 +191,12 @@ int WSCONS_VideoInit(_THIS, SDL_PixelFormat *vformat)
private->redMask = 0x0000ff; private->redMask = 0x0000ff;
private->greenMask = 0x00ff00; private->greenMask = 0x00ff00;
private->blueMask = 0xff0000; private->blueMask = 0xff0000;
#ifdef WSDISPLAY_TYPE_PXALCD
} else if (wstype == WSDISPLAY_TYPE_PXALCD) { } else if (wstype == WSDISPLAY_TYPE_PXALCD) {
private->redMask = 0x1f << 11; private->redMask = 0x1f << 11;
private->greenMask = 0x3f << 5; private->greenMask = 0x3f << 5;
private->blueMask = 0x1f; private->blueMask = 0x1f;
#endif
} else { } else {
WSCONS_ReportError("Unknown video hardware"); WSCONS_ReportError("Unknown video hardware");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment