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



Hello,

i'm trying to compile libxml2 on MPE i/X 6.0 (and that is a pretty
adventure, btw... 8)
That platform doesn't provide a 'strdup()'-function, which is a pitty but OK
inasmuch as it's not ANSI conform (AFAIK).
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()').
When i try to compile libxml (with disabled DEBUG_MEMORY_LOCATION), i get an
error:

  cc: "xmlmemory.c",  line 669: error 1588: "strdup" undefined.

Around line 669 in "xmlmemory.c" we have

  660: #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
  661:   xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
  662:   xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
  663:   xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
  664:   xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
  665: #else
  666:   xmlFreeFunc xmlFree = (xmlFreeFunc) free;
  667:   xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
  668:   xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
  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?




Mit freundlichen Gruessen - Kind regards
Markus Henke



________________________Addressed by:________________________
 ORDAT GmbH & Co. KG  -  Serversystems / eCom 
 Dipl.-Inf. (FH) Markus Henke  Fon: +49 (641) 7941-0
 Rathenaustr. 1                Fax: +49 (641) 7941-132
 35394 Gießen                  mailto:markus henke ordat com
 See:                          http://www.ordat.com
_____________________________________________________________
              ...this behavior is by design...

 <<Markus Henke.vcf>> 

Attachment: Markus Henke.vcf
Description: Binary data



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