knoaman 2003/06/02 07:21:05
Modified: c/src/xercesc/util/Platforms/NetBSD NetBSDPlatformUtils.cpp
Log:
[Bug 20413] Xerces 2.3 does not compile under NetBSD 1.6. Patch by Berin Lautenbach.
Revision Changes Path
1.4 +9 -9
xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp
Index: NetBSDPlatformUtils.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NetBSDPlatformUtils.cpp 19 May 2003 11:11:16 -0000 1.3
+++ NetBSDPlatformUtils.cpp 2 Jun 2003 14:21:05 -0000 1.4
@@ -421,7 +421,8 @@
return (unsigned long)(t.tv_sec*1000 + t.tv_usec);
}
-XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath)
+XMLCh* XMLPlatformUtils::getFullPath(const XMLCh* const srcPath,
+ MemoryManager* const manager)
{
//
@@ -429,20 +430,19 @@
// so we know that its not some pathological freaky path. It comes in
// in native format, and goes out as Unicode always
//
- char* newSrc = XMLString::transcode(srcPath);
- ArrayJanitor<char> janText(newSrc);
+ char* newSrc = XMLString::transcode(srcPath, fgMemoryManager);
+ ArrayJanitor<char> janText(newSrc, fgMemoryManager);
// Use a local buffer that is big enough for the largest legal path
- char *absPath = new char[1024];
+ char absPath[1024];
// get the absolute path
- char* retPath = realpath(newSrc, absPath);
- ArrayJanitor<char> janText2(retPath);
+ char* retPath = realpath(newSrc, absPath);
if (!retPath)
{
ThrowXML(XMLPlatformUtilsException,
XMLExcepts::File_CouldNotGetBasePathName);
}
- return XMLString::transcode(absPath);
+ return XMLString::transcode(absPath, manager);
}
bool XMLPlatformUtils::isRelative(const XMLCh* const toCheck)
@@ -463,7 +463,7 @@
return true;
}
-XMLCh* XMLPlatformUtils::getCurrentDirectory()
+XMLCh* XMLPlatformUtils::getCurrentDirectory(MemoryManager* const manager)
{
char dirBuf[PATH_MAX + 1];
char *curDir = getcwd(&dirBuf[0], PATH_MAX + 1);
@@ -474,7 +474,7 @@
XMLExcepts::File_CouldNotGetBasePathName);
}
- return XMLString::transcode(curDir);
+ return XMLString::transcode(curDir, manager);
}
inline bool XMLPlatformUtils::isAnySlash(XMLCh c)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]