mirror of https://github.com/ecmwf/eccodes.git
Windows: Fix test failure (eccodes_t_grib_data_quality_checks)
This commit is contained in:
parent
5153078859
commit
7af0741529
|
@ -26,6 +26,16 @@ int feenableexcept(int excepts);
|
|||
|
||||
grib_string_list grib_file_not_found;
|
||||
|
||||
/* Windows always has a colon in pathnames e.g. C:\temp\file. So instead we use semi-colons as delimiter */
|
||||
/* in order to have multiple definitions directories */
|
||||
#ifdef ECCODES_ON_WINDOWS
|
||||
# define DEFS_PATH_DELIMITER_CHAR ';'
|
||||
# define DEFS_PATH_DELIMITER_STR ";"
|
||||
#else
|
||||
# define DEFS_PATH_DELIMITER_CHAR ':'
|
||||
# define DEFS_PATH_DELIMITER_STR ":"
|
||||
#endif
|
||||
|
||||
#if GRIB_PTHREADS
|
||||
static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
|
||||
|
@ -466,7 +476,7 @@ grib_context* grib_context_get_default()
|
|||
const char* defs_extra = getenv("ECCODES_EXTRA_DEFINITION_PATH");
|
||||
if (defs_extra) {
|
||||
char buffer[DEF_PATH_MAXLEN];
|
||||
ecc_snprintf(buffer, DEF_PATH_MAXLEN, "%s:%s", defs_extra, default_grib_context.grib_definition_files_path);
|
||||
ecc_snprintf(buffer, DEF_PATH_MAXLEN, "%s%c%s", defs_extra, DEFS_PATH_DELIMITER_CHAR, default_grib_context.grib_definition_files_path);
|
||||
default_grib_context.grib_definition_files_path = strdup(buffer);
|
||||
}
|
||||
}
|
||||
|
@ -566,16 +576,6 @@ static char* resolve_path(grib_context* c, char* path)
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Windows always has a colon in pathnames e.g. C:\temp\file. So instead we use semi-colons as delimiter */
|
||||
/* in order to have multiple definitions directories */
|
||||
#ifdef ECCODES_ON_WINDOWS
|
||||
# define DEFS_PATH_DELIMITER_CHAR ';'
|
||||
# define DEFS_PATH_DELIMITER_STR ";"
|
||||
#else
|
||||
# define DEFS_PATH_DELIMITER_CHAR ':'
|
||||
# define DEFS_PATH_DELIMITER_STR ":"
|
||||
#endif
|
||||
|
||||
static int init_definition_files_dir(grib_context* c)
|
||||
{
|
||||
int err=0;
|
||||
|
|
Loading…
Reference in New Issue