]> git.webhop.me Git - msgbox.git/commitdiff
change 'max' macro to be GNU C++ compatible
authorGetAway <get-away@t-online.de>
Fri, 13 Jan 2017 19:34:03 +0000 (20:34 +0100)
committersvenhoefer <svenhoefer@svenhoefer.com>
Fri, 13 Jan 2017 20:04:14 +0000 (21:04 +0100)
msgbox.c

index acd1773bbda552acf8f9a5c7c9de1521958ca5c8..5dbaab9948468d8b3eb4faf5d0e5b61880b1dd7e 100644 (file)
--- a/msgbox.c
+++ b/msgbox.c
 #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