From 03dd4e260ffde7ee51e8b5b7de6bd1d3e1d627b3 Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Sat, 25 Nov 2017 12:49:05 -0800 Subject: [PATCH 1/6] Make certain tests conditional on dependencies tst_h_rdc0 depends on ncdump_tst_netcdf4, which isn't build if HAVE_BASH isn't true. But CMake errors out with: -- Bash shell not found; disabling shell script tests. CMake Error at CMakeLists.txt:1521 (SET_PROPERTY): SET_PROPERTY given TEST names that do not exist: tst_h_rdc0 There are also some tests which cdl_do_maps depends on, but it is also not defined if HAVE_BASH isn't true. CMake errors out with: CMake Error at examples/CDL/CMakeLists.txt:10 (SET_TESTS_PROPERTIES): SET_TESTS_PROPERTIES Can not find test to add properties to: cdl_do_comps This patch makes these tests conditional, making CMake happy. --- examples/CDL/CMakeLists.txt | 11 ++++++----- ncdump/CMakeLists.txt | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/examples/CDL/CMakeLists.txt b/examples/CDL/CMakeLists.txt index c19198c45..132e4fdc9 100644 --- a/examples/CDL/CMakeLists.txt +++ b/examples/CDL/CMakeLists.txt @@ -7,11 +7,12 @@ FOREACH(F ${CDL_EXAMPLE_TESTS}) add_sh_test(cdl ${F}) ENDFOREACH() -SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS cdl_create_sample_files) -SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_simple_xy_wr) -SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_sfc_pres_temp_wr) -SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_test_pres_temp_4D_wr) - +if(TARGET cdl_do_comps) + SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS cdl_create_sample_files) + SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_simple_xy_wr) + SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_sfc_pres_temp_wr) + SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_test_pres_temp_4D_wr) +ENDIF() SET(CLEANFILES simple_xy.nc sfc_pres_temp.nc pres_temp_4D.nc) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}") diff --git a/ncdump/CMakeLists.txt b/ncdump/CMakeLists.txt index da1033607..ad8a5ccd8 100644 --- a/ncdump/CMakeLists.txt +++ b/ncdump/CMakeLists.txt @@ -174,10 +174,10 @@ ENDIF() # Known failure on MSVC; the number of 0's padding # is different, but the result is actually correct. - #IF(NOT MSVC) - add_sh_test(ncdump tst_netcdf4) - build_bin_test_no_prefix(tst_h_rdc0) - #ENDIF() + IF(HAVE_BASH) + add_sh_test(ncdump tst_netcdf4) + build_bin_test_no_prefix(tst_h_rdc0) + ENDIF() add_bin_test_no_prefix(tst_unicode) From 2281f3e133ace03521b1368ca8c6d7a1e3e813dc Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 2 Jan 2018 14:05:52 -0700 Subject: [PATCH 2/6] Added cross-build check fix in support of https://github.com/Unidata/netcdf-c/issues/753 --- CMakeLists.txt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd2d78a9e..3443890e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,6 @@ INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake) -INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceRuns.cmake) INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake) INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake) @@ -1207,14 +1206,12 @@ MARK_AS_ADVANCED(ENABLE_SHARED_LIBRARY_VERSION) SET(SIGNED_TEST_SOURCE "\n #include \n int main(void) {\n - char is_signed = (char) - 1;\n - if(is_signed < 0)\n - return 1;\n - else\n - return 0;\n + char error_if_char_is_signed[((char)-1) < 0 ? -1 : 1];\n + error_if_char_is_signed[0] = 0; + return -;\n }\n") -CHECK_C_SOURCE_RUNS("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__) +CHECK_C_SOURCE_COMPILES("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__) # Library include checks CHECK_INCLUDE_FILE("math.h" HAVE_MATH_H) From 09ee32b205f04c5d0d24ef6a4cc0a1dafc24d686 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 17 Jan 2018 08:25:15 -0700 Subject: [PATCH 3/6] fixed some header files, checked some return values --- include/rnd.h | 17 +++++++++++------ libsrc4/nc4file.c | 8 ++++++-- libsrc4/nc4var.c | 4 +++- ncgen/nc_iter.h | 6 +++--- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/include/rnd.h b/include/rnd.h index 4021a4d32..b26de52c1 100644 --- a/include/rnd.h +++ b/include/rnd.h @@ -1,9 +1,14 @@ -/* - * Copyright 1996, University Corporation for Atmospheric Research - * See netcdf/COPYRIGHT file for copying and redistribution conditions. +/* Copyright 1996-2018, University Corporation for Atmospheric + * Research See netcdf/COPYRIGHT file for copying and redistribution + * conditions. + * + * This header file contains some macros for rounding numbers. + * + * Glenn Davis, 1996 */ -/* $Id: rnd.h,v 2.13 1996/12/11 05:46:54 davis Exp $ */ -#ifndef _RNDUP + +#ifndef _RND_ +#define _RND_ /* useful for aligning memory */ #define _RNDUP(x, unit) ((((x) + (unit) - 1) / (unit)) \ @@ -14,4 +19,4 @@ #define M_RNDUP(x) _RNDUP(x, M_RND_UNIT) #define M_RNDDOWN(x) __RNDDOWN(x, M_RND_UNIT) -#endif +#endif /* _RND_ */ diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c index aeb75115a..0c3f92074 100644 --- a/libsrc4/nc4file.c +++ b/libsrc4/nc4file.c @@ -2028,7 +2028,9 @@ read_var(NC_GRP_INFO_T *grp, hid_t datasetid, const char *obj_name, att_read_var_callbk, &att_info)) < 0) BAIL(NC_EATTMETA); - nc4_vararray_add(grp, var); + /* Add a var to the variable array, growing it as needed. */ + if ((retval = nc4_vararray_add(grp, var))) + BAIL(retval); /* Is this a deflated variable with a chunksize greater than the * current cache size? */ @@ -2866,7 +2868,9 @@ nc4_open_hdf4_file(const char *path, int mode, NC *nc) var->created = NC_TRUE; var->written_to = NC_TRUE; - nc4_vararray_add(grp, var); + /* Add a var to the variable array, growing it as needed. */ + if ((retval = nc4_vararray_add(grp, var))) + BAIL(retval); /* Open this dataset in HDF4 file. */ if ((var->sdsid = SDselect(h5->sdid, v)) == FAIL) diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index 36be4e748..5c6ce2677 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -610,7 +610,9 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, var->ndims = ndims; var->is_new_var = NC_TRUE; - nc4_vararray_add(grp, var); + /* Add a var to the variable array, growing it as needed. */ + if ((retval = nc4_vararray_add(grp, var))) + BAIL(retval); /* Point to the type, and increment its ref. count */ var->type_info = type_info; diff --git a/ncgen/nc_iter.h b/ncgen/nc_iter.h index 5a2eed49c..ef2e88f1a 100644 --- a/ncgen/nc_iter.h +++ b/ncgen/nc_iter.h @@ -4,8 +4,8 @@ * "$Id $" *********************************************************************/ -#ifndef _NCITER_ -#define _NCITER_ +#ifndef _NC_ITER_ +#define _NC_ITER_ #include @@ -49,4 +49,4 @@ nc_next_iter(nciter_t *iterp, size_t *start, size_t *count); } #endif -#endif /* _NCITER_ */ +#endif /* _NC_ITER_ */ From 9949a11155dcbafa359cf20385ffd0c4c21e6949 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 17 Jan 2018 09:09:58 -0700 Subject: [PATCH 4/6] removed some unneeded HDF4 checks, added some needed parameter checks --- libsrc4/nc4file.c | 2 +- libsrc4/nc4var.c | 60 ++++++++++++++++----------------------- nc_test4/Makefile.am | 2 +- nc_test4/tst_chunk_hdf4.c | 34 +++++++++++++++------- nc_test4/tst_interops2.c | 11 +++++++ 5 files changed, 61 insertions(+), 48 deletions(-) diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c index 0c3f92074..cb26bf97f 100644 --- a/libsrc4/nc4file.c +++ b/libsrc4/nc4file.c @@ -2870,7 +2870,7 @@ nc4_open_hdf4_file(const char *path, int mode, NC *nc) /* Add a var to the variable array, growing it as needed. */ if ((retval = nc4_vararray_add(grp, var))) - BAIL(retval); + return retval; /* Open this dataset in HDF4 file. */ if ((var->sdsid = SDselect(h5->sdid, v)) == FAIL) diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index 5c6ce2677..7cb3f2ad1 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -534,7 +534,7 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, BAIL(retval); /* These degrubbing messages sure are handy! */ - LOG((3, "%s: name %s type %d ndims %d", __func__, norm_name, xtype, ndims)); + LOG((2, "%s: name %s type %d ndims %d", __func__, norm_name, xtype, ndims)); #ifdef LOGGING { int dd; @@ -597,7 +597,7 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, BAIL(NC_EBADTYPE); } - /* Add a new var. */ + /* Create a new var and fill in some HDF5 cache setting values. */ if ((retval = nc4_var_add(&var))) BAIL(retval); @@ -673,14 +673,9 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, } } - /* Check for unlimited dimension and turn off contiguous storage */ - /* (unless HDF4 file) */ -#ifdef USE_HDF4 - if (dim->unlimited && !h5->hdf4) -#else - if (dim->unlimited) -#endif - var->contiguous = NC_FALSE; + /* Check for unlimited dimension and turn off contiguous storage. */ + if (dim->unlimited) + var->contiguous = NC_FALSE; /* Track dimensions for variable */ var->dimids[d] = dimidsp[d]; @@ -975,6 +970,10 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, int retval; nc_bool_t ishdf4 = NC_FALSE; /* Use this to avoid so many ifdefs */ + /* All or none of these will be provided. */ + assert((deflate && deflate_level && shuffle) || + (!deflate && !deflate_level && !shuffle)); + LOG((2, "%s: ncid 0x%x varid %d", __func__, ncid, varid)); /* Find info for this file and group, and set pointer to each. */ @@ -982,9 +981,9 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, return retval; assert(nc && grp && h5); -#ifdef USE_HDF4 - ishdf4 = h5->hdf4; -#endif + /* Trying to write to a read-only file? No way, Jose! */ + if (h5->no_write) + return NC_EPERM; /* Find the var. */ if (varid < 0 || varid >= grp->vars.nelems) @@ -992,12 +991,6 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, var = grp->vars.value[varid]; assert(var && var->varid == varid); - /* Can't turn on contiguous and deflate/fletcher32/szip. */ - if (contiguous) - if ((*contiguous != NC_CHUNKED && deflate) || - (*contiguous != NC_CHUNKED && fletcher32)) - return NC_EINVAL; - /* Can't turn on parallel and deflate/fletcher32/szip/shuffle. */ if (nc->mode & (NC_MPIIO | NC_MPIPOSIX)) { if (deflate || fletcher32 || shuffle) @@ -1056,19 +1049,14 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, if (var->deflate || var->fletcher32 || var->shuffle) return NC_EINVAL; - if (!ishdf4) { - for (d = 0; d < var->ndims; d++) - { - dim = var->dim[d]; - if (dim->unlimited) - return NC_EINVAL; - } - var->contiguous = NC_TRUE; - } + for (d = 0; d < var->ndims; d++) + if (var->dim[d]->unlimited) + return NC_EINVAL; + var->contiguous = NC_TRUE; } /* Chunksizes anyone? */ - if (!ishdf4 && contiguous && *contiguous == NC_CHUNKED) + if (contiguous && *contiguous == NC_CHUNKED) { var->contiguous = NC_FALSE; @@ -1079,10 +1067,9 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, if ((retval = check_chunksizes(grp, var, chunksizes))) return retval; - for (d = 0; d < var->ndims; d++) { - if(var->dim[d]->len > 0 && chunksizes[d] > var->dim[d]->len) + for (d = 0; d < var->ndims; d++) + if (var->dim[d]->len > 0 && chunksizes[d] > var->dim[d]->len) return NC_EBADCHUNK; - } /* Set the chunksizes for this variable. */ for (d = 0; d < var->ndims; d++) @@ -1092,7 +1079,7 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate, /* Is this a variable with a chunksize greater than the current * cache size? */ - if (!var->contiguous && (chunksizes || deflate || contiguous)) + if (!var->contiguous && (deflate || contiguous)) { /* Determine default chunksizes for this variable (do nothing * for scalar vars). */ @@ -1569,8 +1556,11 @@ NC4_rename_var(int ncid, int varid, const char *name) int retval = NC_NOERR; int i; - LOG((2, "%s: ncid 0x%x varid %d name %s", - __func__, ncid, varid, name)); + if (!name) + return NC_EINVAL; + + LOG((2, "%s: ncid 0x%x varid %d name %s", __func__, ncid, varid, + name)); /* Find info for this file and group, and set pointer to each. */ if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5))) diff --git a/nc_test4/Makefile.am b/nc_test4/Makefile.am index 41885b804..3bcb00d6c 100644 --- a/nc_test4/Makefile.am +++ b/nc_test4/Makefile.am @@ -96,7 +96,7 @@ check_PROGRAMS += tst_interops2 tst_chunk_hdf4 tst_h4_lendian if BUILD_UTILITIES # This test script depends on ncdump. -TESTS += tst_formatx_hdf4.sh +TESTS += tst_interops2 tst_formatx_hdf4.sh endif # BUILD_UTILITIES TESTS += run_chunk_hdf4.sh tst_h4_lendian diff --git a/nc_test4/tst_chunk_hdf4.c b/nc_test4/tst_chunk_hdf4.c index 104e44b59..f9edb221d 100644 --- a/nc_test4/tst_chunk_hdf4.c +++ b/nc_test4/tst_chunk_hdf4.c @@ -3,6 +3,8 @@ COPYRIGHT file for conditions of use. Test that NetCDF-4 can read HDF4 files. + + Dennis Heimbigner, Ward Fisher, Ed Hartnett */ #include #include @@ -32,9 +34,8 @@ main(int argc, char **argv) int d; int storage; size_t chunksizes[NC_MAX_VAR_DIMS]; - const char* srcdir = "."; - printf("\n*** Testing HDF4/NetCDF-4 chunking API: chunked...\n"); + printf("\n*** Testing HDF4/NetCDF-4 chunking API: chunked..."); { /* Open with netCDF */ @@ -51,20 +52,21 @@ main(int argc, char **argv) if(nc_inq_var_chunking(ncid,varid,&storage,chunksizes)) ERR; if(storage == NC_CONTIGUOUS) { - fprintf(stderr,"nc_inq_var_chunking did not return CHUNKED\n"); - ERR; + fprintf(stderr,"nc_inq_var_chunking did not return CHUNKED\n"); + ERR; } for(d=0;d #include @@ -10,6 +11,7 @@ #include #include #include +#include #define FILE_NAME "tst_interops2.h4" @@ -56,6 +58,15 @@ main(int argc, char **argv) if (nc_inq_dim(ncid, 1, NULL, &len_in)) ERR; if (len_in != LON_LEN) ERR; + /* THese won't work. */ + if (nc_redef(ncid) != NC_EPERM) ERR; + if (nc_def_var(ncid, "wow", NC_INT, 0, NULL, NULL) != NC_EPERM) ERR; + if (nc_def_var_chunking(ncid, 0, NC_CONTIGUOUS, NULL) != NC_EPERM) ERR; + + /* Expected this to return NC_EPERM, but instead it returns + * success. See github issue #744. */ + if (nc_def_var_chunking_ints(ncid, 0, NC_CONTIGUOUS, NULL)) ERR; + /* Read the data through a vara function from the netCDF API. */ if (nc_get_vara(ncid, 0, nstart, ncount, data_in)) ERR; for (i = 0; i < LAT_LEN; i++) From cf92670687e8bbcf90d2010fe9bf552cb0e46d2e Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 17 Jan 2018 09:20:20 -0700 Subject: [PATCH 5/6] added guards for header files that needed them --- include/rnd.h | 6 +++--- ncdap_test/t_dap3a.c | 1 - ncdump/indent.h | 6 +++++- ncdump/isnan.h | 6 +++++- ncdump/ncdump.c | 2 +- ncdump/nctime0.h | 7 ++++++- ncdump/utils.h | 5 +++++ ncdump/vardata.h | 6 +++++- ncgen/nc_iter.h | 6 +++--- 9 files changed, 33 insertions(+), 12 deletions(-) diff --git a/include/rnd.h b/include/rnd.h index b26de52c1..90da7d2a1 100644 --- a/include/rnd.h +++ b/include/rnd.h @@ -7,8 +7,8 @@ * Glenn Davis, 1996 */ -#ifndef _RND_ -#define _RND_ +#ifndef _RND_H +#define _RND_H /* useful for aligning memory */ #define _RNDUP(x, unit) ((((x) + (unit) - 1) / (unit)) \ @@ -19,4 +19,4 @@ #define M_RNDUP(x) _RNDUP(x, M_RND_UNIT) #define M_RNDDOWN(x) __RNDDOWN(x, M_RND_UNIT) -#endif /* _RND_ */ +#endif /* _RND_H */ diff --git a/ncdap_test/t_dap3a.c b/ncdap_test/t_dap3a.c index 518358f49..535579ace 100644 --- a/ncdap_test/t_dap3a.c +++ b/ncdap_test/t_dap3a.c @@ -113,7 +113,6 @@ int main() int ncstat = NC_NOERR; char url[8102]; const char* topsrcdir; - size_t len; #ifndef USE_NETCDF4 int i,j; #endif diff --git a/ncdump/indent.h b/ncdump/indent.h index d69c3ad77..15b8981f0 100644 --- a/ncdump/indent.h +++ b/ncdump/indent.h @@ -1,8 +1,10 @@ /********************************************************************* * Copyright 2007, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. - * $Header: /upc/share/CVS/netcdf-3/ncdump/indent.h,v 1.1 2007/05/20 20:42:30 russ Exp $ + * Russ Rew *********************************************************************/ +#ifndef _INDENT_H +#define _INDENT_H #ifdef __cplusplus extern "C" { @@ -18,3 +20,5 @@ extern int indent_get(); /* return current indent */ #ifdef __cplusplus } #endif + +#endif /* _INDENT_H */ diff --git a/ncdump/isnan.h b/ncdump/isnan.h index 3d7f50e2e..c62f801fe 100644 --- a/ncdump/isnan.h +++ b/ncdump/isnan.h @@ -1,8 +1,10 @@ /********************************************************************* * Copyright 2008, University Corporation for Atmospheric Research * See netcdf/README file for copying and redistribution conditions. - * $Id: isnan.h,v 1.3 2008/04/23 22:05:00 russ Exp $ + * Russ Rew *********************************************************************/ +#ifndef _ISNAN_H +#define _ISNAN_H #include "config.h" @@ -20,3 +22,5 @@ #if ! (defined(isfinite) || HAVE_DECL_ISFINITE) #define isfinite(x) (!(isinf(x)||isnan(x))) #endif /* !HAVE_DECL_ISFINITE */ + +#endif /* _ISNAN_H */ diff --git a/ncdump/ncdump.c b/ncdump/ncdump.c index 5bd2f2d7b..492cf6cfa 100644 --- a/ncdump/ncdump.c +++ b/ncdump/ncdump.c @@ -273,7 +273,7 @@ kind_string(int kind) case NC_FORMAT_NETCDF4_CLASSIC: return "netCDF-4 classic model"; default: - error("unrecognized file format: %d"); + error("unrecognized file format: %d", kind); return "unrecognized"; } } diff --git a/ncdump/nctime0.h b/ncdump/nctime0.h index a59b92175..c3558e284 100644 --- a/ncdump/nctime0.h +++ b/ncdump/nctime0.h @@ -1,8 +1,10 @@ /********************************************************************* * Copyright 2008, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. - * $Id: nctime.h,v 1.6 2010/03/18 19:24:26 russ Exp $ + * Russ Rew *********************************************************************/ +#ifndef _NCTIME0_H +#define _NCTIME0_H #include "nctime.h" @@ -12,3 +14,6 @@ extern int is_valid_time_unit(const char *units); extern int is_bounds_att(ncatt_t *attp); extern void get_timeinfo(int ncid, int varid, ncvar_t *vp); extern void print_att_times(int ncid, int varid, const ncatt_t *att); + +#endif /* _NCTIME0_H */ + diff --git a/ncdump/utils.h b/ncdump/utils.h index 6d06ed7b7..237647adf 100644 --- a/ncdump/utils.h +++ b/ncdump/utils.h @@ -5,6 +5,8 @@ * Stuff that's common to both ncdump and nccopy * *********************************************************************/ +#ifndef _UTILS_H +#define _UTILS_H #include "config.h" @@ -157,3 +159,6 @@ extern int getrootid(int grpid); #ifdef __cplusplus } #endif + +#endif /* _UTILS_H */ + diff --git a/ncdump/vardata.h b/ncdump/vardata.h index 287bb7981..a70520720 100644 --- a/ncdump/vardata.h +++ b/ncdump/vardata.h @@ -1,8 +1,10 @@ /********************************************************************* * Copyright 1993, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. - * $Header: /upc/share/CVS/netcdf-3/ncdump/vardata.h,v 1.7 2007/10/08 02:47:57 russ Exp $ + * Russ Rew *********************************************************************/ +#ifndef _VARDATA_H +#define _VARDATA_H extern char *progname; /* for error messages */ @@ -43,3 +45,5 @@ extern void pr_any_att_vals( const ncatt_t *attp, const void *vals ); #ifdef __cplusplus } #endif + +#endif /* _VARDATA_H */ diff --git a/ncgen/nc_iter.h b/ncgen/nc_iter.h index ef2e88f1a..8c9f70ae4 100644 --- a/ncgen/nc_iter.h +++ b/ncgen/nc_iter.h @@ -4,8 +4,8 @@ * "$Id $" *********************************************************************/ -#ifndef _NC_ITER_ -#define _NC_ITER_ +#ifndef _NC_ITER_H +#define _NC_ITER_H #include @@ -49,4 +49,4 @@ nc_next_iter(nciter_t *iterp, size_t *start, size_t *count); } #endif -#endif /* _NC_ITER_ */ +#endif /* _NC_ITER_H */ From b850482b8e965cc2fd6516e66ce2e4bf3879c74d Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 18 Jan 2018 10:50:24 -0700 Subject: [PATCH 6/6] Updated cdash dashboard location. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3443890e7..8ccc2646f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -895,8 +895,7 @@ IF(ENABLE_TESTS) # Options for CTest-based tests, dashboards. SET(NC_CTEST_PROJECT_NAME "netcdf-c" CACHE STRING "Project Name for CTest-based testing purposes.") - SET(NC_CTEST_DROP_SITE "129.114.104.111" CACHE STRING "Dashboard location for CTest-based testing purposes.") - #SET(NC_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CTest-based testing purposes.") + SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu" CACHE STRING "Dashboard location for CTest-based testing purposes.") SET(NC_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.") FIND_PROGRAM(HOSTNAME_CMD NAMES hostname)