delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/10/23/13:10:30

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Tue, 23 Oct 2001 13:11:15 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: 1.3.4 status?
Message-ID: <20011023131115.E18754@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <02a201c15b5b$7910a4d0$0200a8c0 AT lifelesswks> <20011022204740 DOT B18754 AT redhat DOT com> <20011023005236 DOT 7136 DOT qmail AT lizard DOT curl DOT com> <20011022205828 DOT C18754 AT redhat DOT com> <02ea01c15b5f$7e673bc0$0200a8c0 AT lifelesswks> <20011022212759 DOT A19493 AT redhat DOT com> <035a01c15b6b$e7788c70$0200a8c0 AT lifelesswks> <039401c15b74$3555bd70$0200a8c0 AT lifelesswks> <03d201c15b83$0e480990$0200a8c0 AT lifelesswks> <03d801c15b83$663928f0$0200a8c0 AT lifelesswks>
Mime-Version: 1.0
In-Reply-To: <03d801c15b83$663928f0$0200a8c0@lifelesswks>
User-Agent: Mutt/1.3.21i

On Tue, Oct 23, 2001 at 03:27:24PM +1000, Robert Collins wrote:
>and this patch fixes it.
>
>Index: fhandler_console.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/fhandler_console.cc,v
>retrieving revision 1.66
>diff -u -p -r1.66 fhandler_console.cc
>--- fhandler_console.cc 2001/10/22 18:39:22     1.66
>+++ fhandler_console.cc 2001/10/23 05:23:17
>@@ -54,7 +54,7 @@ cp_convert (UINT destcp, char * dest, UI
>     }
>   else
>     {
>-      WCHAR wbuffer[CONVERT_LIMIT]; /* same size as the maximum input,
>s.b. */
>+      WCHAR *wbuffer = (WCHAR *) alloca (CONVERT_LIMIT); /* same size
>as the maximum inpu
>t, s.b. */
>       if (!MultiByteToWideChar (srccp, 0, src, size, wbuffer, sizeof
>(wbuffer)))
>        return FALSE;
>       if (!WideCharToMultiByte (destcp, 0, wbuffer, size, dest, size,
>
>Have fun!

Aren't you potentially doing that assignment in a loop?  If this is inlined,
I wonder if gcc does the right thing.

cgf

- Raw text -


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