MSVC++ fixes
This commit is contained in:
parent
3238528b35
commit
ef82114c32
2 changed files with 23 additions and 0 deletions
src/Network
|
@ -31,9 +31,15 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h> //snprintf
|
||||||
|
#if defined( _MSCVER_ )
|
||||||
|
# include <io.h> //lseek, read, write
|
||||||
|
#endif
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
|
#include <plib/ul.h>
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/io/iochannel.hxx>
|
#include <simgear/io/iochannel.hxx>
|
||||||
#include <simgear/math/sg_types.hxx>
|
#include <simgear/math/sg_types.hxx>
|
||||||
|
@ -46,6 +52,9 @@
|
||||||
|
|
||||||
SG_USING_STD(string);
|
SG_USING_STD(string);
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
// Lock the ATC 610 hardware
|
// Lock the ATC 610 hardware
|
||||||
static int ATC610xLock( int fd ) {
|
static int ATC610xLock( int fd ) {
|
||||||
|
@ -276,7 +285,11 @@ bool FGATC610x::open() {
|
||||||
|
|
||||||
ATC610xRelease( lock_fd );
|
ATC610xRelease( lock_fd );
|
||||||
|
|
||||||
|
#if defined( _MSCVER_ )
|
||||||
|
ulMilliSecondSleep(33);
|
||||||
|
#else
|
||||||
usleep(33);
|
usleep(33);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
compass_position = 0.0;
|
compass_position = 0.0;
|
||||||
|
|
|
@ -36,6 +36,16 @@
|
||||||
|
|
||||||
#ifdef FG_JPEG_SERVER
|
#ifdef FG_JPEG_SERVER
|
||||||
# include <simgear/screen/jpgfactory.hxx>
|
# 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
|
#endif
|
||||||
|
|
||||||
#include "protocol.hxx"
|
#include "protocol.hxx"
|
||||||
|
|
Loading…
Add table
Reference in a new issue