mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-24 16:04:40 +08:00
8b0e1134b4
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 |
||
---|---|---|
.. | ||
awsincludes.h | ||
CMakeLists.txt | ||
datt.c | ||
dattget.c | ||
dattinq.c | ||
dattput.c | ||
dauth.c | ||
daux.c | ||
dcompound.c | ||
dcopy.c | ||
dcrc32.c | ||
dcrc32.h | ||
dcrc64.c | ||
ddim.c | ||
ddispatch.c | ||
defcheck.c | ||
denum.c | ||
derror.c | ||
dfile.c | ||
dfilter.c | ||
dfilterx.c | ||
dgroup.c | ||
dhttp.c | ||
dinfermodel.c | ||
dinstance.c | ||
dinternal.c | ||
dnotnc3.c | ||
dnotnc4.c | ||
doffsets.c | ||
dopaque.c | ||
dparallel.c | ||
dpathmgr.c | ||
drc.c | ||
dreadonly.c | ||
dreg.c | ||
ds3util.c | ||
dstring.c | ||
dtype.c | ||
durlmodel.c | ||
dutf8.c | ||
dutil.c | ||
dv2i.c | ||
dvar.c | ||
dvarget.c | ||
dvarinq.c | ||
dvarput.c | ||
dvlen.c | ||
ezxml_extra.c | ||
json.c | ||
Makefile.am | ||
nc.c | ||
ncbytes.c | ||
ncexhash.c | ||
nchashmap.c | ||
ncjson.c | ||
nclist.c | ||
nclistmgr.c | ||
nclog.c | ||
ncs3sdk.cpp | ||
ncsettings.hdr | ||
nctime.c | ||
ncuri.c | ||
ncxcache.c | ||
netcdf.m4 | ||
stubdef.c | ||
u8.c | ||
u8.h | ||
utf8proc_data.c | ||
utf8proc.c | ||
utf8proc.h |