Merge tnftp 20050625

This commit is contained in:
lukem 2005-06-25 07:00:41 +00:00
parent aba42254f1
commit aec9f97f6a
7 changed files with 324 additions and 480 deletions

View file

@ -1,4 +1,34 @@
NetBSD: ChangeLog,v 1.27 2005/06/10 04:40:13 lukem Exp
NetBSD: ChangeLog,v 1.30 2005/06/25 06:27:32 lukem Exp
Sat Jun 25 06:27:00 UTC 2005 lukem
* Release as "tnftp 20050625"
* Simplify the detection & replacement of dirname() and fparseln()
and just use AC_REPLACE_FUNCS.
(We don't care if the vendor has a working version in -lgen or -lutil
instead of -lc; they'll get our replacement version in that case).
Fixes build issue on older Darwin where the previous autoconf check
wouldn't find dirname() in the default system libraries.
* Only provide a prototype for dirname() if we can't find one in
<libgen.h>
* Search for NS_IN6ADDRSZ instead of IN6ADDRSZ, since we use the
former and not the latter and older Darwin has the former.
(This allows INET6 support to be enabled on Darwin 7.9.0)
Mon Jun 13 09:22:13 UTC 2005 lukem
* Tweak SOCKS5 support:
acconfig.h:
- fix a comment
- ensure close() is replaced
- list entries in the same order as aclocal.m4
(and the SOCKS5 FAQ)
aclocal.m4:
- ensure getpeername() is replaced
- don't replace listen() twice
Fri Jun 10 04:39:33 UTC 2005 lukem

View file

@ -1,4 +1,4 @@
/* NetBSD: acconfig.h,v 1.6 2005/05/11 03:10:05 lukem Exp */
/* NetBSD: acconfig.h,v 1.8 2005/06/25 06:14:08 lukem Exp */
@TOP@
@BOTTOM@
@ -30,8 +30,8 @@
/* Define if `struct addrinfo' exists in <netdb.h> */
#undef HAVE_ADDRINFO
/* Define if IN6ADDRSZ exists in <arpa/nameser.h> */
#undef HAVE_IN6ADDRSZ
/* Define if NS_IN6ADDRSZ exists in <arpa/nameser.h> */
#undef HAVE_NS_IN6ADDRSZ
/*
* Define if <netdb.h> contains AI_NUMERICHOST et al.
@ -45,6 +45,9 @@
/* Define if h_errno exists in <netdb.h> */
#undef HAVE_H_ERRNO_D
/* Define if dirname() is declared in <libgen.h> */
#undef HAVE_DIRNAME_D
/* Define if fclose() is declared in <stdio.h> */
#undef HAVE_FCLOSE_D
@ -75,27 +78,28 @@
/*
* Define this if compiling with SOCKS (the firewall traversal library).
* Also, you must define connect, getsockname, bind, accept, listen, and
* select to their R-versions.
* 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
#undef getpeername
#undef read
#undef recv
#undef recvfrom
#undef rresvport
#undef send
#undef sendto
#undef shutdown
#undef write

View file

@ -1,4 +1,4 @@
dnl NetBSD: aclocal.m4,v 1.3 2005/05/11 03:03:42 lukem Exp
dnl NetBSD: aclocal.m4,v 1.4 2005/06/13 09:20:21 lukem Exp
dnl
dnl
@ -223,6 +223,7 @@ AC_DEFUN(AC_LIBRARY_SOCKS, [
AC_DEFINE(SOCKS4)
AC_DEFINE(connect, Rconnect)
AC_DEFINE(getsockname, Rgetsockname)
AC_DEFINE(getpeername, Rgetpeername)
AC_DEFINE(bind, Rbind)
AC_DEFINE(accept, Raccept)
AC_DEFINE(listen, Rlisten)
@ -247,7 +248,6 @@ AC_DEFUN(AC_LIBRARY_SOCKS, [
AC_DEFINE(write,SOCKSwrite)
AC_DEFINE(rresvport,SOCKSrresvport)
AC_DEFINE(shutdown,SOCKSshutdown)
AC_DEFINE(listen,SOCKSlisten)
AC_DEFINE(close,SOCKSclose)
AC_DEFINE(dup,SOCKSdup)
AC_DEFINE(dup2,SOCKSdup2)

View file

@ -1,5 +1,5 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* NetBSD: config.h.in,v 1.10 2005/06/01 15:10:21 lukem Exp */
/* NetBSD: config.h.in,v 1.12 2005/06/25 06:14:57 lukem Exp */
/* Define if on AIX 3.
@ -144,6 +144,9 @@
/* Define if you have the <err.h> header file. */
#undef HAVE_ERR_H
/* Define if you have the <libgen.h> header file. */
#undef HAVE_LIBGEN_H
/* Define if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
@ -213,8 +216,8 @@
/* Define if `struct addrinfo' exists in <netdb.h> */
#undef HAVE_ADDRINFO
/* Define if IN6ADDRSZ exists in <arpa/nameser.h> */
#undef HAVE_IN6ADDRSZ
/* Define if NS_IN6ADDRSZ exists in <arpa/nameser.h> */
#undef HAVE_NS_IN6ADDRSZ
/*
* Define if <netdb.h> contains AI_NUMERICHOST et al.
@ -228,6 +231,9 @@
/* Define if h_errno exists in <netdb.h> */
#undef HAVE_H_ERRNO_D
/* Define if dirname() is declared in <libgen.h> */
#undef HAVE_DIRNAME_D
/* Define if fclose() is declared in <stdio.h> */
#undef HAVE_FCLOSE_D
@ -258,27 +264,28 @@
/*
* Define this if compiling with SOCKS (the firewall traversal library).
* Also, you must define connect, getsockname, bind, accept, listen, and
* select to their R-versions.
* 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
#undef getpeername
#undef read
#undef recv
#undef recvfrom
#undef rresvport
#undef send
#undef sendto
#undef shutdown
#undef write

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
dnl NetBSD: configure.in,v 1.16 2005/06/02 00:20:32 lukem Exp
dnl NetBSD: configure.in,v 1.17 2005/06/25 06:14:08 lukem Exp
dnl
dnl configure.in --
dnl process this file with autoconf to produce a configure script.
dnl
AC_REVISION([Revision: 1.16])dnl
AC_REVISION([Revision: 1.17])dnl
AC_INIT(tnftp.h)
@ -37,13 +37,11 @@ AC_AIX
dnl Checks for libraries.
dnl
AC_SEARCH_LIBS(fparseln, [util], [have_fparseln=yes], [have_fparseln=no])
if test $opt_editcomplete = yes; then
AC_SEARCH_LIBS(tgetent, [termcap termlib curses ncurses tinfo], ,
AC_MSG_ERROR([no relevant library found containing tgetent]))
AC_SEARCH_LIBS(el_init, [edit], [have_libedit=yes], [have_libedit=no])
fi
AC_SEARCH_LIBS(dirname, [gen], [have_dirname=yes], [have_dirname=no])
AC_LIBRARY_NET
AC_LIBRARY_SOCKS
if test -n "$socks"; then
@ -59,8 +57,8 @@ dnl
AC_CONFIG_HEADER(config.h)
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/nameser.h err.h regex.h paths.h poll.h sys/poll.h \
sys/syslimits.h termcap.h util.h libutil.h vis.h])
AC_CHECK_HEADERS([arpa/nameser.h err.h libgen.h regex.h paths.h poll.h \
sys/poll.h sys/syslimits.h termcap.h util.h libutil.h vis.h])
dnl Checks for typedefs, structures, and compiler characteristics.
@ -119,11 +117,13 @@ if test $opt_ipv6 = yes; then
], [AC_DEFINE(HAVE_SOCKADDR_IN6, 1)])
if test $ac_cv_header_arpa_nameser_h = yes; then
AC_MSG_TRY_COMPILE([for IN6ADDRSZ in arpa/nameser.h],
ftp_cv_HAVE_IN6ADDRSZ, [
AC_MSG_TRY_COMPILE([for NS_IN6ADDRSZ in arpa/nameser.h],
ftp_cv_HAVE_NS_IN6ADDRSZ, [
#include <sys/types.h>
#include <arpa/nameser.h>
], [ int X = IN6ADDRSZ ], [AC_DEFINE(HAVE_IN6ADDRSZ, 1)])
],
[ int X = NS_IN6ADDRSZ ],
[ AC_DEFINE(HAVE_NS_IN6ADDRSZ, 1) ])
fi
fi
@ -158,6 +158,10 @@ AC_MSG_TRY_COMPILE([for h_errno declaration], ftp_cv_HAVE_H_ERRNO_D, [
#include <netdb.h>
], [ int X = h_errno ], [AC_DEFINE(HAVE_H_ERRNO_D, 1)])
AC_MSG_TRY_COMPILE([for dirname() declaration], ftp_cv_HAVE_DIRNAME_D, [
#include <libgen.h>
], [ char *(*X)() = dirname ], [ AC_DEFINE(HAVE_DIRNAME_D, 1)])
AC_MSG_TRY_COMPILE([for fclose() declaration], ftp_cv_HAVE_FCLOSE_D, [
#include <stdio.h>
], [ int (*X)() = fclose ], [AC_DEFINE(HAVE_FCLOSE_D, 1)])
@ -184,21 +188,17 @@ AC_MSG_TRY_COMPILE([for pclose() declaration], ftp_cv_HAVE_PCLOSE_D, [
dnl Checks for library functions.
dnl
AC_REPLACE_FUNCS([err fgetln fseeko getaddrinfo getnameinfo inet_ntop \
inet_pton mkstemp setprogname sl_init snprintf strdup \
strerror strlcat strlcpy strptime strsep strunvis \
AC_REPLACE_FUNCS([dirname err fgetln fparseln fseeko getaddrinfo getnameinfo \
inet_ntop inet_pton mkstemp setprogname sl_init snprintf \
strdup strerror strlcat strlcpy strptime strsep strunvis \
strvis timegm usleep utimes])
AC_CHECK_FUNCS([gethostbyname2 getpassphrase getpgrp memmove select])
if test $have_fparseln != yes; then
AC_REPLACE_FUNCS(fparseln)
fi
if test $have_dirname != yes; then
AC_REPLACE_FUNCS(dirname)
fi
if test $ac_cv_func_getpgrp = yes; then
AC_FUNC_GETPGRP
fi
dnl Always replace glob(3); the vendor's may not be secure.
dnl
LIBOBJS="$LIBOBJS glob.o"
if test $ac_cv_func_strptime = yes; then

View file

@ -1,7 +1,7 @@
/* NetBSD: tnftp.h,v 1.19 2005/06/10 04:40:13 lukem Exp */
/* NetBSD: tnftp.h,v 1.21 2005/06/25 06:27:32 lukem Exp */
#define FTP_PRODUCT "tnftp"
#define FTP_VERSION "20050610"
#define FTP_VERSION "20050625"
#include "config.h"
@ -22,7 +22,6 @@
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <limits.h>
#ifdef HAVE_RFC2553_NETDB
#include <netdb.h>
@ -121,6 +120,10 @@ struct pollfd {
# include "ftpglob.h"
#endif
#if HAVE_LIBGEN_H
# include <libgen.h>
#endif
#if HAVE_PATHS_H
# include <paths.h>
#endif
@ -179,7 +182,7 @@ typedef unsigned short sa_family_t;
typedef unsigned int socklen_t;
#endif
#if HAVE_AF_INET6 && HAVE_SOCKADDR_IN6 && HAVE_IN6ADDRSZ
#if HAVE_AF_INET6 && HAVE_SOCKADDR_IN6 && HAVE_NS_IN6ADDRSZ
# define INET6
#endif
@ -312,7 +315,7 @@ extern int optind;
int pclose(FILE *);
#endif
#if ! HAVE_DIRNAME
#if ! HAVE_DIRNAME_D
char *dirname(char *);
#endif