A couple MSVC++ portability tweaks.
This commit is contained in:
parent
c0b59ca4b2
commit
802af70258
3 changed files with 13 additions and 1 deletions
src/FDM/JSBSim
|
@ -168,7 +168,7 @@ bool FGAircraft::LoadAircraft(string aircraft_path, string engine_path, string f
|
||||||
while (!aircraftfile.fail()) {
|
while (!aircraftfile.fail()) {
|
||||||
holding_string.erase();
|
holding_string.erase();
|
||||||
aircraftfile >> holding_string;
|
aircraftfile >> holding_string;
|
||||||
#if defined(__BORLANDC__) || defined(FG_HAVE_NATIVE_SGI_COMPILERS)
|
#if defined(__BORLANDC__) || defined(FG_HAVE_NATIVE_SGI_COMPILERS) || defined(_MSC_VER)
|
||||||
if (holding_string.compare(0, 2, "//") != 0) {
|
if (holding_string.compare(0, 2, "//") != 0) {
|
||||||
#else
|
#else
|
||||||
if (holding_string.compare("//",0,2) != 0) {
|
if (holding_string.compare("//",0,2) != 0) {
|
||||||
|
|
|
@ -66,6 +66,12 @@ INCLUDES
|
||||||
#include "FGAuxiliary.h"
|
#include "FGAuxiliary.h"
|
||||||
#include "FGOutput.h"
|
#include "FGOutput.h"
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
/* get a definition for pi */
|
||||||
|
#include <Include/fg_constants.h>
|
||||||
|
#define M_PI FG_PI
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
************************************ CODE **************************************
|
************************************ CODE **************************************
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
|
@ -57,6 +57,12 @@ INCLUDES
|
||||||
#include "FGState.h"
|
#include "FGState.h"
|
||||||
#include "FGFDMExec.h"
|
#include "FGFDMExec.h"
|
||||||
|
|
||||||
|
#ifndef M_PI
|
||||||
|
/* get a definition for pi */
|
||||||
|
#include <Include/fg_constants.h>
|
||||||
|
#define M_PI FG_PI
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
************************************ CODE **************************************
|
************************************ CODE **************************************
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
Loading…
Add table
Reference in a new issue