From ae6c1e9a8997e67d081954594069e961ed8206c7 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Thu, 14 Nov 2019 22:45:07 +0100 Subject: [PATCH] Fix order of includes in Windows-specific files These files assume, that WIN32 is defined by compiler or MSVC project file, when in MSYS2 and MinGW environments, it is defined in config.h and appears after dosbox.h is included, which in turn is included by associated header (cdrom.h in this case). Fixes: #42 --- src/dos/cdrom_aspi_win32.cpp | 3 +-- src/dos/cdrom_image.cpp | 3 ++- src/dos/cdrom_ioctl_win32.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dos/cdrom_aspi_win32.cpp b/src/dos/cdrom_aspi_win32.cpp index aeed5ea3..66b0d013 100644 --- a/src/dos/cdrom_aspi_win32.cpp +++ b/src/dos/cdrom_aspi_win32.cpp @@ -16,13 +16,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "cdrom.h" #if defined (WIN32) #include -#include "dosbox.h" -#include "cdrom.h" #include "support.h" //Are actually system includes but leave for now diff --git a/src/dos/cdrom_image.cpp b/src/dos/cdrom_image.cpp index 346a5fdf..c3d4ba73 100644 --- a/src/dos/cdrom_image.cpp +++ b/src/dos/cdrom_image.cpp @@ -16,6 +16,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "cdrom.h" + // #define DEBUG 1 #ifdef DEBUG #include // time_t, tm, time(), and localtime() @@ -37,7 +39,6 @@ #include #endif -#include "cdrom.h" #include "drives.h" #include "support.h" #include "setup.h" diff --git a/src/dos/cdrom_ioctl_win32.cpp b/src/dos/cdrom_ioctl_win32.cpp index ca1113e1..87a8b576 100644 --- a/src/dos/cdrom_ioctl_win32.cpp +++ b/src/dos/cdrom_ioctl_win32.cpp @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "cdrom.h" #if defined (WIN32) @@ -35,8 +36,6 @@ #include -#include "cdrom.h" - // for a more sophisticated implementation of the mci cdda functionality // see the SDL sources, which the mci_ functions are based on