diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 2d80fad1bb04560c89fafc1dcd1c639ad942bcc0..e1484566328961e69b89652e19f6e9ff53c7f6ef 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
#define EMAIL "kdebisschop@users.sourceforge.net"
#define SUMMARY "Tests to see if a PostgreSQL DBMS is accepting connections.\n"
-#define OPTIONS "\
-\[-c critical_time] [-w warning_time] [-t timeout] [-H host]\n\
+#define OPTIONS "[-c critical_time] [-w warning_time] [-t timeout] [-H host]\n\
[-P port] [-d database] [-l logname] [-p password]"
#define LONGOPTIONS "\
#include "config.h"
#include "common.h"
#include "utils.h"
-#include <netdb.h>
#include <libpq-fe.h>
int process_arguments (int, char **);
{
int c;
-#ifdef HAVE_GETOPT_H
int option_index = 0;
static struct option long_options[] = {
{"help", no_argument, 0, 'h'},
{"database", required_argument, 0, 'd'},
{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;