diff options
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.c/src/platforms')
3 files changed, 11 insertions, 11 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h index aefbb96b0..c35952a98 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_POSIX_GENERIC_GCC/etDatatypes.h @@ -36,6 +36,8 @@ #include <pthread.h> #include <semaphore.h> +ET_EXTERN_C_BEGIN + /*--- Data types for room.basic.types */ /*-----------------------------------------------------------*/ @@ -61,4 +63,6 @@ typedef timer_t etOSTimerId; /*-----------------------------------------------------------*/ +ET_EXTERN_C_END + #endif /* _DATATYPES_H_ */ diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h index b969c8f4b..6a3a63bdd 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etDatatypes.h @@ -12,10 +12,6 @@ * *******************************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - #ifndef _ETDATATYPES_H_ #define _ETDATATYPES_H_ @@ -36,6 +32,8 @@ extern "C" { #define WINVER 0x0500 #include <windows.h> +ET_EXTERN_C_BEGIN + /*--- Data types for room.basic.types */ /*-----------------------------------------------------------*/ @@ -57,8 +55,6 @@ typedef SOCKET etOSSocketData; /*-----------------------------------------------------------*/ -#endif /* _DATATYPES_H_ */ +ET_EXTERN_C_END -#ifdef __cplusplus -} -#endif +#endif /* _DATATYPES_H_ */ diff --git a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etSocket.c b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etSocket.c index b6492af2f..f3118a5ad 100644 --- a/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etSocket.c +++ b/runtime/org.eclipse.etrice.runtime.c/src/platforms/MT_WIN_MinGW/etSocket.c @@ -49,7 +49,7 @@ int etSocket_destruct(etSocket* self) { } int etSocket_recv(etSocket* self, uint8* buffer, size_t length) { - int result = recv(self->socket, buffer, length, 0); + int result = recv(self->socket, (char*) buffer, length, 0); if(result < 0) { printf("Error: socket could not receive data\n"); printLastError(); @@ -58,7 +58,7 @@ int etSocket_recv(etSocket* self, uint8* buffer, size_t length) { } int etSocket_send(etSocket* self, uint8* buffer, size_t length) { - int result = send(self->socket, buffer, length, 0); + int result = send(self->socket, (const char*) buffer, length, 0); if(result < 0) { printf("Error: socket could not send data\n"); printLastError(); @@ -162,6 +162,6 @@ void printLastError() { NULL, WSAGetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&s, 0, NULL); - printf("%S\n", s); + wprintf(L"%S\n", s); LocalFree(s); } |