diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:22:12 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:22:12 +0000 |
commit | 7283211f00a3a89956d9dfc4a851dc1aaa7a1cf3 (patch) | |
tree | 371434969644a1d3cc3c5c2c26ee73cd8221aaa4 /plugins/check_ping.c | |
parent | d7ba5ec38b51731d4ddc0a7f6e9f30897f70f156 (diff) | |
download | monitoring-plugins-7283211f00a3a89956d9dfc4a851dc1aaa7a1cf3.tar.gz |
Remove getopt_long checks
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@396 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r-- | plugins/check_ping.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 480f631e..2526a74f 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c | |||
@@ -162,7 +162,6 @@ process_arguments (int argc, char **argv) | |||
162 | int c = 1; | 162 | int c = 1; |
163 | char *ptr; | 163 | char *ptr; |
164 | 164 | ||
165 | #ifdef HAVE_GETOPT_H | ||
166 | int option_index = 0; | 165 | int option_index = 0; |
167 | static struct option long_options[] = { | 166 | static struct option long_options[] = { |
168 | STD_LONG_OPTS, | 167 | STD_LONG_OPTS, |
@@ -171,9 +170,6 @@ process_arguments (int argc, char **argv) | |||
171 | {"link", no_argument, 0, 'L'}, | 170 | {"link", no_argument, 0, 'L'}, |
172 | {0, 0, 0, 0} | 171 | {0, 0, 0, 0} |
173 | }; | 172 | }; |
174 | #endif | ||
175 | |||
176 | #define OPTCHARS "VvhnLt:c:w:H:p:" | ||
177 | 173 | ||
178 | if (argc < 2) | 174 | if (argc < 2) |
179 | return ERROR; | 175 | return ERROR; |
@@ -186,11 +182,8 @@ process_arguments (int argc, char **argv) | |||
186 | } | 182 | } |
187 | 183 | ||
188 | while (1) { | 184 | while (1) { |
189 | #ifdef HAVE_GETOPT_H | 185 | c = getopt_long (argc, argv, "VvhnLt:c:w:H:p:", long_options, &option_index); |
190 | c = getopt_long (argc, argv, OPTCHARS, long_options, &option_index); | 186 | |
191 | #else | ||
192 | c = getopt (argc, argv, OPTCHARS); | ||
193 | #endif | ||
194 | if (c == -1 || c == EOF) | 187 | if (c == -1 || c == EOF) |
195 | break; | 188 | break; |
196 | 189 | ||
@@ -507,13 +500,8 @@ void | |||
507 | print_usage (void) | 500 | print_usage (void) |
508 | { | 501 | { |
509 | printf ("Usage:\n" " %s %s\n" | 502 | printf ("Usage:\n" " %s %s\n" |
510 | #ifdef HAVE_GETOPT_H | ||
511 | " %s (-h | --help) for detailed help\n" | 503 | " %s (-h | --help) for detailed help\n" |
512 | " %s (-V | --version) for version information\n", | 504 | " %s (-V | --version) for version information\n", |
513 | #else | ||
514 | " %s -h for detailed help\n" | ||
515 | " %s -V for version information\n", | ||
516 | #endif | ||
517 | progname, OPTIONS, progname, progname); | 505 | progname, OPTIONS, progname, progname); |
518 | } | 506 | } |
519 | 507 | ||