Skip to content

Commit

Permalink
2005-11-24 adrpo@ida
Browse files Browse the repository at this point in the history
- windows stdlib doesn't have setenv, 
  changed systemimpl.c so it uses _putenv("var=value")



git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1986 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 24, 2005
1 parent ded4be4 commit fdbf49a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/winruntime/systemimpl.c
Expand Up @@ -591,7 +591,9 @@ RML_BEGIN_LABEL(System__set_5fenv)
char* envvalue = RML_STRINGDATA(rmlA1);
int overwrite = (int)RML_IMMEDIATE(RML_UNTAGFIXNUM(rmlA2));
int setenv_result = 0;
setenv_result = setenv(envname, envvalue, overwrite);
char *temp = (char*)malloc(strlen(envname)+strlen(envvalue)+2);
sprintf(temp,"%s=%s", envname, envvalue);
setenv_result = _putenv(temp);
rmlA0 = (void*) mk_icon(setenv_result);
RML_TAILCALLK(rmlSC);
}
Expand Down

0 comments on commit fdbf49a

Please sign in to comment.