diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-08-23 20:22:31 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-24 00:18:53 +0200 | 
| commit | de1a880c4e1f24e5cb4a2c1e4793fed73107ecbe (patch) | |
| tree | 19ee9ff69e02a6d55a2e885749f56375dbc22b0c /lib/memory.h | |
| parent | 6a35bfba5e4e4135a29e87dc554b4e7f19f06831 (diff) | |
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.h | 36 | 
1 files changed, 1 insertions, 35 deletions
diff --git a/lib/memory.h b/lib/memory.h index 132d4abd30..6de370514a 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  | 
