Merged Latest from Trunk

This commit is contained in:
Ward Fisher 2013-03-25 19:35:31 +00:00
commit 4a4068c30b
21 changed files with 46 additions and 37 deletions

View File

@ -69,8 +69,9 @@ INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/FindPkgConfig.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
FIND_PACKAGE(PkgConfig QUIET)
# Only necessary for Windows
IF(MSVC)
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/modules/windows/FindHDF5.cmake)

22
cf
View File

@ -9,6 +9,7 @@ fi
HDF5=1
DAP=1
#PNETCDF=1
#HDF4=1
#RPC=1
#PGI=1
#M32=1
@ -25,6 +26,11 @@ cmds=""
#cmds="$cmds install"
fi
# HDF4=>HDF5
if test "x$HDF4" = x1 ; then
HDF5=1
fi
# Test pgi compiler
if test "x$PGI" = x1 ; then
PATH="/opt/pgi/linux86/11.1/bin:$PATH"
@ -97,11 +103,16 @@ MAKE=make
IGNORE="test 0 = 1"
if test "x$HDF5" = "x1" ; then
CPPFLAGS="-I${stddir}/include -I${stddir}/include $CPPFLAGS"
LDFLAGS="-L${stddir}/lib -lhdf5_hl -lhdf5 -L${stddir}/lib -lz $LDFLAGS"
CPPFLAGS="-I${stddir}/include $CPPFLAGS"
LDFLAGS="-L${stddir}/lib -lhdf5_hl -lhdf5 -lz $LDFLAGS"
LD_LIBRARY_PATH="${stddir}/lib:$LD_LIBRARY_PATH"
fi
#if test "x$HDF4" = "x1" ; then
#CPPFLAGS="-I/machine/local/include $CPPFLAGS"
#LDFLAGS="-L/machine/local/lib $LDFLAGS"
#fi
if test "x$DAP" = "x1" -o "x$CDMR" = "x1" -o "x$RPC" = "x1" ; then
if curl-config --version >/dev/null ; then
TMP=`curl-config --cflags`
@ -146,10 +157,6 @@ FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --with-libcf"
#valgrind => not shared
#FLAGS="$FLAGS --enable-valgrind-tests"
# hdf4 requires adding to paths
#FLAGS="$FLAGS --enable-hdf4 --enable-hdf4-file-tests"
#CPPFLAGS="$CPPFLAGS -I/machine/local/include"
#LDFLAGS="$LDFLAGS -L/machine/local/lib -L/usr/local/lib"
FLAGS="$FLAGS --disable-shared"
#FLAGS="$FLAGS --enable-shared"
@ -157,6 +164,9 @@ FLAGS="$FLAGS --disable-shared"
if test "x$HDF5" = "x" ; then
FLAGS="$FLAGS --disable-netcdf-4"
fi
if test "x$HDF4" = x1 ; then
FLAGS="$FLAGS --enable-hdf4 --enable-hdf4-file-tests"
fi
if test "x$DAP" = "x" ; then
FLAGS="$FLAGS --disable-dap"
fi

View File

@ -245,7 +245,7 @@ dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
that can be used with the url
*/
char*
static char*
buildprojectionstring(NClist* projections)
{
char* pstring;
@ -256,7 +256,7 @@ buildprojectionstring(NClist* projections)
return pstring;
}
char*
static char*
buildselectionstring(NClist* selections)
{
NCbytes* buf = ncbytesnew();
@ -267,7 +267,7 @@ buildselectionstring(NClist* selections)
return sstring;
}
char*
static char*
buildconstraintstring(DCEconstraint* constraints)
{
NCbytes* buf = ncbytesnew();

View File

@ -695,7 +695,7 @@ findfield(CDFnode* node, CDFnode* field)
}
int
static int
nc3d_getvarmx(int ncid, int varid,
const size_t *start,
const size_t *edges,

View File

@ -42,7 +42,7 @@ static int NCD3_get_vars(int ncid, int varid,
const size_t *start, const size_t *edges, const ptrdiff_t* stride,
void *value, nc_type memtype);
NC_Dispatch NCD3_dispatch_base = {
static NC_Dispatch NCD3_dispatch_base = {
NC_DISPATCH_NC3 | NC_DISPATCH_NCD,
@ -133,7 +133,7 @@ NULL, /*get_var_chunk_cache*/
NC_Dispatch* NCD3_dispatch_table = NULL; /* moved here from ddispatch.c */
NC_Dispatch NCD3_dispatcher; /* overlay result */
static NC_Dispatch NCD3_dispatcher; /* overlay result */
int
NCD3_initialize(void)

View File

@ -32,7 +32,7 @@ static NCerror buildattribute3a(NCDAPCOMMON*, NCattribute*, nc_type, int);
static char* getdefinename(CDFnode* node);
int nc3dinitialized = 0;
static int ncd3initialized = 0;
size_t dap_one[NC_MAX_VAR_DIMS];
size_t dap_zero[NC_MAX_VAR_DIMS];
@ -46,8 +46,8 @@ int nc__opendap(void) {return 0;}
/**************************************************/
/* Do local initialization */
int
nc3dinitialize(void)
static int
ncd3initialize(void)
{
int i;
compute_nccalignments();
@ -55,7 +55,7 @@ nc3dinitialize(void)
dap_one[i] = 1;
dap_zero[i] = 0;
}
nc3dinitialized = 1;
ncd3initialized = 1;
#ifdef DEBUG
/* force logging to go to stderr */
nclogclose();
@ -79,7 +79,7 @@ NCD3_open(const char * path, int mode,
NCDAPCOMMON* dapcomm = NULL;
const char* value;
if(!nc3dinitialized) nc3dinitialize();
if(!ncd3initialized) ncd3initialize();
if(path == NULL)
return NC_EDAPURL;

View File

@ -130,7 +130,6 @@ extern size_t dap_zero[NC_MAX_VAR_DIMS];
extern NCerror nc3d_open(const char* path, int mode, int* ncidp);
extern int nc3d_close(int ncid);
extern int nc3dinitialize(void);
extern NCerror restruct3(CDFnode* ddsroot, CDFnode* template, NClist*);
extern void setvisible(CDFnode* root, int visible);
extern NCerror mapnodes3(CDFnode* dstroot, CDFnode* srcroot);

View File

@ -35,7 +35,7 @@ free_NC_string(NC_string *ncstrp)
}
int
static int
nextUTF8(const char* cp)
{
/* The goal here is to recognize the length of each

View File

@ -39,7 +39,7 @@ noinst_LTLIBRARIES = libnetcdf3.la
# with m4), but they are included in the distribution so that the user
# does not have to have m4.
MAINTAINERCLEANFILES = attr.c ncx.c putget.c $(man_MANS) attrx.c putgetx.c
EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt
EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt XGetopt.c
# This tells make how to turn .m4 files into .c files.
.m4.c:

View File

@ -76,7 +76,7 @@ static int NC3_set_var_chunk_cache(int,int,size_t,size_t,float);
static int NC3_get_var_chunk_cache(int,int,size_t*,size_t*,float*);
#endif /*USE_NETCDF4*/
NC_Dispatch NC3_dispatcher = {
static NC_Dispatch NC3_dispatcher = {
NC_DISPATCH_NC3,

View File

@ -10,7 +10,7 @@
#include "ncdispatch.h"
#include "nc4dispatch.h"
NC_Dispatch NC4_dispatcher = {
static NC_Dispatch NC4_dispatcher = {
NC_DISPATCH_NC4,

View File

@ -668,7 +668,7 @@ nc4_dim_list_add(NC_DIM_INFO_T **list)
}
/* Add to the beginning of a dim list. */
int
static int
nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim)
{
NC_DIM_INFO_T *dim;
@ -1012,7 +1012,7 @@ field_list_del(NC_FIELD_INFO_T **list, NC_FIELD_INFO_T *field)
}
/* Delete a type from a type list, and nc_free the memory. */
int
static int
type_list_del(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T *type)
{
NC_FIELD_INFO_T *field, *f;

View File

@ -123,7 +123,7 @@ ref_nc_test_netcdf4.cdl ref_tst_special_atts3.cdl tst_brecs.cdl \
ref_tst_grp_spec0.cdl ref_tst_grp_spec.cdl tst_grp_spec.sh \
ref_tst_charfill.cdl tst_charfill.cdl tst_charfill.sh \
tst_iter.sh tst_mud.sh ref_tst_mud4.cdl \
ref_tst_ncf213.cdl CMakeLists.txt
ref_tst_ncf213.cdl CMakeLists.txt XGetopt.c
# NCGEN4 additions
SUBDIRS=cdl4 expected4

View File

@ -22,7 +22,7 @@ man_MANS = ncgen.1
# These files all need to be distributed.
EXTRA_DIST = ncgen.y ncgenyy.c ncgen.l $(man_MANS) internals.html \
run_tests.sh run_nc4_tests.sh c0.cdl ref_camrun.cdl \
ncf199.cdl CMakeLists.txt
ncf199.cdl CMakeLists.txt XGetopt.c
# This shell script causes ncgen to build a classic and a 64-bit
# offset file from a cdl file shipped with the distribution.

View File

@ -30,7 +30,7 @@ endif # USE_NETCDF4
CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc
EXTRA_DIST += CMakeLists.txt
EXTRA_DIST += CMakeLists.txt XGetopt.c
# This is used if someone wants to rebuild ncgenyy.c or ncgentab.c
# Otherwise never invoked, but records how to do it. Don't forget to

View File

@ -26,8 +26,8 @@ static int ocerrorstring(XXDR* xdrs);
static int istoplevel(OCnode* node);
/* Sequence tag constant */
const char StartOfSequence = '\x5A';
const char EndOfSequence = '\xA5';
static const char StartOfSequence = '\x5A';
static const char EndOfSequence = '\xA5';
/*
Provide an option that makes a single pass over

View File

@ -24,7 +24,7 @@ octhrow(int err)
#endif
int
xdrerror(void)
xxdrerror(void)
{
oclog(OCLOGERR,"xdr failure");
return OCTHROW(OC_EDATADDS);

View File

@ -122,7 +122,7 @@ ocnode_new(char* name, OCtype ptype, OCnode* root)
return cdf;
}
OCattribute*
static OCattribute*
makeattribute(char* name, OCtype ptype, OClist* values)
{
OCattribute* att = (OCattribute*)ocmalloc(sizeof(OCattribute)); /* ocmalloc zeros*/

View File

@ -46,7 +46,7 @@ ocstrncmp(const char* s1, const char* s2, size_t len)
}
void
static void
makedimlist(OClist* path, OClist* dims)
{
unsigned int i,j;
@ -94,7 +94,7 @@ freeAttributes(OClist* attset)
}
}
void
static void
freeOCnode(OCnode* cdf, int deep)
{
unsigned int i;
@ -516,7 +516,7 @@ oc_ispacked(OCnode* node)
/* Must be consistent with ocx.h.OCDT */
#define NMODES 6
#define MAXMODENAME 8 /*max (strlen(modestrings[i])) */
char* modestrings[NMODES+1] = {
static char* modestrings[NMODES+1] = {
"FIELD", /* ((OCDT)(1<<0)) field of a container */
"ELEMENT", /* ((OCDT)(1<<1)) element of a structure array */
"RECORD", /* ((OCDT)(1<<2)) record of a sequence */

View File

@ -38,7 +38,6 @@ extern void ocmakedimlist(OClist* path, OClist* dims);
extern int ocfindbod(OCbytes* buffer, size_t*, size_t*);
/* Reclaimers*/
extern void freeOCnode(OCnode*,int);
extern void ocfreeprojectionclause(OCprojectionclause* clause);
/* Misc. */

View File

@ -240,7 +240,7 @@ xxdr_skip_strings(XXDR* xdrs, off_t n)
}
unsigned int
xdr_roundup(unsigned int n)
xxdr_roundup(off_t n)
{
unsigned int rounded;
rounded = RNDUP(n);