Fixed: MFC tools compilation with STLport

This commit is contained in:
kervala 2012-10-28 13:41:50 +01:00
parent c4706adc76
commit 89e78b8ad2
17 changed files with 62 additions and 9 deletions

View file

@ -1,4 +1,4 @@
LIBRARY nelligoscapeutility.dlx ;LIBRARY nelligoscapeutility.dlx
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -18,6 +18,14 @@
#include <assert.h> #include <assert.h>
#ifdef _STLPORT_VERSION
namespace std
{
float fabsf(float f);
double fabsl(double f);
}
#endif
// Various MAX and MXS includes // Various MAX and MXS includes
#include <maxversion.h> #include <maxversion.h>
#if MAX_VERSION_MAJOR >= 14 #if MAX_VERSION_MAJOR >= 14

View file

@ -14,6 +14,19 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef STDAFX_H
#define STDAFX_H
#include <string>
#ifdef _STLPORT_VERSION
namespace std
{
float fabsf(float f);
double fabsl(double f);
}
#endif
#include <assert.h> #include <assert.h>
#include <windows.h> #include <windows.h>
#include <locale.h> #include <locale.h>
@ -36,7 +49,7 @@
# include <maxscript/foundation/mxstime.h> # include <maxscript/foundation/mxstime.h>
# include <maxscript/maxwrapper/mxsobjects.h> # include <maxscript/maxwrapper/mxsobjects.h>
# include <maxscript/compiler/parser.h> # include <maxscript/compiler/parser.h>
# include <maxscript/macros/define_instantiation_functions.h> # include <maxscript/macros/define_instantiation_functions.h>
#else #else
# include <MaxScrpt/maxscrpt.h> # include <MaxScrpt/maxscrpt.h>
# include <MaxScrpt/3dmath.h> # include <MaxScrpt/3dmath.h>
@ -58,3 +71,5 @@
#endif #endif
#include "nel/misc/bsphere.h" #include "nel/misc/bsphere.h"
#endif

View file

@ -49,6 +49,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <map>
#include "../nel_patch_lib/rpo.h" #include "../nel_patch_lib/rpo.h"
#include "nel/misc/time_nl.h" #include "nel/misc/time_nl.h"

View file

@ -27,6 +27,14 @@
using namespace NLMISC; using namespace NLMISC;
using namespace NL3D; using namespace NL3D;
#ifdef _STLPORT_VERSION
namespace std
{
float fabsf(float f) { return ::fabsf(f); }
double fabsl(double f) { return ::fabsl(f); }
}
#endif
// *************************************************************************** // ***************************************************************************
// -------------------------------------------------- // --------------------------------------------------

View file

@ -1,4 +1,4 @@
LIBRARY nelconvertpatch.dlm ;LIBRARY nelconvertpatch.dlm
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -19,7 +19,19 @@
#pragma conform(forScope, push) #pragma conform(forScope, push)
#pragma conform(forScope, off) #pragma conform(forScope, off)
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif
#include <string>
#ifdef _STLPORT_VERSION
namespace std
{
float fabsf(float f);
double fabsl(double f);
}
#endif
#include <assert.h> #include <assert.h>

View file

@ -1,4 +1,4 @@
LIBRARY neleditpatch ;LIBRARY neleditpatch
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -1,4 +1,4 @@
LIBRARY neleditpatchadv ;LIBRARY neleditpatchadv
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -1,4 +1,6 @@
#pragma warning (disable : 4786) #pragma warning (disable : 4786)
#include <assert.h>
#include <max.h> #include <max.h>
#include <decomp.h> #include <decomp.h>
#include <buildver.h> #include <buildver.h>

View file

@ -17,7 +17,9 @@
#pragma conform(forScope, push) #pragma conform(forScope, push)
#pragma conform(forScope, off) #pragma conform(forScope, off)
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif
#pragma warning (disable : 4786) #pragma warning (disable : 4786)
#include <assert.h> #include <assert.h>

View file

@ -1,4 +1,4 @@
LIBRARY nelpaintpatch.dlm ;LIBRARY nelpaintpatch.dlm
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -1,4 +1,4 @@
LIBRARY nel_vertex_tree_paint ;LIBRARY nel_vertex_tree_paint
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -1,4 +1,4 @@
LIBRARY neltileutility.dlu ;LIBRARY neltileutility.dlu
EXPORTS EXPORTS
LibDescription @1 LibDescription @1
LibNumberClasses @2 LibNumberClasses @2

View file

@ -20,7 +20,9 @@
#pragma conform(forScope, push) #pragma conform(forScope, push)
#pragma conform(forScope, off) #pragma conform(forScope, off)
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif
#include <assert.h> #include <assert.h>
#include <Max.h> #include <Max.h>

View file

@ -10,6 +10,9 @@
#pragma once #pragma once
#endif // _MSC_VER > 1000 #endif // _MSC_VER > 1000
#include "nel/misc/types_nl.h"
#include "nel/misc/file.h"
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components

View file

@ -263,7 +263,7 @@ void CHeaderDialog::getFromDocument (const NLGEORGES::CFileHeader &header)
if (end) if (end)
{ {
// Build a string // Build a string
int length = std::min (31, end-start); int length = std::min (31, (int)(end-start));
memcpy (name, start, length); memcpy (name, start, length);
name[length] = 0; name[length] = 0;