Commit Graph

425 Commits

Author SHA1 Message Date
Ed Hartnett
01d1364331 user defined formats working 2018-06-03 06:14:23 -06:00
Ed Hartnett
0f0cd5085a configure options for user-defined formats 2018-06-02 07:13:08 -06:00
Ed Hartnett
b9c0fd473d
Merge branch 'master' into ejh_logging 2018-05-17 04:26:28 -06:00
Ward Fisher
3f83cc4926 Merge branch 'master' into inmem2.dmh 2018-05-16 14:24:19 -06:00
Ed Hartnett
c06ec6aa48
Merge branch 'master' into ejh_logging 2018-05-14 17:17:36 -06:00
Ed Hartnett
ebc6f1fd86 change to trigger CI 2018-05-13 08:38:21 -06:00
Ed Hartnett
60f7732142 cleaned up handling of classic only builds 2018-05-13 06:35:19 -06:00
Ed Hartnett
82c80c8c6c fixed issue building without nc_set_log_level 2018-05-12 11:46:04 -06:00
Ed Hartnett
27a74dee54 now always define nc_set_log_level unless user disables 2018-05-12 11:27:11 -06:00
Dennis Heimbigner
3c7ffcc6d1 Fix https://github.com/Unidata/netcdf-c/issues/963
Fix https://github.com/Unidata/netcdf-c/issues/962

1. remove the --disable-diskless option since it is no
   longer needed. Similarly for CMakeLists.txt.
2. Fixed nc4files.c where BAIL and return were mixed
   leading to situation where cleanup code was not
   being invoked. This probably occurs elsewhere,
   but I did not find any specifically.
2018-05-11 15:30:19 -06:00
Ed Hartnett
c402b79ed8 merged changes from master 2018-05-08 12:13:03 -06:00
Ed Hartnett
5526ca65d1 created libhdf5, moved some files 2018-05-08 11:58:01 -06:00
Dennis Heimbigner
9aa1e9a14e master merge 2018-05-03 21:02:12 -06:00
luz.paz
74fbacdb82 Misc. source comment typos
Some are user-facing. Found via `codespell` and through the downstream FreeCAD.
2018-04-26 23:04:01 -04:00
Dennis Heimbigner
ff212442f1 merge master and conflict resolve 2018-04-26 14:22:01 -06:00
Dennis Heimbigner
0a44d9ae3a Merge branch 'master' into inmemory.dmh 2018-04-23 11:30:14 -06:00
Dennis Heimbigner
d3b309722e re: gh issue https://github.com/Unidata/netcdf-c/issues/911
I took Ed's advice and moved the plugin stuff to its own
top-level directory. This is an attempt to solve the problem of
copying files that we have experienced. In any case, it will
serve as a place to stick additional plugins.
2018-04-21 20:10:47 -06:00
Ward Fisher
1ff184d988 Enabled CDF5 support by default, in support of https://github.com/Unidata/netcdf-c/issues/931 2018-04-19 13:26:58 -06:00
Dennis Heimbigner
4739cd3225 Master merge and conflict resolution 2018-04-12 21:51:17 -06:00
Ward Fisher
e2e2c2117f
Merge branch 'master' into index.dmh 2018-04-02 18:13:34 -06:00
Ed Hartnett
bf3757c2d6
Merge branch 'master' into ejh_valgrind_3 2018-03-30 18:48:37 -06:00
Ed Hartnett
4652d9c3df fixed spaces 2018-03-28 18:04:24 -06:00
Ed Hartnett
af79dfa14d new method of using valgrind 2018-03-28 13:54:05 -06:00
Ward Fisher
36c4b7947d Merge branch 'master' into newhash1.dmh 2018-03-20 11:20:14 -06:00
Dennis Heimbigner
cc136cad08 Add a configurable "test case" that will create
and then open a file with a lot of metadata.
The test is configurable to determine the parameters
for the created metadata.
2018-03-17 16:25:13 -06:00
Dennis Heimbigner
25f062528b This completes (for now) the refactoring of libsrc4.
The file docs/indexing.dox tries to provide design
information for the refactoring.

The primary change is to replace all walking of linked
lists with the use of the NCindex data structure.
Ncindex is a combination of a hash table (for name-based
lookup) and a vector (for walking the elements in the index).
Additionally, global vectors are added to NC_HDF5_FILE_INFO_T
to support direct mapping of an e.g. dimid to the NC_DIM_INFO_T
object. These global vectors exist for dimensions, types, and groups
because they have globally unique id numbers.

WARNING:
1. since libsrc4 and libsrchdf4 share code, there are also
   changes in libsrchdf4.
2. Any outstanding pull requests that change libsrc4 or libhdf4
   are likely to cause conflicts with this code.
3. The original reason for doing this was for performance improvements,
   but as noted elsewhere, this may not be significant because
   the meta-data read performance apparently is being dominated
   by the hdf5 library because we do bulk meta-data reading rather
   than lazy reading.
2018-03-16 11:46:18 -06:00
Ward Fisher
ede8f1b02e Bumping to post-4.6.1-release, for merge back into master. 2018-03-15 11:29:32 -06:00
Ed Hartnett
17f7a76356 moved HDF4 tests 2018-03-05 03:45:18 -07:00
Ward Fisher
c359a0e96a
Merge branch 'master' into newhash1.dmh 2018-03-04 22:40:51 -07:00
Ward Fisher
faad52041f Merge branch 'ejh_valgrind_removal_unidata_again' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into pr-aggregation2.wif 2018-03-02 14:22:42 -07:00
Dennis Heimbigner
618f786053 Merge branch 'master' into inmemory.dmh 2018-02-28 10:46:02 -07:00
Ward Fisher
1f6264273e
Merge branch 'master' into newhash1.dmh 2018-02-27 12:15:06 -07:00
Ed Hartnett
45329862a8 removed valgrind stuff 2018-02-27 08:36:12 -07:00
Ward Fisher
18c47417f7 Updated ac, cmake based builds to require parallel functionality when parallel tests are requested. 2018-02-26 17:08:26 -07:00
Ward Fisher
43b9c6302c Fix in support of https://github.com/Unidata/netcdf-c/issues/881 2018-02-26 12:56:10 -07:00
Dennis Heimbigner
ccc70d640b re: esupport MQO-415619
and https://github.com/Unidata/netcdf-c/issues/708

Expand the NC_INMEMORY capabilities to support writing and accessing
the final modified memory.

Three new functions have been added:
nc_open_memio, nc_create_mem, and nc_close_memio.

The following new capabilities were added.
1. nc_open_memio() allows the NC_WRITE mode flag
   so a chunk of memory can be passed in and be modified
2. nc_create_mem() allows the NC_INMEMORY flag to be set
   to cause the created file to be kept in memory.
3. nc_close_mem() allows the final in-memory contents to be
   retrieved at the time the file is closed.
4. A special flag, NC_MEMIO_LOCK, is provided to ensure that
   the provided memory will not be freed or reallocated.

Note the following.
1. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is not set,
   then the netcdf-c library will take control of the incoming memory.
   This means that the original memory block should not be freed
   but the block returned by nc_close_mem() must be freed.
2. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is set,
   then modifications to the original memory may fail if the space available
   is insufficient.

Documentation is provided in the file docs/inmemory.md.
A test case is provided: nc_test/tst_inmemory.c driven by
nc_test/run_inmemory.sh

WARNING: changes were made to the dispatch table for
the close entry. From int (*close)(int) to int (*close)(int,void*).
2018-02-25 21:45:31 -07:00
Dennis Heimbigner
8cb1fc4cfe This is the second step in refactoring the libsrc4 code.
The first was branch newhash0.dmh.

As with newhash0.dmh, these changes should be transparent.
2018-02-24 20:36:24 -07:00
Ward Fisher
40805e5dfa
Merge branch 'master' into ejh_hdf4_dispatch_unidata2 2018-02-16 13:02:05 -07:00
Ben Boeckel
b432a527c4 c: remove __CHAR_UNSIGNED__
In C, `char`, `signed char`, and `unsigned char` are three separate,
distinct types, so just because `char` happens to be signed does not
mean it is interchangeable with `signed char`.
2018-02-14 17:24:49 -05:00
Ben Boeckel
a7057925d6 configure: remove unused configure checks
These checks all control variables which are unused within the codebase.
2018-02-14 17:24:45 -05:00
Ed Hartnett
111cef3891 disable HDF4 if netCDF-4 is not enabled 2018-02-08 11:35:27 -07:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ward Fisher
b268f268bd Merge branch 'ejh_dims_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:43:41 -07:00
Wei-keng Liao
be871248b9 disable CDF-5 feature when size_t is of size 4 bytes 2018-02-03 00:05:14 -06:00
Ward Fisher
f428660b69 Corrected typo in libnetcdf.settings.in when using autoconf. 2018-02-02 20:31:45 -07:00
Ward Fisher
c1d54b0213 Added check for genlib.h 2018-02-02 20:57:55 -06:00
Ward Fisher
8487a0a954
Merge branch 'master' into cdf5_var_len 2018-01-25 16:30:58 -07:00
Ward Fisher
7df45badce Added ERANGE_FILL information to netcdf_meta.h 2018-01-25 12:46:46 -07:00
Ward Fisher
8f6c1ed6c7 Preparing for 4.6.1 dev cycle. 2018-01-24 15:46:38 -07:00
Ward Fisher
d0339c8902 Merge branch 'pr-catchup' into v4.6.0-release-branch 2018-01-24 15:51:24 -06:00
Wei-keng Liao
d0c2015ced fix tst_converts.c when enable-erange-fill is set 2018-01-20 15:44:04 -06:00
Dennis Heimbigner
99fccab359 1. Keep up to date by merging master
2. Fixed plugin building (nc_test4/hdf5plugins)
   to be done properly by cmake and automake.
4. Duplicated part of the nc_test4 filter test code
   in examples/C

An incomplete and untested set of hooks exist
for OS-X in nc_test4/findplugins.in. They need testing.
2018-01-16 11:00:09 -07:00
Ed Hartnett
46d3bca8f4 removed non-working BUILD_DLL target 2017-11-30 05:40:17 -07:00
Ed Hartnett
4f983e5803 autotools cleanup 2017-11-30 05:29:22 -07:00
Dennis Heimbigner
4db4393e69 Begin changing over to use strlcat instead of strncat because
strlcat provides better protection against buffer overflows.

Code is taken from the FreeBSD project source code. Specifically:
https://github.com/freebsd/freebsd/blob/master/lib/libc/string/strlcat.c
License appears to be acceptable, but needs to be checked by e.g. Debian.

Step 1:
1. Add to netcdf-c/include/ncconfigure.h to use our version
   if not already available as determined by HAVE_STRLCAT in config.h.
2. Add the strlcat code to libdispatch/dstring.c
3. Turns out that strlcat was already defined in several places.
   So remove it from:
	ncgen3/genlib.c
	ncdump/dumplib.c
3. Define strlcat extern definition in ncconfigure.h.
4. Modify following directories to use strlcat:
	libdap2 libdap4 ncdap_test dap4_test
   Will do others in subsequent steps.
2017-11-23 10:55:24 -07:00
Ward Fisher
7d8f58a752
Merge branch 'master' into ejh_ncdump_3 2017-11-21 15:54:29 -07:00
Ward Fisher
2341f9f2b4 Updated release notes 2017-11-21 12:49:14 -07:00
Ward Fisher
a07eddd0e4 More wiring in of test. [ci skip] 2017-11-20 15:58:39 -07:00
Ed Hartnett
21053f5c49 clean up and removal of extra_tests 2017-11-17 15:35:14 -07:00
Ed Hartnett
a2c1aea044 merging documentation fixes 2017-11-14 11:48:27 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
bd15ad06cf set DOXYGEN_SERVER_BASED_SEARCH in configure.ac 2017-11-13 06:37:07 -07:00
Ed Hartnett
b9911d6e6f took out most uses of EXTRA_TESTS, returned it to disabled by default 2017-11-08 13:25:23 -07:00
Ward Fisher
bb2505cf4e
Merge branch 'master' into newrc.dmh 2017-11-03 14:57:27 -06:00
Ward Fisher
2425d6610e Merge branch 'ejh_configure_fix' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_even_more_merges 2017-10-31 12:54:58 -06:00
Dennis Heimbigner
2d77e6451b Master merge 2017-10-28 14:06:39 -06:00
Dennis Heimbigner
9935d54fdf Merge master and resolve conflicts 2017-10-28 13:57:23 -06:00
Ed Hartnett
d8ffc9e55d Merge branch 'master' into ejh_configure_fix 2017-10-27 05:12:26 -06:00
Ward Fisher
178ed4aa98 Merge branch 'typedef_schar' of https://github.com/wkliao/netcdf-c into ejh_more_merges 2017-10-26 14:35:57 -06:00
Ed Hartnett
c3b4526c94 fixed handling of --enable-parallel4 2017-10-26 14:05:04 -06:00
Ed Hartnett
39b738411f cause configure to fail if --enable-pnetcdf is specified but pnetcdf is not found 2017-10-26 05:38:31 -06:00
Ward Fisher
48f0938c21 Corrected a logic error in configure.ac, reported in esupport ticket HHV-610093 2017-10-25 11:12:15 -06:00
Dennis Heimbigner
440cf724ad Update by merging with master 2017-10-21 13:37:09 -06:00
Ward Fisher
dfe92e6d39 Typo 2017-10-16 10:35:09 -06:00
Ward Fisher
b52f3dd0d5 Corrected issue with nc-config generatred by autotools. 2017-10-16 10:30:47 -06:00
Dennis Heimbigner
733da154c5 1. Keep up to date by merging master
2. Factored out the parameter string parsing for ncgen and nccopy
   int libdispatch/dfilter.c + include/ncfilter.h
3. Allow a parameter string to use constant types other than
   unsigned int. See docs/filters.md for details.
4. Moved the old content of  include/netcdf_filter.h into include/netcdf.h
   and removed include/netcdf_filter.h as no longer needed.
5. Force the test filter (bzip2) in nc_test4/filter_test to
   be built using BUILT_SOURCES.
2017-10-08 15:56:45 -06:00
Ward Fisher
3c61d86367 Syntax corrections. 2017-09-26 14:01:21 -06:00
Ward Fisher
a812b69ce4 Added hooks for netcdf_meta.h cdf5 support into autotools based build as well. 2017-09-26 11:33:33 -06:00
Ward Fisher
86cfb9b39c Disable CDF5 support by default for the time being. 2017-09-25 13:19:56 -06:00
Ward Fisher
a5a9e483ff Corrected an issue with --has-szlib 2017-09-18 14:40:51 -06:00
Wei-keng Liao
f7ee463119 disable CDF5 tests when size_t is less than 8 bytes 2017-09-16 17:35:52 -05:00
Ward Fisher
62d80a3f8f Corrected problem in configure.ac 2017-09-15 16:11:57 -06:00
Ward Fisher
035ec80fb2 Wiring in CDF5 configure-time option. 2017-09-13 15:25:40 -06:00
Dennis Heimbigner
a2e0f069ec This pr should probably be delayed until after Version 4.5.
Primary change is to cleanup code and remove duplicated code.

1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
   if we need rc file for netcdf itself as opposed to the dap code.
2. Unify the extraction from the rc file of DAP authorization info.
3. Misc. other small unifications: make temp file, read file.
4. Avoid use of libcurl when reading file:// because
   there is some kind of problem with the Visual Studio version.
   Might be related to the winpath problem.
   In any case, do direct read instead.
5. Add new error code NC_ERCFILE for errors in reading RC file.
6. Complete documentation cleanup as indicated in this comment
   https://github.com/Unidata/netcdf-c/pull/472#issuecomment-325926426
7. Convert some occurrences of #ifdef _WIN32 to #ifdef _MSC_VER
2017-09-02 18:09:36 -06:00
Dennis Heimbigner
d8d4ed627a master merge 2017-08-29 18:05:46 -06:00
Wei-keng Liao
8b6d131cbe Because ncx.c and putget.c are to be released with the package in case users do not have m4, the generation of the two C files cannot depend on the configure option of --enable-erange-fill. This commit fixes this problem by replacing m4 conditional define with C conditional preprocess. 2017-08-20 14:32:57 -05:00
Dennis Heimbigner
86fc8745dc merge master and resolve conflicts 2017-08-12 15:50:31 -06:00
Ward Fisher
05d3d7e9f5 Merge remote-tracking branch 'origin/d4tempfile.dmh' into v4.5.0-release-branch 2017-08-07 10:12:36 -06:00
Dennis Heimbigner
4d8fbbf501 If DAP (2 or 4) is enabled, but diskless is disabled, then the
dap code will create a real temporary file in which to store the
converted metadata for the DAP .dds or .dmr.

It was assumed that the nc_close code would reclaim the
temporary file. For DAP2, reclamation occurs in the ncio
code. For DAP4, it was assumed that the libsrc4 code would do
the reclamation, but for whatever reason, this is not happening.
Thus, in this situation, a temporary file is left in the file
system. Aside from being irritating to users, this screws up
'make distcheck'.

So the DAP4 code is fixed to ensure that the temporary file is
properly reclaimed independent of the libsrc4 code.
2017-08-05 22:41:31 -06:00
Dennis Heimbigner
9719fbfbad re: hithub issue https://github.com/Unidata/netcdf-c/issues/435
Some temporary files are being left in a tempdir (e.g. /tmp
under *nix*).

The situation is described tersely in
netcdf-c/docs/auth.html#REDIR Basically, when a url is used that
requires redirection, a physical cookiejar file is required
to exist in the file system in order for this to work.

Since it was difficult to figure out when redirection was
being used (it was internal to libcurl) I needed to be prepared for that
eventuality. The result was that I always created a cookiejar file if one
was not specified in the rc file. This actually occurs in two places:
one inside oc2 and one inside libdap4.

The solution was two-fold:
1. do not use a cookiejar directory -- create cookiejar file directly
2. ensure that all cookiejar related files are reclaimed by nc_close().
Note that if nc_close (or nc_abort) is not called for whatever reason,
then reclamation will not occur.
2017-07-05 10:03:48 -06:00
Wei-keng Liao
6b85d54d94 typedef schar to signed char 2017-06-08 23:55:25 -05:00
Ward Fisher
b73c81697c Removed a line in configure.ac that is potentially redundant and throws an error on some systems. In support of https://github.com/Unidata/netcdf-c/issues/413 2017-06-08 12:38:43 -06:00
Ward Fisher
3a0b0d5339 Replaced sed with configure_ac_files, since sed may not be available. 2017-06-07 13:21:07 -06:00
Ward Fisher
bad0058410 Corrected a missed string. 2017-06-01 13:40:04 -06:00
Ward Fisher
ec33411c6c Bumped revision information to next version. 2017-06-01 13:35:39 -06:00
Ward Fisher
a077289464 Refactored hdf4 chunking test a little bit. 2017-06-01 09:11:52 -06:00
Ward Fisher
08f7d06eb6 Refactoring hdf4 chunking test in similar fashion to hdf5 compatibility test. Files are linked via AC_CONFIG_LINKS instead of shuffling things around in a shell script. 2017-06-01 09:02:31 -06:00
Ward Fisher
df872ac1bc Continued refactoring. 2017-05-31 16:34:46 -06:00
Ward Fisher
ebd1fca32a Working on reformulating test_common.sh 2017-05-31 15:42:59 -06:00
Ward Fisher
02a6585eae Corrected some typos. 2017-05-24 15:49:18 -06:00