CHANGED: - moved wxwidget header
authorChristian Taedcke <Christian.Taedcke@ica-traffic.de>
Tue, 23 Feb 2010 08:09:57 +0100
changeset 641 404a51700f40
parent 640 e9a4e4c308bb
child 642 f77ad188c2b1
CHANGED: - moved wxwidget header
ADDED: - getopt include for win32
FIXED: - TimerInit must be done for win32, too
* * *
CHANGED: - getopt signature (temp change)
* * *
CHANGED: - moved getopt and windows include
examples/DS401_Slave_Gui/TestSlaveGui.cpp
examples/DS401_Slave_Gui/getopt.h
examples/DS401_Slave_Gui/main.cpp
--- 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"