Skip to content

Commit

Permalink
- fixes for Visual Studio compilation
Browse files Browse the repository at this point in the history
  add also gcc flags: -msse2 -mfpmath=sse when compiling with VS.
- add base_array* to the c_runtime.vcproj
- small changes to Setup.vdproj

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@3596 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed May 22, 2008
1 parent 4f7c6db commit ea63061
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Compiler/runtime/systemimpl.c
Expand Up @@ -278,10 +278,11 @@ void System_5finit(void)
set_cc("gcc");
set_cxx("g++");
set_linker("gcc -shared -export-dynamic");
#if defined(__i386__) || defined(__x86_64__)
#if defined(__i386__) || defined(__x86_64__) || defined(_MSC_VER)
/*
* if we are on i386 or x86_64 then use the
* SSE instructions, not the normal i387 FPU
* if we are on i386 or x86_64 or compiling with
* Visual Studio then use the SSE instructions,
* not the normal i387 FPU
*/
set_cflags("-Wall -msse2 -mfpmath=sse ${MODELICAUSERCFLAGS}");
#else
Expand Down Expand Up @@ -959,11 +960,12 @@ RML_BEGIN_LABEL(System__getVariableNames)
{
char* model = RML_STRINGDATA(rmlA0);
int size = getVariableListSize(model);
char* lst = 0;

if(!size)
RML_TAILCALLK(rmlFC);

char* lst = (char*)malloc(sizeof(char)*size +1);
lst = (char*)malloc(sizeof(char)*size +1);

getVariableList(model, lst);
rmlA0 = (void*)mk_scon(lst);
Expand Down

0 comments on commit ea63061

Please sign in to comment.