aboutsummaryrefslogtreecommitdiff
path: root/gcc/cobol/cbldiag.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cobol/cbldiag.h')
-rw-r--r--gcc/cobol/cbldiag.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cobol/cbldiag.h b/gcc/cobol/cbldiag.h
index ed754f1..d7ee98f 100644
--- a/gcc/cobol/cbldiag.h
+++ b/gcc/cobol/cbldiag.h
@@ -33,6 +33,12 @@
#else
#define _CBLDIAG_H
+#if 0
+#define gcobol_getenv(x) getenv(x)
+#else
+#define gcobol_getenv(x) ((char *)nullptr)
+#endif
+
const char * cobol_filename();
/*
@@ -101,7 +107,7 @@ template <typename LOC>
static void
location_dump( const char func[], int line, const char tag[], const LOC& loc) {
extern int yy_flex_debug;
- if( yy_flex_debug && getenv("update_location") )
+ if( yy_flex_debug && gcobol_getenv("update_location") )
fprintf(stderr, "%s:%d: %s location (%d,%d) to (%d,%d)\n",
func, line, tag,
loc.first_line, loc.first_column, loc.last_line, loc.last_column);