netcdf-c/ncgen3
Dennis Heimbigner 8b0e1134b4 Ensure that netcdf_json.h does not interfere with ncjson.
re: Issue https://github.com/Unidata/netcdf-c/issues/2419

There are effectively two json subsystems in netcdf-c.
1. ncjson.[ch] in libnetcdf
2. netcdf_json.h for use by plugins so they can be built without need
   for libnetcdf.

The netcdf_json.h file is constructed from the concatenation of
ncjson.h plus ncjson.c. It turned out that in doing this, I was
leaving some symbols externally visible so that if, for some
reason, a plugin was built and needed libnetcdf, then symbol
conflicts arose.

The solution is to prefix the declarations in ncjson.[ch] with a
macro (OPTSTATIC) that can be resolved to either nothing or to
"static". Then in netcdf_json.h, it resolves to "static" and
prevents the symbol conflicts.

Note that netcdf_json.h is constructed once in
netcdf-c/include/Makefile.am with the rule named
"makepluginjson". This means that it is included in the
distribution. However, this also means that if ncjson.[ch] is
changed, then it is necessary to invoke makepluginjson
explicitly to rebuild netcdf_json.h
2022-07-05 22:03:52 -06:00
..
bigf1.cdl
bigf2.cdl
bigf3.cdl
bigr1.cdl
bigr2.cdl
bigr3.cdl
c0.cdl
CMakeLists.txt Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
depend
escapes.c ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
generic.h ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
genlib.c ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
genlib.h ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
getfill.c ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
init.c ncgen3 copyright stanzas updated. 2018-12-06 15:42:41 -07:00
lfs-tests
load.c Regularize the semantics of mkstemp. 2021-05-14 11:33:03 -06:00
main_cpp.cpp This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
main.c Merge branch 'main' into mingw-w64-strcasecmp 2022-01-11 10:45:15 +11:00
Makefile.am Support MSYS2/Mingw platform 2021-12-23 22:18:56 -07:00
ncgen3.1
ncgen.h More cleanup. 2022-01-24 15:01:23 -07:00
ncgen.l Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
ncgen.y Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
ncgenl.c Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
ncgeny.c Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
ncgeny.h Fix various problem around VLEN's 2022-01-08 18:30:00 -07:00
run_nc4_tests.sh Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
run_tests2.sh
run_tests.sh Ensure that netcdf_json.h does not interfere with ncjson. 2022-07-05 22:03:52 -06:00