[N-Rage] undeclared functions min() and max()

This commit is contained in:
unknown 2015-10-27 14:01:09 -04:00
parent 572418ec30
commit d3edbf65fc
1 changed files with 12 additions and 0 deletions

View File

@ -170,4 +170,16 @@ typedef struct _ADAPTOIDPAK
bool fRumblePak;
} ADAPTOIDPAK, *LPADAPTOIDPAK;
/*
* <windef.h> from under <windows.h> with MSVC defines these macros.
* For some reason, they are unavailable with MinGW's copy of <windows.h>.
*/
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#endif // #ifndef _PAKIO_H_