> -----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/