mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-19 17:30:27 +08:00
Replace ENABLE_BYTERANGE with NETCDF_ENABLE_BYTERANGE
This commit is contained in:
parent
eb489815ff
commit
b4eb8bf019
@ -537,10 +537,10 @@ else()
|
||||
endif()
|
||||
|
||||
# Option to support byte-range reading of remote datasets
|
||||
option(ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." ON)
|
||||
option(NETCDF_ENABLE_BYTERANGE "Enable byte-range access to remote datasets.." ON)
|
||||
if(NOT ENABLE_REMOTE_FUNCTIONALITY)
|
||||
message(WARNING "ENABLE_REMOTE_FUNCTIONALITY=NO => ENABLE_BYTERANGE=NO")
|
||||
set(ENABLE_BYTERANGE OFF CACHE BOOL "ENABLE_REMOTE_FUNCTIONALITY=NO => ENABLE_BYTERANGE=NO" FORCE)
|
||||
message(WARNING "ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_BYTERANGE=NO")
|
||||
set(NETCDF_ENABLE_BYTERANGE OFF CACHE BOOL "ENABLE_REMOTE_FUNCTIONALITY=NO => NETCDF_ENABLE_BYTERANGE=NO" FORCE)
|
||||
endif()
|
||||
|
||||
# Option to Enable DAP long tests, remote tests.
|
||||
@ -740,8 +740,8 @@ endif()
|
||||
option(ENABLE_LIBXML2 "Link against libxml2 if it is available, use the packaged tinyxml2 parser otherwise." ON)
|
||||
set(XMLPARSER "tinyxml2 (bundled)")
|
||||
|
||||
if(NOT ENABLE_BYTERANGE AND ENABLE_HDF5_ROS3)
|
||||
message(WARNING "ROS3 support requires ENABLE_BYTERANGE=TRUE; disabling ROS3 support")
|
||||
if(NOT NETCDF_ENABLE_BYTERANGE AND ENABLE_HDF5_ROS3)
|
||||
message(WARNING "ROS3 support requires NETCDF_ENABLE_BYTERANGE=TRUE; disabling ROS3 support")
|
||||
set(ENABLE_HDF5_ROS3 OFF CACHE BOOL "ROS3 support" FORCE)
|
||||
endif()
|
||||
|
||||
@ -1631,7 +1631,7 @@ is_enabled(ENABLE_PARALLEL4 HAS_PARALLEL4)
|
||||
is_enabled(ENABLE_DAP HAS_DAP)
|
||||
is_enabled(ENABLE_DAP2 HAS_DAP2)
|
||||
is_enabled(ENABLE_DAP4 HAS_DAP4)
|
||||
is_enabled(ENABLE_BYTERANGE HAS_BYTERANGE)
|
||||
is_enabled(NETCDF_ENABLE_BYTERANGE HAS_BYTERANGE)
|
||||
is_enabled(ENABLE_DISKLESS HAS_DISKLESS)
|
||||
is_enabled(USE_MMAP HAS_MMAP)
|
||||
is_enabled(JNA HAS_JNA)
|
||||
|
@ -36,7 +36,7 @@ build: off
|
||||
build_script:
|
||||
- cmd: mkdir build
|
||||
- cmd: cd build
|
||||
- cmd: cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%INSTALL_LOC% -DNETCDF_ENABLE_BASH_SCRIPT_TESTING=OFF -DENABLE_FILTER_TESTING=OFF -DENABLE_BYTERANGE=ON
|
||||
- cmd: cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%INSTALL_LOC% -DNETCDF_ENABLE_BASH_SCRIPT_TESTING=OFF -DENABLE_FILTER_TESTING=OFF -DNETCDF_ENABLE_BYTERANGE=ON
|
||||
- cmd: if errorlevel 1 exit 1
|
||||
- cmd: cmake --build . --config Release -- /maxcpucount:4
|
||||
|
||||
|
@ -222,7 +222,7 @@ macro(print_conf_summary)
|
||||
message(STATUS "Building netCDF-4: ${ENABLE_NETCDF_4}")
|
||||
message(STATUS "Building DAP2 Support: ${ENABLE_DAP2}")
|
||||
message(STATUS "Building DAP4 Support: ${ENABLE_DAP4}")
|
||||
message(STATUS "Building Byte-range Support: ${ENABLE_BYTERANGE}")
|
||||
message(STATUS "Building Byte-range Support: ${NETCDF_ENABLE_BYTERANGE}")
|
||||
message(STATUS "Building Utilities: ${NETCDF_BUILD_UTILITIES}")
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
message(STATUS "CMake Prefix Path: ${CMAKE_PREFIX_PATH}")
|
||||
|
@ -116,7 +116,7 @@ are set when opening a binary file on Windows. */
|
||||
#cmakedefine NETCDF_ENABLE_ATEXIT_FINALIZE 1
|
||||
|
||||
/* if true, build byte-range Client */
|
||||
#cmakedefine ENABLE_BYTERANGE 1
|
||||
#cmakedefine NETCDF_ENABLE_BYTERANGE 1
|
||||
|
||||
/* if true, enable ERANGE fill */
|
||||
#cmakedefine ENABLE_ERANGE_FILL 1
|
||||
|
@ -1399,7 +1399,7 @@ if test "x$found_curl" = xno && test "x$enable_byterange" = xyes ; then
|
||||
fi
|
||||
|
||||
if test "x$enable_byterange" = xyes; then
|
||||
AC_DEFINE([ENABLE_BYTERANGE], [1], [if true, support byte-range read of remote datasets.])
|
||||
AC_DEFINE([NETCDF_ENABLE_BYTERANGE], [1], [if true, support byte-range read of remote datasets.])
|
||||
fi
|
||||
|
||||
# Does the user want to disable atexit?
|
||||
@ -1926,7 +1926,7 @@ AM_CONDITIONAL(BUILD_MMAP, [test x$enable_mmap = xyes])
|
||||
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_doxygen = xyes])
|
||||
AM_CONDITIONAL(SHOW_DOXYGEN_TAG_LIST, [test x$enable_doxygen_tasks = xyes])
|
||||
AM_CONDITIONAL(ENABLE_METADATA_PERF, [test x$enable_metadata_perf = xyes])
|
||||
AM_CONDITIONAL(ENABLE_BYTERANGE, [test "x$enable_byterange" = xyes])
|
||||
AM_CONDITIONAL(NETCDF_ENABLE_BYTERANGE, [test "x$enable_byterange" = xyes])
|
||||
AM_CONDITIONAL(RELAX_COORD_BOUND, [test "xyes" = xyes])
|
||||
AM_CONDITIONAL(HAS_PAR_FILTERS, [test x$hdf5_supports_par_filters = xyes ])
|
||||
# We need to simplify the set of S3 and Zarr flag combinations
|
||||
|
@ -34,7 +34,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
|
||||
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
|
||||
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
|
||||
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
|
||||
|
||||
|
||||
set(CTEST_DROP_METHOD https)
|
||||
|
@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
|
||||
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
|
||||
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
|
||||
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=FALSE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=FALSE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
|
||||
|
||||
|
||||
set(CTEST_DROP_METHOD https)
|
||||
|
@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
|
||||
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
|
||||
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
|
||||
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
|
||||
|
||||
|
||||
set(CTEST_DROP_METHOD https)
|
||||
|
@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
|
||||
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
|
||||
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
|
||||
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DENABLE_DAP_REMOTE_TESTS=TRUE")
|
||||
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DENABLE_DAP_REMOTE_TESTS=TRUE")
|
||||
|
||||
|
||||
set(CTEST_DROP_METHOD https)
|
||||
|
@ -32,7 +32,7 @@ currently do any sort of optimization or caching.
|
||||
|
||||
This capability is enabled using the option *--enable-byterange* option
|
||||
to the *./configure* command for Automake. For Cmake, the option flag is
|
||||
*-DENABLE_BYTERANGE=true*.
|
||||
*-DNETCDF_ENABLE_BYTERANGE=true*.
|
||||
|
||||
This capability requires access to *libcurl*, and an error will occur
|
||||
if byterange is enabled, but *libcurl* could not be located.
|
||||
|
@ -26,7 +26,7 @@ if USE_DAP
|
||||
noinst_HEADERS += ncdap.h
|
||||
endif
|
||||
|
||||
if ENABLE_BYTERANGE
|
||||
if NETCDF_ENABLE_BYTERANGE
|
||||
noinst_HEADERS += nchttp.h
|
||||
endif
|
||||
|
||||
|
@ -62,7 +62,7 @@ typedef struct NC_HDF5_FILE_INFO {
|
||||
hid_t hdfid;
|
||||
unsigned transientid; /* counter for transient ids */
|
||||
NCURI* uri; /* Parse of the incoming path, if url */
|
||||
#if defined(ENABLE_BYTERANGE)
|
||||
#if defined(NETCDF_ENABLE_BYTERANGE)
|
||||
int byterange;
|
||||
#endif
|
||||
#ifdef ENABLE_S3
|
||||
|
@ -43,12 +43,12 @@ if(BUILD_V2)
|
||||
)
|
||||
endif(BUILD_V2)
|
||||
|
||||
if(ENABLE_BYTERANGE)
|
||||
if(NETCDF_ENABLE_BYTERANGE)
|
||||
target_sources(dispatch
|
||||
PRIVATE
|
||||
dhttp.c
|
||||
)
|
||||
ENDIF(ENABLE_BYTERANGE)
|
||||
ENDIF(NETCDF_ENABLE_BYTERANGE)
|
||||
|
||||
IF(ENABLE_S3)
|
||||
if(ENABLE_S3_INTERNAL)
|
||||
|
@ -43,9 +43,9 @@ libnetcdf2_la_SOURCES = dv2i.c
|
||||
libnetcdf2_la_CPPFLAGS = ${AM_CPPFLAGS} -DDLL_EXPORT
|
||||
endif # BUILD_V2
|
||||
|
||||
if ENABLE_BYTERANGE
|
||||
if NETCDF_ENABLE_BYTERANGE
|
||||
libdispatch_la_SOURCES += dhttp.c
|
||||
endif # ENABLE_BYTERANGE
|
||||
endif # NETCDF_ENABLE_BYTERANGE
|
||||
|
||||
if ENABLE_S3
|
||||
if ENABLE_S3_INTERNAL
|
||||
|
@ -24,7 +24,7 @@ See LICENSE.txt for license information.
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
|
||||
@ -118,7 +118,7 @@ NCDISPATCH_initialize(void)
|
||||
/* Compute type alignments */
|
||||
NC_compute_alignments();
|
||||
|
||||
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
/* Initialize curl if it is being used */
|
||||
{
|
||||
CURLcode cstat = curl_global_init(CURL_GLOBAL_ALL);
|
||||
@ -134,7 +134,7 @@ int
|
||||
NCDISPATCH_finalize(void)
|
||||
{
|
||||
int status = NC_NOERR;
|
||||
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
|
||||
curl_global_cleanup();
|
||||
#endif
|
||||
#if defined(ENABLE_DAP4)
|
||||
|
@ -1323,7 +1323,7 @@ openmagic(struct MagicFile* file)
|
||||
goto done;
|
||||
}
|
||||
if(file->uri != NULL) {
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
/* Construct a URL minus any fragment */
|
||||
file->curlurl = ncuribuild(file->uri,NULL,NULL,NCURISVC);
|
||||
/* Open the curl handle */
|
||||
@ -1411,7 +1411,7 @@ readmagic(struct MagicFile* file, long pos, char* magic)
|
||||
printmagic("XXX: readmagic",magic,file);
|
||||
#endif
|
||||
} else if(file->uri != NULL) {
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
fileoffset_t start = (size_t)pos;
|
||||
fileoffset_t count = MAGIC_NUMBER_LEN;
|
||||
status = nc_http_read(file->state, start, count, buf);
|
||||
@ -1466,7 +1466,7 @@ closemagic(struct MagicFile* file)
|
||||
if(fIsSet(file->omode,NC_INMEMORY)) {
|
||||
/* noop */
|
||||
} else if(file->uri != NULL) {
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
status = nc_http_close(file->state);
|
||||
#endif
|
||||
nullfree(file->curlurl);
|
||||
|
@ -21,7 +21,7 @@ if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdfhdf5 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if(ENABLE_BYTERANGE)
|
||||
if(NETCDF_ENABLE_BYTERANGE)
|
||||
target_sources(netcdfhdf5 PRIVATE
|
||||
H5FDhttp.c
|
||||
)
|
||||
|
@ -18,7 +18,7 @@ hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c \
|
||||
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c \
|
||||
hdf5set_format_compatibility.c hdf5debug.c hdf5debug.h hdf5err.h
|
||||
|
||||
if ENABLE_BYTERANGE
|
||||
if NETCDF_ENABLE_BYTERANGE
|
||||
libnchdf5_la_SOURCES += H5FDhttp.c H5FDhttp.h
|
||||
endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "config.h"
|
||||
#include "hdf5internal.h"
|
||||
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
#include "H5FDhttp.h"
|
||||
#endif
|
||||
|
||||
@ -127,7 +127,7 @@ NC_HDF5_initialize(void)
|
||||
if (!nc4_hdf5_initialized)
|
||||
nc4_hdf5_initialize();
|
||||
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
(void)H5FD_http_init();
|
||||
#endif
|
||||
return NC4_provenance_init();
|
||||
@ -142,7 +142,7 @@ NC_HDF5_initialize(void)
|
||||
int
|
||||
NC_HDF5_finalize(void)
|
||||
{
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
(void)H5FD_http_finalize();
|
||||
#endif
|
||||
(void)nc4_hdf5_finalize();
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ncpathmgr.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
#include "H5FDhttp.h"
|
||||
#endif
|
||||
|
||||
@ -743,7 +743,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
|
||||
|
||||
h5 = (NC_HDF5_FILE_INFO_T*)nc4_info->format_file_info;
|
||||
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
/* Do path as URL processing */
|
||||
ncuriparse(path,&h5->uri);
|
||||
if(h5->uri != NULL) {
|
||||
@ -755,7 +755,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
|
||||
parameters = NULL; /* kill off parallel */
|
||||
}
|
||||
}
|
||||
#endif /*ENABLE_BYTERANGE*/
|
||||
#endif /*NETCDF_ENABLE_BYTERANGE*/
|
||||
|
||||
nc4_info->mem.inmemory = ((mode & NC_INMEMORY) == NC_INMEMORY);
|
||||
nc4_info->mem.diskless = ((mode & NC_DISKLESS) == NC_DISKLESS);
|
||||
@ -882,7 +882,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
|
||||
if ((h5->hdfid = nc4_H5Fopen(path, flags, fapl_id)) < 0)
|
||||
BAIL(NC_EHDFERR);
|
||||
}
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
else if(h5->byterange) { /* Arrange to use the byte-range drivers */
|
||||
char* newpath = NULL;
|
||||
#ifdef ENABLE_HDF5_ROS3
|
||||
|
@ -40,12 +40,12 @@ else (USE_FFIO)
|
||||
list(APPEND libsrc_SOURCES posixio.c)
|
||||
ENDif (USE_FFIO)
|
||||
|
||||
if (ENABLE_BYTERANGE)
|
||||
if (NETCDF_ENABLE_BYTERANGE)
|
||||
list(APPEND libsrc_SOURCES httpio.c)
|
||||
if (ENABLE_S3)
|
||||
list(APPEND libsrc_SOURCES s3io.c)
|
||||
endif(ENABLE_S3)
|
||||
endif(ENABLE_BYTERANGE)
|
||||
endif(NETCDF_ENABLE_BYTERANGE)
|
||||
|
||||
add_library(netcdf3 OBJECT ${libsrc_SOURCES})
|
||||
|
||||
@ -53,13 +53,13 @@ if (ENABLE_DLL)
|
||||
target_compile_definitions(netcdf3 PRIVATE DLL_NETCDF DLL_EXPORT)
|
||||
endif()
|
||||
|
||||
if (ENABLE_BYTERANGE)
|
||||
if (NETCDF_ENABLE_BYTERANGE)
|
||||
target_include_directories(netcdf3 PUBLIC ${CURL_INCLUDE_DIRS})
|
||||
target_compile_options(netcdf3
|
||||
PRIVATE
|
||||
-DCURL_STATICLIB=1
|
||||
)
|
||||
endif (ENABLE_BYTERANGE)
|
||||
endif (NETCDF_ENABLE_BYTERANGE)
|
||||
|
||||
if(STATUS_PARALLEL)
|
||||
target_link_libraries(netcdf3 PUBLIC MPI::MPI_C)
|
||||
|
@ -29,14 +29,14 @@ libnetcdf3_la_SOURCES += posixio.c
|
||||
endif !USE_STDIO
|
||||
endif !USE_FFIO
|
||||
|
||||
if ENABLE_BYTERANGE
|
||||
if NETCDF_ENABLE_BYTERANGE
|
||||
libnetcdf3_la_SOURCES += httpio.c
|
||||
|
||||
if ENABLE_S3
|
||||
libnetcdf3_la_SOURCES += s3io.c
|
||||
endif
|
||||
|
||||
endif ENABLE_BYTERANGE
|
||||
endif NETCDF_ENABLE_BYTERANGE
|
||||
|
||||
noinst_LTLIBRARIES = libnetcdf3.la
|
||||
|
||||
|
@ -37,7 +37,7 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** co
|
||||
extern int mmapio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
|
||||
# endif
|
||||
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
extern int httpio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
|
||||
#endif
|
||||
|
||||
@ -49,7 +49,7 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** co
|
||||
extern int memio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
|
||||
|
||||
/* Forward */
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
static int urlmodetest(const char* path);
|
||||
#endif
|
||||
|
||||
@ -85,7 +85,7 @@ ncio_open(const char *path, int ioflags,
|
||||
void* parameters,
|
||||
ncio** iopp, void** const mempp)
|
||||
{
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
int modetest = urlmodetest(path);
|
||||
#endif
|
||||
|
||||
@ -103,7 +103,7 @@ ncio_open(const char *path, int ioflags,
|
||||
return mmapio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
|
||||
}
|
||||
# endif /*USE_MMAP*/
|
||||
# ifdef ENABLE_BYTERANGE
|
||||
# ifdef NETCDF_ENABLE_BYTERANGE
|
||||
if(modetest == NC_HTTP) {
|
||||
return httpio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
|
||||
}
|
||||
@ -112,7 +112,7 @@ ncio_open(const char *path, int ioflags,
|
||||
return s3io_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
|
||||
}
|
||||
# endif
|
||||
# endif /*ENABLE_BYTERANGE*/
|
||||
# endif /*NETCDF_ENABLE_BYTERANGE*/
|
||||
|
||||
#ifdef USE_STDIO
|
||||
return stdio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
|
||||
@ -181,7 +181,7 @@ NC_HTTP => byterange
|
||||
NC_S3SDK => s3
|
||||
0 => Not URL
|
||||
*/
|
||||
#ifdef ENABLE_BYTERANGE
|
||||
#ifdef NETCDF_ENABLE_BYTERANGE
|
||||
static int
|
||||
urlmodetest(const char* path)
|
||||
{
|
||||
|
@ -118,7 +118,7 @@ IF(NETCDF_BUILD_UTILITIES)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_BYTERANGE)
|
||||
IF(NETCDF_ENABLE_BYTERANGE)
|
||||
IF(ENABLE_EXTERNAL_SERVER_TESTS)
|
||||
build_bin_test_no_prefix(tst_byterange)
|
||||
add_sh_test(nc_test test_byterange)
|
||||
|
@ -77,7 +77,7 @@ TESTS = $(TESTPROGRAMS)
|
||||
|
||||
if NETCDF_BUILD_UTILITIES
|
||||
|
||||
if ENABLE_BYTERANGE
|
||||
if NETCDF_ENABLE_BYTERANGE
|
||||
if ENABLE_EXTERNAL_SERVER_TESTS
|
||||
tst_byterange_SOURCES = tst_byterange.c
|
||||
check_PROGRAMS += tst_byterange
|
||||
|
Loading…
x
Reference in New Issue
Block a user