From d3edbf65fc75c2afef17fb0a82543d0b59f80dc4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Oct 2015 14:01:09 -0400 Subject: [PATCH] [N-Rage] undeclared functions min() and max() --- Source/nragev20/PakIO.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/nragev20/PakIO.h b/Source/nragev20/PakIO.h index d8bd176dd..720654d24 100644 --- a/Source/nragev20/PakIO.h +++ b/Source/nragev20/PakIO.h @@ -170,4 +170,16 @@ typedef struct _ADAPTOIDPAK bool fRumblePak; } ADAPTOIDPAK, *LPADAPTOIDPAK; +/* + * from under with MSVC defines these macros. + * For some reason, they are unavailable with MinGW's copy of . + */ +#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_