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)
#include <sys/stropts.h>
#endif
+#ifndef POSIX_TERMIOS
#ifdef SYSV
#define USE_TERMIO
#endif
#else
#include <sgtty.h>
#endif /* USE_TERMIO */
+#endif /* POSIX_TERMIOS */
#include <netdb.h>
#include <syslog.h>
struct utmp wtmp;
#define MAXRETRIES 4
+#ifndef UT_NAMESIZE
+/* linux defines it directly in <utmp.h> */
#define UT_NAMESIZE sizeof(((struct utmp *)0)->ut_name)
+#endif
#define MAX_PROG_NAME 16
char lusername[UT_NAMESIZE+1];
#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
#endif
#endif
+#ifndef EMPTY
+/* linux has UT_UNKNOWN but not EMPTY */
+#define EMPTY UT_UNKNOWN
+#endif
+
void login(ut)
struct utmp *ut;
{