diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8d5eca680a..2b5189252c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,8 @@ 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). * Fix DAP2 proxy problems. See [Github #2764](https://github.com/Unidata/netcdf-c/pull/2764). * Cleanup a number of misc issues. See [Github #2763](https://github.com/Unidata/netcdf-c/pull/2763). * Mitigate the problem of test interference. See [Github #2755](https://github.com/Unidata/netcdf-c/pull/2755). diff --git a/include/ncconfigure.h b/include/ncconfigure.h index cad59c9e21..496ec59e03 100644 --- a/include/ncconfigure.h +++ b/include/ncconfigure.h @@ -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 diff --git a/libdispatch/ncexhash.c b/libdispatch/ncexhash.c index ea3957a054..26375e8d8f 100644 --- a/libdispatch/ncexhash.c +++ b/libdispatch/ncexhash.c @@ -111,7 +111,7 @@ ncexinit(void) int i; bitmasks[0] = 0; for(i=1;ileaflen, leafavg); fprintf(stderr," load=%g",leafload); fprintf(stderr,"]\n"); - dirsize = (1<<(map->depth))*((unsigned long long)sizeof(void*)); + dirsize = (1ULL<<(map->depth))*((unsigned long long)sizeof(void*)); leafsize = (nleaves)*((unsigned long long)sizeof(NCexleaf)); total = dirsize + leafsize; fprintf(stderr,"\tsizeof(directory)=%llu sizeof(leaves)=%lld total=%lld\n", diff --git a/libdispatch/nclistmgr.c b/libdispatch/nclistmgr.c index 48b4eeb584..4069e87698 100644 --- a/libdispatch/nclistmgr.c +++ b/libdispatch/nclistmgr.c @@ -81,8 +81,8 @@ free_NCList(void) int add_to_NCList(NC* ncp) { - int i; - int new_id; + unsigned int i; + unsigned int new_id; if(nc_filelist == NULL) { if (!(nc_filelist = calloc(1, sizeof(NC*)*NCFILELISTLENGTH))) return NC_ENOMEM; @@ -96,7 +96,7 @@ add_to_NCList(NC* ncp) if(new_id == 0) return NC_ENOMEM; /* no more slots */ nc_filelist[new_id] = ncp; numfiles++; - ncp->ext_ncid = (new_id << ID_SHIFT); + ncp->ext_ncid = (int)(new_id << ID_SHIFT); return NC_NOERR; } diff --git a/libncxml/Makefile.am b/libncxml/Makefile.am index 3866eae5ba..f5fab3b101 100644 --- a/libncxml/Makefile.am +++ b/libncxml/Makefile.am @@ -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 diff --git a/libncxml/tinyxml2.cpp b/libncxml/tinyxml2.cpp index 4f761ad319..c0d16eda0f 100644 --- a/libncxml/tinyxml2.cpp +++ b/libncxml/tinyxml2.cpp @@ -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 ); @@ -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 ); @@ -2317,6 +2320,7 @@ void XMLDocument::DeleteNode( XMLNode* node ) { } +#if 0 XMLError XMLDocument::LoadFile( const char* filename ) { if ( !filename ) { @@ -2420,6 +2424,8 @@ XMLError XMLDocument::SaveFile( FILE* fp, bool compact ) } +#endif /*0*/ + XMLError XMLDocument::Parse( const char* xml, size_t nBytes ) { Clear(); diff --git a/nctest/CMakeLists.txt b/nctest/CMakeLists.txt index d7de84a6cd..ada220f2ab 100644 --- a/nctest/CMakeLists.txt +++ b/nctest/CMakeLists.txt @@ -18,7 +18,9 @@ TARGET_LINK_LIBRARIES(nctest netcdf) ADD_TEST(nctest ${EXECUTABLE_OUTPUT_PATH}/nctest) add_bin_test_no_prefix(tst_rename) -add_sh_test(nctest compare_test_files) -IF(HAVE_BASH) - SET_TESTS_PROPERTIES(nctest_compare_test_files PROPERTIES DEPENDS nctest) -ENDIF(HAVE_BASH) +IF(BUILD_UTILITIES) + add_sh_test(nctest compare_test_files) + IF(HAVE_BASH) + SET_TESTS_PROPERTIES(nctest_compare_test_files PROPERTIES DEPENDS nctest) + ENDIF(HAVE_BASH) +ENDIF(BUILD_UTILITIES)