From: Geling, Gary <Gary.Geling@dreo.dnd.ca>
Subject: metamail - fix?
Date: Fri, 9 May 1997 12:54:55 -0400 (EDT) [thread overview]
Message-ID: <199705091654.MAA11404@algary.abrdr.dreo.dnd.ca> (raw)
Greetings,
Regarding metamail 2.7-7 on AXP, RH4.1
The current include files for RH4.1 do not handle 'old' stuff
very well. metamail used the old termio structure and included termio.h.
This file quickly redirected this to termios.h and sys/ioctl.h probably
breaking the FAQ port error of confusing termio with termios. The only
way to get termio actually defined was to define, before any system includes,
the variable _LOOSE_KERNEL_NAMES. But this resulted in a NON-working
metamail, (hung on multipart messages, trying to reset the terminal state).
Easiest solution: convert all references to termio and TC---A- to
termios and TC---S- respectively. Seems to work like a charm.
Included is the diff -u file.
TTFN
Gary
--
--------------------------
Gary W. Geling
Pulsed-Doppler Radar Group (PDR)
Aerospace Radar and Navigation (ARN)
Defence Research Establishment Ottawa (DREO)
WWW: http://www.dreo.dnd.ca
e-mail: Gary.Geling@dreo.dnd.ca
613-998-2063 FAX 613-990-8906
--- metamail.c.orig Fri May 9 12:27:14 1997
+++ metamail.c Fri May 9 12:28:45 1997
@@ -48,7 +48,7 @@
#ifndef AMIGA
#ifdef SYSV
-#include <termio.h>
+#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#else /* SYSV */
@@ -2378,7 +2378,7 @@
int HasSavedTtyState=0;
#if !defined(AMIGA) && !defined(MSDOS)
#ifdef SYSV
-static struct termio MyTtyStateIn, MyTtyStateOut;
+static struct termios MyTtyStateIn, MyTtyStateOut;
#else
static struct sgttyb MyTtyStateIn, MyTtyStateOut;
#endif
@@ -2388,8 +2388,8 @@
/* Bogus -- would like a good portable way to reset the terminal state here */
#if !defined(AMIGA) && !defined(MSDOS)
#ifdef SYSV
- ioctl(fileno(stdin), TCGETA, &MyTtyStateIn);
- ioctl(fileno(stdout), TCGETA, &MyTtyStateOut);
+ ioctl(fileno(stdin), TCGETS, &MyTtyStateIn);
+ ioctl(fileno(stdout), TCGETS, &MyTtyStateOut);
#else
gtty(fileno(stdin), &MyTtyStateIn);
gtty(fileno(stdout), &MyTtyStateOut);
@@ -2402,8 +2402,8 @@
#if !defined(AMIGA) && !defined(MSDOS)
#ifdef SYSV
if (HasSavedTtyState) {
- ioctl(fileno(stdout), TCSETA, &MyTtyStateOut);
- ioctl(fileno(stdin), TCSETA, &MyTtyStateIn);
+ ioctl(fileno(stdout), TCSETS, &MyTtyStateOut);
+ ioctl(fileno(stdin), TCSETS, &MyTtyStateIn);
}
#else
if (HasSavedTtyState) {
@@ -2684,14 +2684,14 @@
StartRawStdin() {
#if !defined(AMIGA) && !defined(MSDOS)
#ifdef SYSV
- struct termio orterm, fterm;
- ioctl(0, TCGETA, &orterm); /* get current (i.e. cooked) termio */
- fterm = orterm; /* get termio to modify */
+ struct termios orterm, fterm;
+ ioctl(0, TCGETS, &orterm); /* get current (i.e. cooked) termios */
+ fterm = orterm; /* get termios to modify */
fterm.c_lflag &= ~ICANON; /* clear ICANON giving raw mode */
fterm.c_cc[VMIN] = 1; /* set MIN char count to 1 */
fterm.c_cc[VTIME] = 0; /* set NO time limit */
- return ioctl(0, TCSETAW, &fterm); /* modify termio for raw mode */
+ return ioctl(0, TCSETSW, &fterm); /* modify termios for raw mode */
#else
struct sgttyb ts;
gtty(fileno(stdin), &ts);
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
reply other threads:[~1997-05-09 16:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox