X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Vijay Kumar R Zanvar" Newsgroups: comp.os.msdos.djgpp Subject: Re: snprintf error Date: Mon, 8 Mar 2004 15:54:49 +0530 Lines: 37 Message-ID: References: <87hdx3t63c DOT fsf AT cube DOT internal DOT net> NNTP-Posting-Host: 61.11.64.74 X-Trace: news.uni-berlin.de 1078741459 62972984 I 61.11.64.74 ([203837]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com [..] > From google: > > On Wed, 10 Jul 2002 00:25:55 CDT > Charles Sandmann writes: > > >The program you are trying to build is using the routine snprintf(), > >which is a relatively new call and not available in the v2.03 > >library. > > >You can either try the 2.04 work in progress library, or inspect the > >code and see if you can get by with a simple define: > > >#define snprintf(a,b,c,d) sprintf(a,c,d) > > >This define assumes the string is long enough. snprintf() is a safe > >sprintf call which you send the string length so you don't get buffer > >overruns. > > An alternative that works in your sample program: > > http://www.ijs.si/software/snprintf/snprintf_2.2.tar.gz > > in string.c #include "snprintf.h" > > gcc -std=c99 -Wall -o string.exe snprintf.c string.c > Thanks. It worked. > > Hope this helps. > > -- > Roberto Quiroga