diff --git a/ChangeLog b/ChangeLog index 701bf403f..ec5ddac55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +20000115 + - Add --with-xauth-path configure directive and explicit test for + /usr/openwin/bin/xauth for Solaris systems. Report from Anders + Nordby + - Fix incorrect detection of /dev/ptmx on Linux systems that lack + openpty. Report from John Seifarth + - Look for intXX_t and u_intXX_t in sys/bitypes.h if they are not in + sys/types.h. Fixes problems on SCO, report from Gary E. Miller + + - Use __snprintf and __vnsprintf if they are found where snprintf and + vnsprintf are lacking. Suggested by Ben Taylor + and others. + 20000114 - Merged OpenBSD IPv6 patch: - [sshd.c sshd.8 sshconnect.c ssh.h ssh.c servconf.h servconf.c scp.1] diff --git a/configure.in b/configure.in index ab175d409..06a770764 100644 --- a/configure.in +++ b/configure.in @@ -11,9 +11,7 @@ AC_PROG_INSTALL AC_CHECK_PROG(AR, ar, ar) AC_PATH_PROG(PERL, perl) AC_SUBST(PERL) -AC_PATH_PROG(xauth_path, xauth) -dnl Use ip address instead of hostname in $DISPLAY AC_ARG_WITH(rsh, [ --with-rsh=PATH Specify path to remote shell program ], [ @@ -26,6 +24,21 @@ AC_ARG_WITH(rsh, ] ) +AC_ARG_WITH(xauth-path, + [ --with-xauth-path=PATH Specify path to xauth program ], + [ + if test "x$withval" != "$xno" ; then + AC_DEFINE_UNQUOTED(XAUTH_PATH, "$withval") + fi + ], + [ + AC_PATH_PROG(xauth_path, xauth) + if test ! -z "$xauth_path" -a -x "/usr/openwin/bin/xauth" ; then + xauth_path="/usr/openwin/bin/xauth" + fi + ] +) + if test ! -z "$xauth_path" ; then AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path") fi @@ -70,6 +83,9 @@ case "$host" in no_libsocket=1 no_libnsl=1 ;; +*-*-linux*) + no_dev_ptmx=1 + ;; *-*-solaris*) AC_DEFINE(USE_UTMPX) ;; @@ -125,10 +141,10 @@ if test -z "$no_libnsl" ; then fi dnl Checks for header files. -AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) +AC_CHECK_HEADERS(bstring.h endian.h lastlog.h login.h maillock.h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/time.h sys/ttcompat.h util.h utmp.h utmpx.h) dnl Checks for library functions. -AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo _getpty innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf) +AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getpagesize getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty __snprintf __vsnprintf) AC_CHECK_FUNC(login, [AC_DEFINE(HAVE_LOGIN)], @@ -154,6 +170,7 @@ AC_TRY_COMPILE( [ AC_DEFINE(HAVE_INTXX_T) AC_MSG_RESULT(yes) + have_intxx_t=1 ], [AC_MSG_RESULT(no)] ) @@ -165,10 +182,32 @@ AC_TRY_COMPILE( [ AC_DEFINE(HAVE_U_INTXX_T) AC_MSG_RESULT(yes) + have_u_intxx_t=1 ], [AC_MSG_RESULT(no)] ) +if test -z "$have_u_intxx_t" -a -z "$have_intxx_t" -a \ + "x$ac_cv_header_sys_bitypes_h" = "xyes" +then + AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) + AC_TRY_COMPILE( + [#include ], + [ + u_int16_t c; u_int32_t d; + int16_t e; int32_t f; + c = 1235; d = 1235; + e = 1235; f = 1235; + ], + [ + AC_DEFINE(HAVE_U_INTXX_T) + AC_DEFINE(HAVE_INTXX_T) + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no)] + ) +fi + AC_MSG_CHECKING([for uintXX_t types]) AC_TRY_COMPILE( [#include ], @@ -468,7 +507,9 @@ AC_ARG_WITH(dante, ] ) -AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) +if test ! -z "$no_dev_ptmx" ; then + AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) +fi AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) AC_MSG_CHECKING([whether libc defines __progname]) diff --git a/defines.h b/defines.h index d2f61e269..9c88f2e85 100644 --- a/defines.h +++ b/defines.h @@ -3,9 +3,13 @@ /* Necessary headers */ -#include /* For u_intXX_t */ +#include #include /* For SHUT_XXXX */ +#ifdef HAVE_SYS_BITYPES_H +# include /* For u_intXX_t */ +#endif + #ifdef HAVE_PATHS_H # include /* For _PATH_XXX */ #endif @@ -232,4 +236,13 @@ typedef unsigned int size_t; # define PAM_STRERROR(a,b) pam_strerror((a),(b)) #endif +/* Solaris doesn't have a public [v]snprintf() function, but it has */ +/* __[v]snprintf() */ +#if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF) +# define snprintf __snprintf +#endif /* !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF) */ +#if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF) +# define vsnprintf __vsnprintf +#endif /* !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF) */ + #endif /* _DEFINES_H */