[Nagiosplug-checkins] CVS: nagiosplug/plugins check_by_ssh.c,1.9,1.10 check_dig.c,1.8,1.9 check_disk.c,1.10,1.11 check_dns.c,1.9,1.10 check_fping.c,1.4,1.5 check_hpjd.c,1.8,1.9 check_http.c,1.25,1.26 check_ide-smart.c,1.1.1.1,1.2 check_ldap.c,1.4,1.5 check_load.c,1.6,1.7 check_mrtg.c,1.4,1.5 check_mrtgtraf.c,1.4,1.5 check_mysql.c,1.7,1.8 check_nagios.c,1.4,1.5 check_nt.c,1.8,1.9 check_nwstat.c,1.4,1.5 check_overcr.c,1.2,1.3 check_pgsql.c,1.8,1.9 check_ping.c,1.13,1.14 check_procs.c,1.9,1.10 check_radius.c,1.4,1.5 check_real.c,1.4,1.5 check_smtp.c,1.11,1.12 check_snmp.c,1.24,1.25 check_ssh.c,1.6,1.7 check_swap.c,1.9,1.10 check_tcp.c,1.13,1.14 check_time.c,1.4,1.5 check_udp.c,1.5,1.6 check_ups.c,1.6,1.7 check_users.c,1.3,1.4 check_vsz.c,1.6,1.7

Ton Voon tonvoon at users.sourceforge.net
Tue Mar 11 14:23:07 CET 2003


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

Modified Files:
	check_by_ssh.c check_dig.c check_disk.c check_dns.c 
	check_fping.c check_hpjd.c check_http.c check_ide-smart.c 
	check_ldap.c check_load.c check_mrtg.c check_mrtgtraf.c 
	check_mysql.c check_nagios.c check_nt.c check_nwstat.c 
	check_overcr.c check_pgsql.c check_ping.c check_procs.c 
	check_radius.c check_real.c check_smtp.c check_snmp.c 
	check_ssh.c check_swap.c check_tcp.c check_time.c check_udp.c 
	check_ups.c check_users.c check_vsz.c 
Log Message:
Remove getopt_long checks


Index: check_by_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_by_ssh.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_by_ssh.c	29 Jan 2003 06:15:32 -0000	1.9
--- check_by_ssh.c	11 Mar 2003 22:22:08 -0000	1.10
***************
*** 175,179 ****
  	size_t len;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 175,178 ----
***************
*** 196,200 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 195,198 ----
***************
*** 206,216 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 204,209 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vvh46ft:H:O:p:i:u:l:C:n:s:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_dig.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dig.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_dig.c	13 Jan 2003 12:15:15 -0000	1.8
--- check_dig.c	11 Mar 2003 22:22:09 -0000	1.9
***************
*** 147,151 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 147,150 ----
***************
*** 157,161 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 156,159 ----
***************
*** 163,171 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "hVvt:l:H:", long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "hVvt:l:H:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 161,165 ----

Index: check_disk.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** check_disk.c	11 Mar 2003 06:44:22 -0000	1.10
--- check_disk.c	11 Mar 2003 22:22:09 -0000	1.11
***************
*** 218,222 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 218,221 ----
***************
*** 236,240 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 235,238 ----
***************
*** 246,255 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
!  			getopt_long (argc, argv, "+?Vqhvet:c:w:p:x:m", long_options, &option_index);
! #else
!  		c = getopt (argc, argv, "+?Vqhvet:c:w:p:x:m");
! #endif
  
  		if (c == -1 || c == EOF)
--- 244,248 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+?Vqhvet:c:w:p:x:m", long_options, &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_dns.c	8 Mar 2003 02:27:57 -0000	1.9
--- check_dns.c	11 Mar 2003 22:22:09 -0000	1.10
***************
*** 263,267 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int opt_index = 0;
  	static struct option long_opts[] = {
--- 263,266 ----
***************
*** 276,280 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 275,278 ----
***************
*** 286,294 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "hVvt:H:s:r:a:", long_opts, &opt_index);
- #else
- 		c = getopt (argc, argv, "hVvt:H:s:r:a:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 284,288 ----

Index: check_fping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_fping.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_fping.c	13 Jan 2003 12:15:15 -0000	1.4
--- check_fping.c	11 Mar 2003 22:22:09 -0000	1.5
***************
*** 203,207 ****
  	char *rv[2];
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 203,206 ----
***************
*** 216,220 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	rv[PL] = NULL;
--- 215,218 ----
***************
*** 232,241 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVvH:c:w:b:n:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "+hVvH:c:w:b:n:");
! #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 230,234 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVvH:c:w:b:n:", long_options, &option_index);
  
  		if (c == -1 || c == EOF || c == 1)

Index: check_hpjd.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_hpjd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_hpjd.c	3 Feb 2003 05:07:26 -0000	1.8
--- check_hpjd.c	11 Mar 2003 22:22:09 -0000	1.9
***************
*** 391,395 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 391,394 ----
***************
*** 403,407 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 402,405 ----
***************
*** 410,418 ****
  	
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+hVH:C:", long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "+?hVH:C:");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 408,412 ----

Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** check_http.c	5 Mar 2003 00:17:15 -0000	1.25
--- check_http.c	11 Mar 2003 22:22:10 -0000	1.26
***************
*** 297,301 ****
  	int c = 1;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 297,300 ----
***************
*** 318,322 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 317,320 ----
***************
*** 336,347 ****
  	}
  
- #define OPTCHARS "Vvht:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nlLSm:"
- 
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c = getopt_long (argc, argv, OPTCHARS, long_options, &option_index);
! #else
! 		c = getopt (argc, argv, OPTCHARS);
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 334,339 ----
  	}
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vvht:c:w:H:P:I:a:e:p:s:R:r:u:f:C:nlLSm:", long_options, &option_index);
  		if (c == -1 || c == EOF)
  			break;
***************
*** 1069,1079 ****
  {
  	printf ("Usage:\n" " %s %s\n"
- #ifdef HAVE_GETOPT_H
  	        " %s (-h | --help) for detailed help\n"
  	        " %s (-V | --version) for version information\n",
- #else
- 	        " %s -h for detailed help\n"
- 	        " %s -V for version information\n",
- #endif
  	progname, OPTIONS, progname, progname);
  }
--- 1061,1066 ----

Index: check_ide-smart.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ide-smart.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** check_ide-smart.c	28 Feb 2002 06:42:57 -0000	1.1.1.1
--- check_ide-smart.c	11 Mar 2003 22:22:10 -0000	1.2
***************
*** 45,49 ****
  #include <linux/hdreg.h>
  #include <linux/types.h>
- #include <getopt.h>
  #include <errno.h>
  	
--- 45,48 ----
***************
*** 343,347 ****
  	int retval = 0;
  	
- #ifdef HAVE_GETOPT_H
  	const struct option longopts[] = { 
  			{"device", required_argument, 0, 'd'}, 
--- 342,345 ----
***************
*** 355,368 ****
  	};
  	
- #endif	/*  */
  		while (1) {
  		
- #ifdef HAVE_GETOPT_H
  			o = getopt_long (argc, argv, "+d:iq10nhV", longopts, &longindex);
  		
- #else	/*  */
- 			o = getopt (argc, argv, "+d:iq10nhV");
- 		
- #endif	/*  */
  			if (o == -1 || o == EOF)
  			break;
--- 353,360 ----

Index: check_ldap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ldap.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_ldap.c	29 Jan 2003 06:16:15 -0000	1.4
--- check_ldap.c	11 Mar 2003 22:22:10 -0000	1.5
***************
*** 131,135 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	/* initialize the long option struct */
--- 131,134 ----
***************
*** 148,152 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 147,150 ----
***************
*** 159,167 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =	getopt_long (argc, argv, "hVt:c:w:H:b:p:a:D:P:", longopts, &option_index);
! #else
! 		c = getopt (argc, argv, "+?hVt:c:w:H:b:p:a:D:P:");
! #endif
  
  		if (c == -1 || c == EOF)
--- 157,161 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVt:c:w:H:b:p:a:D:P:", longopts, &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_load.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_load.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_load.c	18 Feb 2003 22:10:55 -0000	1.6
--- check_load.c	11 Mar 2003 22:22:10 -0000	1.7
***************
*** 156,160 ****
  	int c = 0;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 156,159 ----
***************
*** 165,171 ****
  		{0, 0, 0, 0}
  	};
- #endif
- 
- #define OPTCHARS "Vhc:w:"
  
  	if (argc < 2)
--- 164,167 ----
***************
*** 173,181 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c = getopt_long (argc, argv, OPTCHARS, long_options, &option_index);
! #else
! 		c = getopt (argc, argv, OPTCHARS);
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 169,174 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vhc:w:", long_options, &option_index);
! 
  		if (c == -1 || c == EOF)
  			break;

Index: check_mrtg.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtg.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_mrtg.c	13 Jan 2003 12:15:16 -0000	1.4
--- check_mrtg.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 215,219 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 215,218 ----
***************
*** 231,235 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 230,233 ----
***************
*** 246,256 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "hVF:e:a:v:c:w:l:u:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 244,249 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF)
***************
*** 371,381 ****
  {
  	printf ("Usage:\n" " %s %s\n"
- #ifdef HAVE_GETOPT_H
  					" %s (-h | --help) for detailed help\n"
  					" %s (-V | --version) for version information\n",
- #else
- 					" %s -h for detailed help\n"
- 					" %s -V for version information\n",
- #endif
  					progname, OPTIONS, progname, progname);
  }
--- 364,369 ----

Index: check_mrtgtraf.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mrtgtraf.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_mrtgtraf.c	29 Jan 2003 20:57:09 -0000	1.4
--- check_mrtgtraf.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 232,236 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option longopts[] = {
--- 232,235 ----
***************
*** 246,250 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 245,248 ----
***************
*** 261,269 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =	getopt_long (argc, argv, "hVF:e:a:c:w:", longopts, &option_index);
! #else
! 		c = getopt (argc, argv, "hVF:e:a:c:w:");
! #endif
  
  		if (c == -1 || c == EOF)
--- 259,263 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVF:e:a:c:w:", longopts, &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_mysql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_mysql.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** check_mysql.c	11 Feb 2003 00:47:47 -0000	1.7
--- check_mysql.c	11 Mar 2003 22:22:11 -0000	1.8
***************
*** 127,131 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 127,130 ----
***************
*** 140,144 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 1)
--- 139,142 ----
***************
*** 146,155 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "hVP:p:u:d:H:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "hVP:p:u:d:H:");
! #endif
  
  		if (c == -1 || c == EOF)
--- 144,148 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVP:p:u:d:H:", long_options, &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_nagios.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nagios.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_nagios.c	13 Jan 2003 12:15:16 -0000	1.4
--- check_nagios.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 145,149 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 145,148 ----
***************
*** 155,159 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 154,157 ----
***************
*** 173,181 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+hVF:C:e:", long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "+hVF:C:e:");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 171,175 ----

Index: check_nt.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nt.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_nt.c	4 Mar 2003 23:56:26 -0000	1.8
--- check_nt.c	11 Mar 2003 22:22:11 -0000	1.9
***************
*** 388,392 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] =
--- 388,391 ----
***************
*** 402,406 ****
  		{0,0,0,0}
  	};
- #endif
  
  	/* no options were supplied */
--- 401,404 ----
***************
*** 425,433 ****
  
  	while (1){
- #ifdef HAVE_GETOPT_H
  		c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:",long_options,&option_index);
- #else
- 		c = getopt(argc,argv,"+hVH:t:c:w:p:v:l:s:d:");
- #endif
  
  		if (c==-1||c==EOF||c==1)
--- 423,427 ----

Index: check_nwstat.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_nwstat.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_nwstat.c	13 Jan 2003 12:15:16 -0000	1.4
--- check_nwstat.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 623,627 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] =
--- 623,626 ----
***************
*** 638,642 ****
  		{0,0,0,0}
  	};
- #endif
  
  	/* no options were supplied */
--- 637,640 ----
***************
*** 661,669 ****
  
  	while (1){
- #ifdef HAVE_GETOPT_H
  		c = getopt_long(argc,argv,"+hoVH:t:c:w:p:v:",long_options,&option_index);
- #else
- 		c = getopt(argc,argv,"+hoVH:t:c:w:p:v:");
- #endif
  
  		if (c==-1||c==EOF||c==1)
--- 659,663 ----
***************
*** 798,808 ****
  		("Usage:\n"
  		 " %s %s\n"
- #ifdef HAVE_GETOPT_H
  		 " %s (-h | --help) for detailed help\n"
  		 " %s (-V | --version) for version information\n",
- #else
- 		 " %s -h for detailed help\n"
- 		 " %s -V for version information\n",
- #endif
  		 progname, OPTIONS, progname, progname);
  }
--- 792,797 ----

Index: check_overcr.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_overcr.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** check_overcr.c	13 Jan 2003 12:15:16 -0000	1.2
--- check_overcr.c	11 Mar 2003 22:22:11 -0000	1.3
***************
*** 318,322 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 318,321 ----
***************
*** 331,335 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	/* no options were supplied */
--- 330,333 ----
***************
*** 355,365 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVH:t:c:w:p:v:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "+hVH:t:c:w:p:v:");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 353,358 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVH:t:c:w:p:v:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF || c == 1)

Index: check_pgsql.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_pgsql.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** check_pgsql.c	7 Mar 2003 22:11:25 -0000	1.8
--- check_pgsql.c	11 Mar 2003 22:22:11 -0000	1.9
***************
*** 247,251 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 247,250 ----
***************
*** 263,275 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "hVt:c:w:H:P:d:l:p:a:",
  		                 long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "hVt:c:w:H:P:d:l:p:a:");
! #endif
  		if (c == EOF)
  			break;
--- 262,270 ----
  		{0, 0, 0, 0}
  	};
  
  	while (1) {
  		c = getopt_long (argc, argv, "hVt:c:w:H:P:d:l:p:a:",
  		                 long_options, &option_index);
! 
  		if (c == EOF)
  			break;

Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** check_ping.c	3 Mar 2003 03:49:40 -0000	1.13
--- check_ping.c	11 Mar 2003 22:22:11 -0000	1.14
***************
*** 163,167 ****
  	char *ptr;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 163,166 ----
***************
*** 172,178 ****
  		{0, 0, 0, 0}
  	};
- #endif
- 
- #define OPTCHARS "VvhnLt:c:w:H:p:"
  
  	if (argc < 2)
--- 171,174 ----
***************
*** 187,195 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c = getopt_long (argc, argv, OPTCHARS, long_options, &option_index);
! #else
! 		c = getopt (argc, argv, OPTCHARS);
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 183,188 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "VvhnLt:c:w:H:p:", long_options, &option_index);
! 
  		if (c == -1 || c == EOF)
  			break;
***************
*** 508,518 ****
  {
  	printf ("Usage:\n" " %s %s\n"
- #ifdef HAVE_GETOPT_H
  					" %s (-h | --help) for detailed help\n"
  					" %s (-V | --version) for version information\n",
- #else
- 					" %s -h for detailed help\n"
- 					" %s -V for version information\n",
- #endif
  					progname, OPTIONS, progname, progname);
  }
--- 501,506 ----

Index: check_procs.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_procs.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_procs.c	31 Jan 2003 18:40:40 -0000	1.9
--- check_procs.c	11 Mar 2003 22:22:11 -0000	1.10
***************
*** 269,273 ****
  	char *user;
  	struct passwd *pw;
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 269,272 ----
***************
*** 284,288 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	for (c = 1; c < argc; c++)
--- 283,286 ----
***************
*** 291,299 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =	getopt_long (argc, argv, "Vvht:c:w:p:s:u:C:a:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "Vvht:c:w:p:s:u:C:a:");
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 289,294 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "Vvht:c:w:p:s:u:C:a:", long_options, &option_index);
! 
  		if (c == -1 || c == EOF)
  			break;

Index: check_radius.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_radius.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_radius.c	16 Jan 2003 06:22:03 -0000	1.4
--- check_radius.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 209,213 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 209,212 ----
***************
*** 225,229 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 224,227 ----
***************
*** 252,262 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVvH:P:F:u:p:t:r:e:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "+hVvH:P:F:u:p:t:r:e:");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 250,255 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVvH:P:F:u:p:t:r:e:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF || c == 1)
***************
*** 341,351 ****
  {
  	printf ("Usage:\n" " %s %s\n"
- #ifdef HAVE_GETOPT_H
  					" %s (-h | --help) for detailed help\n"
  					" %s (-V | --version) for version information\n",
- #else
- 					" %s -h for detailed help\n"
- 					" %s -V for version information\n",
- #endif
  					progname, OPTIONS, progname, progname);
  }
--- 334,339 ----

Index: check_real.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_real.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_real.c	28 Jan 2003 07:42:32 -0000	1.4
--- check_real.c	11 Mar 2003 22:22:11 -0000	1.5
***************
*** 275,279 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 275,278 ----
***************
*** 291,295 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 290,293 ----
***************
*** 306,316 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "+?hVI:H:e:u:p:w:c:t");
- #endif
  
  		if (c == -1 || c == EOF)
--- 304,309 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVI:H:e:u:p:w:c:t:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** check_smtp.c	7 Mar 2003 07:45:45 -0000	1.11
--- check_smtp.c	11 Mar 2003 22:22:11 -0000	1.12
***************
*** 193,197 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 193,196 ----
***************
*** 207,211 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 206,209 ----
***************
*** 222,232 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVvt:p:f:e:c:w:H:", long_options,
  									 &option_index);
! #else
! 		c = getopt (argc, argv, "+?hVvt:p:f:e:c:w:H:");
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 220,226 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVvt:p:f:e:c:w:H:", long_options,
  									 &option_index);
! 
  		if (c == -1 || c == EOF)
  			break;

Index: check_snmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_snmp.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** check_snmp.c	18 Feb 2003 04:04:09 -0000	1.24
--- check_snmp.c	11 Mar 2003 22:22:11 -0000	1.25
***************
*** 423,427 ****
  	int j = 0, jj = 0, ii = 0;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 423,426 ----
***************
*** 448,452 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 447,450 ----
***************
*** 464,474 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:",
  									 long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 462,467 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hvVt:c:w:H:C:o:e:E:d:D:s:R:r:l:u:p:m:P:L:U:a:A:X:",
  									 long_options, &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_ssh.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ssh.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_ssh.c	10 Feb 2003 18:36:46 -0000	1.6
--- check_ssh.c	11 Mar 2003 22:22:11 -0000	1.7
***************
*** 65,69 ****
  	char *tmp = NULL;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 65,68 ----
***************
*** 75,79 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 74,77 ----
***************
*** 85,93 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+Vhvt:H:p:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "+Vhvt:H:p:");
! #endif
  		if (c == -1 || c == EOF)
  			break;
--- 83,88 ----
  
  	while (1) {
  		c = getopt_long (argc, argv, "+Vhvt:H:p:", long_options, &option_index);
! 
  		if (c == -1 || c == EOF)
  			break;

Index: check_swap.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_swap.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** check_swap.c	18 Feb 2003 03:46:15 -0000	1.9
--- check_swap.c	11 Mar 2003 22:22:11 -0000	1.10
***************
*** 199,203 ****
  	int cc = 0; /* critical counter */
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 199,202 ----
***************
*** 210,214 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 209,212 ----
***************
*** 216,224 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+?Vvhac:w:", long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "+?Vvhac:w:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 214,218 ----

Index: check_tcp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_tcp.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** check_tcp.c	18 Feb 2003 22:20:01 -0000	1.13
--- check_tcp.c	11 Mar 2003 22:22:12 -0000	1.14
***************
*** 335,339 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 335,338 ----
***************
*** 355,359 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 354,357 ----
***************
*** 378,388 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "+hVvH:s:e:q:c:w:t:p:C:W:d:S", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "+hVvH:s:e:q:c:w:t:p:C:W:d:S");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 376,381 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVvH:s:e:q:c:w:t:p:C:W:d:S", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF || c == 1)

Index: check_time.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_time.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** check_time.c	13 Jan 2003 12:15:16 -0000	1.4
--- check_time.c	11 Mar 2003 22:22:12 -0000	1.5
***************
*** 159,163 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 159,162 ----
***************
*** 173,177 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 172,175 ----
***************
*** 192,202 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "hVH:w:c:W:C:p:t:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "hVH:w:c:W:C:p:t:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 190,195 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVH:w:c:W:C:p:t:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_udp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_udp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** check_udp.c	7 Mar 2003 06:43:50 -0000	1.5
--- check_udp.c	11 Mar 2003 22:22:12 -0000	1.6
***************
*** 126,130 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 126,129 ----
***************
*** 141,145 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 140,143 ----
***************
*** 156,164 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =	getopt_long (argc, argv, "+hVvH:e:s:c:w:t:p:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "+hVvH:e:s:c:w:t:p:");
! #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 154,158 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "+hVvH:e:s:c:w:t:p:", long_options, &option_index);
  
  		if (c == -1 || c == EOF || c == 1)

Index: check_ups.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ups.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_ups.c	13 Jan 2003 12:15:16 -0000	1.6
--- check_ups.c	11 Mar 2003 22:22:12 -0000	1.7
***************
*** 435,439 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 435,438 ----
***************
*** 449,453 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 448,451 ----
***************
*** 464,474 ****
  
  	while (1) {
! #ifdef HAVE_GETOPT_H
! 		c =
! 			getopt_long (argc, argv, "hVH:u:p:v:c:w:t:", long_options,
  									 &option_index);
- #else
- 		c = getopt (argc, argv, "hVH:u:p:v:c:w:t:");
- #endif
  
  		if (c == -1 || c == EOF)
--- 462,467 ----
  
  	while (1) {
! 		c = getopt_long (argc, argv, "hVH:u:p:v:c:w:t:", long_options,
  									 &option_index);
  
  		if (c == -1 || c == EOF)

Index: check_users.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_users.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** check_users.c	13 Jan 2003 12:15:16 -0000	1.3
--- check_users.c	11 Mar 2003 22:22:12 -0000	1.4
***************
*** 137,141 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 137,140 ----
***************
*** 146,150 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 145,148 ----
***************
*** 152,160 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+hVvc:w:", long_options, &option_index);
- #else
- 		c = getopt (argc, argv, "+hVvc:w:");
- #endif
  
  		if (c == -1 || c == EOF || c == 1)
--- 150,154 ----

Index: check_vsz.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_vsz.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** check_vsz.c	29 Jan 2003 04:28:37 -0000	1.6
--- check_vsz.c	11 Mar 2003 22:22:12 -0000	1.7
***************
*** 141,145 ****
  	int c;
  
- #ifdef HAVE_GETOPT_H
  	int option_index = 0;
  	static struct option long_options[] = {
--- 141,144 ----
***************
*** 151,155 ****
  		{0, 0, 0, 0}
  	};
- #endif
  
  	if (argc < 2)
--- 150,153 ----
***************
*** 157,165 ****
  
  	while (1) {
- #ifdef HAVE_GETOPT_H
  		c = getopt_long (argc, argv, "+hVc:w:C:", long_options, &option_index);
! #else
! 		c = getopt (argc, argv, "+hVc:w:C:");
! #endif
  		if (c == EOF)
  			break;
--- 155,160 ----
  
  	while (1) {
  		c = getopt_long (argc, argv, "+hVc:w:C:", long_options, &option_index);
! 
  		if (c == EOF)
  			break;





More information about the Commits mailing list