making code compiles and work on mingw 32 bit on versions 4.7.x and 4.8.x (nw)

This commit is contained in:
Miodrag Milanovic 2014-03-30 11:10:39 +00:00
parent 7908b0201f
commit f708e7460f
3 changed files with 11 additions and 2 deletions

View File

@ -93,7 +93,12 @@
// select which one we will be using
#if defined(__GNUC__)
#define USE_DELEGATE_TYPE DELEGATE_TYPE_INTERNAL
/* does not work in versions over 4.7.x of 32bit MINGW */
#if ((defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
#else
#define USE_DELEGATE_TYPE DELEGATE_TYPE_INTERNAL
#endif
#else
#define USE_DELEGATE_TYPE DELEGATE_TYPE_COMPATIBLE
#endif

View File

@ -82,7 +82,7 @@ static void drawgdi_exit(void)
static int drawgdi_window_init(win_window_info *window)
{
gdi_info *gdi;
int i;
UINT8 i;
// allocate memory for our structures
gdi = global_alloc_clear(gdi_info);

View File

@ -53,6 +53,10 @@
#define end_timing(v) do { } while (0)
#endif
#if __GNUC__ && defined(__i386__) && !defined(__x86_64)
#undef YieldProcessor
#endif
#ifndef YieldProcessor
#ifdef __GNUC__
INLINE void YieldProcessor(void)