68 lines
2.4 KiB
Diff
68 lines
2.4 KiB
Diff
|
--- glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c.orig Sat Sep 6 05:52:52 2003
|
||
|
+++ glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c Wed Sep 10 21:50:15 2003
|
||
|
@@ -66,8 +66,9 @@
|
||
|
__set_errno (EINVAL);
|
||
|
return -1;
|
||
|
}
|
||
|
-
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||
|
termios_p->c_ospeed = speed;
|
||
|
+#endif
|
||
|
termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
|
||
|
termios_p->c_cflag |= speed;
|
||
|
|
||
|
@@ -91,8 +92,9 @@
|
||
|
__set_errno (EINVAL);
|
||
|
return -1;
|
||
|
}
|
||
|
-
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||
|
termios_p->c_ispeed = speed;
|
||
|
+#endif
|
||
|
if (speed == 0)
|
||
|
termios_p->c_iflag |= IBAUD0;
|
||
|
else
|
||
|
diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c
|
||
|
--- glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 12:41:08.000000000 -0400
|
||
|
+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 11:56:37.000000000 -0400
|
||
|
@@ -45,16 +45,20 @@
|
||
|
termios_p->c_cflag = k_termios.c_cflag;
|
||
|
termios_p->c_lflag = k_termios.c_lflag;
|
||
|
termios_p->c_line = k_termios.c_line;
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||
|
#ifdef _HAVE_C_ISPEED
|
||
|
termios_p->c_ispeed = k_termios.c_ispeed;
|
||
|
#else
|
||
|
termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
|
||
|
#endif
|
||
|
+#endif
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
|
||
|
#ifdef _HAVE_C_OSPEED
|
||
|
termios_p->c_ospeed = k_termios.c_ospeed;
|
||
|
#else
|
||
|
termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
|
||
|
#endif
|
||
|
+#endif
|
||
|
if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
|
||
|
|| (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
|
||
|
memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
|
||
|
diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c
|
||
|
--- glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 12:41:08.000000000 -0400
|
||
|
+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 11:56:42.000000000 -0400
|
||
|
@@ -71,12 +71,16 @@
|
||
|
k_termios.c_cflag = termios_p->c_cflag;
|
||
|
k_termios.c_lflag = termios_p->c_lflag;
|
||
|
k_termios.c_line = termios_p->c_line;
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
|
||
|
#ifdef _HAVE_C_ISPEED
|
||
|
k_termios.c_ispeed = termios_p->c_ispeed;
|
||
|
#endif
|
||
|
+#endif
|
||
|
+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
|
||
|
#ifdef _HAVE_C_OSPEED
|
||
|
k_termios.c_ospeed = termios_p->c_ospeed;
|
||
|
#endif
|
||
|
+#endif
|
||
|
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
|
||
|
__KERNEL_NCCS * sizeof (cc_t));
|