summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukem <lukem@pkgsrc.org>2007-08-06 01:54:38 +0000
committerlukem <lukem@pkgsrc.org>2007-08-06 01:54:38 +0000
commit0e8056a3437e9196df70c08a26846453f9b8305c (patch)
tree3cc62d44158984ec8f666ff052f6ecf2cc7512fc
parent91b7757560c7968d4203ae96869c4b14bd925488 (diff)
downloadpkgsrc-0e8056a3437e9196df70c08a26846453f9b8305c.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/INSTALL168
-rw-r--r--net/tnftp/files/README23
-rw-r--r--net/tnftp/files/config.h.in558
-rw-r--r--net/tnftp/files/tnftp.h359
4 files changed, 603 insertions, 505 deletions
diff --git a/net/tnftp/files/INSTALL b/net/tnftp/files/INSTALL
index 8b4dfe23fdc..7c5e96a6ea2 100644
--- a/net/tnftp/files/INSTALL
+++ b/net/tnftp/files/INSTALL
@@ -15,12 +15,9 @@ For most systems, execute the following to compile and install tnftp:
make
make install
-A preformatted manual page (src/ftp.cat1) is also installed. If
-you wish to install the source (src/ftp.1), ensure that your system
-has up-to-date mandoc macros. groff ships with this macro suite,
-but it has bugs. Try:
- ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/src/share/tmac/
-for a more recent version.
+A preformatted manual page (src/ftp.cat1) is also installed.
+If you wish to install the source (src/ftp.1), ensure that your system
+has up-to-date mandoc macros, such as those that are shipped with groff.
CONFIGURATION OPTIONS
@@ -39,14 +36,11 @@ script. `configure' supports the following options:
* Specific options:
--enable-editcomplete Turn on command line editing and completion.
- --disable-editcomplete Turn off command line editing and completion
- [default: enabled].
- --enable-ipv6 Enable IPv6 support (if your OS supports it)
- --disable-ipv6 Disable IPv6 support (even if your OS supports it.)
- [default: enabled].
- --with-socks Compile with SOCKS firewall traversal support.
- --with-socks5[=PATH] Compile with SOCKS5 firewall traversal support.
- --with-socks4[=PATH] Compile with SOCKS4 firewall traversal support.
+ (default: enabled)
+ --enable-ipv6 Enable IPv6 support (if your OS supports it).
+ (default: enabled)
+ --disable-largefile omit support for large files
+ --with-socks enable support for (Dante) SOCKS5 proxy
The following environment variables can be set to override various
compiler related settings.
@@ -64,149 +58,3 @@ This can be achieved with:
= =
============================================
-
-PLATFORM SPECIFIC NOTES
------------------------
-
-(none tested)
-
-
-===============================
-= OLD PLATFORM SPECIFIC NOTES =
-===============================
-
-NOTE: these are out of date...
-
-
-The following platforms & compilers have been tested:
-
-- AIX 4.1.5:
-- AIX 4.2.1:
-- AIX 4.3.3:
- - Compiler: xlc -qlanglvl=ansi
- version: xlC 3.1.4.10 -- C for AIX Compiler
- version: ibmcxx.cmp 3.6.6.6 -- IBM C and C++ Compilers
-
- Configure with:
- env CC="xlc" CFLAGS="-qlanglvl=ansi" ./configure
-
-- BSD/OS 4.0.1 (x86)
-- BSD/OS 4.1 (x86)
-- BSD/OS 4.1 (sparc)
-- BSD/OS 4.2 (x86)
- - Compiler: /bin/cc
- version: gcc 2.7.2.1
- version: gcc version 2.95.2 19991024
-
-- Digital UNIX 4.0b
-- Digital UNIX 4.0d
-- Digital UNIX 4.0f
- - Compiler: cc -std
- version: DEC C V5.2-036 on Digital UNIX V4.0 (Rev. 564)
- version: DEC C V5.9-005 on Digital UNIX V4.0 (Rev. 1229)
-
- Configure with
- env CC="cc -std" ./configure
-
- - Compiler: gcc
- version: 2.95.1
-
-- Digital UNIX 5.0
- - Compiler: cc
- version: Compaq C V6.1-011 on Digital UNIX V5.0 (Rev. 910)
-
-- FreeBSD 3.4 (i386):
-- FreeBSD 3.5 (i386):
-- FreeBSD 4.1 (i386):
- - Compiler: cc
- version: gcc version 2.7.2.3
- version: gcc version 2.95.2 19991024
-
-- HP/UX 10.20:
-- HP/UX 11.00:
- - Compiler: /opt/ansic/bin/cc -Ae
- version: A.10.32.03
-
- Configure with
- env CC="cc -Ae" ./configure
-
- To generate code that will run on old architectures you
- may need to add "+DAportable" to CC.
-
-
-- IRIX 6.5.4
-- IRIX 6.5.8
- Compiler: /bin/cc
- version: MIPSpro Compilers: Version 7.2.1
- Compiler:
- version: gcc version 2.95.2
-
-- HP/UX 11.00:
-- HP/UX 11.00 64 bit:
- - Compiler: /opt/ansic/bin/cc -Ae
- version: A.11.01.00
-
- Configure with
- env CC="cc -Ae" ./configure
-
-- NetBSD 1.3.3 (i386)
- Compiler: /usr/bin/cc
- Compiler: /usr/bin/cc
-
- Ignore warnings about ``passing arg 3 of `tputs' from
- incompatible pointer type''.
-
-- RedHat Linux 5.1 (?? i386)
-- RedHat Linux 5.2 (?? i386)
-- RedHat Linux 6.0 (Linux 2.2.10 i686)
-- RedHat Linux 6.1 (Linux 2.2.5-15 i686)
-- RedHat Linux 6.2 (Linux 2.2.16-3smp i686)
- - Compiler: cc
- version: egcs-1.1.2
-
-- Slackware (Linux 2.0.35 i686)
- - Compiler: cc
- version: 2.7.2.3
-
-- Solaris 2.6 (sparc)
-- Solaris 7 (sparc)
- - Compiler: /opt/SUNWspro/bin/cc
- version: WorkShop Compilers 5.0
-
- - Compiler: gcc
- version: egcs-1.1.2
-
-- RedHat Linux 5.0 (i386)
- Compiler: cc
-
-- Solaris 2.5 (sparc)
-- Solaris 7 (x86)
- Compiler: /opt/SUNWspro/bin/cc
- version: SC3.0 15 Dec 1993
- version: WorkShop Compilers 5.0
- Compiler: gcc
- version: egcs-1.1.2
- version: gcc 2.8.1
- version: gcc 2.95.1
-
-- Solaris 7 (sparc) 64 bit
- Compiler: /opt/SUNWspro/bin/cc -xarch=v9
- version: WorkShop Compilers 5.0
-
-- SunOS 4
- Compiler: gcc -lresolv
- version:
-
-- SuSE Linux
- Compiler: gcc
- version:
-
- /usr/bin/ftp on SuSE Linux 6.4 is this ftp client.
-
- May need `gcc -L/usr/lib/termcap' if tgetent() et al aren't found.
-
-- Ultrix 4.5
- Compiler: cc
- version: MIPS C Compiler 3.0
- Compiler: gcc
- version: 2.7.2.2
diff --git a/net/tnftp/files/README b/net/tnftp/files/README
index 910c3a4cf53..5093e71014e 100644
--- a/net/tnftp/files/README
+++ b/net/tnftp/files/README
@@ -11,26 +11,29 @@ The enhancements over the standard ftp client in 4.4BSD (and
derivatives) include:
* command-line editing within ftp
* command-line fetching of URLS, including support for:
- - http proxies (c.f: $http_proxy, $ftp_proxy)
+ - http proxies (see $http_proxy, $ftp_proxy)
- authentication
* configurable prompt
* context sensitive command and filename completion
* dynamic progress bar
* feature negotiation extensions from RFC 2389
- (c.f: `feat' and `remopts')
+ (see `feat' and `remopts')
* extensions to ftp from the IETF ftpext working group
- (c.f: `mlsd' and `mlst')
+ (see `mlsd' and `mlst')
* IPv6 support (from the WIDE project)
* modification time preservation
* paging of local and remote files, and of directory listings
- (c.f: `lpage', `page', `pdir')
+ (see `lpage', `page', `pdir')
* passive mode support, with fallback to active mode
- * retrieval of filenames listed in a given file (c.f: `fget')
+ * retrieval of filenames listed in a given file (see `fget')
* `set option' override of ftp environment variables
- * socks4/socks5 support
- * TIS Firewall Toolkit gate ftp proxy support (c.f: `gate')
- * transfer-rate throttling (c.f: `-T', `rate')
- * uploading of files on the command line (c.f: `-u')
+ * TIS Firewall Toolkit gate ftp proxy support (see `gate')
+ * transfer-rate throttling (see `-T', `rate')
+ * uploading of files on the command line (see `-u')
+ * (Dante) SOCKS5 support
+
+Previous features, currently disabled until a test system is available:
+ * SOCKS4 support
INSTALLATION
@@ -62,4 +65,4 @@ The primary ftp site for tnftp is:
DOCUMENT REFERENCE
------------------
-NetBSD: README,v 1.6 2005/05/11 03:05:52 lukem Exp
+$NetBSD: README,v 1.1.1.4 2007/08/06 01:58:57 lukem Exp $
diff --git a/net/tnftp/files/config.h.in b/net/tnftp/files/config.h.in
index 2957899433d..f9f61c74d40 100644
--- a/net/tnftp/files/config.h.in
+++ b/net/tnftp/files/config.h.in
@@ -1,291 +1,493 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-/* NetBSD: config.h.in,v 1.12 2005/06/25 06:14:57 lukem Exp */
+/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
-/* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-#undef _ALL_SOURCE
-#endif
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
-/* Define if the closedir function returns void instead of int. */
-#undef CLOSEDIR_VOID
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
-/* Define if the `getpgrp' function takes no argument. */
+/* Define to 1 if the `getpgrp' function requires zero arguments. */
#undef GETPGRP_VOID
-/* Define if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
+/* Define to 1 if `TIOCGWINSZ' requires <sys/ioctl.h>. */
+#undef GWINSZ_IN_SYS_IOCTL
-/* Define if your Fortran 77 compiler doesn't accept -c and -o together. */
-#undef F77_NO_MINUS_C_MINUS_O
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <arpa/ftp.h> header file. */
+#undef HAVE_ARPA_FTP_H
-/* Define to the type of arg1 for select(). */
-#undef SELECT_TYPE_ARG1
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
-/* Define to the type of args 2, 3 and 4 for select(). */
-#undef SELECT_TYPE_ARG234
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
-/* Define to the type of arg5 for select(). */
-#undef SELECT_TYPE_ARG5
+/* Define to 1 if you have the declaration of `AF_INET6', and to 0 if you
+ don't. */
+#undef HAVE_DECL_AF_INET6
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the declaration of `AI_NUMERICHOST', and to 0 if
+ you don't. */
+#undef HAVE_DECL_AI_NUMERICHOST
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
+/* Define to 1 if you have the declaration of `dirname', and to 0 if you
+ don't. */
+#undef HAVE_DECL_DIRNAME
+
+/* Define to 1 if you have the declaration of `fclose', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FCLOSE
-/* Define if the closedir function returns void instead of int. */
-#undef VOID_CLOSEDIR
+/* Define to 1 if you have the declaration of `getpass', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETPASS
-/* The number of bytes in a off_t. */
-#undef SIZEOF_OFF_T
+/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
+ don't. */
+#undef HAVE_DECL_H_ERRNO
-/* Define if you have the dirname function. */
+/* Define to 1 if you have the declaration of `NS_IN6ADDRSZ', and to 0 if you
+ don't. */
+#undef HAVE_DECL_NS_IN6ADDRSZ
+
+/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
+ */
+#undef HAVE_DECL_OPTARG
+
+/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
+ */
+#undef HAVE_DECL_OPTIND
+
+/* Define to 1 if you have the declaration of `pclose', and to 0 if you don't.
+ */
+#undef HAVE_DECL_PCLOSE
+
+/* Define to 1 if you have the declaration of `strptime', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRPTIME
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dirname' function. */
#undef HAVE_DIRNAME
-/* Define if you have the err function. */
+/* Define to 1 if you have the `err' function. */
#undef HAVE_ERR
-/* Define if you have the fgetln function. */
+/* Define to 1 if you have the <err.h> header file. */
+#undef HAVE_ERR_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fgetln' function. */
#undef HAVE_FGETLN
-/* Define if you have the fparseln function. */
-#undef HAVE_FPARSELN
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
-/* Define if you have the fseeko function. */
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
-/* Define if you have the getaddrinfo function. */
+/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
-/* Define if you have the gethostbyname2 function. */
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `gethostbyaddr' function. */
+#undef HAVE_GETHOSTBYADDR
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `gethostbyname2' function. */
#undef HAVE_GETHOSTBYNAME2
-/* Define if you have the getnameinfo function. */
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the `getnameinfo' function. */
#undef HAVE_GETNAMEINFO
-/* Define if you have the getpassphrase function. */
+/* Define to 1 if you have the `getpass' function. */
+#undef HAVE_GETPASS
+
+/* Define to 1 if you have the `getpassphrase' function. */
#undef HAVE_GETPASSPHRASE
-/* Define if you have the getpgrp function. */
+/* Define to 1 if you have the `getpgrp' function. */
#undef HAVE_GETPGRP
-/* Define if you have the inet_ntop function. */
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the `inet_ntop' function. */
#undef HAVE_INET_NTOP
-/* Define if you have the inet_pton function. */
+/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
-/* Define if you have the memmove function. */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if the system has the type `in_port_t'. */
+#undef HAVE_IN_PORT_T
+
+/* Define to 1 if you have the `isascii' function. */
+#undef HAVE_ISASCII
+
+/* Define to 1 if you have the <libgen.h> header file. */
+#undef HAVE_LIBGEN_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if the system has the type `long double'. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
-/* Define if you have the mkstemp function. */
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
-/* Define if you have the select function. */
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
+/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H
+
+/* Define if we have poll() and it is not emulated. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define if `long long' is supported and *printf() supports %lld or %qd to
+ print them. */
+#undef HAVE_PRINTF_LONG_LONG
+
+/* Define if *printf() uses %qd to print `long long' (otherwise uses %lld). */
+#undef HAVE_PRINTF_QD
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define to 1 if you have the `realpath' function. */
+#undef HAVE_REALPATH
+
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define to 1 if the system has the type `sa_family_t'. */
+#undef HAVE_SA_FAMILY_T
+
+/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
-/* Define if you have the setprogname function. */
+/* Define to 1 if you have the <setjmp.h> header file. */
+#undef HAVE_SETJMP_H
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
+/* Define to 1 if you have the `setprogname' function. */
#undef HAVE_SETPROGNAME
-/* Define if you have the sl_init function. */
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `sl_init' function. */
#undef HAVE_SL_INIT
-/* Define if you have the snprintf function. */
+/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
-/* Define if you have the strdup function. */
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if the system has the type `socklen_t'. */
+#undef HAVE_SOCKLEN_T
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strcoll' function and it is properly defined.
+ */
+#undef HAVE_STRCOLL
+
+/* Define to 1 if you have the `strcspn' function. */
+#undef HAVE_STRCSPN
+
+/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
-/* Define if you have the strerror function. */
+/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
-/* Define if you have the strlcat function. */
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strlcat' function. */
#undef HAVE_STRLCAT
-/* Define if you have the strlcpy function. */
+/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
-/* Define if you have the strptime function. */
-#undef HAVE_STRPTIME
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
-/* Define if you have the strsep function. */
-#undef HAVE_STRSEP
+/* Define to 1 if you have the `strpbrk' function. */
+#undef HAVE_STRPBRK
-/* Define if you have the strtoll function. */
-#undef HAVE_STRTOLL
+/* Define to 1 if you have the `strptime' function. */
+#undef HAVE_STRPTIME
-/* Define if you have the strunvis function. */
-#undef HAVE_STRUNVIS
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
-/* Define if you have the strvis function. */
-#undef HAVE_STRVIS
+/* Define to 1 if you have the `strsep' function. */
+#undef HAVE_STRSEP
-/* Define if you have the timegm function. */
-#undef HAVE_TIMEGM
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
-/* Define if you have the usleep function. */
-#undef HAVE_USLEEP
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
-/* Define if you have the utimes function. */
-#undef HAVE_UTIMES
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
-/* Define if you have the <arpa/nameser.h> header file. */
-#undef HAVE_ARPA_NAMESER_H
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
-/* Define if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
-/* Define if you have the <err.h> header file. */
-#undef HAVE_ERR_H
+/* Define to 1 if `d_namlen' is member of `struct dirent'. */
+#undef HAVE_STRUCT_DIRENT_D_NAMLEN
-/* Define if you have the <libgen.h> header file. */
-#undef HAVE_LIBGEN_H
+/* Define to 1 if the system has the type `struct pollfd'. */
+#undef HAVE_STRUCT_POLLFD
-/* Define if you have the <libutil.h> header file. */
-#undef HAVE_LIBUTIL_H
+/* Define to 1 if the system has the type `struct sockaddr_in6'. */
+#undef HAVE_STRUCT_SOCKADDR_IN6
-/* Define if you have the <ndir.h> header file. */
-#undef HAVE_NDIR_H
+/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
+#undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
-/* Define if you have the <paths.h> header file. */
-#undef HAVE_PATHS_H
+/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
+#undef HAVE_STRUCT_SOCKADDR_SA_LEN
-/* Define if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
+/* Define to 1 if you have the `strunvis' function. */
+#undef HAVE_STRUNVIS
-/* Define if you have the <regex.h> header file. */
-#undef HAVE_REGEX_H
+/* Define to 1 if you have the `strvis' function. */
+#undef HAVE_STRVIS
-/* Define if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/poll.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
-/* Define if you have the <sys/syslimits.h> header file. */
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/syslimits.h> header file. */
#undef HAVE_SYS_SYSLIMITS_H
-/* Define if you have the <termcap.h> header file. */
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
-/* Define if you have the <util.h> header file. */
-#undef HAVE_UTIL_H
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
-/* Define if you have the <vis.h> header file. */
-#undef HAVE_VIS_H
+/* Define to 1 if you have the `timegm' function. */
+#undef HAVE_TIMEGM
-/* Define if you have the nsl library (-lnsl). */
-#undef HAVE_LIBNSL
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
-/* Define if you have the socket library (-lsocket). */
-#undef HAVE_LIBSOCKET
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
-/* Define if your compiler supports `long long' */
-#undef HAVE_LONG_LONG
+/* Define to 1 if you have the `utime' function. */
+#undef HAVE_UTIME
-/* Define if *printf() uses %qd to print `long long' (otherwise uses %lld) */
-#undef HAVE_PRINTF_QD
+/* Define to 1 if you have the `utimes' function. */
+#undef HAVE_UTIMES
-/* Define if in_port_t exists */
-#undef HAVE_IN_PORT_T
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
-/* Define if sa_family_t exists in <sys/socket.h> */
-#undef HAVE_SA_FAMILY_T
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
-/* Define if struct sockaddr.sa_len exists (implies sockaddr_in.sin_len, etc) */
-#undef HAVE_SOCKADDR_SA_LEN
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
-/* Define if socklen_t exists */
-#undef HAVE_SOCKLEN_T
+/* Define to 1 if you have the <vis.h> header file. */
+#undef HAVE_VIS_H
-/* Define if AF_INET6 exists in <sys/socket.h> */
-#undef HAVE_AF_INET6
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
-/* Define if `struct sockaddr_in6' exists in <netinet/in.h> */
-#undef HAVE_SOCKADDR_IN6
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
-/* Define if `struct addrinfo' exists in <netdb.h> */
-#undef HAVE_ADDRINFO
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if NS_IN6ADDRSZ exists in <arpa/nameser.h> */
-#undef HAVE_NS_IN6ADDRSZ
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/*
- * Define if <netdb.h> contains AI_NUMERICHOST et al.
- * Systems which only implement RFC2133 will need this.
- */
-#undef HAVE_RFC2553_NETDB
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* Define if `struct direct' has a d_namlen element */
-#undef HAVE_D_NAMLEN
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
-/* Define if h_errno exists in <netdb.h> */
-#undef HAVE_H_ERRNO_D
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
-/* Define if dirname() is declared in <libgen.h> */
-#undef HAVE_DIRNAME_D
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
-/* Define if fclose() is declared in <stdio.h> */
-#undef HAVE_FCLOSE_D
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
-/* Define if getpass() is declared in <stdlib.h> or <unistd.h> */
-#undef HAVE_GETPASS_D
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
-/* Define if optarg is declared in <stdlib.h> or <unistd.h> */
-#undef HAVE_OPTARG_D
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* Define if optind is declared in <stdlib.h> or <unistd.h> */
-#undef HAVE_OPTIND_D
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
-/* Define if pclose() is declared in <stdio.h> */
-#undef HAVE_PCLOSE_D
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
-/* Define if `long long' is supported and sizeof(off_t) >= 8 */
-#undef HAVE_QUAD_SUPPORT
+/* Define if using (Dante) SOCKS5 proxy. */
+#undef USE_SOCKS
-/* Define if strptime() is declared in <time.h> */
-#undef HAVE_STRPTIME_D
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
-/* Define if we have poll() and it is not emulated */
-#undef HAVE_POLL
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
-/* Define if we have struct pollfd in <poll.h> or <sys/poll.h> */
-#undef HAVE_STRUCT_POLLFD
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint32_t
-/*
- * Define this if compiling with SOCKS (the firewall traversal library).
- * Also, you must define connect, getsockname, bind, accept, listen, and
- * select to their SOCKS-versions.
- */
-#undef SOCKS
-#undef SOCKS4
-#undef SOCKS5
-#undef connect
-#undef getsockname
-#undef getpeername
-#undef bind
-#undef accept
-#undef listen
-#undef select
-#undef recvfrom
-#undef sendto
-#undef recv
-#undef send
-#undef read
-#undef write
-#undef rresvport
-#undef shutdown
-#undef close
-#undef dup
-#undef dup2
-#undef fclose
-#undef gethostbyname
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
diff --git a/net/tnftp/files/tnftp.h b/net/tnftp/files/tnftp.h
index 22df1cfd48d..edd8535cbe3 100644
--- a/net/tnftp/files/tnftp.h
+++ b/net/tnftp/files/tnftp.h
@@ -1,78 +1,140 @@
-/* NetBSD: tnftp.h,v 1.21 2005/06/25 06:27:32 lukem Exp */
+/* $NetBSD: tnftp.h,v 1.1.1.7 2007/08/06 01:54:38 lukem Exp $ */
-#define FTP_PRODUCT "tnftp"
-#define FTP_VERSION "20050625"
+#define FTP_PRODUCT PACKAGE_NAME
+#define FTP_VERSION PACKAGE_VERSION
#include "config.h"
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-
-#include <arpa/ftp.h>
-#include <arpa/inet.h>
-
+#include <stdio.h>
#include <ctype.h>
#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#ifdef HAVE_RFC2553_NETDB
-#include <netdb.h>
+
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#if defined(STDC_HEADERS)
+# include <stdarg.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+#if defined(HAVE_LIBGEN_H)
+# include <libgen.h>
+#endif
+#if defined(HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#if defined(HAVE_POLL_H)
+# include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+# include <sys/poll.h>
+#endif
+#if defined(HAVE_SYS_SOCKET_H)
+# include <sys/socket.h>
+#endif
+#if defined(HAVE_NETINET_IN_H)
+# include <netinet/in.h>
+#endif
+#if defined(HAVE_NETINET_IN_SYSTM_H)
+# include <netinet/in_systm.h>
+#endif
+#if defined(HAVE_NETINET_IP_H)
+# include <netinet/ip.h>
+#endif
+#if defined(HAVE_NETDB_H)
+# if HAVE_DECL_AI_NUMERICHOST
+# include <netdb.h>
+# else /* !HAVE_DECL_AI_NUMERICHOST */
+# define getaddrinfo non_rfc2553_getaddrinfo
+# include <netdb.h>
+# undef getaddrinfo
+# endif /* !HAVE_DECL_AI_NUMERICHOST */
+#endif
+#if defined(HAVE_ARPA_INET_H)
+# include <arpa/inet.h>
+#endif
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
#else
-#define getaddrinfo non_rfc2553_getaddrinfo
-#include <netdb.h>
-#undef getaddrinfo
-#endif
-#include <pwd.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
+# define dirent direct
+# if defined(HAVE_SYS_NDIR_H)
+# include <sys/ndir.h>
+# endif
+# if defined(HAVE_SYS_DIR_H)
+# include <sys/dir.h>
+# endif
+# if defined(HAVE_NDIR_H)
+# include <ndir.h>
+# endif
+#endif
+
+#if defined(HAVE_SYS_IOCTL_H)
+# include <sys/ioctl.h>
+#endif
+#if defined(HAVE_SYS_PARAM_H)
+# include <sys/param.h>
+#endif
+#if defined(HAVE_SYS_STAT_H)
+# include <sys/stat.h>
+#endif
+#if defined(HAVE_SYS_SYSLIMITS_H)
+# include <sys/syslimits.h>
+#endif
+#if defined(HAVE_SYS_WAIT_H)
+# include <sys/wait.h>
+#endif
+
+#if defined(HAVE_ARPA_FTP_H)
+# include <arpa/ftp.h>
+#endif
+
+#if defined(HAVE_FCNTL_H)
+# include <fcntl.h>
+#endif
+#if defined(HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+#if defined(HAVE_PWD_H)
+# include <pwd.h>
+#endif
+#if defined(HAVE_SETJMP_H)
+# include <setjmp.h>
+#endif
+#if defined(HAVE_SIGNAL_H)
+# include <signal.h>
+#endif
+#if defined(HAVE_STDDEF_H)
+# include <stddef.h>
+#endif
+#if defined(HAVE_TERMIOS_H)
+# include <termios.h>
+#endif
-#if HAVE_POLL
+#if defined(HAVE_POLL)
/* we use poll */
-#elif HAVE_SELECT
+#elif defined(HAVE_SELECT)
/* we use select */
-#else /* ! HAVE_POLL && ! HAVE_SELECT */
+#else /* !defined(HAVE_POLL) && !defined(HAVE_SELECT) */
# error "no poll() or select() found"
#endif
-
-#if HAVE_POLL_H
-# include <poll.h>
-#elif HAVE_SYS_POLL_H
-# include <sys/poll.h>
-#endif
-#ifndef POLLIN
+#if !defined(POLLIN)
# define POLLIN 0x0001
#endif
-#ifndef POLLOUT
+#if !defined(POLLOUT)
# define POLLOUT 0x0004
#endif
-#ifndef POLLRDNORM
+#if !defined(POLLRDNORM)
# define POLLRDNORM 0x0040
#endif
-#ifndef POLLWRNORM
+#if !defined(POLLWRNORM)
# define POLLWRNORM POLLOUT
#endif
-#ifndef POLLRDBAND
+#if !defined(POLLRDBAND)
# define POLLRDBAND 0x0080
#endif
-#ifndef INFTIM
+#if !defined(INFTIM)
# define INFTIM -1
#endif
-#if ! HAVE_STRUCT_POLLFD
+#if !defined(HAVE_STRUCT_POLLFD)
struct pollfd {
int fd;
short events;
@@ -80,58 +142,35 @@ struct pollfd {
};
#endif
-#if HAVE_DIRENT_H
-# include <dirent.h>
-#else
-# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
-#if TIME_WITH_SYS_TIME
+#if defined(TIME_WITH_SYS_TIME)
# include <sys/time.h>
# include <time.h>
#else
-# if HAVE_SYS_TIME_H
+# if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
-#if HAVE_SYS_SYSLIMITS_H
-# include <sys/syslimits.h>
-#endif
-
-#if HAVE_ERR_H
+#if defined(HAVE_ERR_H)
# include <err.h>
#endif
-#if USE_GLOB_H /* not set by configure; used by other build systems */
+#if defined(USE_GLOB_H) /* not set by configure; used by other build systems */
# include <glob.h>
#else
# include "ftpglob.h"
#endif
-#if HAVE_LIBGEN_H
-# include <libgen.h>
-#endif
-
-#if HAVE_PATHS_H
+#if defined(HAVE_PATHS_H)
# include <paths.h>
#endif
-#ifndef _PATH_BSHELL
-#define _PATH_BSHELL "/bin/sh"
+#if !defined(_PATH_BSHELL)
+# define _PATH_BSHELL "/bin/sh"
#endif
-#ifndef _PATH_TMP
-#define _PATH_TMP "/tmp/"
+#if !defined(_PATH_TMP)
+# define _PATH_TMP "/tmp/"
#endif
typedef struct _stringlist {
@@ -145,7 +184,7 @@ int sl_add(StringList *, char *);
void sl_free(StringList *, int);
char *sl_find(StringList *, char *);
-#if HAVE_TERMCAP_H
+#if defined(HAVE_TERMCAP_H)
# include <termcap.h>
#else
int tgetent(char *, const char *);
@@ -154,15 +193,7 @@ int tgetflag(const char *);
int tgetnum(const char *);
char *tgoto(const char *, int, int);
void tputs(const char *, int, int (*)(int));
-#endif
-
-#if HAVE_UTIL_H
-# include <util.h>
-#endif
-
-#if HAVE_LIBUTIL_H
-# include <libutil.h>
-#endif
+#endif /* !HAVE_TERMCAP_H */
#if defined(HAVE_VIS_H) && defined(HAVE_STRVIS) && defined(HAVE_STRUNVIS)
# include <vis.h>
@@ -170,24 +201,25 @@ void tputs(const char *, int, int (*)(int));
# include "ftpvis.h"
#endif
-#if ! HAVE_IN_PORT_T
+#if !defined(HAVE_IN_PORT_T)
typedef unsigned short in_port_t;
#endif
-#if ! HAVE_SA_FAMILY_T
+#if !defined(HAVE_SA_FAMILY_T)
typedef unsigned short sa_family_t;
#endif
-#if ! HAVE_SOCKLEN_T
+#if !defined(HAVE_SOCKLEN_T)
typedef unsigned int socklen_t;
#endif
-#if HAVE_AF_INET6 && HAVE_SOCKADDR_IN6 && HAVE_NS_IN6ADDRSZ
+#if HAVE_DECL_AF_INET6 \
+ && defined(HAVE_STRUCT_SOCKADDR_IN6) \
+ && HAVE_DECL_NS_IN6ADDRSZ
# define INET6
#endif
-
-#if ! HAVE_RFC2553_NETDB
+#if !HAVE_DECL_AI_NUMERICHOST
/* RFC 2553 */
#undef EAI_ADDRFAMILY
@@ -260,10 +292,11 @@ typedef unsigned int socklen_t;
#undef AI_V4MAPPED
#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */
-#endif /* ! HAVE_RFC2553_NETDB */
+#endif /* !HAVE_DECL_AI_NUMERICHOST */
-#if ! HAVE_RFC2553_NETDB && ! HAVE_ADDRINFO
+#if !HAVE_DECL_AI_NUMERICHOST && !defined(HAVE_STRUCT_ADDRINFO) \
+ && !defined(USE_SOCKS)
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
@@ -281,156 +314,143 @@ int getaddrinfo(const char *, const char *,
int getnameinfo(const struct sockaddr *, socklen_t,
char *, size_t, char *, size_t, int);
void freeaddrinfo(struct addrinfo *);
-char *gai_strerror(int);
-
-#endif /* ! HAVE_RFC2553_NETDB && ! HAVE_ADDRINFO */
+const char *gai_strerror(int);
+#endif /* !HAVE_DECL_AI_NUMERICHOST && !defined(HAVE_STRUCT_ADDRINFO) \
+ && !defined(USE_SOCKS) */
-#if ! HAVE_D_NAMLEN
+#if !defined(HAVE_STRUCT_DIRENT_D_NAMLEN)
# define DIRENT_MISSING_D_NAMLEN
#endif
-#if ! HAVE_H_ERRNO_D
+#if !HAVE_DECL_H_ERRNO
extern int h_errno;
#endif
#define HAVE_H_ERRNO 1 /* XXX: an assumption for now... */
-#if ! HAVE_FCLOSE_D
+#if !HAVE_DECL_FCLOSE
int fclose(FILE *);
#endif
-#if ! HAVE_GETPASS_D
+#if !HAVE_DECL_GETPASS
char *getpass(const char *);
#endif
-#if ! HAVE_OPTARG_D
+#if !HAVE_DECL_OPTARG
extern char *optarg;
#endif
-#if ! HAVE_OPTIND_D
+#if !HAVE_DECL_OPTIND
extern int optind;
#endif
-#if ! HAVE_PCLOSE_D
+#if !HAVE_DECL_PCLOSE
int pclose(FILE *);
#endif
-#if ! HAVE_DIRNAME_D
+#if !HAVE_DECL_DIRNAME
char *dirname(char *);
#endif
-#if ! HAVE_ERR
+#if !defined(HAVE_ERR)
void err(int, const char *, ...);
void errx(int, const char *, ...);
void warn(const char *, ...);
void warnx(const char *, ...);
#endif
-#if ! HAVE_FGETLN
+#if !defined(HAVE_FGETLN)
char *fgetln(FILE *, size_t *);
#endif
-#if ! HAVE_FSEEKO
+#if !defined(HAVE_FSEEKO)
int fseeko(FILE *, off_t, int);
#endif
-#if ! HAVE_FPARSELN
-# define FPARSELN_UNESCESC 0x01
-# define FPARSELN_UNESCCONT 0x02
-# define FPARSELN_UNESCCOMM 0x04
-# define FPARSELN_UNESCREST 0x08
-# define FPARSELN_UNESCALL 0x0f
-char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
-#endif
-
-#if ! HAVE_INET_NTOP
+#if !defined(HAVE_INET_NTOP)
const char *inet_ntop(int, const void *, char *, socklen_t);
#endif
-#if ! HAVE_INET_PTON
+#if !defined(HAVE_INET_PTON)
int inet_pton(int, const char *, void *);
#endif
-#if ! HAVE_MKSTEMP
+#if !defined(HAVE_MKSTEMP)
int mkstemp(char *);
#endif
-#if ! HAVE_SETPROGNAME
+#if !defined(HAVE_SETPROGNAME)
const char *getprogname(void);
void setprogname(const char *);
#endif
-#if ! HAVE_SNPRINTF
+#if !defined(HAVE_SNPRINTF)
int snprintf(char *, size_t, const char *, ...);
#endif
-#if ! HAVE_STRDUP
+#if !defined(HAVE_STRDUP)
char *strdup(const char *);
#endif
-#if ! HAVE_STRERROR
+#if !defined(HAVE_STRERROR)
char *strerror(int);
#endif
-#if ! HAVE_STRPTIME || ! HAVE_STRPTIME_D
+#if !defined(HAVE_STRPTIME) || !HAVE_DECL_STRPTIME
char *strptime(const char *, const char *, struct tm *);
#endif
-#if HAVE_QUAD_SUPPORT
-# if ! HAVE_STRTOLL && HAVE_LONG_LONG
+#if defined(HAVE_PRINTF_LONG_LONG) && defined(HAVE_LONG_LONG_INT)
+# if !defined(HAVE_STRTOLL)
long long strtoll(const char *, char **, int);
-# if ! defined(LLONG_MIN)
-# define LLONG_MIN (-0x7fffffffffffffffL-1)
-# endif
-# if ! defined(LLONG_MAX)
-# define LLONG_MAX (0x7fffffffffffffffL)
-# endif
# endif
-#else /* ! HAVE_QUAD_SUPPORT */
+# if !defined(LLONG_MIN)
+# define LLONG_MIN (-0x7fffffffffffffffLL-1)
+# endif
+# if !defined(LLONG_MAX)
+# define LLONG_MAX (0x7fffffffffffffffLL)
+# endif
+#else /* !(defined(HAVE_PRINTF_LONG_LONG) && defined(HAVE_LONG_LONG_INT)) */
# define NO_LONG_LONG 1
-#endif /* ! HAVE_QUAD_SUPPORT */
+#endif /* !(defined(HAVE_PRINTF_LONG_LONG) && defined(HAVE_LONG_LONG_INT)) */
-#if ! HAVE_TIMEGM
+#if !defined(HAVE_TIMEGM)
time_t timegm(struct tm *);
#endif
-#if ! HAVE_HSTRERROR
-char *strerror(int);
-#endif
-
-#if ! HAVE_STRLCAT
+#if !defined(HAVE_STRLCAT)
size_t strlcat(char *, const char *, size_t);
#endif
-#if ! HAVE_STRLCPY
+#if !defined(HAVE_STRLCPY)
size_t strlcpy(char *, const char *, size_t);
#endif
-#if ! HAVE_STRSEP
+#if !defined(HAVE_STRSEP)
char *strsep(char **stringp, const char *delim);
#endif
-#if ! HAVE_UTIMES
+#if !defined(HAVE_UTIMES)
int utimes(const char *, const struct timeval *);
#endif
-#if ! HAVE_MEMMOVE
+#if !defined(HAVE_MEMMOVE)
# define memmove(a,b,c) bcopy((b),(a),(c))
/* XXX: add others #defines for borken systems? */
#endif
-#if HAVE_GETPASSPHRASE
+#if defined(HAVE_GETPASSPHRASE)
# define getpass getpassphrase
#endif
-#if ! defined(MIN)
+#if !defined(MIN)
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
-#if ! defined(MAX)
+#if !defined(MAX)
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
-#if ! defined(timersub)
+#if !defined(timersub)
# define timersub(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
@@ -442,7 +462,7 @@ int utimes(const char *, const struct timeval *);
} while (0)
#endif
-#if ! defined(S_ISLNK)
+#if !defined(S_ISLNK)
# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
#endif
@@ -450,3 +470,28 @@ int utimes(const char *, const struct timeval *);
#define SECSPERHOUR 3600
#define SECSPERDAY 86400
#define TM_YEAR_BASE 1900
+
+#if defined(USE_SOCKS) /* (Dante) SOCKS5 */
+#define connect Rconnect
+#define bind Rbind
+#define getsockname Rgetsockname
+#define getpeername Rgetpeername
+#define accept Raccept
+#define rresvport Rrresvport
+#define bindresvport Rbindresvport
+#define gethostbyname Rgethostbyname
+#define gethostbyname2 Rgethostbyname2
+#define sendto Rsendto
+#define recvfrom Rrecvfrom
+#define recvfrom Rrecvfrom
+#define write Rwrite
+#define writev Rwritev
+#define send Rsend
+#define sendmsg Rsendmsg
+#define read Rread
+#define readv Rreadv
+#define recv Rrecv
+#define recvmsg Rrecvmsg
+#define getaddrinfo Rgetaddrinfo
+#define getipnodebyname Rgetipnodebyname
+#endif /* defined(USE_SOCKS) */