[Nagiosplug-checkins] CVS: nagiosplug/plugins utils.c,1.17,1.18 utils.h.in,1.9,1.10

Jeremy T. Bouse undrgrid at users.sourceforge.net
Wed Mar 12 09:12:09 CET 2003


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv3454/plugins

Modified Files:
	utils.c utils.h.in 
Log Message:
Added autogen.sh script that rebuilds using autotools and runs configure
Modified configure.in to include some debug build option info at the end 
of the scripts execution. Can be removed by release time.
Modified configure.in to include a --with-ipv6 option
Default build is without IPv6 support now to enable you need to use the 
--with-ipv6 command line option to configure.
Modified plugins/utils.* to use USE_IPV6


Index: utils.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** utils.c	8 Mar 2003 02:26:22 -0000	1.17
--- utils.c	12 Mar 2003 17:11:20 -0000	1.18
***************
*** 33,37 ****
--- 33,39 ----
  int resolve_host_or_addr (char *, int);
  int is_inet_addr (char *);
+ #ifdef USE_IPV6
  int is_inet6_addr (char *);
+ #endif
  int is_hostname (char *);
  
***************
*** 182,186 ****
--- 184,192 ----
  is_addr (char *address)
  {
+ #ifdef USE_IPV6
  	if (is_inet_addr (address) || is_inet6_addr (address))
+ #else
+ 	if (is_inet_addr (address))
+ #endif
  		return (TRUE);
  
***************
*** 213,216 ****
--- 219,223 ----
  }
  
+ #ifdef USE_IPV6
  int
  is_inet6_addr (char *address)
***************
*** 218,221 ****
--- 225,229 ----
  	return resolve_host_or_addr (address, AF_INET6);
  }
+ #endif
  
  /* from RFC-1035
***************
*** 229,233 ****
--- 237,245 ----
  is_hostname (char *s1)
  {
+ #ifdef USE_IPV6
  	return resolve_host_or_addr (s1, AF_UNSPEC);
+ #else
+ 	return resolve_host_or_addr (s1, AF_INET);
+ #endif
  }
  

Index: utils.h.in
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/utils.h.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** utils.h.in	8 Mar 2003 02:26:22 -0000	1.9
--- utils.h.in	12 Mar 2003 17:11:20 -0000	1.10
***************
*** 31,35 ****
--- 31,37 ----
  int is_addr (char *);
  int is_inet_addr (char *);
+ #ifdef USE_IPV6
  int is_inet6_addr (char *);
+ #endif
  int is_hostname (char *);
  





More information about the Commits mailing list