Skip to content

Commit

Permalink
- make it portable
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7463 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Dec 17, 2010
1 parent 0bdee47 commit 0676031
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions c_runtime/interactive/client.cpp
@@ -1,7 +1,7 @@
/*
* Simple client to test OMI.
*
* Author: Per Östlund
* Author: Per Östlund
* Last revision: 2010-02-23
*/

Expand All @@ -13,7 +13,18 @@

bool run = true;

void* threadServerControl(void*)
/* Windows and mingw32 */
#if defined(__MINGW32__) || defined(_MSC_VER)

#define PTR_PORTABLE DWORD WINAPI

#else

#define PTR_PORTABLE void*

#endif

PTR_PORTABLE threadServerControl(void*)
{
Socket s1;

Expand All @@ -40,7 +51,7 @@ void* threadServerControl(void*)
}
}

void* threadServerTransfer(void*)
PTR_PORTABLE threadServerTransfer(void*)
{
Socket s1;

Expand All @@ -67,7 +78,7 @@ void* threadServerTransfer(void*)
}
}

void* threadControlClient(void*)
PTR_PORTABLE threadControlClient(void*)
{
Socket s1;

Expand Down Expand Up @@ -115,7 +126,7 @@ void* threadControlClient(void*)
break;
}

usleep(500000);
delay(5);
}

run = false;
Expand Down

0 comments on commit 0676031

Please sign in to comment.