Re: [xml] Problems with file names in UTF-8 on Windows



On Fri, Sep 01, 2006 at 12:16:56PM +0400, Emelyanov Alexey wrote:
Probably, an alternative version of patch will be more acceptable.
[...]

Roland's patch has been applied to CVS. So any further patch should
be against CVs head i.e. the version with Roland's code changes. This
would also help checking what you are really changing, please resubmit.
[...]

Daniel

Here is patch for latest version in CVS.

Patched library was compiled with MSVC 5.0, MSVC 7.1, Mingw (gcc 3.4.2),
Borland C++ 5.5 and was tested under Win 98, Win 2000 SP4, Win XP SP2.

Changes:
1. Platform specific code is moved to separate functions (opening
   of files and status information retrieving).
2. As xmlInitParser() should be called in multithreaded programs
   before use of any other library functions, detection of
   platform and appropriate API features is carried out in
   xmlRegisterDefaultInputCallbacks() and
   xmlRegisterDefaultOutputCallbacks().
   Thus there is no need to complicate a code,
   protecting it with the mutex.
   After initialization two static function pointers are
   used only for reading, therefore problems with
   multithreading will not arise too.
3. Unnecessary increase of string buffer length is removed in
   function __xmlIOWin32UTF8ToWChar().
4. The dynamic loading of msvcrt.dll is not used at all.
   The functions _wstat()/_wfopen() exists even in
   msvcrt20.dll (Win 95 distribution).
5. Functions xmlMalloc()/xmlFree() are used instead of malloc()/free().
6. In a code the stat() calls are used. If there is _stat()
   function in C library, appropriate macros is defined.
7. Code is changed for Windows only.

  This looks sensible, I particulary appreciate the large set of compilers
and platform that you report. Eric and others should still check it again
just in case but that sounds good ! Applied and commited to CVS,

   thanks a lot !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
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]