[Scummvm-git-logs] scummvm master -> 0b2ae9fa5ef71db1662d0aa311585bd6e22b899f

orgads orgads at gmail.com
Tue Aug 3 04:35:17 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0b2ae9fa5e DEVTOOLS: Replace ugly SDL/MinGW hack with a cleaner hack


Commit: 0b2ae9fa5ef71db1662d0aa311585bd6e22b899f
    https://github.com/scummvm/scummvm/commit/0b2ae9fa5ef71db1662d0aa311585bd6e22b899f
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-08-03T07:35:15+03:00

Commit Message:
DEVTOOLS: Replace ugly SDL/MinGW hack with a cleaner hack

Instead of having main=SDL_main defined by pkg-config/sdl2-config --cflags
and undefining it everywhere, strip it in its origin.

Changed paths:
  R test/cxxtest_mingw.h
    configure
    devtools/create_access/create_access_dat.cpp
    devtools/create_cryo/create_cryo_dat.cpp
    devtools/create_cryomni3d/create_cryomni3d_dat.cpp
    devtools/create_drascula/create_drascula.cpp
    devtools/create_glk/create_glk.cpp
    devtools/create_hugo/create_hugo.cpp
    devtools/create_kyradat/create_kyradat.cpp
    devtools/create_lure/create_lure_dat.cpp
    devtools/create_mortdat/create_mortdat.cpp
    devtools/create_myst3/create_myst3.cpp
    devtools/create_neverhood/create_neverhood.cpp
    devtools/create_project/create_project.cpp
    devtools/create_supernova/create_image/create_image.cpp
    devtools/create_supernova/create_supernova.cpp
    devtools/create_teenagent/create_teenagent.cpp
    devtools/create_titanic/create_titanic_dat.cpp
    devtools/create_titanic/script_preresponses.cpp
    devtools/create_titanic/script_quotes.cpp
    devtools/create_titanic/script_ranges.cpp
    devtools/create_titanic/script_responses.cpp
    devtools/create_titanic/script_states.cpp
    devtools/create_titanic/tag_maps.cpp
    devtools/create_tony/create_tony.cpp
    devtools/create_toon/create_toon.cpp
    devtools/create_translations/create_translations.cpp
    devtools/create_ultima/create_ultima.cpp
    devtools/create_xeen/cc.cpp
    devtools/create_xeen/clouds.cpp
    devtools/create_xeen/constants.cpp
    devtools/create_xeen/create_xeen.cpp
    devtools/create_xeen/map.cpp
    devtools/create_xeen/swords.cpp
    devtools/extract_mort/extract_mort.cpp
    devtools/qtable/qtable.cpp
    devtools/skycpt/AsciiCptCompile.cpp
    test/module.mk


diff --git a/configure b/configure
index b6e96371da..ac609d4d01 100755
--- a/configure
+++ b/configure
@@ -3736,7 +3736,7 @@ fi
 #
 if test "$_sdl" = auto ; then
 	find_sdlconfig
-	append_var SDL_CFLAGS "`$_sdlconfig --cflags`"
+	append_var SDL_CFLAGS "`$_sdlconfig --cflags | sed 's/[[:space:]]*-Dmain=SDL_main//g'`"
 	if test "$_static_build" = yes ; then
 		append_var SDL_LIBS "`$_sdlconfig --static-libs`"
 	else
@@ -3790,7 +3790,7 @@ if test "$_sdlnet" = auto ; then
 	if test "$_sdl" = no || test "$_sdlMajorVersionNumber" = 2; then
 		if test "$_pkg_config" = "yes" && $_pkgconfig --exists SDL2_net; then
 			append_var SDL2_NET_LIBS "`$_pkgconfig --libs SDL2_net`"
-			append_var SDL2_NET_CFLAGS "`$_pkgconfig --cflags SDL2_net`"
+			append_var SDL2_NET_CFLAGS "`$_pkgconfig --cflags SDL2_net | sed 's/[[:space:]]*-Dmain=SDL_main//g'`"
 		else
 			append_var SDL2_NET_LIBS "-lSDL2_net"
 		fi
@@ -3799,7 +3799,7 @@ if test "$_sdlnet" = auto ; then
 	if test "$_sdl" = no || test "$_sdlMajorVersionNumber" = 1; then
 		if test "$_pkg_config" = "yes" && $_pkgconfig --exists SDL_net; then
 			append_var SDL1_NET_LIBS "`$_pkgconfig --libs SDL_net`"
-			append_var SDL1_NET_CFLAGS "`$_pkgconfig --cflags SDL_net`"
+			append_var SDL1_NET_CFLAGS "`$_pkgconfig --cflags SDL_net | sed 's/[[:space:]]*-Dmain=SDL_main//g'`"
 		else
 			append_var SDL1_NET_LIBS "-lSDL_net"
 		fi
diff --git a/devtools/create_access/create_access_dat.cpp b/devtools/create_access/create_access_dat.cpp
index f0abdca9b1..654039b82e 100644
--- a/devtools/create_access/create_access_dat.cpp
+++ b/devtools/create_access/create_access_dat.cpp
@@ -23,12 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_cryo/create_cryo_dat.cpp b/devtools/create_cryo/create_cryo_dat.cpp
index 53798ad5ff..b9b0b2852f 100644
--- a/devtools/create_cryo/create_cryo_dat.cpp
+++ b/devtools/create_cryo/create_cryo_dat.cpp
@@ -20,12 +20,6 @@
  *
  */
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 
 #include "eden.h"
diff --git a/devtools/create_cryomni3d/create_cryomni3d_dat.cpp b/devtools/create_cryomni3d/create_cryomni3d_dat.cpp
index 9296e93806..0a35690014 100644
--- a/devtools/create_cryomni3d/create_cryomni3d_dat.cpp
+++ b/devtools/create_cryomni3d/create_cryomni3d_dat.cpp
@@ -23,12 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
diff --git a/devtools/create_drascula/create_drascula.cpp b/devtools/create_drascula/create_drascula.cpp
index 9fcbf6ecd0..063c3b7704 100644
--- a/devtools/create_drascula/create_drascula.cpp
+++ b/devtools/create_drascula/create_drascula.cpp
@@ -22,12 +22,6 @@
  * data file, used by the game engine
  */
 
- // HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_glk/create_glk.cpp b/devtools/create_glk/create_glk.cpp
index dd4f553e90..4bc6e999d9 100644
--- a/devtools/create_glk/create_glk.cpp
+++ b/devtools/create_glk/create_glk.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_hugo/create_hugo.cpp b/devtools/create_hugo/create_hugo.cpp
index 9f3f4d5e64..dd7776ae39 100644
--- a/devtools/create_hugo/create_hugo.cpp
+++ b/devtools/create_hugo/create_hugo.cpp
@@ -25,12 +25,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_kyradat/create_kyradat.cpp b/devtools/create_kyradat/create_kyradat.cpp
index 38d3f8799e..acd1ca4e7d 100644
--- a/devtools/create_kyradat/create_kyradat.cpp
+++ b/devtools/create_kyradat/create_kyradat.cpp
@@ -23,12 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "create_kyradat.h"
 #include "resources.h"
 #include "types.h"
diff --git a/devtools/create_lure/create_lure_dat.cpp b/devtools/create_lure/create_lure_dat.cpp
index 1d887819c0..f5498370a4 100644
--- a/devtools/create_lure/create_lure_dat.cpp
+++ b/devtools/create_lure/create_lure_dat.cpp
@@ -31,12 +31,6 @@
 #pragma GCC diagnostic ignored "-Wnarrowing"
 #endif
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_mortdat/create_mortdat.cpp b/devtools/create_mortdat/create_mortdat.cpp
index e3051869cb..ac1aaba8d1 100644
--- a/devtools/create_mortdat/create_mortdat.cpp
+++ b/devtools/create_mortdat/create_mortdat.cpp
@@ -27,12 +27,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "common/endian.h"
 #include "create_mortdat.h"
 #include "enginetext.h"
diff --git a/devtools/create_myst3/create_myst3.cpp b/devtools/create_myst3/create_myst3.cpp
index 2118185cc8..c45b2f99bb 100644
--- a/devtools/create_myst3/create_myst3.cpp
+++ b/devtools/create_myst3/create_myst3.cpp
@@ -20,12 +20,6 @@
  *
  */
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <vector>
 #include <string>
 #include "file.h"
@@ -416,4 +410,4 @@ void copyData(Common::File &temp, Common::File &target) {
 	target.write(data, dataSize);
 
 	delete[] data;
-}
\ No newline at end of file
+}
diff --git a/devtools/create_neverhood/create_neverhood.cpp b/devtools/create_neverhood/create_neverhood.cpp
index acafcccc1c..d71911c11c 100644
--- a/devtools/create_neverhood/create_neverhood.cpp
+++ b/devtools/create_neverhood/create_neverhood.cpp
@@ -23,13 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "create_neverhood.h"
 #include <vector>
 #include "md5.h"
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index a442a4ca51..c1535cf9f6 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -22,12 +22,6 @@
 
 #define ENABLE_XCODE
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #if (defined(_WIN32) || defined(WIN32)) && !defined(__GNUC__)
 #define USE_WIN32_API
 #endif
diff --git a/devtools/create_supernova/create_image/create_image.cpp b/devtools/create_supernova/create_image/create_image.cpp
index fa3532e82e..9c0fa82f4e 100644
--- a/devtools/create_supernova/create_image/create_image.cpp
+++ b/devtools/create_supernova/create_image/create_image.cpp
@@ -1,9 +1,3 @@
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <fstream>
 #include <iostream>
 #include <sstream>
diff --git a/devtools/create_supernova/create_supernova.cpp b/devtools/create_supernova/create_supernova.cpp
index 78ed883b59..34f6a43f42 100644
--- a/devtools/create_supernova/create_supernova.cpp
+++ b/devtools/create_supernova/create_supernova.cpp
@@ -4,12 +4,6 @@
 #include "po_parser.h"
 #include <iostream>
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 // List of languages to look for. To add new languages you only need to change the array below
 // and add the supporting files:
 //   - 640x480 bitmap picture for the newpaper named 'img1-##.pbm' and 'img2-##.pbm'
diff --git a/devtools/create_teenagent/create_teenagent.cpp b/devtools/create_teenagent/create_teenagent.cpp
index be9a7ec6a9..2f180bb814 100644
--- a/devtools/create_teenagent/create_teenagent.cpp
+++ b/devtools/create_teenagent/create_teenagent.cpp
@@ -23,12 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
diff --git a/devtools/create_titanic/create_titanic_dat.cpp b/devtools/create_titanic/create_titanic_dat.cpp
index f0570b4e18..d8643c37bd 100644
--- a/devtools/create_titanic/create_titanic_dat.cpp
+++ b/devtools/create_titanic/create_titanic_dat.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_titanic/script_preresponses.cpp b/devtools/create_titanic/script_preresponses.cpp
index e0b65b8a91..3fe832f6c1 100644
--- a/devtools/create_titanic/script_preresponses.cpp
+++ b/devtools/create_titanic/script_preresponses.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "script_preresponses.h"
 
diff --git a/devtools/create_titanic/script_quotes.cpp b/devtools/create_titanic/script_quotes.cpp
index 41365de437..ed034d8ff6 100644
--- a/devtools/create_titanic/script_quotes.cpp
+++ b/devtools/create_titanic/script_quotes.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "script_quotes.h"
 
diff --git a/devtools/create_titanic/script_ranges.cpp b/devtools/create_titanic/script_ranges.cpp
index c69ec2b42d..085ea9ba35 100644
--- a/devtools/create_titanic/script_ranges.cpp
+++ b/devtools/create_titanic/script_ranges.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "script_ranges.h"
 
diff --git a/devtools/create_titanic/script_responses.cpp b/devtools/create_titanic/script_responses.cpp
index 2411d62885..bbc58834a8 100644
--- a/devtools/create_titanic/script_responses.cpp
+++ b/devtools/create_titanic/script_responses.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "script_responses.h"
 
diff --git a/devtools/create_titanic/script_states.cpp b/devtools/create_titanic/script_states.cpp
index a958cc4c73..81b4de323d 100644
--- a/devtools/create_titanic/script_states.cpp
+++ b/devtools/create_titanic/script_states.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "script_states.h"
 
diff --git a/devtools/create_titanic/tag_maps.cpp b/devtools/create_titanic/tag_maps.cpp
index a176fb604d..4ad20f20fa 100644
--- a/devtools/create_titanic/tag_maps.cpp
+++ b/devtools/create_titanic/tag_maps.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "tag_maps.h"
 
diff --git a/devtools/create_tony/create_tony.cpp b/devtools/create_tony/create_tony.cpp
index 505aec4eb8..a2460d09d9 100644
--- a/devtools/create_tony/create_tony.cpp
+++ b/devtools/create_tony/create_tony.cpp
@@ -25,12 +25,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_toon/create_toon.cpp b/devtools/create_toon/create_toon.cpp
index e98f29e41d..1520233282 100644
--- a/devtools/create_toon/create_toon.cpp
+++ b/devtools/create_toon/create_toon.cpp
@@ -25,12 +25,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_translations/create_translations.cpp b/devtools/create_translations/create_translations.cpp
index 7b9498fc04..44180313df 100644
--- a/devtools/create_translations/create_translations.cpp
+++ b/devtools/create_translations/create_translations.cpp
@@ -30,12 +30,6 @@
 #include <ctype.h>
 #include <vector>
 
- // HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "po_parser.h"
 
 #define TRANSLATIONS_DAT_VER 4	// 1 byte
diff --git a/devtools/create_ultima/create_ultima.cpp b/devtools/create_ultima/create_ultima.cpp
index 98ea4c9c9a..393f79e311 100644
--- a/devtools/create_ultima/create_ultima.cpp
+++ b/devtools/create_ultima/create_ultima.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_xeen/cc.cpp b/devtools/create_xeen/cc.cpp
index ae9371a10c..67336512d6 100644
--- a/devtools/create_xeen/cc.cpp
+++ b/devtools/create_xeen/cc.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "cc.h"
 #include "common/endian.h"
 
diff --git a/devtools/create_xeen/clouds.cpp b/devtools/create_xeen/clouds.cpp
index f8aba7b7d6..da73fff829 100644
--- a/devtools/create_xeen/clouds.cpp
+++ b/devtools/create_xeen/clouds.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "clouds.h"
 
diff --git a/devtools/create_xeen/constants.cpp b/devtools/create_xeen/constants.cpp
index e67c5cbea7..50e9b06d83 100644
--- a/devtools/create_xeen/constants.cpp
+++ b/devtools/create_xeen/constants.cpp
@@ -23,12 +23,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "common/language.h"
 #include "constants.h"
 
diff --git a/devtools/create_xeen/create_xeen.cpp b/devtools/create_xeen/create_xeen.cpp
index d15689e6c9..935a073648 100644
--- a/devtools/create_xeen/create_xeen.cpp
+++ b/devtools/create_xeen/create_xeen.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/create_xeen/map.cpp b/devtools/create_xeen/map.cpp
index 07436a8c0c..b3c18e841a 100644
--- a/devtools/create_xeen/map.cpp
+++ b/devtools/create_xeen/map.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "map.h"
 
diff --git a/devtools/create_xeen/swords.cpp b/devtools/create_xeen/swords.cpp
index 499038a721..5206105bb5 100644
--- a/devtools/create_xeen/swords.cpp
+++ b/devtools/create_xeen/swords.cpp
@@ -23,12 +23,6 @@
  // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include "file.h"
 #include "swords.h"
 
diff --git a/devtools/extract_mort/extract_mort.cpp b/devtools/extract_mort/extract_mort.cpp
index 4002b72cf9..f3507ad59c 100644
--- a/devtools/extract_mort/extract_mort.cpp
+++ b/devtools/extract_mort/extract_mort.cpp
@@ -27,12 +27,6 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/qtable/qtable.cpp b/devtools/qtable/qtable.cpp
index c4d770fd19..9857779965 100644
--- a/devtools/qtable/qtable.cpp
+++ b/devtools/qtable/qtable.cpp
@@ -1,9 +1,3 @@
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/devtools/skycpt/AsciiCptCompile.cpp b/devtools/skycpt/AsciiCptCompile.cpp
index 708a711840..5ebd531637 100644
--- a/devtools/skycpt/AsciiCptCompile.cpp
+++ b/devtools/skycpt/AsciiCptCompile.cpp
@@ -20,12 +20,6 @@
  *
  */
 
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
 // AsciiCptCompile.cpp
 //
 
diff --git a/test/cxxtest_mingw.h b/test/cxxtest_mingw.h
deleted file mode 100644
index 922598825a..0000000000
--- a/test/cxxtest_mingw.h
+++ /dev/null
@@ -1,11 +0,0 @@
-
-#ifndef CXXTEST_MINGW
-#define CXXTEST_MINGW
-
-// HACK to allow building with the SDL backend on MinGW
-// see bug #3412 "TOOLS: MinGW tools building broken"
-#ifdef main
-#undef main
-#endif // main
-
-#endif // CXXTEST_MINGW
diff --git a/test/module.mk b/test/module.mk
index a357445306..e42c36ff84 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -41,7 +41,7 @@ ifeq ($(ENABLE_ULTIMA), STATIC_PLUGIN)
 endif
 
 #
-TEST_FLAGS   := --runner=StdioPrinter --no-std --no-eh --include=$(srcdir)/test/cxxtest_mingw.h
+TEST_FLAGS   := --runner=StdioPrinter --no-std --no-eh
 TEST_CFLAGS  := $(CFLAGS) -I$(srcdir)/test/cxxtest
 TEST_LDFLAGS := $(LDFLAGS) $(LIBS)
 TEST_CXXFLAGS := $(filter-out -Wglobal-constructors,$(CXXFLAGS))




More information about the Scummvm-git-logs mailing list