From ef82114c32d807f8e461e74e3574dbf0f79454dd Mon Sep 17 00:00:00 2001 From: curt <curt> Date: Fri, 8 Feb 2002 00:07:53 +0000 Subject: [PATCH] MSVC++ fixes --- src/Network/atc610x.cxx | 13 +++++++++++++ src/Network/jpg-httpd.hxx | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/Network/atc610x.cxx b/src/Network/atc610x.cxx index e07270957..6b229d403 100644 --- a/src/Network/atc610x.cxx +++ b/src/Network/atc610x.cxx @@ -31,9 +31,15 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <stdio.h> //snprintf +#if defined( _MSCVER_ ) +# include <io.h> //lseek, read, write +#endif #include STL_STRING +#include <plib/ul.h> + #include <simgear/debug/logstream.hxx> #include <simgear/io/iochannel.hxx> #include <simgear/math/sg_types.hxx> @@ -46,6 +52,9 @@ SG_USING_STD(string); +#ifdef _MSC_VER +# define snprintf _snprintf +#endif // Lock the ATC 610 hardware static int ATC610xLock( int fd ) { @@ -276,7 +285,11 @@ bool FGATC610x::open() { ATC610xRelease( lock_fd ); +#if defined( _MSCVER_ ) + ulMilliSecondSleep(33); +#else usleep(33); +#endif } compass_position = 0.0; diff --git a/src/Network/jpg-httpd.hxx b/src/Network/jpg-httpd.hxx index b51b6d376..610b51215 100644 --- a/src/Network/jpg-httpd.hxx +++ b/src/Network/jpg-httpd.hxx @@ -36,6 +36,16 @@ #ifdef FG_JPEG_SERVER # include <simgear/screen/jpgfactory.hxx> +#else +// dummy it in to keep the compiler happy +class trJpgFactory { +public: + trJpgFactory(); + void init(int, int); + void destroy(); + int render(); + void *data(); +}; #endif #include "protocol.hxx"