--- a/examples/DS401_Slave_Gui/TestSlaveGui.cpp Fri Feb 19 08:19:23 2010 +0100
+++ b/examples/DS401_Slave_Gui/TestSlaveGui.cpp Tue Feb 23 08:09:57 2010 +0100
@@ -20,14 +20,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-#include <wx/wxprec.h>
-#include <wx/wx.h>
-#include <wx/textctrl.h>
-#include <iostream>
-
#if defined(WIN32) && !defined(__CYGWIN__)
#include <windows.h>
+#include "getopt.h"
#else
#include <stdio.h>
#include <string.h>
@@ -36,6 +31,14 @@
#include <signal.h>
#endif
+
+#include <wx/wxprec.h>
+#include <wx/wx.h>
+#include <wx/textctrl.h>
+#include <iostream>
+
+
+
//#include <can_driver.h>
//#include <timers_driver.h>
extern "C"
@@ -73,9 +76,9 @@
main_can (s_BOARD SlaveBoard, char *LibraryPath)
{
#if !defined(WIN32) && !defined(__CYGWIN__)
+ //TimerInit();
+#endif
TimerInit();
-#endif
-
printf ("Bus name: %s Freq: %s Driver: %s\n",
SlaveBoard.busname, SlaveBoard.baudrate, LibraryPath);
--- a/examples/DS401_Slave_Gui/getopt.h Fri Feb 19 08:19:23 2010 +0100
+++ b/examples/DS401_Slave_Gui/getopt.h Tue Feb 23 08:09:57 2010 +0100
@@ -147,13 +147,15 @@
`getopt'. */
#if (defined __STDC__ && __STDC__) || defined __cplusplus
-# if (defined __GNU_LIBRARY__ || __CYGWIN__ || __MINGW32__)
+//# if (defined __GNU_LIBRARY__) || defined(__CYGWIN__) || defined(__MINGW32__)
+# ifdef __GNU_LIBRARY__
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
# else /* not __GNU_LIBRARY__ */
-extern int getopt ();
+//extern int getopt ();
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts);
# endif /* __GNU_LIBRARY__ */
# ifndef __need_getopt
--- a/examples/DS401_Slave_Gui/main.cpp Fri Feb 19 08:19:23 2010 +0100
+++ b/examples/DS401_Slave_Gui/main.cpp Tue Feb 23 08:09:57 2010 +0100
@@ -1,3 +1,8 @@
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
+#include "getopt.h"
+#endif
+
#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/textctrl.h>
@@ -16,13 +21,13 @@
//#include "monicone.xpm"
-#if defined(WIN32) && !defined(__CYGWIN__)
-#include <windows.h>
-extern "C"
-{
-#include "getopt.h"
-}
-#endif
+//#if defined(WIN32) && !defined(__CYGWIN__)
+//#include <windows.h>
+//extern "C"
+//{
+//#include "getopt.h"
+//}
+//#endif
#include "main.h"
#include "TestSlaveGui.h"