aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/x48
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2004-11-30 03:56:09 +0800
committerdanfe <danfe@FreeBSD.org>2004-11-30 03:56:09 +0800
commit6bd069544e162110711334c3e55b6800f08ef764 (patch)
tree6c7a249f41fbe80678f4b0f911bc1d6e8f31d133 /emulators/x48
parent85bf8130619dd3c6088bdcecad647bfed2ae951b (diff)
downloadfreebsd-ports-graphics-6bd069544e162110711334c3e55b6800f08ef764.tar.gz
freebsd-ports-graphics-6bd069544e162110711334c3e55b6800f08ef764.tar.zst
freebsd-ports-graphics-6bd069544e162110711334c3e55b6800f08ef764.zip
Fix build with GCC 2.95.4.
Reported by: kris Approved by: fjoe (mentor, implicit)
Diffstat (limited to 'emulators/x48')
-rw-r--r--emulators/x48/files/patch-src+serial.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/emulators/x48/files/patch-src+serial.c b/emulators/x48/files/patch-src+serial.c
index 9a4ebf77dee..75ec8a93692 100644
--- a/emulators/x48/files/patch-src+serial.c
+++ b/emulators/x48/files/patch-src+serial.c
@@ -18,16 +18,12 @@
#include <sys/termios.h>
#endif
-@@ -135,8 +137,23 @@
-
- wire_fd = -1;
+@@ -137,6 +139,19 @@
ttyp = -1;
-+#ifdef FREEBSD
-+ int tty_m, tty_s;
-+#endif
if (useTerminal)
{
+#ifdef FREEBSD
++ int tty_m, tty_s;
+ if (openpty(&tty_m, &tty_s, tty_dev_name, NULL, NULL) == 0)
+ {
+ if (verbose)
@@ -42,7 +38,7 @@
#ifdef IRIX
if ((p = _getpty(&wire_fd, O_RDWR | O_EXCL | O_NDELAY, 0666, 0)) == NULL)
{
-@@ -234,11 +251,12 @@
+@@ -234,11 +249,12 @@
#endif /* LINUX */
#endif /* SOLARIS */
#endif /* IRIX */
@@ -56,7 +52,7 @@
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -263,7 +281,7 @@
+@@ -263,7 +279,7 @@
if (ttyp >= 0)
{
@@ -65,7 +61,7 @@
if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
-@@ -291,7 +309,7 @@
+@@ -291,7 +307,7 @@
if (ir_fd >= 0)
{
@@ -74,7 +70,7 @@
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -315,7 +333,7 @@
+@@ -315,7 +331,7 @@
if (ir_fd >= 0)
{
@@ -83,7 +79,7 @@
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -344,7 +362,7 @@
+@@ -344,7 +360,7 @@
if (ir_fd >= 0)
{
@@ -92,7 +88,7 @@
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -358,6 +376,10 @@
+@@ -358,6 +374,10 @@
}
}
@@ -103,7 +99,7 @@
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
-@@ -404,9 +426,11 @@
+@@ -404,9 +424,11 @@
ttybuf.c_cflag |= B9600;
}
@@ -116,7 +112,7 @@
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -422,7 +446,7 @@
+@@ -422,7 +444,7 @@
if (ttyp >= 0)
{
@@ -125,7 +121,7 @@
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -437,6 +461,9 @@
+@@ -437,6 +459,9 @@
}
}
@@ -135,7 +131,7 @@
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
-@@ -482,10 +509,11 @@
+@@ -482,10 +507,11 @@
fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
ttybuf.c_cflag |= B9600;
}