]> git.mxchange.org Git - flightgear.git/commitdiff
Use our own set of endian functions. This fixes a Cygwin problem.
authorehofman <ehofman>
Tue, 11 Oct 2005 08:21:07 +0000 (08:21 +0000)
committerehofman <ehofman>
Tue, 11 Oct 2005 08:21:07 +0000 (08:21 +0000)
utils/GPSsmooth/MIDG-II.cxx

index 3d84d9d2b2c20a12c875229aa4a5bd48d20195d5..9dedceebc2f36492173a15122415225093bd1fba 100644 (file)
@@ -1,12 +1,11 @@
 #include <iostream>
 
-#include <plib/ul.h>
-
 #include <simgear/constants.h>
 #include <simgear/io/sg_file.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/misc/strutils.hxx>
+#include <simgear/misc/stdint.hxx>
 
 #include "MIDG-II.hxx"
 
@@ -26,11 +25,11 @@ static uint32_t read_swab( char *buf, size_t offset, size_t size ) {
     char *ptr = buf + offset;
 
     // MIDG data is big endian so swap if needed.
-    if ( ulIsLittleEndian ) {
+    if ( sgIsLittleEndian() ) {
         if ( size == 4 ) {
-            ulEndianSwap( (uint32_t *)ptr );
+            sgEndianSwap( (uint32_t *)ptr );
         } else if ( size == 2 ) {
-            ulEndianSwap( (uint16_t *)ptr );
+            sgEndianSwap( (uint16_t *)ptr );
         }
     }