summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukem <lukem@pkgsrc.org>2007-07-22 05:19:01 +0000
committerlukem <lukem@pkgsrc.org>2007-07-22 05:19:01 +0000
commitb9b6af8ea04b1b2e5cda7b93075e4b2ffc66dd22 (patch)
treed6d2b30d81f60231bb361329261833ba2f24c2ec
parent8070f97a62ca2101ab2f95dbc192b869bc045e54 (diff)
downloadpkgsrc-b9b6af8ea04b1b2e5cda7b93075e4b2ffc66dd22.tar.gz
Update to tnftp 20070806.
Notable changes: - Implement '-s srcaddr' to set the local IP address for all connections. - Support '-q quittime' when waiting for server replies. - Use IEC 60027-2 "KiB", "MiB" (etc) instead of "KB", "MB", ... - Portability fixes, including for FreeBSD, Mac OS X, and Solaris.
-rw-r--r--net/tnftp/files/libnetbsd/getaddrinfo.c12
-rw-r--r--net/tnftp/files/libnetbsd/getnameinfo.c4
-rw-r--r--net/tnftp/files/libnetbsd/snprintf.c8
-rw-r--r--net/tnftp/files/libnetbsd/usleep.c8
4 files changed, 16 insertions, 16 deletions
diff --git a/net/tnftp/files/libnetbsd/getaddrinfo.c b/net/tnftp/files/libnetbsd/getaddrinfo.c
index 82f8139ca90..cad1c814caf 100644
--- a/net/tnftp/files/libnetbsd/getaddrinfo.c
+++ b/net/tnftp/files/libnetbsd/getaddrinfo.c
@@ -1,4 +1,4 @@
-/* NetBSD: getaddrinfo.c,v 1.3 2005/05/11 01:01:56 lukem Exp */
+/* $NetBSD: getaddrinfo.c,v 1.1.1.3 2007/07/22 05:19:01 lukem Exp $ */
/* from ? */
/*
@@ -225,7 +225,7 @@ do { \
#define MATCH(x, y, w) \
((x) == (y) || (/*CONSTCOND*/(w) && ((x) == ANY || (y) == ANY)))
-char *
+const char *
gai_strerror(int ecode)
{
if (ecode < 0 || ecode > EAI_MAX)
@@ -571,14 +571,14 @@ explore_fqdn(const struct addrinfo *pai, const char *hostname,
hp = getipnodebyname(hostname, pai->ai_family,
pai->ai_flags & AI_ADDRCONFIG, &h_error);
#else
-#if HAVE_GETHOSTBYNAME2
+#if defined(HAVE_GETHOSTBYNAME2)
hp = gethostbyname2(hostname, pai->ai_family);
#else
if (pai->ai_family != AF_INET)
return 0;
hp = gethostbyname(hostname);
-#endif /*HAVE_GETHOSTBYNAME2*/
-#if HAVE_H_ERRNO
+#endif /* defined(HAVE_GETHOSTBYNAME2) */
+#if defined(HAVE_H_ERRNO)
h_error = h_errno;
#else
h_error = EINVAL;
@@ -919,7 +919,7 @@ get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr)
memcpy(ai, pai, sizeof(struct addrinfo));
ai->ai_addr = (struct sockaddr *)(void *)(ai + 1);
memset(ai->ai_addr, 0, (size_t)afd->a_socklen);
-#if HAVE_SOCKADDR_SA_LEN
+#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
ai->ai_addr->sa_len = afd->a_socklen;
#endif
ai->ai_addrlen = afd->a_socklen;
diff --git a/net/tnftp/files/libnetbsd/getnameinfo.c b/net/tnftp/files/libnetbsd/getnameinfo.c
index 897f4ce068e..d3117b75cc0 100644
--- a/net/tnftp/files/libnetbsd/getnameinfo.c
+++ b/net/tnftp/files/libnetbsd/getnameinfo.c
@@ -1,4 +1,4 @@
-/* NetBSD: getnameinfo.c,v 1.5 2005/06/01 11:48:49 lukem Exp */
+/* $NetBSD: getnameinfo.c,v 1.1.1.4 2007/07/22 05:19:01 lukem Exp $ */
/* from ? */
/*
@@ -103,7 +103,7 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen,
if (sa == NULL)
return ENI_NOSOCKET;
-#if HAVE_SOCKADDR_SA_LEN
+#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
if (sa->sa_len != salen)
return ENI_SALEN;
#endif
diff --git a/net/tnftp/files/libnetbsd/snprintf.c b/net/tnftp/files/libnetbsd/snprintf.c
index 4765ca8751d..66ac1b67f4c 100644
--- a/net/tnftp/files/libnetbsd/snprintf.c
+++ b/net/tnftp/files/libnetbsd/snprintf.c
@@ -1,4 +1,4 @@
-/* NetBSD: snprintf.c,v 1.4 2005/05/11 01:01:56 lukem Exp */
+/* $NetBSD: snprintf.c,v 1.1.1.3 2007/07/22 05:19:02 lukem Exp $ */
/*
* Copyright Patrick Powell 1995
@@ -60,13 +60,13 @@
#include "tnftp.h"
-#if HAVE_LONG_DOUBLE
+#if defined(HAVE_LONG_DOUBLE)
#define LDOUBLE long double
#else
#define LDOUBLE double
#endif
-#if HAVE_LONG_LONG
+#if defined(HAVE_LONG_LONG_INT)
#define LLONG long long
#else
#define LLONG long
@@ -731,7 +731,7 @@ main(int argc, char *argv[])
"%+22.33d",
"%01.3d",
"%4d",
-#if HAVE_LONG_LONG
+#if defined(HAVE_LONG_LONG_INT)
"%12lld",
#endif
NULL
diff --git a/net/tnftp/files/libnetbsd/usleep.c b/net/tnftp/files/libnetbsd/usleep.c
index f729e2d0506..a546d67a0fb 100644
--- a/net/tnftp/files/libnetbsd/usleep.c
+++ b/net/tnftp/files/libnetbsd/usleep.c
@@ -1,4 +1,4 @@
-/* NetBSD: usleep.c,v 1.4 2005/05/16 13:21:43 lukem Exp */
+/* $NetBSD: usleep.c,v 1.1.1.4 2007/07/22 05:19:02 lukem Exp $ */
/*-
* Copyright (c) 1999,2000,2005 The NetBSD Foundation, Inc.
@@ -41,9 +41,9 @@
int
usleep(unsigned int usec)
{
-#if HAVE_POLL
- return (poll(NULL, 0, usec / 1000);
-#elif HAVE_SELECT
+#if defined(HAVE_POLL)
+ return (poll(NULL, 0, usec / 1000));
+#elif defined(HAVE_SELECT)
struct timeval tv;
tv.tv_sec = 0;