[SDL] Any outstanding bugs?

Guy Harrison swamp-dog at ntlworld.com
Wed Aug 21 02:59:01 PDT 2002


On Wed, 21 Aug 2002 07:40:55 GMT, swamp-dog at ntlworld.com (Guy Harrison)
wrote:

oops, forgot to mention examples!

>Conversely, pass "-mno-cygwin" to the compiler and it toggles to mingw
>mode. __CYGWIN__ and unix vanish to be replaced by -D__MINGW32__ and
>-DWIN32 (and flavours). 'specs' also ensures various headers and
>libraries appear and vanish accordingly.
>
>I guess all your script guru needs be concerned with is ensuring the
>compiler becomes "gcc -mno-cygwin" in 'configure' when everybody (but
>me!) wants to compile a mingw target SDL under Cygwin.

--- SDL-1.2.4/include/SDL_syswm.h.ORIGINAL	2002-08-12
03:06:25.000000000 +0100
+++ SDL-1.2.4/include/SDL_syswm.h	2002-08-12 03:08:09.000000000
+0100
@@ -50,7 +50,7 @@
 
 /* This is the structure for custom window manager events */
 #if (defined(unix) || defined(__unix__) || defined(_AIX) ||
defined(__OpenBSD__)) && \
-    (!defined(DISABLE_X11) && !defined(__CYGWIN32__))
+    (!defined(DISABLE_X11))
  /* AIX is unix, of course, but the native compiler CSet doesn't define
unix */
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>

(removed because __MINGW32__ won't have 'unix' defined)




--- SDL-1.2.4/src/SDL_error.c.ORIGINAL	2002-08-12 04:52:25.000000000
+0100
+++ SDL-1.2.4/src/SDL_error.c	2002-08-12 04:52:53.000000000 +0100
@@ -47,7 +47,7 @@
 #define SDL_GetErrBuf()	(&SDL_global_error)
 #endif /* DISABLE_THREADS */
 
-#ifdef __CYGWIN__
+#ifdef __MINGW32__
 #define DISABLE_STDIO
 #endif
 
--- SDL-1.2.4/src/SDL_fatal.c.ORIGINAL	2002-08-12 04:53:31.000000000
+0100
+++ SDL-1.2.4/src/SDL_fatal.c	2002-08-12 04:53:34.000000000 +0100
@@ -51,7 +51,7 @@
 #include "SDL.h"
 #include "SDL_fatal.h"
 
-#ifdef __CYGWIN__
+#ifdef __MINGW32__
 #define DISABLE_STDIO
 #endif

(substituted so that only a windows native target gets disabled)



And a converse example...

--- SDL-1.2.4/src/video/x11/SDL_x11gl.c.ORIGINAL	2002-08-12
08:17:14.000000000 +0100
+++ SDL-1.2.4/src/video/x11/SDL_x11gl.c	2002-08-12 08:18:30.000000000
+0100
@@ -34,7 +34,11 @@
 #include "SDL_x11dga_c.h"
 #include "SDL_x11gl_c.h"
 
-#define DEFAULT_OPENGL	"libGL.so.1"
+#ifdef __CYGWIN__
+#	define	DEFAULT_OPENGL	"libGL.dll"
+#else
+#	define	DEFAULT_OPENGL	"libGL.so.1"
+#endif

...which may interest somebody because the rotating cube example does
work at a half-decent frame rate. ;-)


-- 
swamp-dog at ntlworld.com




More information about the SDL mailing list