#ifndef WINDOWS
# include <sys/socket.h>
-# include <netdb.h>
+# ifdef __VMS
+# include "vms_ip.h"
+# else /* def __VMS */
+# include <netdb.h>
+# endif /* def __VMS [else] */
# include <netinet/in.h>
# ifndef __BEOS__
# include <arpa/inet.h>
#include "connect.h"
#include "hash.h"
+/* Apparently needed for Interix: */
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
/* Define sockaddr_storage where unavailable (presumably on IPv4-only
hosts). */
{
const char *txt_addr = print_address (ip);
if (0 != strcmp (print, txt_addr))
- logprintf (LOG_VERBOSE, _("Connecting to %s|%s|:%d... "),
- escnonprint_uri (print), txt_addr, port);
+ {
+ char *str = NULL, *name;
+
+ if (opt.enable_iri && (name = idn_decode ((char *) print)) != NULL)
+ {
+ int len = strlen (print) + strlen (name) + 4;
+ str = xmalloc (len);
+ snprintf (str, len, "%s (%s)", name, print);
+ str[len-1] = '\0';
+ xfree (name);
+ }
+
+ logprintf (LOG_VERBOSE, _("Connecting to %s|%s|:%d... "),
+ str ? str : escnonprint_uri (print), txt_addr, port);
+
+ if (str)
+ xfree (str);
+ }
else
logprintf (LOG_VERBOSE, _("Connecting to %s:%d... "), txt_addr, port);
}