From 1ebfef778e67329d221d82eb11592a50b0b49b6a Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sat, 18 Nov 2017 16:54:27 +0300 Subject: Fix compilation on MinGW-w64 when using a DosBox emulator (Help to solve #32) --- src/dbopl.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/dbopl.h') diff --git a/src/dbopl.h b/src/dbopl.h index 826cb44..e51a7a3 100644 --- a/src/dbopl.h +++ b/src/dbopl.h @@ -48,12 +48,20 @@ typedef signed char Bit8s; //Select the type of wave generator routine #define DBOPL_WAVE WAVE_TABLEMUL -#ifdef _MSC_VER -#ifdef _WIN64 +#ifdef _WIN32 +# ifdef _MSC_VER +# ifdef _WIN64 typedef __int64 ssize_t; -#else +# else typedef __int32 ssize_t; -#endif +# endif +# elif !defined(__MINGW32__) +# ifdef _WIN64 +typedef int64_t ssize_t; +# else +typedef int32_t ssize_t; +# endif +# endif #endif namespace DBOPL -- cgit v1.2.3