summaryrefslogtreecommitdiffstats
path: root/lib/memory.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-08-23 20:22:31 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-24 00:18:53 +0200
commitde1a880c4e1f24e5cb4a2c1e4793fed73107ecbe (patch)
tree19ee9ff69e02a6d55a2e885749f56375dbc22b0c /lib/memory.h
parentbuild: fix libtool stupidity wrt. parallel install (diff)
downloadfrr-de1a880c4e1f24e5cb4a2c1e4793fed73107ecbe.tar.xz
frr-de1a880c4e1f24e5cb4a2c1e4793fed73107ecbe.zip
lib: split off compiler magic into its own file
Also make timed notices available via CONFDATE. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/memory.h')
-rw-r--r--lib/memory.h36
1 files changed, 1 insertions, 35 deletions
diff --git a/lib/memory.h b/lib/memory.h
index 132d4abd3..6de370514 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <frratomic.h>
+#include "compiler.h"
#define array_size(ar) (sizeof(ar) / sizeof(ar[0]))
@@ -37,41 +38,6 @@ struct memgroup {
const char *name;
};
-#if defined(__clang__)
-#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 5)
-# define _RET_NONNULL , returns_nonnull
-#endif
-# define _CONSTRUCTOR(x) constructor(x)
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
-# define _RET_NONNULL , returns_nonnull
-#endif
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-# define _CONSTRUCTOR(x) constructor(x)
-# define _DESTRUCTOR(x) destructor(x)
-# define _ALLOC_SIZE(x) alloc_size(x)
-#endif
-#endif
-
-#ifdef __sun
-/* Solaris doesn't do constructor priorities due to linker restrictions */
-#undef _CONSTRUCTOR
-#undef _DESTRUCTOR
-#endif
-
-#ifndef _RET_NONNULL
-# define _RET_NONNULL
-#endif
-#ifndef _CONSTRUCTOR
-# define _CONSTRUCTOR(x) constructor
-#endif
-#ifndef _DESTRUCTOR
-# define _DESTRUCTOR(x) destructor
-#endif
-#ifndef _ALLOC_SIZE
-# define _ALLOC_SIZE(x)
-#endif
-
/* macro usage:
*
* mydaemon.h