pkgsrc/x11/xmindpath/patches/patch-ab

58 lines
1.4 KiB
Text

$NetBSD: patch-ab,v 1.3 2007/10/01 11:02:45 rillig Exp $
--- main.c.orig 1998-10-01 01:58:17.000000000 +0200
+++ main.c 2007-10-01 12:55:46.375715000 +0200
@@ -33,16 +33,20 @@
*/
#include <sys/time.h>
+#include <err.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <termios.h>
#include <signal.h>
+#include <string.h>
#include <X11/X.h>
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>
+#include "uucplock.h"
+
#ifdef X_DISPLAY_MISSING
# error this program cannot be compiled without X11.
#endif
@@ -51,6 +55,13 @@
# define REMOTE_DEVICE "/dev/tty02" /*biased to VAIO505 :-P*/
#endif
+#ifndef __P
+# define __P(X) X
+#endif
+#ifndef MDMBUF
+# define MDMBUF 0
+#endif
+
static char *remote = REMOTE_DEVICE;
static int debug = 0;
#define dprintf(x) { if (debug) fprintf x; }
@@ -144,8 +155,18 @@ main(argc, argv)
}
tcgetattr(fd, &old);
raw = old;
+#if defined(__sun)
+ raw.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+ raw.c_oflag &= ~OPOST;
+ raw.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ raw.c_cflag &= ~(CSIZE|PARENB);
+ raw.c_cflag |= CS8;
+ cfsetispeed(&raw, B1200);
+ cfsetospeed(&raw, B1200);
+#else
cfmakeraw(&raw);
cfsetspeed(&raw, B1200);
+#endif
raw.c_cflag &= ~(CSIZE|PARENB|CSTOPB|MDMBUF);
raw.c_cflag |= CS8|CREAD|CLOCAL;
tcsetattr(fd, TCSANOW, &raw);