diff options
| author | David Lamparter <equinox@diac24.net> | 2021-02-21 05:48:48 +0100 | 
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2021-03-17 06:18:17 +0100 | 
| commit | 15c05f1edf079bc03b277e44426a8af8616bb10b (patch) | |
| tree | 07eba7a6ffc9e4c1caaabbb572632bd921082dc6 /babeld | |
| parent | 247c7e27a9928bd54e336590c526da68d4c79ff1 (diff) | |
*: require ISO C11 (or C++11)
It's 2021... time to drop some 10yo compat stuff.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'babeld')
| -rw-r--r-- | babeld/babeld.h | 14 | ||||
| -rw-r--r-- | babeld/util.h | 15 | 
2 files changed, 0 insertions, 29 deletions
diff --git a/babeld/babeld.h b/babeld/babeld.h index 752cc8620a..4487aae99f 100644 --- a/babeld/babeld.h +++ b/babeld/babeld.h @@ -41,20 +41,6 @@ THE SOFTWARE.  #define MAX(x,y) ((x)<=(y)?(y):(x))  #define MIN(x,y) ((x)<=(y)?(x):(y)) -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -/* nothing */ -#elif defined(__GNUC__) -#define inline __inline -#if  (__GNUC__ >= 3) -#define restrict __restrict -#else -#define restrict /**/ -#endif -#else -#define inline /**/ -#define restrict /**/ -#endif -  #if defined(__GNUC__) && (__GNUC__ >= 3)  #define ATTRIBUTE(x) __attribute__ (x)  #define LIKELY(_x) __builtin_expect(!!(_x), 1) diff --git a/babeld/util.h b/babeld/util.h index 9310040571..8b1b6fbfc9 100644 --- a/babeld/util.h +++ b/babeld/util.h @@ -129,13 +129,7 @@ extern const unsigned char v4prefix[16];     vararg macros are not portable. */  #if defined NO_DEBUG -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L  #define debugf(...) do {} while(0) -#elif defined __GNUC__ -#define debugf(_args...) do {} while(0) -#else -static inline void debugf(int level, const char *format, ...) { return; } -#endif  #else /* NO_DEBUG */ @@ -148,19 +142,10 @@ static inline void debugf(int level, const char *format, ...) { return; }  #define BABEL_DEBUG_ROUTE       (1 << 5)  #define BABEL_DEBUG_ALL         (0xFFFF) -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L  #define debugf(level, ...) \  do { \  if(UNLIKELY(debug & level)) zlog_debug(__VA_ARGS__);     \  } while(0) -#elif defined __GNUC__ -#define debugf(level, _args...) \ -do { \ -if(UNLIKELY(debug & level)) zlog_debug(_args);   \ -} while(0) -#else -static inline void debugf(int level, const char *format, ...) { return; } -#endif  #endif /* NO_DEBUG */  | 
