From ecbb26d3d4490968b5c86e82c286b3d75ad8091e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 15 Jul 2000 14:59:14 +1000 Subject: - Fixes for SunOS 4.1.4 from Gordon Atwood - Include floatingpoint.h for entropy.c - strerror replacement --- ChangeLog | 5 ++++- acconfig.h | 3 +++ bsd-misc.c | 7 +++++++ bsd-misc.h | 4 ++++ configure.in | 16 ++++++++++++++-- entropy.c | 7 ++++++- ssh_prng_cmds.in | 1 + 7 files changed, 39 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b3cd0b6..df4c735a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -20000713 +20000715 - (djm) OpenBSD CVS updates - provos@cvs.openbsd.org 2000/07/13 16:53:22 [aux.c readconf.c servconf.c ssh.h] @@ -16,6 +16,9 @@ - djm@cvs.openbsd.org 2000/07/14 22:01:38 [ssh-keygen.c ssh.c] Always create ~/.ssh with mode 700; ok Markus + - Fixes for SunOS 4.1.4 from Gordon Atwood + - Include floatingpoint.h for entropy.c + - strerror replacement 20000712 - (djm) Remove -lresolve for Reliant Unix diff --git a/acconfig.h b/acconfig.h index 4528be67..358390bc 100644 --- a/acconfig.h +++ b/acconfig.h @@ -6,6 +6,9 @@ @TOP@ +/* Define if your system defines sys_errlist[] */ +#undef HAVE_SYS_ERRLIST + /* Define if your system choked on IP TOS setting */ #undef IP_TOS_IS_BROKEN diff --git a/bsd-misc.c b/bsd-misc.c index c22cde32..e6b529e1 100644 --- a/bsd-misc.c +++ b/bsd-misc.c @@ -157,3 +157,10 @@ int seteuid(uid_t euid) return(setreuid(-1,euid)); } #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ + +#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) +const char *strerror(void) +{ + return(sys_errlist[errno]); +} +#endif /* !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) */ diff --git a/bsd-misc.h b/bsd-misc.h index cdf8e2b6..76b4e1a7 100644 --- a/bsd-misc.h +++ b/bsd-misc.h @@ -58,4 +58,8 @@ int innetgr(const char *netgroup, const char *host, int seteuid(uid_t euid); #endif /* !defined(HAVE_SETEUID) && defined(HAVE_SETREUID) */ +#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) +const char *strerror(void); +#endif /* !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) */ + #endif /* _BSD_MISC_H */ diff --git a/configure.in b/configure.in index 0b8047a3..92659857 100644 --- a/configure.in +++ b/configure.in @@ -216,10 +216,10 @@ if test -z "$no_libnsl" ; then fi # Checks for header files. -AC_CHECK_HEADERS(bstring.h endian.h lastlog.h limits.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.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/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h usersec.h util.h utmp.h utmpx.h) +AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h lastlog.h limits.h login.h maillock.h netdb.h netgroup.h netinet/in_systm.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/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h time.h usersec.h util.h utmp.h utmpx.h) # Checks for library functions. -AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage inet_aton innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop) +AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage inet_aton innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid sigaction sigvec snprintf strerror strlcat strlcpy strsep vsnprintf vhangup _getpty __b64_ntop) dnl checks for time functions AC_CHECK_FUNCS(gettimeofday time) dnl checks for libutil functions @@ -724,6 +724,18 @@ if test "x$ac_cv_libc_defines___progname" = "xyes" ; then fi +AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ + AC_TRY_LINK([], + [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], + [ ac_cv_libc_defines_sys_errlist="yes" ], + [ ac_cv_libc_defines_sys_errlist="no" ] + ) +]) +if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then + AC_DEFINE(HAVE_SYS_ERRLIST) +fi + + # Looking for programs, paths and files AC_ARG_WITH(rsh, [ --with-rsh=PATH Specify path to remote shell program ], diff --git a/entropy.c b/entropy.c index 84276099..aa62650a 100644 --- a/entropy.c +++ b/entropy.c @@ -35,7 +35,12 @@ #include #include -RCSID("$Id: entropy.c,v 1.17 2000/07/09 12:42:33 djm Exp $"); +/* SunOS 4.4.4 needs this */ +#ifdef HAVE_FLOATINGPOINT_H +# include +#endif /* HAVE_FLOATINGPOINT_H */ + +RCSID("$Id: entropy.c,v 1.18 2000/07/15 04:59:15 djm Exp $"); #ifndef offsetof # define offsetof(type, member) ((size_t) &((type *)0)->member) diff --git a/ssh_prng_cmds.in b/ssh_prng_cmds.in index df45ed22..d7389d7e 100644 --- a/ssh_prng_cmds.in +++ b/ssh_prng_cmds.in @@ -15,6 +15,7 @@ "netstat -an" @PROG_NETSTAT@ 0.05 "netstat -in" @PROG_NETSTAT@ 0.05 "netstat -rn" @PROG_NETSTAT@ 0.02 +"netstat -pn" @PROG_NETSTAT@ 0.02 "netstat -s" @PROG_NETSTAT@ 0.02 "arp -a -n" @PROG_ARP@ 0.02 -- cgit v1.2.3