From ac2fd2e7e585569c1238a23c96011793ed15cb94 Mon Sep 17 00:00:00 2001 From: GetAway Date: Fri, 13 Jan 2017 20:34:03 +0100 Subject: [PATCH] change 'max' macro to be GNU C++ compatible --- msgbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/msgbox.c b/msgbox.c index acd1773..5dbaab9 100644 --- a/msgbox.c +++ b/msgbox.c @@ -12,9 +12,10 @@ #include "pngw.h" -#define max(a,b) ( \ - { __auto_type __a = (a); __auto_type __b = (b); \ - __a > __b ? __a : __b; }) +#define max(a,b) ({ \ + typeof (a) __a = (a); \ + typeof (b) __b = (b); \ + __a > __b ? __a : __b; }) #define M_VERSION 2.0 -- 2.39.5