X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;fp=src%2Fcommon%2Fmacros.h;h=81f901c2d5d171bda6a6f064124d8c49bbf76944;hp=8185c85abfdacdece8bd4442cc10ca2898b8bd32;hb=b33f89bf07e0eaf5742f6c7738d7d20e260dd620;hpb=35737c8c1f26826ef96481aaf51bad9a235c63b3 diff --git a/src/common/macros.h b/src/common/macros.h index 8185c85ab..81f901c2d 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -52,4 +52,12 @@ #define ARRAY_SIZE(array) (sizeof(array) / (sizeof((array)[0]))) #endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + #endif /* _MACROS_H */