X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0	tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,SARE_SUB_PCT_LETTER
X-Spam-Check-By: sourceware.org
Message-ID: <4FD5EB79.6060707@sister-shadow.de>
Date: Mon, 11 Jun 2012 14:58:33 +0200
From: Otto Meta <otto.meta@sister-shadow.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: s?wprintf family of functions has broken %s formatter output
References: <CAKw7uVgEzeqw9=hRSiLtN-YkgWFhTPg-_VoTOowPUt0TXE2fyQ@mail.gmail.com>
In-Reply-To: <CAKw7uVgEzeqw9=hRSiLtN-YkgWFhTPg-_VoTOowPUt0TXE2fyQ@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

> `-->  ./testvswprintf.exe

> this works, 1, 2, 3...
> but the following does not:
> ret: 1
> buf: >T<
>> T<
> ret: 4
> wcout: >THIS IS A TEST<
> 
> The same code works well on both Ubuntu with GCC and on Windows with
> Visual Studio 2010.


I just tried your test with g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2:

$> ./testvswprintf
this works, 1, 2, 3...
but the following does not:
ret: 1
buf: >T<
>T<
ret: 4
wcout: >THIS IS A TEST<

Looks quite the same, so it’s not really a Cygwin-only problem.
My Ubuntu 11.04 is a bit dated already, so maybe you have a newer
Ubuntu version with a fixed swprintf?

Otto

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

