From 05ca362732eb26f8ae9ebe02da230bc2a7b76120 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 4 Dec 2020 05:57:23 +0000 Subject: [PATCH] fixed a minor build issue in HawkStd.cpp --- hawk/lib/HawkStd.cpp | 5 +++-- hawk/lib/std-prv.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hawk/lib/HawkStd.cpp b/hawk/lib/HawkStd.cpp index 8e5860e5..c47e4ca5 100644 --- a/hawk/lib/HawkStd.cpp +++ b/hawk/lib/HawkStd.cpp @@ -42,9 +42,10 @@ #if defined(HAVE_CRT_EXTERNS_H) # include /* MacOSX/darwin. _NSGetEnviron() */ -# define environ (*(_NSGetEnviron())) +# define SYSTEM_ENVIRON (*(_NSGetEnviron())) #else extern char** environ; +# define SYSTEM_ENVIRON ::environ #endif ///////////////////////////////// @@ -343,7 +344,7 @@ int HawkStd::make_additional_globals (Run* run) { /* TODO: use wenviron where it's available */ - if (this->build_argcv(run) <= -1 || this->build_environ(run, ::environ) <= -1) return -1; + if (this->build_argcv(run) <= -1 || this->build_environ(run, SYSTEM_ENVIRON) <= -1) return -1; return 0; } diff --git a/hawk/lib/std-prv.h b/hawk/lib/std-prv.h index bda54653..373814ad 100644 --- a/hawk/lib/std-prv.h +++ b/hawk/lib/std-prv.h @@ -24,7 +24,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _HAWK_STD_PRV_H +#ifndef _HAWK_STD_PRV_H_ #define _HAWK_STD_PRV_H_ #include