X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: vsnprintf with djgpp <= 2.03 Date: Wed, 6 Jul 2011 15:26:18 -0700 (PDT) Organization: http://groups.google.com Lines: 45 Message-ID: <58bb680f-9b2b-43ea-85c0-ab096df8cdd0@z12g2000yqj.googlegroups.com> References: <66fec64a-4317-485b-8dae-7d8431e0cd48 AT x16g2000yqg DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1309991178 18527 127.0.0.1 (6 Jul 2011 22:26:18 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Wed, 6 Jul 2011 22:26:18 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: z12g2000yqj.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: UHALERCNK X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.50,gzip(gfe) Bytes: 2986 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p66Mj2mg015413 Reply-To: djgpp AT delorie DOT com Hi, On Jul 6, 12:54 am, Ozkan Sezer wrote: > On Wed, Jul 6, 2011 at 1:36 AM, Rugxulo wrote: > > > On Jul 5, 12:46 pm, Ozkan Sezer wrote: > > >> For vsnprintf() with djgpp<=2.03, I use src/libc/ansi/stdio/vsnprntf.c > >> from djgpp 2.04 directly included in my sources with __stropenw() and > >> __strclosew() helpers pasted from include/libc/file.h into it. > > >> This seems successful fo me, so far.  Are there any problems with this > >> that I am not aware of? > > > Don't know offhand, you'll just have to try it and see.   :-)) > > I did, and it seems to work fine, even with djgpp as old as 2.0.0 :) > I just wanted to know whether there are any requirements that I > don't know. > > > P.S. I think libsupp supports those, which might be a cleaner way of > > getting it. > > Well cleaner is arguable, there are lots of stuff in libsupp that I don't > care about one bit, so this was the easiest and most straightforward > for me. Here's something I remember reading a while back. Maybe it'll work for you? :-) http://www.mesa3d.org/README.DJ (by Daniel Borca) Q) Libraries built OK, but linker complains about `vsnprintf' every time I compile some demo. A) Upgrade to DJGPP 2.04. A) Add `vsnprintf.c' to the CORE_SOURCES in `src/ Makefile.DJ' (untested!). A) Patch `src/mesa/main/imports.c' with the following line: #define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg) This hack should be safe in 90% of the cases, but if anything goes wrong, don't come back to me crying.