mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
1a7531392f
Primary fixes to get -ansi to work. 1. Convert all '//' C++ style comments to /*...*/ or to use #if 0...#endif 2. It turns out that when -ansi is specified, then a number of functions no longer are defined in the header -- but they are still in the .so file.<br> The big example is strdup(). So, added code to include/ncconfig.h to define externs for those missing functions that occur in more than one place. These are enabled if !_WIN32 && __STDC__ == 1 (__STDC__ is supposed to be the equivalent compile time flag to -ansi). Note that this requires config.h (which references ncconfig.h) to be included in files where it is currently not included. Single uses will be only in the file that uses them. 3. Added mmap test for the MAP_ANONYMOUS flag to configure.ac. Apparently this is not always defined with -ansi. 4. fix some large integer constants in nc_test4/tst_atts3.c and nc_test4/tst_filterparser.c to avoid compiler complaints. 5. fix a double constant in nc_test4/tst_filterparser.c to avoid compiler complaints. [Note I suspect #4 and #5 will be a problem on big-endian machines, but we have no way to test] Misc. Changes: 1. convert more instances of _MSC_VER to _WIN32. 2. added some debugging code to include/nctestserver.h 3. added comment about libdispatch/drc.c always being compiled. 4. modify parser generation in ncgen to remove unneeded files.
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/* Copyright 2005-2018 University Corporation for Atmospheric
|
|
Research/Unidata. */
|
|
/**
|
|
* @file
|
|
* @internal Contains information for creating provenance
|
|
* info and/or displaying provenance info.
|
|
*
|
|
* @author Dennis Heimbigner, Ward Fisher
|
|
*/
|
|
/**************************************************/
|
|
/**
|
|
|
|
It has come to pass that we can't guarantee that this information is
|
|
contained only within netcdf4 files. As a result, we need
|
|
to make printing these hidden attributes available to
|
|
netcdf3 as well.
|
|
|
|
For netcdf4 files, capture state information about the following:
|
|
1. Global: netcdf library version
|
|
2. Global: hdf5 library version
|
|
3. Per file: superblock version
|
|
4. Per File: was it created by netcdf-4?
|
|
5. Per file: _NCProperties attribute
|
|
*/
|
|
|
|
#ifndef _NCPROVENANCE_
|
|
#define _NCPROVENANCE_
|
|
|
|
#define NCPROPS "_NCProperties"
|
|
#define NCPVERSION "version" /* Of the properties format */
|
|
#define NCPHDF5LIB1 "hdf5libversion"
|
|
#define NCPNCLIB1 "netcdflibversion"
|
|
#define NCPHDF5LIB2 "hdf5"
|
|
#define NCPNCLIB2 "netcdf"
|
|
#define NCPROPS_VERSION (2)
|
|
/* Version 2 changes this because '|' was causing bash problems */
|
|
#define NCPROPSSEP1 '|'
|
|
#define NCPROPSSEP2 ','
|
|
|
|
|
|
/* Other hidden attributes */
|
|
#define ISNETCDF4ATT "_IsNetcdf4"
|
|
#define SUPERBLOCKATT "_SuperblockVersion"
|
|
|
|
|
|
#endif /* _NCPROVENANCE_ */
|