diff --git a/src/grib_loader_from_handle.cc b/src/grib_loader_from_handle.cc index a423c31cc..765915bbd 100644 --- a/src/grib_loader_from_handle.cc +++ b/src/grib_loader_from_handle.cc @@ -10,6 +10,10 @@ #include "grib_api_internal.h" +#if defined DEBUG && ! defined GRIB_PTHREADS + #define MY_DEBUG +#endif + static int copy_values(grib_handle* h, grib_accessor* ga) { int i, j, k; @@ -62,7 +66,7 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_ unsigned char* uval = NULL; long* lval = NULL; double* dval = NULL; -#ifdef DEBUG +#ifdef MY_DEBUG static int first = 1; static const char* missing = 0; #endif @@ -123,7 +127,7 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_ if (ret != GRIB_SUCCESS) { name = ga->name; -#ifdef DEBUG +#ifdef MY_DEBUG if (first) { missing = codes_getenv("ECCODES_PRINT_MISSING"); first = 0; @@ -131,7 +135,7 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_ #endif grib_context_log(h->context, GRIB_LOG_DEBUG, "Copying [%s] failed: %s", name, grib_get_error_message(ret)); -#ifdef DEBUG +#ifdef MY_DEBUG if (missing) { fprintf(stdout, "REPARSE: no value for %s", name); if (default_value)