summaryrefslogtreecommitdiff
path: root/Ivy/IvyStdAfx.h
blob: f41104bae3787bc008f6749fcde2a90c73552736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#pragma once

#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 <winsock2.h>
#include <Ws2tcpip.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

//#include <assert.h>


#ifndef IN_CLASSD
#define IN_CLASSD(i)            (((long)(i) & 0xf0000000) == 0xe0000000)
#endif

#ifdef IVY_USE_OWN_DATATYPES

#include "DataTypes.h"

#else

#include <string>
#include <list>
#include <vector>
#include <map>

namespace ivy =  std; 

#endif


#ifdef WIN32 

#ifndef TRACE
void DebugTrace ( const char *fmt , ... );
#define TRACE DebugTrace
#endif

#if defined(_WIN32_WCE)
#undef ASSERT
#endif // _WIN32_WCE

#ifndef ASSERT
#define ASSERT(expr) \
   do { \
      if (! (expr) ) \
		{\
		TRACE( "Assert (%s) failed in file %s at line %d\r\n", TEXT(#expr), __FILE__ ,  __LINE__ ); \
        DebugBreak(); \
		}\
    } while (0)
#endif

#else
#include <assert.h>
#define TRACE printf
#define ASSERT(expr) assert( expr )
#endif