From d01c2d228737ea9ac8fc2f350a48c9c494c8f753 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Wed, 16 Feb 2011 20:04:34 +0000 Subject: [PATCH] max() as compile-time expression for gcc3 git-svn-id: svn://kolibrios.org@1871 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/ddk/stdio/vsprintf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ddk/stdio/vsprintf.c b/drivers/ddk/stdio/vsprintf.c index d9cb992d1f..f4857e18f3 100644 --- a/drivers/ddk/stdio/vsprintf.c +++ b/drivers/ddk/stdio/vsprintf.c @@ -647,6 +647,8 @@ char *resource_string(char *buf, char *end, struct resource *res, #define FLAG_BUF_SIZE (2 * sizeof(res->flags)) #define DECODED_BUF_SIZE sizeof("[mem - 64bit pref window disabled]") #define RAW_BUF_SIZE sizeof("[mem - flags 0x]") +#undef max +#define max(a,b) ((a) > (b) ? (a) : (b)) char sym[max(2*RSRC_BUF_SIZE + DECODED_BUF_SIZE, 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)];