delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/01/03/17:41:16

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: Strange behaviour with latest snapshot
3 Jan 1999 17:41:16 -0800 :
Message-ID: <19990103200019.A8157.cygnus.cygwin32.developers@cygnus.com>
References: <368FD2CE DOT EA0631E8 AT cityweb DOT de>
Mime-Version: 1.0
To: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>,
cygwin32-developers AT cygnus DOT com

On Sun, Jan 03, 1999 at 09:27:58PM +0100, Corinna Vinschen wrote:
>Hi Chris,
>
>I have found a strange behaviour, which has already happened
>in older snapshots ('til 981126, I believe). Do you remember your
>experience with pdksh, that every command begun with the
>character `k' instead of the really typed char?
>
>I have now done the following, without changing the sources:
>
>Installed egcs-1.1.1 from Mumits page,
>compiled latest newlib snapshot,
>compiled libio and libstdc++,
>compiled latest winsup snapshot,
>compiled tcsh-6.08.00 twice with termcap and ncurses:
>
>starting any of the new compiled tcsh:
>
>> ls
>ts: command not found.
>
>Then I took a glimps at the sources of winsup-981230 (select.cc):
>Your code, which did an empty ReadFile() was #if'd 0. I changed the
>0 to 1, recompiled it and got in the new compiled tcsh:

That's very strange.  It almost sounds like some code from an experimental
branch leaked into the latest snapshot.  I've been working, in my spare time,
on rewriting parts of fhandler_console.cc .  The rewritten code does not
need that test so I've ifdef'ed it.  I must have somehow copied this file
to the main trunk.

Thanks for catching this problem.

>> ls
>ls		<-- repeated command output
>FAQ                ed.term.h          sh.glob.o          tc.os.h
>Fixes              ed.term.o          sh.h               tc.os.h.orig
>...etc.
>
>Exiting shell with Ctrl-D didn't work, too. Same behaviour with
>new compiled pdksh. But it's strange, that this happens only with
>new compiled versions, the previous compiled versions do their job
>as expected.
>
>I'm not sure, but I suppose an error in one of the libraries, not
>in winsup sources itself, because I have make a test:
>
>I have used the egcs-1.1.1 compiler, latest winsup-981230, but compiled
>the shells with the older libraries from last dev-src package, built with
>egcs-1.1b and one of the previous winsup-snapshots (981201, I guess).
>This works fine, again.

This is a termios.h problem.  The termios struct changed recently.
cygwin1.dll detects when it is being used with an executable which
uses the older style termios struct and translates back and forth between
the new and old versions of the struct internally.  If you link a program
with the new libcygwin.a then cygwin1.dll will assume that you are using the
new termios structure.

In your case, it sounds like you're using a libncurses or libtermcap library
that was compiled a while ago and uses the old termios structure but you're
also using the newer libcygwin.a which contains a version number that will
tell cygwin1.dll to use the new style structs.

The best solution is to recompile everything.

It is beginning to sound like we should release a B21 very soon which breaks
binary compatibility with older versions of cygwin.  The termios changes
were inavoidable but they may end up causing some problems.

-chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019