Re: [xml] Patches to 2.3.4



On Wed, Mar 21, 2001 at 11:58:56AM -0600, xml thewrittenword com wrote:
1. On Solaris 2.5.1 and IRIX 6.2, snprintf is *not* available. So,
   I copied in the snprintf.c from the Samba distribution and
   added an autoconf test to compile and link it into libxml2.
   If we do not link snprintf into libxml2, then *every* program
   that links against libxml2 will need snprintf.c compiled into
   it (like xmllint).

  Hum,  I don't know if I should take this patch, currently
what libxml does is that if the feature is not available it doesn't
use it. I.e. when snprintf is not there it uses sprintf. Obvious goal
is to get the people who ship those broken OSes to fix or die by
obsolescence by proven track of not having the minimal routines for
secure programming.
  If you try to circumvent it the way you suggest then all your
binaries ends up having that duplicated code which should be shared
in the libc.
  Last but not least if there is a bug in this code there is no
simple way to fix it, you need checking and fixes on all the
applications.

  So on theoretical grounds I'm inclined to not add the patch.
Practically this may be better to have all platforms reuse those
800 lines of code than having #ifdef #else #endif scattered around
the places where I need snprintf and vsnfprintf.

  I will need to think a bit more about it, feedback welcome.

2. C++ comments in C code is wrong (error.c).

   Okay this one was already fixed,

  Thanks for the patch,

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]