changeset 1383:1736c5e2173f

NetBSD support
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Feb 2006 03:57:03 +0000
parents b34d38f76a2a
children 6fd39b50dd91
files configure.in include/SDL_config.h.in src/timer/unix/SDL_systimer.c src/video/wscons/SDL_wsconsevents.c src/video/wscons/SDL_wsconsvideo.c
diffstat 5 files changed, 10 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Mon Feb 20 03:11:04 2006 +0000
+++ b/configure.in	Mon Feb 20 03:57:03 2006 +0000
@@ -287,7 +287,7 @@
 
             # OpenBSD needs linking with ossaudio emulation library
             case "$target" in
-                *-*-openbsd*)
+                *-*-openbsd*|*-*-netbsd*)
                     BUILD_LIBS="$BUILD_LIBS -lossaudio";;
             esac
         fi
@@ -1483,7 +1483,7 @@
             pthread_lib="-pthread"
             ;;
         *-*-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"
             ;;
         *-*-openbsd*)
@@ -1976,7 +1976,7 @@
                 SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
                 have_cdrom=yes
             ;;
-            *netbsd*|*openbsd*)
+            *openbsd*|*netbsd*)
                 AC_DEFINE(SDL_CDROM_OPENBSD)
                 SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
                 have_cdrom=yes
@@ -2014,12 +2014,8 @@
         fi
         # Do any final platform setup
         case $ARCH in
-            netbsd)
-                # NetBSD does not define "unix"
-                BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
-            ;;
-            openbsd)
-                # OpenBSD does not define "unix"
+            openbsd|netbsd)
+                # OpenBSD and NetBSD do not define "unix"
                 BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
             ;;
         esac
--- a/include/SDL_config.h.in	Mon Feb 20 03:11:04 2006 +0000
+++ b/include/SDL_config.h.in	Mon Feb 20 03:57:03 2006 +0000
@@ -38,10 +38,10 @@
 #undef uint16_t
 #undef int32_t
 #undef uint32_t
-#undef SDL_HAS_64BIT_TYPE
 #undef int64_t
 #undef uint64_t
 #undef uintptr_t
+#undef SDL_HAS_64BIT_TYPE
 
 /* Endianness */
 #undef SDL_BYTEORDER
--- a/src/timer/unix/SDL_systimer.c	Mon Feb 20 03:11:04 2006 +0000
+++ b/src/timer/unix/SDL_systimer.c	Mon Feb 20 03:57:03 2006 +0000
@@ -41,8 +41,6 @@
 
 #if SDL_THREAD_PTH
 #include <pth.h>
-#elif _POSIX_THREAD_SYSCALL_SOFT
-#include <pthread.h>
 #endif
 
 #if SDL_THREADS_DISABLED
@@ -111,9 +109,6 @@
 	do {
 		errno = 0;
 
-#if _POSIX_THREAD_SYSCALL_SOFT
-		pthread_yield_np();
-#endif
 #if HAVE_NANOSLEEP
 		tv.tv_sec = elapsed.tv_sec;
 		tv.tv_nsec = elapsed.tv_nsec;
--- a/src/video/wscons/SDL_wsconsevents.c	Mon Feb 20 03:11:04 2006 +0000
+++ b/src/video/wscons/SDL_wsconsevents.c	Mon Feb 20 03:57:03 2006 +0000
@@ -146,6 +146,7 @@
   }
 
   switch (private->kbdType) {
+#ifdef WSKBD_TYPE_ZAURUS
   case WSKBD_TYPE_ZAURUS:
     /* top row */
     keymap[2] = SDLK_1;
@@ -219,6 +220,7 @@
     keymap[77] = SDLK_RIGHT;
     keymap[80] = SDLK_DOWN;
     break;
+#endif /* WSKBD_TYPE_ZAURUS */
 
   default:
     WSCONS_ReportError("Unable to map keys for keyboard type %u", 
--- a/src/video/wscons/SDL_wsconsvideo.c	Mon Feb 20 03:11:04 2006 +0000
+++ b/src/video/wscons/SDL_wsconsvideo.c	Mon Feb 20 03:57:03 2006 +0000
@@ -191,10 +191,12 @@
       private->redMask = 0x0000ff;
       private->greenMask = 0x00ff00;
       private->blueMask = 0xff0000;
+#ifdef WSDISPLAY_TYPE_PXALCD
     } else if (wstype == WSDISPLAY_TYPE_PXALCD) {
       private->redMask = 0x1f << 11;
       private->greenMask = 0x3f << 5;
       private->blueMask = 0x1f;
+#endif
     } else {
       WSCONS_ReportError("Unknown video hardware");
       return -1;