fixed a minor build issue in HawkStd.cpp

This commit is contained in:
hyung-hwan 2020-12-04 05:57:23 +00:00
parent 3a5119504e
commit 05ca362732
2 changed files with 4 additions and 3 deletions

View File

@ -42,9 +42,10 @@
#if defined(HAVE_CRT_EXTERNS_H) #if defined(HAVE_CRT_EXTERNS_H)
# include <crt_externs.h> /* MacOSX/darwin. _NSGetEnviron() */ # include <crt_externs.h> /* MacOSX/darwin. _NSGetEnviron() */
# define environ (*(_NSGetEnviron())) # define SYSTEM_ENVIRON (*(_NSGetEnviron()))
#else #else
extern char** environ; extern char** environ;
# define SYSTEM_ENVIRON ::environ
#endif #endif
///////////////////////////////// /////////////////////////////////
@ -343,7 +344,7 @@ int HawkStd::make_additional_globals (Run* run)
{ {
/* TODO: use wenviron where it's available */ /* 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; return 0;
} }

View File

@ -24,7 +24,7 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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_ #define _HAWK_STD_PRV_H_
#include <hawk-std.h> #include <hawk-std.h>