From c467fee70447cb73da1cf321f38506210eae3348 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:02:38 +0000 Subject: Utilisateur : Fcolin Date : 2/02/01 Heure : 18:30 Archivé dans $/Ivy Commentaire: win CE compile not finished (vss 6) --- Bus/Ivy/IvyStdAfx.h | 70 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 21 deletions(-) (limited to 'Bus') diff --git a/Bus/Ivy/IvyStdAfx.h b/Bus/Ivy/IvyStdAfx.h index 4a795f4..ca8c507 100644 --- a/Bus/Ivy/IvyStdAfx.h +++ b/Bus/Ivy/IvyStdAfx.h @@ -5,19 +5,17 @@ #pragma once -#ifdef WIN32 - -#pragma warning (disable : 4786) -#pragma warning( disable : 4275 ) // non dll-interface class 'X' used as base for dll-interface class 'Y' -#pragma warning( disable : 4251 ) // 'm' : class 'X' needs to have dll-interface to be used by clients of class 'Y' -#include +#if defined( WIN32 ) || defined( UNDER_CE ) +#pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information +#pragma warning( disable : 4275 ) // non dll-interface class 'X' used as base for dll-interface class 'Y' +#pragma warning( disable : 4251 ) // 'm' : class 'X' needs to have dll-interface to be used by clients of class 'Y' #endif -#include +#include #include #include -#include +#include //#include #ifdef _WINSOCK2API_ @@ -43,8 +41,12 @@ struct ip_mreq { }; #endif -#ifndef _WIN32_WCE -#define STL +#ifndef IN_CLASSD +#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000) +#endif + +#ifndef UNDER_CE +//#define STL #endif #ifdef STL #include @@ -54,32 +56,58 @@ struct ip_mreq { using std::string; using std::vector; -using std::map; using std::list; #else #include "DataTypes.h" #endif -//using namespace std; -#ifndef TRACE + #ifdef WIN32 +#ifndef TRACE void DebugTrace ( const char *fmt , ... ); #define TRACE DebugTrace -#else -#define TRACE printf #endif + +#ifndef ASSERT +#define ASSERT(expr) \ + do { \ + if (! (expr) ) \ + {\ + TRACE( "Assert (%s) at %s:%d\n", #expr, __FILE__ , __LINE__ ); \ + DebugBreak(); \ + }\ + } while (0) +#endif +#elif defined( _WIN32_WCE ) + + +#ifndef TRACE +void DebugTrace ( const char *fmt , ... ); +#define TRACE DebugTrace #endif + #ifndef ASSERT -#ifdef WIN32 #define ASSERT(expr) \ do { \ - if (!(expr) && (1 == _CrtDbgReport( \ - _CRT_ASSERT, __FILE__, __LINE__, "Ivy", #expr))) \ - _CrtDbgBreak(); \ + if (! (expr) ) \ + {\ + TRACE( "Assert (%s) failed in file %s at line %d\r\n", #expr, __FILE__ , __LINE__ ); \ + DebugBreak(); \ + }\ } while (0) -#else -#define ASSERT printf #endif + +#else +#include +#define TRACE printf +#define ASSERT(expr) assert( expr ) #endif + +#ifdef WIN32 + +void* __cdecl operator new(size_t nSize, const char * lpszFileName, int nLine); +void __cdecl operator delete(void *p, const char * lpszFileName, int nLine); + +#endif \ No newline at end of file -- cgit v1.1