Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update internal tinyxml2 code to the latest version #2771

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release

## 4.9.3 - TBD

* Update the internal copy of tinyxml2 to latest code. See [Github #2771](https://github.com/Unidata/netcdf-c/pull/2771).
* Mitigate the problem of remote/nczarr-related test interference. See [Github #2755](https://github.com/Unidata/netcdf-c/pull/2755).
* Extend NCZarr to support unlimited dimensions. See [Github #2755](https://github.com/Unidata/netcdf-c/pull/2755).
* Fix significant bug in the NCZarr cache management. See [Github #2737](https://github.com/Unidata/netcdf-c/pull/2737).
Expand Down
2 changes: 1 addition & 1 deletion include/ncconfigure.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern "C" {
#endif

/* WARNING: in some systems, these functions may be defined as macros, so check */
#ifndef HAVE_STRDUP
#if ! defined(HAVE_STRDUP) || defined(__CYGWIN__)
#ifndef strdup
char* strdup(const char*);
#endif
Expand Down
19 changes: 16 additions & 3 deletions libncxml/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,20 @@ tinyxml2::
rm -fr ./tinyxml2 ./license.txt
git clone --depth=1 ${REPO}
cat tinyxml2/LICENSE.txt > ./license.txt
cat tinyxml2/tinyxml2.h > ./tinyxml2.h
sed -e 's/__BORLANDC__/__APPLE__/' < tinyxml2/tinyxml2.cpp \
| sed -e 's/ptrdiff_t/long/g' > ./tinyxml2.cpp
tr -d '\r' < tinyxml2/tinyxml2.h > tinyxml2.h
cat tinyxml2/tinyxml2.cpp \
| sed -e 's/__BORLANDC__/__APPLE__/' \
| sed -e 's/ptrdiff_t/long/g' \
| sed -e '/^static[ ]*FILE[*][ ]*callfopen(/i\
\#if 0' \
| sed -e '/^void[ ]*XMLDocument::DeleteNode(/i\
\#endif /*0*/\
' \
| sed -e '/^XMLError[ ]*XMLDocument::LoadFile([ ]*const[ ]*char[*]/i\
\#if 0' \
| sed -e '/^XMLError[ ]*XMLDocument::Parse(/i\
\#endif /*0*/\
' \
| tr -d '\r' \
| cat > ./tinyxml2.cpp
rm -fr tinyxml2
6 changes: 6 additions & 0 deletions libncxml/tinyxml2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2283,6 +2283,7 @@ XMLUnknown* XMLDocument::NewUnknown( const char* str )
return unk;
}

#if 0
static FILE* callfopen( const char* filepath, const char* mode )
{
TIXMLASSERT( filepath );
Expand All @@ -2299,6 +2300,8 @@ static FILE* callfopen( const char* filepath, const char* mode )
return fp;
}

#endif /*0*/

void XMLDocument::DeleteNode( XMLNode* node ) {
TIXMLASSERT( node );
TIXMLASSERT(node->_document == this );
Expand All @@ -2317,6 +2320,7 @@ void XMLDocument::DeleteNode( XMLNode* node ) {
}


#if 0
XMLError XMLDocument::LoadFile( const char* filename )
{
if ( !filename ) {
Expand Down Expand Up @@ -2420,6 +2424,8 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact )
}


#endif /*0*/

XMLError XMLDocument::Parse( const char* xml, size_t nBytes )
{
Clear();
Expand Down