aboutsummaryrefslogtreecommitdiffhomepage
path: root/System
diff options
context:
space:
mode:
Diffstat (limited to 'System')
-rw-r--r--System/Posix/Terminal/Common.hsc12
1 files changed, 12 insertions, 0 deletions
diff --git a/System/Posix/Terminal/Common.hsc b/System/Posix/Terminal/Common.hsc
index 2f6327a..49418f5 100644
--- a/System/Posix/Terminal/Common.hsc
+++ b/System/Posix/Terminal/Common.hsc
@@ -527,8 +527,16 @@ baud2Word B4800 = (#const B4800)
baud2Word B9600 = (#const B9600)
baud2Word B19200 = (#const B19200)
baud2Word B38400 = (#const B38400)
+#ifdef B57600
baud2Word B57600 = (#const B57600)
+#else
+baud2Word B57600 = error "B57600 not available on this system"
+#endif
+#ifdef B115200
baud2Word B115200 = (#const B115200)
+#else
+baud2Word B115200 = error "B115200 not available on this system"
+#endif
-- And convert a word back to a baud rate
-- We really need some cpp macros here.
@@ -551,8 +559,12 @@ word2Baud x =
else if x == (#const B9600) then B9600
else if x == (#const B19200) then B19200
else if x == (#const B38400) then B38400
+#ifdef B57600
else if x == (#const B57600) then B57600
+#endif
+#ifdef B115200
else if x == (#const B115200) then B115200
+#endif
else error "unknown baud rate"
-- Clear termios i_flag