Rafal Maszkowski <[EMAIL PROTECTED]> writes:
> After a break I am trying to run version 1999-01-28 now. All problems except
> the one with -z option are fixed. I was able to connect lsh to lshd on Solaris.
> One of he strange problems I've met is ignoring '\n' by tr so I have changed it
> like
> -AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | uniq |
>tr -d '\n'`")
> -AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 |
>sort | uniq | tr -d '\n'`")
> +AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | uniq |
>/usr/xpg4/bin/tr -d '\n'`")
> +AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 |
>sort | uniq | /usr/xpg4/bin/tr -d '\n'`")
> in configure.in .
Thanks, I should change these tests. Is there any particular reason
why you are using absolute paths for tr?
> ioctl(newtty, TIOCSCTTY, NULL) in tty.c fails - looks like there is no
> TIOCSCTTY on Solaris, at least 2.5.1 . I don't know what to use here instead.
> I commented out this ioctl so the code compiles but lshd says
> pty_setctty: Error disconnecting from controlling tty.
> The commands I am typing after logging in seem to get to the shell after
> entering another two characters. I don't know if it is related to missing
> ioctl.
Don't really know. I have to read more about Solaris/sysv pty:s,
unless somebody else fixes this first. Losing only two characters
seems really odd.
> Another missing function is cfmakeraw() - I defined it as desribed in Linux man
> page:
> #define cfmakeraw(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; }
So we'll need a configure test and a fallback for this function.
> In this version I discovered snprintf missing (not only vsnprintf) and hacked
> some ugly workaround just to compile.
Strange. snprintf should be more or less standard. (I don't have any
ANSI-C reference, though).
> What could I do for the mankind:
> - add some tests to do something with tr problem
If using tr -d works, I think that solution is good enough.
> - steal [v]snprintf from glibc-2.1 and put tests into configure.in
That would be good. Currently, there are only two uses of snprintf,
though (in server_pty.c).
> - add another compatibility function and test - cfmakeraw()
That would be good. Something like #if !HAVE_CFMAKERAW #define
cfmakeraw(... should do.
> - move all compatibility functions into compatibility (or src/compatibility ?)
> subdirectory
Subdirectories with code should be placed under src. However, I prefer
not having a separate subdirectory for compatibility stuff, at least
not for now. If we find that it is needed later, some system dependent
stuff would be moved to src/unix, src/windows, src/beos, etc.
/Niels