From 8267bcbf07053783ca0663f04650b84c11012f80 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Sun, 7 Aug 1994 04:58:52 +0000 Subject: [PATCH] more posix and linux fixes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4059 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 2 ++ src/appl/bsd/krlogind.c | 5 +++++ src/appl/bsd/login.c | 3 +++ src/appl/bsd/logutil.c | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 4fa2de104..acef24ee2 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,6 +1,8 @@ Sun Aug 7 04:43:24 1994 Mark Eichin (eichin@cygnus.com) * krlogin.c (oob): FWRITE (and out) not needed w/POSIX_TERMIOS + * logutil.c: if EMPTY is missing, use UT_UNKNOWN instead. + * login.c (main): some systems just don't have TIOCLSET Fri Aug 5 18:47:00 1994 Mark Eichin (eichin@cygnus.com) diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index ef088dfef..808a2ab99 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -141,6 +141,7 @@ static char sccsid[] = "@(#)rlogind.c 5.17 (Berkeley) 8/31/88"; #include #endif +#ifndef POSIX_TERMIOS #ifdef SYSV #define USE_TERMIO #endif @@ -150,6 +151,7 @@ static char sccsid[] = "@(#)rlogind.c 5.17 (Berkeley) 8/31/88"; #else #include #endif /* USE_TERMIO */ +#endif /* POSIX_TERMIOS */ #include #include @@ -264,7 +266,10 @@ krb5_ticket *ticket = 0; struct utmp wtmp; #define MAXRETRIES 4 +#ifndef UT_NAMESIZE +/* linux defines it directly in */ #define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name) +#endif #define MAX_PROG_NAME 16 char lusername[UT_NAMESIZE+1]; diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index b6bb9c99d..0cbf16a8e 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -378,7 +378,10 @@ main(argc, argv) #if !defined(_AIX) ioctlval = 0; +#ifndef TIOCLSET +/* linux, sco don't have this line discipline interface */ (void)ioctl(0, TIOCLSET, (char *)&ioctlval); +#endif (void)ioctl(0, TIOCNXCL, (char *)0); (void)fcntl(0, F_SETFL, ioctlval); #endif diff --git a/src/appl/bsd/logutil.c b/src/appl/bsd/logutil.c index 9cd8c6664..c4e44eff7 100644 --- a/src/appl/bsd/logutil.c +++ b/src/appl/bsd/logutil.c @@ -40,6 +40,11 @@ #endif #endif +#ifndef EMPTY +/* linux has UT_UNKNOWN but not EMPTY */ +#define EMPTY UT_UNKNOWN +#endif + void login(ut) struct utmp *ut; { -- 2.26.2