Fix mingw32 cross build for can_peak_win32 and can_tcp_win32 server.
authoredouard
Sat, 13 Nov 2010 23:08:34 +0100
changeset 633 2c43383a1d57
parent 632 0f3dc8bbaaa0
child 634 15e8d1ec0e61
Fix mingw32 cross build for can_peak_win32 and can_tcp_win32 server.
drivers/can_peak_win32/can_peak_win32.c
drivers/can_tcp_win32/can_tcp_win32_server.cpp
--- a/drivers/can_peak_win32/can_peak_win32.c	Sat Nov 13 22:25:24 2010 +0100
+++ b/drivers/can_peak_win32/can_peak_win32.c	Sat Nov 13 23:08:34 2010 +0100
@@ -132,7 +132,7 @@
 }
 
 /********* functions which permit to communicate with the board ****************/
-UNS8 canReceive_driver (CAN_HANDLE fd0, Message * m)
+UNS8 __stdcall canReceive_driver (CAN_HANDLE fd0, Message * m)
 {
 	int ret=0;
 	UNS8 data;
@@ -217,7 +217,7 @@
 }
 
 /***************************************************************************/
-UNS8 canSend_driver (CAN_HANDLE fd0, Message const * m)
+UNS8 __stdcall canSend_driver (CAN_HANDLE fd0, Message const * m)
 {
 	UNS8 data;
 	DWORD localerrno;
@@ -272,14 +272,14 @@
 }
 
 /***************************************************************************/
-UNS8 canChangeBaudRate_driver( CAN_HANDLE fd, char* baud)
+UNS8 __stdcall canChangeBaudRate_driver( CAN_HANDLE fd, char* baud)
 {
 	printf("canChangeBaudRate not yet supported by this driver\n");
 	return 0;
 }
 
 /***************************************************************************/
-CAN_HANDLE canOpen_driver (s_BOARD * board)
+CAN_HANDLE __stdcall canOpen_driver (s_BOARD * board)
 {
   char busname[64];
   char* pEnd;
@@ -308,7 +308,7 @@
 }
 
 /***************************************************************************/
-int canClose_driver (CAN_HANDLE fd0)
+int __stdcall canClose_driver (CAN_HANDLE fd0)
 {
 #ifdef PCAN2_HEADER_
       // if not the first handler
--- a/drivers/can_tcp_win32/can_tcp_win32_server.cpp	Sat Nov 13 22:25:24 2010 +0100
+++ b/drivers/can_tcp_win32/can_tcp_win32_server.cpp	Sat Nov 13 23:08:34 2010 +0100
@@ -20,6 +20,7 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include <stdio.h>
 #include "Socket.h"
 #include <iostream>
 #include <process.h>