From f23685f92b91aa53546a81bf7793c38a45df15d3 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Fri, 19 Aug 2005 11:12:29 +0000 Subject: stdint.patch, debug_output.patch, ssh_12_select.patch, solaris_7.patch and args_in_decl.patch from Norbert. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@12 7dcaeef0-15fb-0310-b436-a5af3365683c --- sample.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sample.c') diff --git a/sample.c b/sample.c index 43a0b2ab..d1c0fb47 100644 --- a/sample.c +++ b/sample.c @@ -12,6 +12,7 @@ The goal is to show the API in action. It's not a reference on how terminal clients must be made or how a client should react. */ +#include "config.h" #include #include #include @@ -20,7 +21,9 @@ clients must be made or how a client should react. #include #include +#ifdef HAVE_PTY_H #include +#endif #include #include #include @@ -77,6 +80,17 @@ int opts(int argc, char **argv){ return 0; } +#ifndef HAVE_PTY_H +static void cfmakeraw(struct termios *termios_p){ + termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + termios_p->c_oflag &= ~OPOST; + termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + termios_p->c_cflag &= ~(CSIZE|PARENB); + termios_p->c_cflag |= CS8; +} +#endif + + void do_cleanup(){ tcsetattr(0,TCSANOW,&terminal); } -- cgit v1.2.3