#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)
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
}
newterm.c_lflag &= ~ICANON;
settermattr(STDIN_FILENO, &newterm);
break;
- case 'p':
+ case 'p':;
int st;
struct timespec ts;
ts.tv_sec = spulsedelay;