[Bug 2998] With multi-line input terminal gets echo twice and ctrl+D does not work

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Thu Apr 25 12:16:10 AEST 2019


https://bugzilla.mindrot.org/show_bug.cgi?id=2998

--- Comment #23 from Darren Tucker <dtucker at dtucker.net> ---
(In reply to Yuri Voinov from comment #19)

Please keep it polite.

> Created attachment 3272 [details]
> Why 8.0 search cc first?!

Because we had instances where gcc did the wrong thing but the system
cc didn't and we thought it should use the system one unless told
otherwise by $CC.  configure's preference of gcc is a gnuism that
probably made sense when system 'cc' was a pre-ansi compiler but those
days are gone.

> Anyway, what about compatibility?

OpenSSH should work with any ANSI C compiler, barring bugs.  In this
specific case it looks like it's sshd not handling the difference due
to the newer XPG behaviour.  There's a patch in  bug#2945
(https://bugzilla.mindrot.org/attachment.cgi?id=3248) which should fix
it however that did not make 8.0 due to insufficient testing.  Does it
resolve the problem for you?

(In reply to Yuri Voinov from comment #20)
> Without explicity specified CC environment variable it is bad idea
> to make any assumptions and assumptions about compilers, IMHO.

(In reply to Yuri Voinov from comment #21)
> It seems to me that it is generally advisable for compilers to ask
> who they are, and not just to look at names and symbolic links.

configure is not making assumptions about the compiler based on its
binary name, or at least none that are significant in this case.  The
tirggering behaviour was a difference in the default xpg version, which
based on the comments in bug#2945 could just have easily been triggered
by a newer version of gcc.

> For example, looking in -V output.

It does in fact do this for some things where necessary, however
maintaining the mapping of returned version to inferred behaviour is
fragile.  You're better off explicitly testing for the thing you want
where that's possible (see the OSSH_CHECK_CFLAG_COMPILE macro for an
example).

Anyway, does the patch in bug#2945 fix it when compiled with your cc?

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list