diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:22:12 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-11 22:22:12 (GMT) |
commit | 7283211f00a3a89956d9dfc4a851dc1aaa7a1cf3 (patch) | |
tree | 371434969644a1d3cc3c5c2c26ee73cd8221aaa4 /plugins/check_mrtg.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_mrtg.c')
-rw-r--r-- | plugins/check_mrtg.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index e26e2e6..095dcbc 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c | |||
@@ -214,7 +214,6 @@ process_arguments (int argc, char **argv) | |||
214 | { | 214 | { |
215 | int c; | 215 | int c; |
216 | 216 | ||
217 | #ifdef HAVE_GETOPT_H | ||
218 | int option_index = 0; | 217 | int option_index = 0; |
219 | static struct option long_options[] = { | 218 | static struct option long_options[] = { |
220 | {"logfile", required_argument, 0, 'F'}, | 219 | {"logfile", required_argument, 0, 'F'}, |
@@ -230,7 +229,6 @@ process_arguments (int argc, char **argv) | |||
230 | {"help", no_argument, 0, 'h'}, | 229 | {"help", no_argument, 0, 'h'}, |
231 | {0, 0, 0, 0} | 230 | {0, 0, 0, 0} |
232 | }; | 231 | }; |
233 | #endif | ||
234 | 232 | ||
235 | if (argc < 2) | 233 | if (argc < 2) |
236 | return ERROR; | 234 | return ERROR; |
@@ -245,13 +243,8 @@ process_arguments (int argc, char **argv) | |||
245 | } | 243 | } |
246 | 244 | ||
247 | while (1) { | 245 | while (1) { |
248 | #ifdef HAVE_GETOPT_H | 246 | c = getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options, |
249 | c = | ||
250 | getopt_long (argc, argv, "hVF:e:a:v:c:w:l:u:", long_options, | ||
251 | &option_index); | 247 | &option_index); |
252 | #else | ||
253 | c = getopt (argc, argv, "hVF:e:a:v:c:w:l:u:"); | ||
254 | #endif | ||
255 | 248 | ||
256 | if (c == -1 || c == EOF) | 249 | if (c == -1 || c == EOF) |
257 | break; | 250 | break; |
@@ -370,12 +363,7 @@ void | |||
370 | print_usage (void) | 363 | print_usage (void) |
371 | { | 364 | { |
372 | printf ("Usage:\n" " %s %s\n" | 365 | printf ("Usage:\n" " %s %s\n" |
373 | #ifdef HAVE_GETOPT_H | ||
374 | " %s (-h | --help) for detailed help\n" | 366 | " %s (-h | --help) for detailed help\n" |
375 | " %s (-V | --version) for version information\n", | 367 | " %s (-V | --version) for version information\n", |
376 | #else | ||
377 | " %s -h for detailed help\n" | ||
378 | " %s -V for version information\n", | ||
379 | #endif | ||
380 | progname, OPTIONS, progname, progname); | 368 | progname, OPTIONS, progname, progname); |
381 | } | 369 | } |