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. ;-)On Wed, 21 Aug 2002 07:40:55 GMT, swamp-dog at ntlworld.com (Guy Harrison) wrote:
–
swamp-dog at ntlworld.com