From 41f8bf57c4d80cbec89b90b901afa9df4d2d76f1 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Nov 2013 21:59:43 +0100 Subject: [PATCH] Changes identifiers to avoid use of reserved ones. --- lib/birdlib.h | 20 ++++++++++---------- proto/bfd/bfd.h | 6 +++--- proto/bfd/io.h | 2 +- proto/radv/config.Y | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/birdlib.h b/lib/birdlib.h index b7a5a6a6..04fb7fed 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -20,14 +20,14 @@ /* Utility macros */ -#define _MIN(a,b) (((a)<(b))?(a):(b)) -#define _MAX(a,b) (((a)>(b))?(a):(b)) +#define MIN_(a,b) (((a)<(b))?(a):(b)) +#define MAX_(a,b) (((a)>(b))?(a):(b)) #ifndef PARSER #undef MIN #undef MAX -#define MIN(a,b) _MIN(a,b) -#define MAX(a,b) _MAX(a,b) +#define MIN(a,b) MIN_(a,b) +#define MAX(a,b) MAX_(a,b) #endif #define ABS(a) ((a)>=0 ? (a) : -(a)) @@ -54,17 +54,17 @@ typedef s64 btime; -#define _S *1000000 -#define _MS *1000 -#define _US *1 +#define S_ *1000000 +#define MS_ *1000 +#define US_ *1 #define TO_S /1000000 #define TO_MS /1000 #define TO_US /1 #ifndef PARSER -#define S _S -#define MS _MS -#define US _US +#define S S_ +#define MS MS_ +#define US US_ #endif diff --git a/proto/bfd/bfd.h b/proto/bfd/bfd.h index f4ab3fcc..9b61be64 100644 --- a/proto/bfd/bfd.h +++ b/proto/bfd/bfd.h @@ -28,9 +28,9 @@ #define BFD_ECHO_PORT 3785 #define BFD_MULTI_CTL_PORT 4784 -#define BFD_DEFAULT_MIN_RX_INT (10 _MS) -#define BFD_DEFAULT_MIN_TX_INT (100 _MS) -#define BFD_DEFAULT_IDLE_TX_INT (1 _S) +#define BFD_DEFAULT_MIN_RX_INT (10 MS_) +#define BFD_DEFAULT_MIN_TX_INT (100 MS_) +#define BFD_DEFAULT_IDLE_TX_INT (1 S_) #define BFD_DEFAULT_MULTIPLIER 5 diff --git a/proto/bfd/io.h b/proto/bfd/io.h index 3f166a47..641ee054 100644 --- a/proto/bfd/io.h +++ b/proto/bfd/io.h @@ -75,7 +75,7 @@ static inline void tm2_start_max(timer2 *t, btime after) { btime rem = tm2_remains(t); - tm2_start(t, _MAX(rem, after)); + tm2_start(t, MAX_(rem, after)); } */ diff --git a/proto/radv/config.Y b/proto/radv/config.Y index c5b7aaee..ff70a2f7 100644 --- a/proto/radv/config.Y +++ b/proto/radv/config.Y @@ -113,7 +113,7 @@ radv_iface_finish: struct radv_iface_config *ic = RADV_IFACE; if (ic->min_ra_int == (u32) -1) - ic->min_ra_int = _MAX(ic->max_ra_int / 3, 3); + ic->min_ra_int = MAX_(ic->max_ra_int / 3, 3); if (ic->default_lifetime == (u32) -1) ic->default_lifetime = 3 * ic->max_ra_int;