You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by James Berry <jb...@criticalpath.com> on 2000/05/12 22:27:52 UTC
use of include nonstandard
A number of Xerces files include <memory.h>, which to my way of thinking
is not a standard C++ header. In all cases I've seen, this code is
actually trying to get to the various memcpy, memset, etc, routines,
which are defined by the standard to be in <string.h>.
Files that include <memory.h> and should really include <string.h>
instead.
The include <memory.h> in these files should be replaced with include
<string.h>:
- XMLFormatter.cpp
- XMLReader.cpp
- StringPool.cpp
- XML256TableTranscoder.cpp
- XML88591Transcoder.cpp
- XMLAsciiTranscoder.cpp
- XMLChTranscoder.cpp
- XMLUTF16Transcoder.cpp
- NamedIdPool.hpp
Files that include <memory.h> but don't seem to actually rely on it.
They may include <string.h> as well.
The include <memory.h> in these files should be removed:
- BinMemInputStream.cpp
- CMStateSet.hpp
- ElemStack.cpp
- MixedContentModel.cpp
- XMLBuffer.cpp
- XMLBufferMgr.cpp
Files that don't include <memory.h>, but instead rely on someone else to
do it.
This file should include <string.h>.
- SAXParser.cpp
Thanks!
-jdb
--
James D. Berry
Critical Path jberry@criticalpath.com
Software, Inc.
711 SW Alder St, www.criticalpath.com
Third Floor voice:503 222 2922
Portland OR 97205 fax:503 222 3020
Re: use of include nonstandard
Posted by Andy Heninger <an...@jtcsv.com>.
Right you are. I'll get those changes back into CVS today.
Andy Heninger
IBM XML Technology Group, Cupertino, CA
heninger@us.ibm.com
----- Original Message -----
From: James Berry
A number of Xerces files include <memory.h>, which to my way of thinking is
not a standard C++ header. In all cases I've seen, this code is actually
trying to get to the various memcpy, memset, etc, routines, which are
defined by the standard to be in <string.h>.
Files that include <memory.h> and should really include <string.h> instead.
The include <memory.h> in these files should be replaced with include
<string.h>:
- XMLFormatter.cpp
- XMLReader.cpp
- StringPool.cpp
- XML256TableTranscoder.cpp
- XML88591Transcoder.cpp
- XMLAsciiTranscoder.cpp
- XMLChTranscoder.cpp
- XMLUTF16Transcoder.cpp
- NamedIdPool.hpp
Files that include <memory.h> but don't seem to actually rely on it. They
may include <string.h> as well.
The include <memory.h> in these files should be removed:
- BinMemInputStream.cpp
- CMStateSet.hpp
- ElemStack.cpp
- MixedContentModel.cpp
- XMLBuffer.cpp
- XMLBufferMgr.cpp
Files that don't include <memory.h>, but instead rely on someone else to do
it.
This file should include <string.h>.
- SAXParser.cpp
Thanks!
-jdb
-- James D. Berry
Critical Path Software, Inc.
711 SW Alder St, Third Floor
Portland OR 97205jberry@criticalpath.com
www.criticalpath.com
voice:503 222 2922
fax:503 222 3020
Re: use of include nonstandard
Posted by James Berry <jb...@criticalpath.com>.
What I perhaps should have said, but didn't, is that memory.h does not
exist on some systems, or (Macintosh) may be used for something entirely
different. The improper use of this header thus causes complications in
porting Xerces to additional platforms.
-jdb
James Berry wrote:
> A number of Xerces files include <memory.h>, which to my way of
> thinking is not a standard C++ header. In all cases I've seen, this
> code is actually trying to get to the various memcpy, memset, etc,
> routines, which are defined by the standard to be in <string.h>.
>
> Files that include <memory.h> and should really include <string.h>
> instead.
> The include <memory.h> in these files should be replaced with include
> <string.h>:
>
> - XMLFormatter.cpp
> - XMLReader.cpp
> - StringPool.cpp
> - XML256TableTranscoder.cpp
> - XML88591Transcoder.cpp
> - XMLAsciiTranscoder.cpp
> - XMLChTranscoder.cpp
> - XMLUTF16Transcoder.cpp
> - NamedIdPool.hpp
>
> Files that include <memory.h> but don't seem to actually rely on it.
> They may include <string.h> as well.
> The include <memory.h> in these files should be removed:
>
> - BinMemInputStream.cpp
> - CMStateSet.hpp
> - ElemStack.cpp
> - MixedContentModel.cpp
> - XMLBuffer.cpp
> - XMLBufferMgr.cpp
>
> Files that don't include <memory.h>, but instead rely on someone else
> to do it.
> This file should include <string.h>.
>
> - SAXParser.cpp
>
> Thanks!
>
> -jdb
> --
> James D. Berry
Critical Path jberry@criticalpath.com
Software, Inc.
711 SW Alder St, www.criticalpath.com
Third Floor voice:503 222 2922
Portland OR 97205 fax:503 222 3020
>