X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;h=fc159c0af3c707102d7bb853a49360d16e01c1d1;hp=81f901c2d5d171bda6a6f064124d8c49bbf76944;hb=24bc0841bdd3fb38b76a9244d21f28000d653fcf;hpb=cf3f19ae5f634bf07dcdb771e66d40f805700a17 diff --git a/src/common/macros.h b/src/common/macros.h index 81f901c2d..fc159c0af 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -56,8 +56,20 @@ #define max(a, b) ((a) > (b) ? (a) : (b)) #endif +#ifndef max_t +#define max_t(type, a, b) ((type) max(a, b)) +#endif + #ifndef min #define min(a, b) ((a) < (b) ? (a) : (b)) #endif +#ifndef LTTNG_PACKED +#define LTTNG_PACKED __attribute__((__packed__)) +#endif + +#ifndef LTTNG_HIDDEN +#define LTTNG_HIDDEN __attribute__((visibility("hidden"))) +#endif + #endif /* _MACROS_H */