]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxser.c
Rationalise access to, and content of, backends[] array.
[PuTTY.git] / unix / uxser.c
index 454d7b36e1291b5f90653778ae8c3f6c8b751ad0..a12fdec76add7098a3e8b622a3845e1bc9200d9a 100644 (file)
@@ -214,7 +214,16 @@ static const char *serial_configure(Serial serial, Config *cfg)
 #ifdef ONLCR
                         | ONLCR
 #endif
-                        | OCRNL | ONOCR | ONLRET);
+#ifdef OCRNL
+                        | OCRNL
+#endif
+#ifdef ONOCR
+                        | ONOCR
+#endif
+#ifdef ONLRET
+                        | ONLRET
+#endif
+                        );
     options.c_cc[VMIN] = 1;
     options.c_cc[VTIME] = 0;
 
@@ -527,5 +536,7 @@ Backend serial_backend = {
     serial_provide_logctx,
     serial_unthrottle,
     serial_cfg_info,
+    "serial",
+    PROT_SERIAL,
     1
 };