From 074c4cbcd3b9aac3eff1c5173bd37f41086963e7 Mon Sep 17 00:00:00 2001 From: dtucker Date: Thu, 8 Apr 2004 06:16:06 +0000 Subject: [PATCH] - (dtucker) [defines.h loginrec.c] Define UT_LINESIZE if not defined and simplify loginrec.c. ok tim@ --- ChangeLog | 2 ++ defines.h | 4 ++++ loginrec.c | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a247735..22183643 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ pty name on Linux 2.6.x systems. Patch from jpe at eisenmenger.org. - (bal) [monitor.c monitor_wrap.c] Second try. Put the zlib.h headers back and #undef TARGET_OS_MAC instead. (Bug report pending with Apple) + - (dtucker) [defines.h loginrec.c] Define UT_LINESIZE if not defined and + simplify loginrec.c. ok tim@ 20040407 - (dtucker) [session.c] Flush stdout after displaying loginmsg. From diff --git a/defines.h b/defines.h index 6e539079..4ae40dac 100644 --- a/defines.h +++ b/defines.h @@ -615,6 +615,10 @@ struct winsize { #endif +#ifndef UT_LINESIZE +# define UT_LINESIZE 8 +#endif + /* I hope that the presence of LASTLOG_FILE is enough to detect this */ #if defined(LASTLOG_FILE) && !defined(DISABLE_LASTLOG) # define USE_LASTLOG diff --git a/loginrec.c b/loginrec.c index aa8f5b6c..897921c6 100644 --- a/loginrec.c +++ b/loginrec.c @@ -1354,11 +1354,7 @@ static int syslogin_perform_logout(struct logininfo *li) { # ifdef HAVE_LOGOUT -# ifdef UT_LINESIZE char line[UT_LINESIZE]; -# else - char line[8]; -# endif (void)line_stripname(line, li->line, sizeof(line)); -- 2.45.2