Skip to content

Commit

Permalink
- Fix Windows compilation
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12892 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 12, 2012
1 parent 75d6677 commit e9540f2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Compiler/runtime/systemimpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ int SystemImpl__spawnCall(const char* path, const char* str)

fflush(NULL); /* flush output so the testsuite is deterministic */
#if defined(__MINGW32__) || defined(_MSC_VER)
status = spawnl(P_DETACH, path, str, "", NULL);
ret_val = spawnl(P_DETACH, path, str, "", NULL);
#else
pid_t pID = vfork();
if (pID == 0) { // child
Expand All @@ -590,19 +590,14 @@ int SystemImpl__spawnCall(const char* path, const char* str)
c_add_message(-1,ErrorType_scripting,ErrorLevel_error,gettext("system(%s) failed: %s"),tokens,2);
return -1;
}
ret_val = 0;
#endif
fflush(NULL); /* flush output so the testsuite is deterministic */

if (debug) {
fprintf(stderr, "System.spawnCall: returned\n"); fflush(NULL);
}

#if defined(__MINGW32__) || defined(_MSC_VER)
ret_val = status;
#else
ret_val = 0;
#endif

if (debug) {
fprintf(stderr, "System.spawnCall: returned value: %d\n", ret_val); fflush(NULL);
}
Expand Down

0 comments on commit e9540f2

Please sign in to comment.