0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 20:58:44 +00:00

Changes identifiers to avoid use of reserved ones.

This commit is contained in:
Ondrej Zajicek 2013-11-22 21:59:43 +01:00
parent 56027b5cbd
commit 41f8bf57c4
4 changed files with 15 additions and 15 deletions

View File

@ -20,14 +20,14 @@
/* Utility macros */ /* Utility macros */
#define _MIN(a,b) (((a)<(b))?(a):(b)) #define MIN_(a,b) (((a)<(b))?(a):(b))
#define _MAX(a,b) (((a)>(b))?(a):(b)) #define MAX_(a,b) (((a)>(b))?(a):(b))
#ifndef PARSER #ifndef PARSER
#undef MIN #undef MIN
#undef MAX #undef MAX
#define MIN(a,b) _MIN(a,b) #define MIN(a,b) MIN_(a,b)
#define MAX(a,b) _MAX(a,b) #define MAX(a,b) MAX_(a,b)
#endif #endif
#define ABS(a) ((a)>=0 ? (a) : -(a)) #define ABS(a) ((a)>=0 ? (a) : -(a))
@ -54,17 +54,17 @@
typedef s64 btime; typedef s64 btime;
#define _S *1000000 #define S_ *1000000
#define _MS *1000 #define MS_ *1000
#define _US *1 #define US_ *1
#define TO_S /1000000 #define TO_S /1000000
#define TO_MS /1000 #define TO_MS /1000
#define TO_US /1 #define TO_US /1
#ifndef PARSER #ifndef PARSER
#define S _S #define S S_
#define MS _MS #define MS MS_
#define US _US #define US US_
#endif #endif

View File

@ -28,9 +28,9 @@
#define BFD_ECHO_PORT 3785 #define BFD_ECHO_PORT 3785
#define BFD_MULTI_CTL_PORT 4784 #define BFD_MULTI_CTL_PORT 4784
#define BFD_DEFAULT_MIN_RX_INT (10 _MS) #define BFD_DEFAULT_MIN_RX_INT (10 MS_)
#define BFD_DEFAULT_MIN_TX_INT (100 _MS) #define BFD_DEFAULT_MIN_TX_INT (100 MS_)
#define BFD_DEFAULT_IDLE_TX_INT (1 _S) #define BFD_DEFAULT_IDLE_TX_INT (1 S_)
#define BFD_DEFAULT_MULTIPLIER 5 #define BFD_DEFAULT_MULTIPLIER 5

View File

@ -75,7 +75,7 @@ static inline void
tm2_start_max(timer2 *t, btime after) tm2_start_max(timer2 *t, btime after)
{ {
btime rem = tm2_remains(t); btime rem = tm2_remains(t);
tm2_start(t, _MAX(rem, after)); tm2_start(t, MAX_(rem, after));
} }
*/ */

View File

@ -113,7 +113,7 @@ radv_iface_finish:
struct radv_iface_config *ic = RADV_IFACE; struct radv_iface_config *ic = RADV_IFACE;
if (ic->min_ra_int == (u32) -1) 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) if (ic->default_lifetime == (u32) -1)
ic->default_lifetime = 3 * ic->max_ra_int; ic->default_lifetime = 3 * ic->max_ra_int;