This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sscanf %as broken (was: linking with glut32.lib?)


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]