diff --git a/ChangeLog b/ChangeLog index 02c477133..a79bb19c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +20000530 + - Define atexit for old Solaris + 20000520 - Xauth fix from Markus Friedl - Don't touch utmp if USE_UTMPX defined diff --git a/configure.in b/configure.in index a8b9794fd..3c6694dba 100644 --- a/configure.in +++ b/configure.in @@ -135,7 +135,7 @@ fi AC_CHECK_HEADERS(bstring.h endian.h lastlog.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/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h) # Checks for library functions. -AC_CHECK_FUNCS(arc4random b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty __b64_ntop) +AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_af clock freeaddrinfo gai_strerror getaddrinfo getnameinfo getrusage innetgr md5_crypt memmove mkdtemp on_exit openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf vhangup _getpty __b64_ntop) AC_CHECK_FUNC(login, [AC_DEFINE(HAVE_LOGIN)], diff --git a/defines.h b/defines.h index 5eddf2e10..ef9130982 100644 --- a/defines.h +++ b/defines.h @@ -293,4 +293,8 @@ typedef int ssize_t; # define memmove(s1, s2, n) bcopy((s2), (s1), (n)) #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ +#if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) +# define atexit(a) on_exit(a) +#endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */ + #endif /* _DEFINES_H */