Re: [xml] windows multi-threading

2005-02-24 Thread Daniel Veillard
On Thu, Feb 24, 2005 at 12:25:55PM -0500, Rob Richards wrote: > Here's the revised patch. Okay, applied and commited, thanks ! Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.c

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
Here's the revised patch. Rob Rich Salz wrote: Both fixes are correct. (I thought II returned the old value) Can you post a revised patch so Daniel can commit it? thanks for debugging my code. :) Index: threads.c === RCS file: /cvs

Re: [xml] windows multi-threading

2005-02-24 Thread Rich Salz
Both fixes are correct. (I thought II returned the old value) Can you post a revised patch so Daniel can commit it? thanks for debugging my code. :) -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.d

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
That one does compile. Get a warning now: ..\threads.c(702) : warning C4020: 'InterlockedIncrement' : too many actual parameters Shouldn't it be: if (InterlockedIncrement(&run_once.control) == 1) removed the second parameter and test == 1 (otherwise go into a nice forever loop calling Sleep(0))

Re: [xml] windows multi-threading

2005-02-24 Thread Rich Salz
thanks. try this patch. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html *** threads.c.orig Thu Feb 24 10:06:35 2005 --- threads.c Thu Feb 24 11:28

Re: [xml] windows multi-threading

2005-02-24 Thread Rob Richards
Just tried it and it breaks my build (confirmed that patch was applied correctly). Using VC++ 6 with default args other than debug=yes mem_debug=yes ..\threads.c(112) : error C2061: syntax error : identifier 'int32' ..\threads.c(114) : error C2059: syntax error : '}' ..\threads.c(701) : error C2

Re: [xml] windows multi-threading

2005-02-24 Thread Daniel Veillard
On Thu, Feb 24, 2005 at 10:15:58AM -0500, Rich Salz wrote: > > Can you generate a patch ? > > Sure, attached. Untested. The code now looks similar to the beos code. Hum, I can't test it, it didn't broke on Linux, I commited I hope someone can give it a try on Windows, thanks, Daniel --

Re: [xml] windows multi-threading

2005-02-24 Thread Rich Salz
> Can you generate a patch ? Sure, attached. Untested. The code now looks similar to the beos code. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html ***

Re: [xml] windows multi-threading

2005-02-24 Thread Daniel Veillard
On Thu, Feb 24, 2005 at 09:33:11AM -0500, Rich Salz wrote: > In threads.c for the windows platform it might be better to use > InterlockedIncrement on run_once_init so that you get better pthread_once > semantics. See this link for details > http://pluto.cdpa.nsysu.edu.tw/sourceware/pthreads-win32

Re: [xml] xmlParseFile;encode - newbie question

2005-02-24 Thread Pieter Louw
Yes but you MUST fix the problem on input. Especially for this kind of stupid, obvious brokeness. I'm horribly serious about this, and there is no garantee I will keep that mode available except for a couple of API calls purely dedicated to recovery in the future. You are warned, I already state

[xml] windows multi-threading

2005-02-24 Thread Rich Salz
In threads.c for the windows platform it might be better to use InterlockedIncrement on run_once_init so that you get better pthread_once semantics. See this link for details http://pluto.cdpa.nsysu.edu.tw/sourceware/pthreads-win32/sources/pthreads-snap-2005-01-25/pthread_once.c -- Rich Salz

Re: [xml] xmlParseFile;encode - newbie question

2005-02-24 Thread Daniel Veillard
On Thu, Feb 24, 2005 at 03:59:51PM +0200, Pieter Louw wrote: > #The cleanest way I can think of to handle this > #is to have a "forgiving" mode for libxml2 that treats bad entity references > #as plain text. > > Is there currently a feature available to put the parser in "forgiving" > mode? Ye

Re: [xml] xmlParseFile;encode - newbie question

2005-02-24 Thread Pieter Louw
#The cleanest way I can think of to handle this #is to have a "forgiving" mode for libxml2 that treats bad entity references #as plain text. Is there currently a feature available to put the parser in "forgiving" mode? ___ xml mailing list, project page

Re: [xml] xmlParseFile;encode - newbie question

2005-02-24 Thread Eric Haszlakiewicz
On Wed, Feb 23, 2005 at 01:01:04PM +0100, Baurzhan Ismagulov wrote: > On Wed, Feb 23, 2005 at 01:21:05PM +0200, Pieter Louw wrote: > > That is my question, how do I convert the & to &? > > > > or are there no function to do this in libxml? > > As Daniel said, "Whatever generating this must be fix