Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 0fb52cfc authored by deuce's avatar deuce

Use stdin as the tty test, not stdout...

parent 66d25a30
...@@ -1784,11 +1784,11 @@ no_fossil: ...@@ -1784,11 +1784,11 @@ no_fossil:
if(pPortInfo->Method == kComMethodStdIO || if(pPortInfo->Method == kComMethodStdIO ||
pPortInfo->Method == kComMethodUnspecified) pPortInfo->Method == kComMethodUnspecified)
{ {
if (isatty(STDIN_FILENO)) { if (isatty(STDOUT_FILENO)) {
tcgetattr(STDIN_FILENO,&tio_default); tcgetattr(STDOUT_FILENO,&tio_default);
tio_raw = tio_default; tio_raw = tio_default;
cfmakeraw(&tio_raw); cfmakeraw(&tio_raw);
tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw); tcsetattr(STDOUT_FILENO,TCSANOW,&tio_raw);
setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0);
} }
...@@ -1980,7 +1980,7 @@ tODResult ODComClose(tPortHandle hPort) ...@@ -1980,7 +1980,7 @@ tODResult ODComClose(tPortHandle hPort)
#ifdef INCLUDE_STDIO_COM #ifdef INCLUDE_STDIO_COM
case kComMethodStdIO: case kComMethodStdIO:
tcsetattr(STDIN_FILENO,TCSANOW,&tio_default); tcsetattr(STDOUT_FILENO,TCSANOW,&tio_default);
break; break;
#endif #endif
......
...@@ -2224,8 +2224,8 @@ malloc_error: ...@@ -2224,8 +2224,8 @@ malloc_error:
od_control.baud=19200; od_control.baud=19200;
gethostname(od_control.system_name,sizeof(od_control.system_name)); gethostname(od_control.system_name,sizeof(od_control.system_name));
od_control.system_name[sizeof(od_control.system_name)-1]=0; od_control.system_name[sizeof(od_control.system_name)-1]=0;
if (isatty(STDIN_FILENO)) { if (isatty(STDOUT_FILENO)) {
tcgetattr(STDIN_FILENO,&term); tcgetattr(STDOUT_FILENO,&term);
od_control.baud=cfgetispeed(&term); od_control.baud=cfgetispeed(&term);
if(!od_control.baud) if(!od_control.baud)
od_control.baud=cfgetispeed(&term); od_control.baud=cfgetispeed(&term);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment