Re: [xml] Use of 'strdup' in xmlmemory.c?



On Fri, Dec 07, 2001 at 06:41:01PM +0100, Henke, Markus wrote:
Hello,

i'm trying to compile libxml2 on MPE i/X 6.0 (and that is a pretty
adventure, btw... 8)

  Well as long as you have an ansi compiler this should not be that
hard (this uses ASCII for C strings encoding I hope).

That platform doesn't provide a 'strdup()'-function, which is a pitty but OK
inasmuch as it's not ANSI conform (AFAIK).

  Yup, I used to work on a DecStation which hadn't it either

So, HAVE_STRDUP if  *undefined*  in "config.h", trio support is  *enabled*
in "xmlversion.h" (although i don't know if trio cares about 'strdup()').

  I don't think so.

  669:   xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) strdup;
  670: #endif

I'm not sure, but could it be that this is a vioalation of the portability
rules of libxml?

  Yep, it's bad replace it with 

  xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;

BTW with more recent version of the libraries it's in globals.c

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
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]