# HG changeset patch # User Christian Taedcke # Date 1266908997 -3600 # Node ID 404a51700f40c5b799110db8ad472193c26e140a # Parent e9a4e4c308bb798e3724e13435be1b9bc4e32633 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 diff -r e9a4e4c308bb -r 404a51700f40 examples/DS401_Slave_Gui/TestSlaveGui.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 -#include -#include -#include - #if defined(WIN32) && !defined(__CYGWIN__) #include +#include "getopt.h" #else #include #include @@ -36,6 +31,14 @@ #include #endif + +#include +#include +#include +#include + + + //#include //#include 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); diff -r e9a4e4c308bb -r 404a51700f40 examples/DS401_Slave_Gui/getopt.h --- 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 diff -r e9a4e4c308bb -r 404a51700f40 examples/DS401_Slave_Gui/main.cpp --- 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 +#include "getopt.h" +#endif + #include #include #include @@ -16,13 +21,13 @@ //#include "monicone.xpm" -#if defined(WIN32) && !defined(__CYGWIN__) -#include -extern "C" -{ -#include "getopt.h" -} -#endif +//#if defined(WIN32) && !defined(__CYGWIN__) +//#include +//extern "C" +//{ +//#include "getopt.h" +//} +//#endif #include "main.h" #include "TestSlaveGui.h"