Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 6 Apr 2004 15:49:02 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: zsh and line breaks
Message-ID: <20040406134902.GA18138@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20040406083806.GJ26575@cygbert.vinschen.de> <NUTMEGpiwHOOkCWaUJL0000038b@NUTMEG.CAM.ARTIMI.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <NUTMEGpiwHOOkCWaUJL0000038b@NUTMEG.CAM.ARTIMI.COM>
User-Agent: Mutt/1.4.2i

On Apr  6 13:54, Dave Korn wrote:
> >   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.

And what's the gain?  My above configure.ac snippet is everything needed
so what's the additional -wrap for?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

