FreeBSD Bugzilla – Attachment 105232 Details for
Bug 145643
japanese/mh: fix compile error which is caused by replacing 'utmp.h' to 'utmpx.h'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.shar
file.shar (text/plain), 3.18 KB, created by
YAMAMOTO
on 2010-04-12 10:00:05 UTC
(
hide
)
Description:
file.shar
Filename:
MIME Type:
Creator:
YAMAMOTO
Created:
2010-04-12 10:00:05 UTC
Size:
3.18 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># ./files/patch-uip:rcvtty.c ># ./files/patch-uip:slocal.c ># >echo x - ./files/patch-uip:rcvtty.c >sed 's/^X//' >./files/patch-uip:rcvtty.c << '818b4c79655ac1dad35c0f218f83e31b' >X--- uip/rcvtty.c.orig 2001-04-05 01:05:17.000000000 +0900 >X+++ uip/rcvtty.c 2010-04-12 17:36:19.000000000 +0900 >X@@ -12,7 +12,11 @@ >X #include "../zotnet/tws.h" >X #include <signal.h> >X #include <sys/stat.h> >X+#include <sys/param.h> >X #ifndef TTYD >X+#if __FreeBSD_version > 900007 >X+#include <utmpx.h> >X+#else /* __FreeBSD_version > 900007 */ >X #include <utmp.h> >X #ifndef UTMP_FILENAME >X #ifdef UTMP_FILE >X@@ -25,6 +29,7 @@ >X #endif >X #endif >X #endif /* UTMP_FILENAME */ >X+#endif /* __FreeBSD_version > 900007 */ >X #endif /* not TTYD */ >X #ifdef LOCALE >X #include <locale.h> >X@@ -110,8 +115,12 @@ >X *vec[MAXARGS]; >X #ifndef TTYD >X char tty[BUFSIZ]; >X+#if __FreeBSD_version > 900007 >X+ struct utmpx *ut; >X+#else /* __FreeBSD_version > 900007 */ >X struct utmp ut; >X register FILE *uf; >X+#endif /* __FreeBSD_version > 900007 */ >X #endif /* not TTYD */ >X >X #ifdef BSD43 >X@@ -200,6 +209,13 @@ >X >X user = getusr (); >X #ifndef TTYD >X+#if __FreeBSD_version > 900007 >X+ ut = getutxuser(user); >X+ if (ut != NULL) { >X+ (void) strncpy (tty, ut->ut_line, sizeof ut->ut_line); >X+ alert (tty, md); >X+ } >X+#else /* __FreeBSD_version > 900007 */ >X if ((uf = fopen (UTMP_FILENAME, "r")) == NULL) >X exit (RCV_MBX); >X while (fread ((char *) &ut, sizeof ut, 1, uf) == 1) >X@@ -212,6 +228,7 @@ >X alert (tty, md); >X } >X (void) fclose (uf); >X+#endif /* __FreeBSD_version > 900007 */ >X #else /* TTYD */ >X alert (user, md); >X #endif /* TTYD */ >818b4c79655ac1dad35c0f218f83e31b >echo x - ./files/patch-uip:slocal.c >sed 's/^X//' >./files/patch-uip:slocal.c << 'bad534e727880848b3ceded2c8d3b1d5' >X--- uip/slocal.c.orig 2000-12-04 21:09:38.000000000 +0900 >X+++ uip/slocal.c 2010-04-12 17:10:12.000000000 +0900 >X@@ -36,6 +36,10 @@ >X #endif /* NOIOCTLH */ >X #endif /* not V7 */ >X #include <sys/stat.h> >X+#include <sys/param.h> >X+#if __FreeBSD_version > 900007 >X+#include <utmpx.h> >X+#else /* __FreeBSD_version > 900007 */ >X #include <utmp.h> >X #ifndef UTMP_FILENAME >X #ifdef UTMP_FILE >X@@ -48,6 +52,7 @@ >X #endif >X #endif >X #endif /* UTMP_FILENAME */ >X+#endif /* __FreeBSD_version > 900007 */ >X #ifdef LOCALE >X #include <locale.h> >X #endif >X@@ -938,6 +943,24 @@ >X >X /* */ >X >X+#if __FreeBSD_version > 900007 >X+static int logged_in (void) { >X+ if (utmped) { >X+ return utmped; >X+ } >X+ else { >X+ struct utmpx* ut = NULL; >X+ >X+ ut = getutxuser(user); >X+ if (ut != NULL) { >X+ return (utmped = DONE); >X+ } >X+ else { >X+ return (utmped = NOTOK); >X+ } >X+ } >X+} >X+#else /* __FreeBSD_version > 900007 */ >X static int logged_in () { >X struct utmp ut; >X register FILE *uf; >X@@ -963,6 +986,7 @@ >X (void) fclose (uf); >X return (utmped = NOTOK); >X } >X+#endif /* __FreeBSD_version > 900007 */ >X >X >X static int timely (t1, t2) >bad534e727880848b3ceded2c8d3b1d5 >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 145643
: 105232