changeset 1026:0f3aa6ab3341

Select patches included from The NetBSD Package Collection (www.pkgsrc.org)
author Sam Lantinga <slouken@libsdl.org>
date Wed, 12 Jan 2005 06:04:48 +0000
parents 3652d111416c
children c69697a85412
files include/SDL_endian.h include/SDL_syswm.h src/audio/SDL_audiodev.c src/cdrom/openbsd/SDL_syscdrom.c
diffstat 4 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_endian.h	Sat Jan 08 23:13:01 2005 +0000
+++ b/include/SDL_endian.h	Wed Jan 12 06:04:48 2005 +0000
@@ -68,7 +68,7 @@
 #elif defined(__GNUC__) && defined(__x86_64__)
 static __inline__ Uint16 SDL_Swap16(Uint16 x)
 {
-	__asm__("xchgb %b0,%h0" : "=q" (x) :  "0" (x));
+	__asm__("xchgb %b0,%h0" : "=Q" (x) :  "0" (x));
 	return x;
 }
 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
--- a/include/SDL_syswm.h	Sat Jan 08 23:13:01 2005 +0000
+++ b/include/SDL_syswm.h	Wed Jan 12 06:04:48 2005 +0000
@@ -49,7 +49,7 @@
 #else
 
 /* This is the structure for custom window manager events */
-#if (defined(unix) || defined(__unix__) || defined(_AIX) || defined(__OpenBSD__)) && \
+#if (defined(unix) || defined(__unix__) || defined(_AIX) || defined(__OpenBSD__) || defined(__NetBSD__)) && \
     (!defined(DISABLE_X11) && !defined(__CYGWIN32__) && !defined(ENABLE_NANOX) && \
      !defined(__QNXNTO__))
  /* AIX is unix, of course, but the native compiler CSet doesn't define unix */
--- a/src/audio/SDL_audiodev.c	Sat Jan 08 23:13:01 2005 +0000
+++ b/src/audio/SDL_audiodev.c	Wed Jan 12 06:04:48 2005 +0000
@@ -39,7 +39,7 @@
 #include "SDL_audiodev_c.h"
 
 #ifndef _PATH_DEV_DSP
-#ifdef __OpenBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
 #define _PATH_DEV_DSP  "/dev/audio"
 #else
 #define _PATH_DEV_DSP  "/dev/dsp"
--- a/src/cdrom/openbsd/SDL_syscdrom.c	Sat Jan 08 23:13:01 2005 +0000
+++ b/src/cdrom/openbsd/SDL_syscdrom.c	Wed Jan 12 06:04:48 2005 +0000
@@ -143,6 +143,8 @@
 	static char *checklist[] = {
 #ifdef __OpenBSD__
 		"?0 cd?c", "cdrom", NULL
+#elif defined(__NetBSD__)
+		"?0 cd?d", "?0 cd?c", "cdrom", NULL
 #else
 		"?0 cd?c", "?0 acd?c", "cdrom", NULL
 #endif