]> git.mxchange.org Git - flightgear.git/commitdiff
MSVC++ fixes
authorcurt <curt>
Fri, 8 Feb 2002 00:07:53 +0000 (00:07 +0000)
committercurt <curt>
Fri, 8 Feb 2002 00:07:53 +0000 (00:07 +0000)
src/Network/atc610x.cxx
src/Network/jpg-httpd.hxx

index e0727095787aaf61c242b275e077fdb2669a24d1..6b229d403d7eb3a5b877831b7449dc0a98e67c85 100644 (file)
 #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;
index b51b6d376f8e78dbadb986daccd9c578f59d0088..610b51215ae666158931fe843ba39ad023696ecb 100644 (file)
 
 #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"