]> git.mxchange.org Git - flightgear.git/commitdiff
This code is written on top of a driver interface only available with linux
authorcurt <curt>
Thu, 18 Nov 2004 17:40:03 +0000 (17:40 +0000)
committercurt <curt>
Thu, 18 Nov 2004 17:40:03 +0000 (17:40 +0000)
(/proc file system) so it doesn't make sense to have other OS's trying to
open these files because they could never exist.

src/Network/ATC-Inputs.cxx

index 0d11ca64e7ea154e0e8f24d8b7ac274f0d328cc5..d950dc8242f81ac5e7efef89dfe3d7069623e1e7 100644 (file)
@@ -63,6 +63,7 @@ FGATCInput::FGATCInput( const int _board, const SGPath &_config_file ) :
 
 // Read analog inputs
 static void ATCReadAnalogInputs( int fd, unsigned char *analog_in_bytes ) {
+#if defined( unix ) || defined( __CYGWIN__ )
     // rewind
     lseek( fd, 0, SEEK_SET );
 
@@ -71,11 +72,13 @@ static void ATCReadAnalogInputs( int fd, unsigned char *analog_in_bytes ) {
        SG_LOG( SG_IO, SG_ALERT, "Read failed" );
        exit( -1 );
     }
+#endif
 }
 
 
 // Read status of radio switches and knobs
 static void ATCReadRadios( int fd, unsigned char *switch_data ) {
+#if defined( unix ) || defined( __CYGWIN__ )
     // rewind
     lseek( fd, 0, SEEK_SET );
 
@@ -84,11 +87,13 @@ static void ATCReadRadios( int fd, unsigned char *switch_data ) {
        SG_LOG( SG_IO, SG_ALERT, "Read failed" );
        exit( -1 );
     }
+#endif
 }
 
 
 // Read switch inputs
 static void ATCReadSwitches( int fd, unsigned char *switch_bytes ) {
+#if defined( unix ) || defined( __CYGWIN__ )
     // rewind
     lseek( fd, 0, SEEK_SET );
 
@@ -97,6 +102,7 @@ static void ATCReadSwitches( int fd, unsigned char *switch_bytes ) {
        SG_LOG( SG_IO, SG_ALERT, "Read failed" );
        exit( -1 );
     }
+#endif
 }