From 4e9adb59f353025b0a50ba3e0675d9e5bea03c63 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 22 Aug 2014 17:54:40 +0100 Subject: [PATCH] Wrapper ARRAY_SIZE macro into ifndef --- slre.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/slre.c b/slre.c index 5c0d33c..990a744 100644 --- a/slre.c +++ b/slre.c @@ -25,9 +25,12 @@ #define MAX_BRANCHES 100 #define MAX_BRACKETS 100 -#define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0])) #define FAIL_IF(condition, error_code) if (condition) return (error_code) +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0])) +#endif + #ifdef SLRE_DEBUG #define DBG(x) printf x #else