From 22e0a9e6c7bd7775da6bfb00d9a4114643cf9369 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 11 Jul 2003 17:55:46 +0000 Subject: 2003-07-11 Vsevolod Sipakov * lib/command.c: Add missing HAVE_IPV6 defines. see bug id #23: http://bugzilla.dishone.st/show_bug.cgi?id=23 --- lib/command.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/command.c b/lib/command.c index ade413bb..c6203be4 100644 --- a/lib/command.c +++ b/lib/command.c @@ -715,6 +715,8 @@ cmd_ipv4_prefix_match (char *str) #define STATE_SLASH 6 #define STATE_MASK 7 +#ifdef HAVE_IPV6 + enum match_type cmd_ipv6_match (char *str) { @@ -952,6 +954,8 @@ cmd_ipv6_prefix_match (char *str) return exact_match; } +#endif /* HAVE_IPV6 */ + #define DECIMAL_STRLEN_MAX 10 int @@ -1046,6 +1050,7 @@ cmd_filter_by_completion (char *command, vector v, int index) matched++; } } +#ifdef HAVE_IPV6 else if (CMD_IPV6 (str)) { if (cmd_ipv6_match (command)) @@ -1066,6 +1071,7 @@ cmd_filter_by_completion (char *command, vector v, int index) matched++; } } +#endif /* HAVE_IPV6 */ else if (CMD_IPV4 (str)) { if (cmd_ipv4_match (command)) @@ -1160,6 +1166,7 @@ cmd_filter_by_string (char *command, vector v, int index) matched++; } } +#ifdef HAVE_IPV6 else if (CMD_IPV6 (str)) { if (cmd_ipv6_match (command) == exact_match) @@ -1178,6 +1185,7 @@ cmd_filter_by_string (char *command, vector v, int index) matched++; } } +#endif /* HAVE_IPV6 */ else if (CMD_IPV4 (str)) { if (cmd_ipv4_match (command) == exact_match) @@ -1272,6 +1280,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type) match++; } break; +#ifdef HAVE_IPV6 case ipv6_match: if (CMD_IPV6 (str)) match++; @@ -1285,6 +1294,7 @@ is_cmd_ambiguous (char *command, vector v, int index, enum match_type type) match++; } break; +#endif /* HAVE_IPV6 */ case ipv4_match: if (CMD_IPV4 (str)) match++; @@ -1350,6 +1360,7 @@ cmd_entry_function_desc (char *src, char *dst) return NULL; } +#ifdef HAVE_IPV6 if (CMD_IPV6 (dst)) { if (cmd_ipv6_match (src)) @@ -1365,6 +1376,7 @@ cmd_entry_function_desc (char *src, char *dst) else return NULL; } +#endif /* HAVE_IPV6 */ if (CMD_IPV4 (dst)) { -- cgit v1.2.1