FreeBSD Bugzilla – Attachment 87926 Details for
Bug 124637
[patch] games/powwow up to 1.2.13, sgtty -> termios conversion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 5.85 KB, created by
Alex Kozlov
on 2008-06-16 11:00:09 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alex Kozlov
Created:
2008-06-16 11:00:09 UTC
Size:
5.85 KB
patch
obsolete
>Index: games/powwow/files/patch-follow.c >@@ -1,11 +1,65 @@ >---- follow.c.orig Sat Oct 14 00:12:28 2006 >-+++ follow.c Sat Oct 14 00:12:43 2006 >-@@ -96,7 +96,7 @@ >- ioctl(0, TIOCGLTC, <csave); >- ttyb = ttybsave; >- ttyb.sg_flags = (ttyb.sg_flags|O_CBREAK) & ~O_ECHO; >-- ioctl(tty_read_fd, TIOCSETP, &ttyb); >-+ ioctl(0, TIOCSETP, &ttyb); >- ltc = ltcsave; >- ltc.t_suspc = -1; >+Index: follow.c >+@@ -13,7 +13,9 @@ >+ #include <sys/time.h> >+ #include <sys/types.h> >+ >+-#ifndef USE_SGTTY >++#ifdef POSIX >++# include <termios.h> >++#elif !defined(USE_SGTTY) >+ # ifdef APOLLO >+ # include "/sys5.3/usr/include/sys/termio.h" >+ # else >+@@ -44,6 +46,9 @@ >+ # define O_CBREAK CBREAK >+ #endif >+ >++#ifdef POSIX >++typedef struct termios termiostruct; >++#else >+ #if defined(TCSETS) || defined(TCSETATTR) >+ # ifndef TCSETS /* cc for HP-UX SHOULD define this... */ >+ # define TCSETS TCSETATTR >+@@ -55,6 +60,7 @@ >+ # define TCGETS TCGETA >+ typedef struct termio termiostruct; >+ #endif >++#endif /* POSIX */ >+ >+ #ifdef VSUSP >+ # define O_SUSP VSUSP >+@@ -102,14 +108,22 @@ > ioctl(0, TIOCSLTC, <c); >+ #else /* not USE_SGTTY */ >+ termiostruct ttyb; >++#if POSIX >++ tcgetattr(0, &ttyb); >++#else >+ ioctl(0, TCGETS, &ttyb); >++#endif >+ ttybsave = ttyb; >+ ttyb.c_lflag &= ~(ECHO|ICANON); >+ ttyb.c_cc[VTIME] = 0; >+ ttyb.c_cc[VMIN] = 1; >+ /* disable the special handling of the suspend key (handle it ourselves) */ >+ ttyb.c_cc[O_SUSP] = 0; >++#if POSIX >++ tcsetattr(0, TCSANOW, &ttyb); >++#else >+ ioctl(0, TCSETS, &ttyb); >++#endif >+ #endif /* USE_SGTTY */ >+ } >+ >+@@ -123,7 +137,11 @@ >+ ioctl(0, TIOCSETC, &tcsave); >+ ioctl(0, TIOCSLTC, <csave); >+ #else /* not USE_SGTTY */ >++#if POSIX >++ tcsetattr(0, TCSANOW, &ttybsave); >++#else >+ ioctl(0, TCSETS, &ttybsave); >++#endif >+ #endif /* USE_SGTTY */ >+ } >+ >Index: games/powwow/files/patch-ptr.c >@@ -0,0 +1,17 @@ >+Index: ptr.c >+@@ -407,6 +407,7 @@ >+ return (char*)p; /* shortcut for NULL */ >+ } >+ >++#ifdef _GNU_SOURCE >+ /* >+ * find last occurrence of c in p >+ * return NULL if none found. >+@@ -427,6 +428,7 @@ >+ else >+ return NULL; >+ } >++#endif >+ >+ char *ptrrchr __P2 (ptr,p, char,c) >+ { >Index: games/powwow/files/patch-ptr.h >@@ -0,0 +1,10 @@ >+Index: ptr.h >+@@ -65,7 +65,7 @@ >+ /* TODO: watch memrchr, it is defined differently here than under _GNU_SOURCE, >+ * so it could cause bizarre results if a module makes use of a library that >+ * uses it */ >+-char *memrchr __P ((char *p, int lenp, char c)); >++//char *memrchr __P ((char *p, int lenp, char c)); >+ #endif >+ >+ #endif /* _PTR_H_ */ >Index: games/powwow/files/patch-tty.c >@@ -0,0 +1,88 @@ >+Index: tty.c >+@@ -33,7 +33,9 @@ >+ #include "tty.h" >+ #include "tcp.h" >+ >+-#ifndef USE_SGTTY >++#ifdef POSIX >++# include <termios.h> >++#elif !defined(USE_SGTTY) >+ # ifdef APOLLO >+ # include "/sys5.3/usr/include/sys/termio.h" >+ # else >+@@ -64,6 +66,9 @@ >+ # define O_CBREAK CBREAK >+ #endif >+ >++#ifdef POSIX >++typedef struct termios termiostruct; >++#else >+ #if defined(TCSETS) || defined(TCSETATTR) >+ # ifndef TCSETS /* cc for HP-UX SHOULD define this... */ >+ # define TCSETS TCSETATTR >+@@ -75,6 +80,7 @@ >+ # define TCGETS TCGETA >+ typedef struct termio termiostruct; >+ #endif >++#endif /* POSIX */ >+ >+ #ifdef VSUSP >+ # define O_SUSP VSUSP >+@@ -181,14 +187,22 @@ >+ ioctl(tty_read_fd, TIOCSLTC, <c); >+ #else /* not USE_SGTTY */ >+ termiostruct ttyb; >++#if POSIX >++ tcgetattr(tty_read_fd, &ttyb); >++#else >+ ioctl(tty_read_fd, TCGETS, &ttyb); >++#endif >+ ttybsave = ttyb; >+ ttyb.c_lflag &= ~(ECHO|ICANON); >+ ttyb.c_cc[VTIME] = 0; >+ ttyb.c_cc[VMIN] = 1; >+ /* disable the special handling of the suspend key (handle it ourselves) */ >+ ttyb.c_cc[O_SUSP] = 0; >++#if POSIX >++ tcsetattr(tty_read_fd, TCSANOW, &ttyb); >++#else >+ ioctl(tty_read_fd, TCSETS, &ttyb); >++#endif >+ #endif /* USE_SGTTY */ >+ >+ #ifdef USE_LOCALE >+@@ -216,7 +230,11 @@ >+ ioctl(tty_read_fd, TIOCSETC, &tcsave); >+ ioctl(tty_read_fd, TIOCSLTC, <csave); >+ #else /* not USE_SGTTY */ >++#if POSIX >++ tcsetattr(tty_read_fd, TCSANOW, &ttybsave); >++#else >+ ioctl(tty_read_fd, TCSETS, &ttybsave); >++#endif >+ #endif /* USE_SGTTY */ >+ tty_puts(kpadend); >+ tty_flush(); >+@@ -251,7 +269,11 @@ >+ #else /* not USE_SGTTY */ >+ int i; >+ termiostruct ttyb; >++#if POSIX >++ tcgetattr(tty_read_fd, &ttyb); >++#else >+ ioctl(tty_read_fd, TCGETS, &ttyb); >++#endif >+ if (linemode & LM_CHAR) { >+ /* char-by-char mode: disable all special keys and set raw mode */ >+ for(i = 0; i < NCCS; i++) >+@@ -266,7 +288,11 @@ >+ /* set cooked mode */ >+ ttyb.c_oflag |= OPOST; >+ } >++#if POSIX >++ tcsetattr(tty_read_fd, TCSANOW, &ttyb); >++#else >+ ioctl(tty_read_fd, TCSETS, &ttyb); >++#endif >+ #endif /* USE_SGTTY */ >+ } >Index: games/powwow/Makefile >@@ -6,7 +6,7 @@ > # > > PORTNAME= powwow >-PORTVERSION= 1.2.10 >+PORTVERSION= 1.2.13 > CATEGORIES= games > MASTER_SITES= http://hoopajoo.net/static/projects/ \ > ftp://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/ >@@ -15,19 +15,15 @@ > COMMENT= Client to play MUDs > > GNU_CONFIGURE= yes >-CONFIGURE_ARGS+= --enable-bsd > > MAN6= powwow.6 > > .include <bsd.port.pre.mk> > >-.if ${OSVERSION} >= 800034 >-BROKEN= does not compile >-.endif >- > pre-build: > @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/defines.h \ > ${WRKSRC}/list.c ${WRKSRC}/main.c ${WRKSRC}/cmd2.c ${WRKSRC}/beam.c >+ @${REINPLACE_CMD} -e 's|^DEFS = |DEFS = -DPOSIX |' ${WRKSRC}/Makefile > > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/powwow ${PREFIX}/bin >Index: games/powwow/distinfo >@@ -1,3 +1,3 @@ >-MD5 (powwow-1.2.10.tar.gz) = f8d948d5a0cb5fd1e74d05ad1420441a >-SHA256 (powwow-1.2.10.tar.gz) = fd556e876529ac5b1c8be915b9750a45ff5cde8ec88e66befe88a56844f9799b >-SIZE (powwow-1.2.10.tar.gz) = 257811 >+MD5 (powwow-1.2.13.tar.gz) = 42240a569c7fba837aa140f084de55ed >+SHA256 (powwow-1.2.13.tar.gz) = be22d1d8f12b89d70375e1657eb7d746a338d606a4afe29f8fa5b423bf7415ef >+SIZE (powwow-1.2.13.tar.gz) = 274569
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 124637
: 87926