|
From: Ethan M. <merritt@U.WASHINGTON.EDU> - 2009-12-03 18:50:39
|
On Thursday 03 December 2009 03:03:57 Petr Mikulik wrote: > > DJGPP never had snprintf, see config.djg: > > /* Define to 1 if you have the `snprintf' function. */ > /* #undef HAVE_SNPRINTF */ > > > Thus there should be: > > #ifdef HAVE_SNPRINTF > snprintf(...); > #else > sprintf(...); > #endif In my view we are past the point where we can guarantee support for platforms too ancient to provide ansi-compliant C environments. There is good reason to require snprintf(). Adding #ifdef statements to avoid it is an ugly hack that introduces known overflow problems. Are you sure that sprintf() itself is ansi-compliant on DJGPP? It isn't on ultrix, for instance. That's why the "ultrix" patch has been on the contributions page of the web site for years now. It allows mousing on ultrix systems even though the have a broken sprintf() implementation. But really the easiest is to say that DJGPP doesn't support lua/tikz. Is anyone set up to test whether a no-snprintf() version actually works to produce lua->tikz->pdflatex output correctly on a DJGPP system? After all, just because it compiles does not mean that it works correctly. Ethan |