From: git Date: Sat, 14 Feb 2026 19:25:22 +0000 (-0500) Subject: DTR/DSR, DCD macro switches are now platform-agnostic. X-Git-Url: https://git.datadissipation.net/?a=commitdiff_plain;h=HEAD;p=ust.git DTR/DSR, DCD macro switches are now platform-agnostic. Fixed "declaration after label" warning/error --- diff --git a/ust.c b/ust.c index 350fcf7..b9cee49 100644 --- a/ust.c +++ b/ust.c @@ -23,7 +23,7 @@ #define LF '\n' #define BS '\b' #define DEL '\x7f' -#ifndef __linux__ +#if defined(CCDTR_IFLOW) && defined(CDSR_OFLOW) #define CDTRDSR (CDTR_IFLOW | CDSR_OFLOW) #endif #define IXONXOFF (IXON | IXOFF) @@ -333,14 +333,14 @@ openport() if (hard == 1) { cntrl.c_cflag |= CRTSCTS; } else if (hard == 2) { - #ifdef __linux__ - fprintf(stderr, "DTR/DSR flow control is not supported on Linux\nenabling this option does nothing!\n"); + #ifndef CDTRDSR + fprintf(stderr, "DTR/DSR flow control is not supported on this platform\nenabling this option does nothing!\n"); #else cntrl.c_lflag |= CDTRDSR; #endif } else if (hard == 3) { cntrl.c_cflag &= ~CLOCAL; - #ifndef __linux__ + #ifdef CCAR_OFLOW cntrl.c_lflag |= CCAR_OFLOW; #endif } @@ -823,7 +823,7 @@ getcmd(int escape) newterm.c_lflag &= ~ICANON; settermattr(STDIN_FILENO, &newterm); break; - case 'p': + case 'p':; int st; struct timespec ts; ts.tv_sec = spulsedelay;