+#ifndef B19200
+# define B19200 B9600
+#endif
+
+#ifndef B38400
+# define B38400 B19200
+#endif
+
+/*
+ * This code assumes that the values B0, B50, B75...
+ * are in ascending order. They do not have to be
+ * contiguous.
+ */
+struct termspeeds {
+ long speed;
+ long value;
+} termspeeds[] = {
+ { 0, B0 }, { 50, B50 }, { 75, B75 },
+ { 110, B110 }, { 134, B134 }, { 150, B150 },
+ { 200, B200 }, { 300, B300 }, { 600, B600 },
+ { 1200, B1200 }, { 1800, B1800 }, { 2400, B2400 },
+ { 4800, B4800 }, { 9600, B9600 }, { 19200, B19200 },
+ { 38400, B38400 }, { -1, B38400 }
+};
+
+#ifndef USE_TERMIO
+# define ISPEED ottyb.sg_ispeed
+# define OSPEED ottyb.sg_ospeed
+#else
+# ifdef SYSV_TERMIO
+# define ISPEED (old_tc.c_cflag&CBAUD)
+# define OSPEED ISPEED
+# else
+# define ISPEED old_tc.c_ispeed
+# define OSPEED old_tc.c_ospeed
+# endif
+#endif
+