From ea630615cb4859c53d0ce71da5dda5992154ef5b Mon Sep 17 00:00:00 2001 From: Adrian Pop Date: Thu, 22 May 2008 09:00:21 +0000 Subject: [PATCH] - fixes for Visual Studio compilation 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 --- Compiler/runtime/systemimpl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Compiler/runtime/systemimpl.c b/Compiler/runtime/systemimpl.c index 45bc1920771..00b5e73e6b8 100644 --- a/Compiler/runtime/systemimpl.c +++ b/Compiler/runtime/systemimpl.c @@ -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 @@ -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);