[Nagiosplug-checkins] nagiosplug/plugins Makefile.am, 1.73, 1.74 check_smtp.c, 1.54, 1.55 common.h, 1.25, 1.26 netutils.h, 1.17, 1.18 getaddrinfo.c, 1.2, NONE getaddrinfo.h, 1.2, NONE gethostbyname.c, 1.3, NONE gethostbyname.h, 1.3, NONE
Ton Voon
tonvoon at users.sourceforge.net
Wed Jan 24 23:47:27 CET 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9154/plugins
Modified Files:
Makefile.am check_smtp.c common.h netutils.h
Removed Files:
getaddrinfo.c getaddrinfo.h gethostbyname.c gethostbyname.h
Log Message:
Sync with gnulib - lots of extraneous code removed in preference to GNU code
--- gethostbyname.c DELETED ---
Index: common.h
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/common.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- common.h 7 Dec 2006 16:07:42 -0000 1.25
+++ common.h 24 Jan 2007 22:47:24 -0000 1.26
@@ -103,18 +103,11 @@
#include <signal.h>
#endif
+/* GNU Libraries */
#include <getopt.h>
-#include <ctype.h>
-
-#ifdef HAVE_LWRES_NETDB_H
-#include <lwres/netdb.h>
-#else
-# if !HAVE_GETADDRINFO
-# include "getaddrinfo.h"
-# else
-# include <netdb.h>
-# endif
-#endif
+#include "vasprintf.h"
+#include "snprintf.h"
+#include "vsnprintf.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -138,22 +131,6 @@
# define strtoul(a,b,c) (unsigned long)atol((a))
#endif
-#ifndef HAVE_ASPRINTF
-int asprintf(char **strp, const char *fmt, ...);
-#endif
-
-#ifndef HAVE_VASPRINTF
-/* int vasprintf(char **strp, const char *fmt, va_list ap); */
-#endif
-
-#ifndef HAVE_SNPRINTF
-int snprintf(char *str, size_t size, const char *format, ...);
-#endif
-
-#ifndef HAVE_VSNPRINTF
-int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif
-
/* SSL implementations */
#ifdef HAVE_GNUTLS_OPENSSL_H
# include <gnutls/openssl.h>
--- gethostbyname.h DELETED ---
Index: netutils.h
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/netutils.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- netutils.h 7 Dec 2006 16:07:42 -0000 1.17
+++ netutils.h 24 Jan 2007 22:47:25 -0000 1.18
@@ -39,6 +39,7 @@
#include "utils.h"
#include <netinet/in.h>
#include <arpa/inet.h>
+#include "getaddrinfo.h"
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
--- getaddrinfo.c DELETED ---
Index: check_smtp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- check_smtp.c 19 Oct 2006 23:53:28 -0000 1.54
+++ check_smtp.c 24 Jan 2007 22:47:24 -0000 1.55
@@ -171,7 +171,6 @@
char *helocmd = NULL;
char *error_msg = NULL;
struct timeval tv;
- struct hostent *hp;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
@@ -191,9 +190,6 @@
printf(_("gethostname() failed!\n"));
return STATE_CRITICAL;
}
- hp = gethostbyname(localhostname);
- if(!hp) helocmd = localhostname;
- else helocmd = hp->h_name;
} else {
helocmd = localhostname;
}
@@ -202,6 +198,9 @@
else
asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
+ if (verbose)
+ printf("HELOCMD: %s", helocmd);
+
/* initialize the MAIL command with optional FROM command */
asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n");
Index: Makefile.am
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/Makefile.am,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- Makefile.am 6 Dec 2006 20:34:31 -0000 1.73
+++ Makefile.am 24 Jan 2007 22:47:24 -0000 1.74
@@ -2,7 +2,7 @@
VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t
-INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@
+INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl @LDAPINCLUDE@ @PGINCLUDE@ @SSLINCLUDE@
datadir = @datadir@
localedir = $(datadir)/locale
@@ -33,7 +33,7 @@
PLUGINHDRS = common.h
-BASEOBJS = utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a
+BASEOBJS = utils.o ../lib/libnagiosplug.a ../gl/libgnu.a
NETOBJS = netutils.o $(BASEOBJS) $(EXTRA_NETOBJS)
SSLOBJS = sslutils.o
NETLIBS = $(NETOBJS) $(SOCKETLIBS)
--- getaddrinfo.h DELETED ---
More information about the Commits
mailing list