NetBSD support
authorSam Lantinga <slouken@libsdl.org>
Mon, 20 Feb 2006 03:57:03 +0000
changeset 13831736c5e2173f
parent 1382 b34d38f76a2a
child 1384 6fd39b50dd91
NetBSD support
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
     1.1 --- a/configure.in	Mon Feb 20 03:11:04 2006 +0000
     1.2 +++ b/configure.in	Mon Feb 20 03:57:03 2006 +0000
     1.3 @@ -287,7 +287,7 @@
     1.4  
     1.5              # OpenBSD needs linking with ossaudio emulation library
     1.6              case "$target" in
     1.7 -                *-*-openbsd*)
     1.8 +                *-*-openbsd*|*-*-netbsd*)
     1.9                      BUILD_LIBS="$BUILD_LIBS -lossaudio";;
    1.10              esac
    1.11          fi
    1.12 @@ -1483,7 +1483,7 @@
    1.13              pthread_lib="-pthread"
    1.14              ;;
    1.15          *-*-netbsd*)
    1.16 -            pthread_cflags="-I/usr/include -D_REENTRANT -D_THREAD_SAFE -D_POSIX_THREAD_SYSCALL_SOFT=1"
    1.17 +            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
    1.18              pthread_lib="-L/usr/lib -lpthread"
    1.19              ;;
    1.20          *-*-openbsd*)
    1.21 @@ -1976,7 +1976,7 @@
    1.22                  SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
    1.23                  have_cdrom=yes
    1.24              ;;
    1.25 -            *netbsd*|*openbsd*)
    1.26 +            *openbsd*|*netbsd*)
    1.27                  AC_DEFINE(SDL_CDROM_OPENBSD)
    1.28                  SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
    1.29                  have_cdrom=yes
    1.30 @@ -2014,12 +2014,8 @@
    1.31          fi
    1.32          # Do any final platform setup
    1.33          case $ARCH in
    1.34 -            netbsd)
    1.35 -                # NetBSD does not define "unix"
    1.36 -                BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
    1.37 -            ;;
    1.38 -            openbsd)
    1.39 -                # OpenBSD does not define "unix"
    1.40 +            openbsd|netbsd)
    1.41 +                # OpenBSD and NetBSD do not define "unix"
    1.42                  BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
    1.43              ;;
    1.44          esac
     2.1 --- a/include/SDL_config.h.in	Mon Feb 20 03:11:04 2006 +0000
     2.2 +++ b/include/SDL_config.h.in	Mon Feb 20 03:57:03 2006 +0000
     2.3 @@ -38,10 +38,10 @@
     2.4  #undef uint16_t
     2.5  #undef int32_t
     2.6  #undef uint32_t
     2.7 -#undef SDL_HAS_64BIT_TYPE
     2.8  #undef int64_t
     2.9  #undef uint64_t
    2.10  #undef uintptr_t
    2.11 +#undef SDL_HAS_64BIT_TYPE
    2.12  
    2.13  /* Endianness */
    2.14  #undef SDL_BYTEORDER
     3.1 --- a/src/timer/unix/SDL_systimer.c	Mon Feb 20 03:11:04 2006 +0000
     3.2 +++ b/src/timer/unix/SDL_systimer.c	Mon Feb 20 03:57:03 2006 +0000
     3.3 @@ -41,8 +41,6 @@
     3.4  
     3.5  #if SDL_THREAD_PTH
     3.6  #include <pth.h>
     3.7 -#elif _POSIX_THREAD_SYSCALL_SOFT
     3.8 -#include <pthread.h>
     3.9  #endif
    3.10  
    3.11  #if SDL_THREADS_DISABLED
    3.12 @@ -111,9 +109,6 @@
    3.13  	do {
    3.14  		errno = 0;
    3.15  
    3.16 -#if _POSIX_THREAD_SYSCALL_SOFT
    3.17 -		pthread_yield_np();
    3.18 -#endif
    3.19  #if HAVE_NANOSLEEP
    3.20  		tv.tv_sec = elapsed.tv_sec;
    3.21  		tv.tv_nsec = elapsed.tv_nsec;
     4.1 --- a/src/video/wscons/SDL_wsconsevents.c	Mon Feb 20 03:11:04 2006 +0000
     4.2 +++ b/src/video/wscons/SDL_wsconsevents.c	Mon Feb 20 03:57:03 2006 +0000
     4.3 @@ -146,6 +146,7 @@
     4.4    }
     4.5  
     4.6    switch (private->kbdType) {
     4.7 +#ifdef WSKBD_TYPE_ZAURUS
     4.8    case WSKBD_TYPE_ZAURUS:
     4.9      /* top row */
    4.10      keymap[2] = SDLK_1;
    4.11 @@ -219,6 +220,7 @@
    4.12      keymap[77] = SDLK_RIGHT;
    4.13      keymap[80] = SDLK_DOWN;
    4.14      break;
    4.15 +#endif /* WSKBD_TYPE_ZAURUS */
    4.16  
    4.17    default:
    4.18      WSCONS_ReportError("Unable to map keys for keyboard type %u", 
     5.1 --- a/src/video/wscons/SDL_wsconsvideo.c	Mon Feb 20 03:11:04 2006 +0000
     5.2 +++ b/src/video/wscons/SDL_wsconsvideo.c	Mon Feb 20 03:57:03 2006 +0000
     5.3 @@ -191,10 +191,12 @@
     5.4        private->redMask = 0x0000ff;
     5.5        private->greenMask = 0x00ff00;
     5.6        private->blueMask = 0xff0000;
     5.7 +#ifdef WSDISPLAY_TYPE_PXALCD
     5.8      } else if (wstype == WSDISPLAY_TYPE_PXALCD) {
     5.9        private->redMask = 0x1f << 11;
    5.10        private->greenMask = 0x3f << 5;
    5.11        private->blueMask = 0x1f;
    5.12 +#endif
    5.13      } else {
    5.14        WSCONS_ReportError("Unknown video hardware");
    5.15        return -1;