max() as compile-time expression for gcc3

git-svn-id: svn://kolibrios.org@1871 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2011-02-16 20:04:34 +00:00
parent 888c0bb31e
commit d01c2d2287

View File

@ -647,6 +647,8 @@ char *resource_string(char *buf, char *end, struct resource *res,
#define FLAG_BUF_SIZE (2 * sizeof(res->flags)) #define FLAG_BUF_SIZE (2 * sizeof(res->flags))
#define DECODED_BUF_SIZE sizeof("[mem - 64bit pref window disabled]") #define DECODED_BUF_SIZE sizeof("[mem - 64bit pref window disabled]")
#define RAW_BUF_SIZE sizeof("[mem - flags 0x]") #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, char sym[max(2*RSRC_BUF_SIZE + DECODED_BUF_SIZE,
2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)]; 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)];