Skip to content

Commit

Permalink
- fixed compilation of the bootstrapped compiler
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8159 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Mar 10, 2011
1 parent a824af4 commit 45a522b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Util/System.mo
Expand Up @@ -755,7 +755,7 @@ end unquoteIdentifier;

public function intMaxLit "Returns the maximum integer that can be represent using this version of the compiler"
output Integer outInt;
external "builtin" outInt=System_intMaxLit();
external "C" outInt=System_intMaxLit();
end intMaxLit;

public function realMaxLit "Returns the maximum integer that can be represent using this version of the compiler"
Expand Down
13 changes: 13 additions & 0 deletions Compiler/runtime/System_omc.cpp
Expand Up @@ -31,6 +31,7 @@
#include "meta_modelica.h"
#include "rml_compatibility.h"
#include "systemimpl.c"
#include <limits.h>

extern "C" {

Expand Down Expand Up @@ -516,4 +517,16 @@ extern char* System_unquoteIdentifier(char *str)
return res;
}

extern int System_intMaxLit()
{
return (LONG_MAX / 2);
}

extern void* System_realMaxLit()
{
return mmc_mk_rcon(DBL_MAX / 2048);
}



}

0 comments on commit 45a522b

Please sign in to comment.