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:
if(pPortInfo->Method == kComMethodStdIO ||
pPortInfo->Method == kComMethodUnspecified)
{
if (isatty(STDIN_FILENO)) {
tcgetattr(STDIN_FILENO,&tio_default);
if (isatty(STDOUT_FILENO)) {
tcgetattr(STDOUT_FILENO,&tio_default);
tio_raw = tio_default;
cfmakeraw(&tio_raw);
tcsetattr(STDIN_FILENO,TCSANOW,&tio_raw);
tcsetattr(STDOUT_FILENO,TCSANOW,&tio_raw);
setvbuf(stdout, NULL, _IONBF, 0);
}
......@@ -1980,7 +1980,7 @@ tODResult ODComClose(tPortHandle hPort)
#ifdef INCLUDE_STDIO_COM
case kComMethodStdIO:
tcsetattr(STDIN_FILENO,TCSANOW,&tio_default);
tcsetattr(STDOUT_FILENO,TCSANOW,&tio_default);
break;
#endif
......
......@@ -2224,8 +2224,8 @@ malloc_error:
od_control.baud=19200;
gethostname(od_control.system_name,sizeof(od_control.system_name));
od_control.system_name[sizeof(od_control.system_name)-1]=0;
if (isatty(STDIN_FILENO)) {
tcgetattr(STDIN_FILENO,&term);
if (isatty(STDOUT_FILENO)) {
tcgetattr(STDOUT_FILENO,&term);
od_control.baud=cfgetispeed(&term);
if(!od_control.baud)
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