include: Add min() & max() macros.

This commit is contained in:
Józef Kucia 2016-09-28 09:42:49 +02:00
parent 2976d7798d
commit 821d978950

View File

@ -179,6 +179,7 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES;
#endif /* _WIN32 */ #endif /* _WIN32 */
/* Nameless unions */
#ifndef __C89_NAMELESS #ifndef __C89_NAMELESS
# ifdef NONAMELESSUNION # ifdef NONAMELESSUNION
# define __C89_NAMELESS # define __C89_NAMELESS
@ -189,4 +190,13 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES;
# endif /* NONAMELESSUNION */ # endif /* NONAMELESSUNION */
#endif /* __C89_NAMELESS */ #endif /* __C89_NAMELESS */
/* Define min() & max() macros */
#ifndef min
# define min(a, b) (((a) <= (b)) ? (a) : (b))
#endif
#ifndef max
# define max(a, b) (((a) >= (b)) ? (a) : (b))
#endif
#endif /* __VKD3D_WINDOWS_H */ #endif /* __VKD3D_WINDOWS_H */