From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29863 invoked by alias); 20 Dec 2001 08:38:28 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 29834 invoked from network); 20 Dec 2001 08:38:26 -0000 Received: from unknown (HELO syntrex.com) (212.41.210.71) by sources.redhat.com with SMTP; 20 Dec 2001 08:38:26 -0000 Received: (qmail 27972 invoked by uid 8); 20 Dec 2001 08:40:38 -0000 Received: from UNKNOWN (192.168.2.50, claiming to be "syntrex.com") by mail.syntrex.com with SMTP id smtpdlmhFQm; Thu, 20 Dec 2001 03:40:32 EST Message-ID: <3C21A373.3C40BCB4@syntrex.com> Date: Thu, 20 Dec 2001 00:41:00 -0000 From: Pavel Tsekov X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mark Sheppard CC: cygwin@cygwin.com Subject: Re: sscanf %as broken (was: linking with glut32.lib?) References: <4.3.2.7.0.20011219110228.00b4da40@irispavp.igb.umontreal.ca> <20011219201135.GL4554@ddf.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00978.txt.bz2 The man page of the glibc sscanf explains it all - see this: a Indicates that the conversion will be s, the needed memory space for the string will be malloc'ed and the pointer to it will be assigned to the char pointer variable, which does not have to be initialised before. This flag does not exist in ANSI C. In other words this is a glibc artifact and cygwin uses newlib as its C runtime library. Mark Sheppard wrote: > > On 2001-12-19 (Wednesday) at 11:13:01 -0500, Andre Bleau wrote: > > > Anyway I've now got it compiling cleanly, but there's a totally > unrelated runtime error which after investigation looks like it's > caused by sscanf(3) not working properly with "%as". The following > code which works under Linux (sscanf returns 1) but not under Cygwin > (sscanf returns 0) demonstrates the problem: -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/