aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-04-03 10:35:08 +0200
committerMattias Andrée <maandree@kth.se>2021-04-03 10:35:08 +0200
commit175bc40deeefb3a385012d3f9a3874e8b3c46d97 (patch)
tree7203cf13e791445509720eb6aa06e0f0766c920a /common.h
parentFix bugs and warnings (diff)
downloadlibcontacts-175bc40deeefb3a385012d3f9a3874e8b3c46d97.tar.gz
libcontacts-175bc40deeefb3a385012d3f9a3874e8b3c46d97.tar.bz2
libcontacts-175bc40deeefb3a385012d3f9a3874e8b3c46d97.tar.xz
Add pure attributes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/common.h b/common.h
index ab021cc..5bb22a1 100644
--- a/common.h
+++ b/common.h
@@ -14,6 +14,13 @@
#include <unistd.h>
+#if defined(__GNUC__) || defined(__clang__)
+# define ATTRIBUTE_PURE __attribute__((__pure__))
+#else
+# define ATTRIBUTE_PURE
+#endif
+
+
#define TIME_MAX ((time_t)((1ULL << (8 * sizeof(time_t) - 1)) - 1ULL))