Skip to content

Commit

Permalink
- Trying to fix corbaimpl on Windows.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13435 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Oct 17, 2012
1 parent 744dcef commit 19a8afd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Compiler/runtime/corbaimpl.cpp
Expand Up @@ -87,8 +87,6 @@ char** construct_dummy_args(int argc, const char* argv[])
char** args = new char*[argc];

for(int i = 0; i < argc; ++i) {
int len = strlen(argv[i]);
args[i] = new char[len];
args[i] = strdup(argv[i]);
}

Expand All @@ -98,7 +96,7 @@ char** construct_dummy_args(int argc, const char* argv[])
void free_dummy_args(int argc, char** argv)
{
for(int i = 0; i < argc; ++i) {
delete [] argv[i];
free(argv[i]);
}
delete [] argv;
}
Expand Down Expand Up @@ -169,7 +167,7 @@ int CorbaImpl__initialize()
#ifndef NOMICO
#if defined(USE_OMNIORB)
int argc = 6;
const char *args[] = {
const char *dummyArgv[] = {
"omc",
"-NoResolve",
"-IIOPAddr",
Expand All @@ -179,7 +177,7 @@ int CorbaImpl__initialize()
};
#else
int argc=4;
const char *args[] = {
const char *dummyArgv[] = {
"omc",
"ORBNoResolve",
"-ORBIIOPAddr",
Expand Down Expand Up @@ -218,7 +216,7 @@ Please stop or kill the other OMC process first!\nOpenModelica OMC will now exit
InitializeCriticalSection(&lock);
InitializeCriticalSection(&clientlock);

char **argv = construct_dummy_args(argc, args);
char **argv = construct_dummy_args(argc, dummyArgv);
#if defined(USE_OMNIORB)
orb = CORBA::ORB_init(argc, argv, "omniORB4");
#else
Expand Down

0 comments on commit 19a8afd

Please sign in to comment.