Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: zsh and line breaks Date: Tue, 6 Apr 2004 13:54:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-reply-to: <20040406083806.GJ26575@cygbert.vinschen.de> Message-ID: X-OriginalArrivalTime: 06 Apr 2004 12:54:04.0718 (UTC) FILETIME=[3DCF8CE0:01C41BD6] > -----Original Message----- > From: cygwin-owner On Behalf Of Corinna Vinschen > Sent: 06 April 2004 09:38 > On Apr 4 20:29, Peter Stephenson wrote: > > Bart Schaefer wrote: > > > On Apr 2, 5:23pm, Peter A. Castro wrote: > > > } > > > } On Thu, 1 Apr 2004, Peter A. Castro wrote: > > > } > > > } So, now I need a ruling on just where to put this fix. > > > > > > I don't know that I can give you a "ruling" but in my > opinion it would be > > > fine to put this in main.c, appropriately #ifdef'd. > > > > I agree, there's nothing magic about main.c. The only > reason it's short > > is because usually it's convenient for as much stuff as > possible to be > > in zsh.dll, on systems where that needs to exist. Your > case is exactly > > the opposite, so main.c is fine. > > I'm wondering if it makes sense to add a "/usr/lib/textreadmode.o" to > Cygwin, so that applications like zsh and gawk don't have to have this > code to provide by themselves. A simple > > case "$host" in > *-*-cygwin*) > LIBS="$LIBS /usr/lib/textreadmode.o";; > esac > > in configure.ac would do it then. You could take it one step further: combine that with using the --wrap option to ld case "$host" in *-*-cygwin*) LIBS="$LIBS /usr/lib/textreadmode.o";; LDFLAGS="$LDFLAGS --wrap _main" esac and textreadmode.o has a function __wrap_main that sets the textmode and calls __real_main. That way the entire cygwinization can be done in configure and no need for #ifdefs anywhere. OTOH it's a bit obscure maintenance-wise. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/