--- mstools/mfc/include/afx.h 2018/08/09 18:21:00 1.1.1.1 +++ mstools/mfc/include/afx.h 2018/08/09 18:25:02 1.1.1.3 @@ -53,6 +53,9 @@ class CDumpContext; // #include #include #include +#ifdef _NTWIN +#pragma warning(default: 4069) +#endif #include ///////////////////////////////////////////////////////////////////////////// @@ -116,11 +119,9 @@ class CDumpContext; // #else -extern "C" { #include #include #include -} #define BASED_CODE #undef _NEARDATA @@ -143,8 +144,6 @@ extern "C" { #define _huge #define huge -#define pascal -#define cdecl #define near #define far @@ -159,8 +158,12 @@ extern "C" { #define _frealloc realloc #define _ffree free +// _export is not accepted by the NT compiler +#define __export +#define _export +#define export + #undef GetCurrentTime -extern "C" unsigned long GetTickCount(void); inline unsigned long GetCurrentTime(void) { return ::GetTickCount(); } @@ -375,14 +378,16 @@ struct NEAR CClassInit ///////////////////////////////////////////////////////////////////////////// // setjmp for Windows and C++ + #ifdef _NTWIN -typedef int jmp_buf[8]; +#ifdef _M_MRX000 +typedef double jmp_buf[16]; #else -typedef int jmp_buf[9]; +typedef int jmp_buf[8]; +#define setjmp _setjmp #endif - -#ifdef _NTWIN -#define setjmp _setjmp +#else +typedef int jmp_buf[9]; #endif #if defined(_WINDOWS) && defined(_DOSWIN) @@ -523,7 +528,7 @@ public: sharingViolation, lockViolation, diskFull, - endOfFile, + endOfFile }; // Constructors @@ -928,6 +933,10 @@ private: friend class CTime; }; +#ifdef _NTWIN +struct _SYSTEMTIME; +struct _FILETIME; +#endif class CTime { @@ -943,8 +952,6 @@ public: CTime(const CTime& timeSrc); #ifdef _NTWIN - struct _SYSTEMTIME; - struct _FILETIME; CTime(const _SYSTEMTIME& sysTime); CTime(const _FILETIME& fileTime); #endif @@ -1052,7 +1059,7 @@ enum AfxMemDF // memory debug/diagnostic { allocMemDF = 0x01, // turn on debugging allocator delayFreeMemDF = 0x02, // delay freeing memory memory - checkAlwaysMemDF = 0x04, // AfxCheckMemory on every alloc/free + checkAlwaysMemDF = 0x04 // AfxCheckMemory on every alloc/free }; // turn on/off tracking for a short while @@ -1078,7 +1085,7 @@ struct CMemoryState freeBlock, // not used objectBlock, // contains a CObject derived class object bitBlock, // contains ::operator new data - nBlockUseMax, // total number of usages + nBlockUseMax // total number of usages }; struct CBlockHeader* m_pBlockHeader; @@ -1255,12 +1262,15 @@ extern "C" BOOL afxTraceEnabled; #define BASED_CODE __based(__segname("_CODE")) #endif +#ifndef _NTWIN #if defined(_M_I86MM) || defined(_M_I86LM) // far code #define AFX_CORE_SEG "AFX_CORE_TEXT" /* core functionality */ #define AFX_AUX_SEG "AFX_AUX_TEXT" /* auxilliary functionality */ #define AFX_COLL_SEG "AFX_COLL_TEXT" /* collections */ #define AFX_OLE_SEG "AFX_OLE_TEXT" /* OLE support */ #endif +#endif + ///////////////////////////////////////////////////////////////////////////// // Inline function declarations