diff --git a/cf b/cf index 60db61277..fb93c5c46 100644 --- a/cf +++ b/cf @@ -24,6 +24,7 @@ CFLAGS="" FORCE="-i" #INSTALL=1 +#PREFIX=/usr/local PREFIX=/usr/local if test "x$cmds" = x ; then @@ -170,7 +171,7 @@ FLAGS="$FLAGS --enable-dap-auth-tests" #valgrind => not shared #FLAGS="$FLAGS --enable-valgrind-tests" -FLAGS="$FLAGS --disable-shared" +#FLAGS="$FLAGS --disable-shared" #FLAGS="$FLAGS --enable-shared" if test "x$HDF5" = "x" ; then diff --git a/libsrc/putget.c b/libsrc/putget.c index 39afcfc43..3add44aaf 100644 --- a/libsrc/putget.c +++ b/libsrc/putget.c @@ -5147,7 +5147,7 @@ NC3_get_vara(int ncid, int varid, /* If this is a record variable, then we have to substitute the number of records into dimension 0. */ if(varp->shape[0] == 0) { - memcpy((void*)modedges,(void*)varp->shape, + (void*)memcpy((void*)modedges,(void*)varp->shape, sizeof(size_t)*varp->ndims); modedges[0] = NC_get_numrecs(nc3); edges = modedges; @@ -5280,7 +5280,7 @@ NC3_put_vara(int ncid, int varid, /* If this is a record variable, then we have to substitute the number of records into dimension 0. */ if(varp->shape[0] == 0) { - memcpy((void*)modedges,(void*)varp->shape, + (void*)memcpy((void*)modedges,(void*)varp->shape, sizeof(size_t)*varp->ndims); modedges[0] = NC_get_numrecs(nc3); edges = modedges; diff --git a/wjna b/wjna new file mode 100644 index 000000000..d315622eb --- /dev/null +++ b/wjna @@ -0,0 +1,53 @@ +#!/bin/bash + +JNADIR="c:/Users/dmh/opt/jna" + +PREFIX="${JNADIR}" + +# CMAKE Prefix Path +CPP="${JNADIR}" + +CMP="${CPP}/deps/shared/share/cmake" + +INCLUDES="${JNADIR}/deps/shared/include" + +FLAGS="" + +# Why does this not work? +#FLAGS="-DHDF5_LIBRARY=${CPP} ${FLAGS}" +#FLAGS="-DHDF5_INCLUDE_DIR=${INCLUDES} ${FLAGS}" + +# But this does +#CPP="${CPP};${CMP}" + +FLAGS="-DCMAKE_INSTALL_PREFIX=${PREFIX} ${FLAGS}" +#FLAGS="-DCMAKE_PREFIX_PATH=${CPP} ${FLAGS}" + +FLAGS="-DHDF5_LIB=${CPP}/hdf5.dll ${FLAGS}" +FLAGS="-DHDF5_HL_LIB=${CPP}/hdf5_hl.dll ${FLAGS}" +FLAGS="-DHDF5_INCLUDE_DIR=${INCLUDES} ${FLAGS}" + +FLAGS="-DZLIB_LIBRARY=${CPP}/zlib.dll ${FLAGS}" +FLAGS="-DZLIB_INCLUDE_DIR=${INCLUDES} ${FLAGS}" + +FLAGS="-DCURL_LIBRARY=${CPP}/libcurl.dll ${FLAGS}" +FLAGS="-DCURL_INCLUDE_DIR=${INCLUDES} ${FLAGS}" + +FLAGS="-ENABLE_CONVERSION_WARNINGS=OFF ${FLAGS}" +FLAGS="-DBUILD_UTILITIES=OFF ${FLAGS}" +FLAGS="-DENABLE_EXAMPLES=OFF ${FLAGS}" +FLAGS="-BUILD_V2=OFF ${FLAGS}" + +rm -fr ./build +mkdir build +pushd build +cmake -G"Visual Studio 10" ${FLAGS} .. +cmake --build . --config Release +popd + +exit + +# heap +#FLAGS="-DHDF5_LIBRARY=${CPP} ${FLAGS}" +#FLAGS="-DHDF5_INCLUDE_DIRS=/usr/local/include ${FLAGS}" +#CPP="${JNADIR}/deps/shared/share/cmake"