Browse Source

Building MFC the same was as other 3rd party libraries

(instead of manually storing it to C++Builder installation folder)
Now always doing release build – preventing debug code from being used when building debug version of the main code by modifying the headers accordingly.
+ Avoiding warnings when building a fresh library (as that will now break the build, while before we ignored the warnings during manual build)

(cherry picked from commit 3a86ce004e438877947c3378a48fcb96875ea04b)

Source commit: 659d507f2e8ce5fca8c1c1b79480d1ceb7268e81
Martin Prikryl 3 years ago
parent
commit
8e52a5ab93
49 changed files with 309 additions and 301 deletions
  1. 19 0
      libs/buildlibs.bat
  2. 6 0
      libs/cleaninterm.bat
  3. 33 33
      libs/mfc/include/afx.h
  4. 9 9
      libs/mfc/include/afx.inl
  5. 1 1
      libs/mfc/include/afxcmn.h
  6. 17 17
      libs/mfc/include/afxcoll.h
  7. 5 5
      libs/mfc/include/afxctl.h
  8. 23 23
      libs/mfc/include/afxdao.h
  9. 13 13
      libs/mfc/include/afxdb.h
  10. 2 2
      libs/mfc/include/afxdb_.h
  11. 7 7
      libs/mfc/include/afxdisp.h
  12. 10 10
      libs/mfc/include/afxdlgs.h
  13. 3 3
      libs/mfc/include/afxdll_.h
  14. 3 3
      libs/mfc/include/afxdocob.h
  15. 8 8
      libs/mfc/include/afxext.h
  16. 2 2
      libs/mfc/include/afxext.inl
  17. 1 1
      libs/mfc/include/afxhtml.h
  18. 11 11
      libs/mfc/include/afxinet.h
  19. 12 12
      libs/mfc/include/afxisapi.h
  20. 1 1
      libs/mfc/include/afxisapi.inl
  21. 1 1
      libs/mfc/include/afxmt.h
  22. 10 10
      libs/mfc/include/afxodlgs.h
  23. 15 15
      libs/mfc/include/afxole.h
  24. 1 1
      libs/mfc/include/afxoledb.h
  25. 4 4
      libs/mfc/include/afxpriv.h
  26. 3 3
      libs/mfc/include/afxrich.h
  27. 4 4
      libs/mfc/include/afxsock.h
  28. 2 2
      libs/mfc/include/afxstat_.h
  29. 13 13
      libs/mfc/include/afxtempl.h
  30. 1 1
      libs/mfc/include/afxtls_.h
  31. 9 9
      libs/mfc/include/afxver_.h
  32. 37 37
      libs/mfc/include/afxwin.h
  33. 1 1
      libs/mfc/include/afxwin1.inl
  34. 1 1
      libs/mfc/include/atlconv.h
  35. 2 2
      libs/mfc/source/afximpl.h
  36. 3 3
      libs/mfc/source/borland.mak
  37. 3 3
      libs/mfc/source/fixalloc.h
  38. 2 2
      libs/mfc/source/mfcdb.rc
  39. 2 2
      libs/mfc/source/mfcdll.rc
  40. 1 1
      libs/mfc/source/mfcnet.rc
  41. 2 2
      libs/mfc/source/mfcole.rc
  42. 1 1
      libs/mfc/source/oleimpl2.h
  43. 2 2
      libs/mfc/source/winhand_.h
  44. 0 1
      readme.md
  45. 0 12
      readme_mfc.txt
  46. 1 1
      source/FileZilla.cbproj
  47. 1 1
      source/ScpCore.cbproj
  48. 1 1
      source/WinSCP.cbproj
  49. 0 4
      source/filezilla/FileZillaIntf.cpp

+ 19 - 0
libs/buildlibs.bat

@@ -99,4 +99,23 @@ exit
 
 :SKIP_LIBS3
 
+rem ==== MFC ====
+
+if exist lib\UafxcW.lib (
+echo MFC already built
+goto SKIP_MFC
+)
+
+echo Building MFC ...
+cd mfc\source
+make -fborland.mak NO_WARNINGS=1
+cd ..\..
+
+if not exist lib\UafxcW.lib (
+echo MFC build failed
+exit
+)
+
+:SKIP_MFC
+
 echo All done

+ 6 - 0
libs/cleaninterm.bat

@@ -25,4 +25,10 @@ rem ==== libs3 ====
 echo Cleaning up libs3 ...
 rmdir /s /q libs3\tmp
 
+rem ==== MFC ====
+
+echo Cleaning up MFC ...
+rmdir /s /q mfc\source\$UW
+del mfc\source\bor.rsp
+
 echo All done

+ 33 - 33
libs/mfc/include/afx.h

@@ -34,13 +34,13 @@
 #ifndef __BORLANDC__
 #ifndef _AFXDLL
 	#ifndef _UNICODE
-		#ifdef _DEBUG
+		#ifdef MFC_DEBUG
 			#pragma comment(lib, "nafxcwd.lib")
 		#else
 			#pragma comment(lib, "nafxcw.lib")
 		#endif
 	#else
-		#ifdef _DEBUG
+		#ifdef MFC_DEBUG
 			#pragma comment(lib, "uafxcwd.lib")
 		#else
 			#pragma comment(lib, "uafxcw.lib")
@@ -48,7 +48,7 @@
 	#endif
 #else
 	#ifndef _UNICODE
-		#ifdef _DEBUG
+		#ifdef MFC_DEBUG
 			#pragma comment(lib, "mfc42d.lib")
 			#pragma comment(lib, "mfcs42d.lib")
 		#else
@@ -56,7 +56,7 @@
 			#pragma comment(lib, "mfcs42.lib")
 		#endif
 	#else
-		#ifdef _DEBUG
+		#ifdef MFC_DEBUG
 			#pragma comment(lib, "mfc42ud.lib")
 			#pragma comment(lib, "mfcs42ud.lib")
 		#else
@@ -67,20 +67,20 @@
 #endif
 
 #ifdef _DLL
-	#if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
+	#if !defined(_AFX_NO_DEBUG_CRT) && defined(MFC_DEBUG)
 		#pragma comment(lib, "msvcrtd.lib")
 	#else
 		#pragma comment(lib, "msvcrt.lib")
 	#endif
 #else
 #ifdef _MT
-	#if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
+	#if !defined(_AFX_NO_DEBUG_CRT) && defined(MFC_DEBUG)
 		#pragma comment(lib, "libcmtd.lib")
 	#else
 		#pragma comment(lib, "libcmt.lib")
 	#endif
 #else
-	#if !defined(_AFX_NO_DEBUG_CRT) && defined(_DEBUG)
+	#if !defined(_AFX_NO_DEBUG_CRT) && defined(MFC_DEBUG)
 		#pragma comment(lib, "libcd.lib")
 	#else
 		#pragma comment(lib, "libc.lib")
@@ -207,7 +207,7 @@ struct _AFX_FLOAT   { BYTE floatBits[sizeof(float)]; };
 /////////////////////////////////////////////////////////////////////////////
 // Diagnostic support
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 BOOL AFXAPI AfxAssertFailedLine(LPCSTR lpszFileName, int nLine);
 
@@ -242,7 +242,7 @@ void AFXAPI AfxDump(const CObject* pOb); // Dump an object from CodeView
 #define AFX_DUMP0(dc, sz)   dc << _T(sz)
 #define AFX_DUMP1(dc, sz, p1) dc << _T(sz) << p1
 
-#else   // _DEBUG
+#else   // MFC_DEBUG
 
 #define ASSERT(f)          ((void)0)
 #define VERIFY(f)          ((void)(f))
@@ -255,7 +255,7 @@ inline void AFX_CDECL AfxTrace(LPCTSTR, ...) { }
 #define TRACE2(sz, p1, p2)
 #define TRACE3(sz, p1, p2, p3)
 
-#endif // !_DEBUG
+#endif // !MFC_DEBUG
 
 #define ASSERT_POINTER(p, type) \
 	ASSERT(((p) != NULL) && AfxIsValidAddress((p), sizeof(type), FALSE))
@@ -279,7 +279,7 @@ inline void AFX_CDECL AfxTrace(LPCTSTR, ...) { }
 #pragma warning(disable: 4705)  // statement has no effect in optimized code
 #pragma warning(disable: 4191)  // pointer-to-function casting
 // warnings caused by normal optimizations
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #pragma warning(disable: 4701)  // local variable *may* be used without init
 #pragma warning(disable: 4702)  // unreachable code caused by optimizations
 #pragma warning(disable: 4791)  // loss of debugging info in release version
@@ -296,7 +296,7 @@ inline void AFX_CDECL AfxTrace(LPCTSTR, ...) { }
 #endif
 #endif //!ALL_WARNINGS
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 #define UNUSED(x)
 #else
 #define UNUSED(x) x
@@ -553,7 +553,7 @@ public:
 	void AFX_CDECL FormatMessage(UINT nFormatID, ...);
 
 	// input and output
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc,
 				const CString& string);
 #endif
@@ -683,7 +683,7 @@ public:
 	void PASCAL operator delete(void* p, void* pPlace);
 #endif
 
-#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
+#if defined(MFC_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
 	// for file name/line number tracking using DEBUG_NEW
 	void* PASCAL operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
 // __BORLANDC__
@@ -710,7 +710,7 @@ public:
 // Overridables
 	virtual void Serialize(CArchive& ar);
 
-#if defined(_DEBUG) || defined(_AFXDLL)
+#if defined(MFC_DEBUG) || defined(_AFXDLL)
 	// Diagnostic Support
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
@@ -735,7 +735,7 @@ CObject* AFX_CDECL AfxDynamicDownCast(CRuntimeClass* pClass, CObject* pObject);
 #define DYNAMIC_DOWNCAST(class_name, object) \
 	(class_name*)AfxDynamicDownCast(RUNTIME_CLASS(class_name), object)
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 const CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, const CObject* pObject);
 CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, CObject* pObject);
 #define STATIC_DOWNCAST(class_name, object) \
@@ -889,7 +889,7 @@ public:
 public:
 	virtual ~CException();
 	BOOL m_bAutoDelete;
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void PASCAL operator delete(void* pbData);
 #if 0 // __BORLANDC__ was _MSC_VER >= 1200
 	void PASCAL operator delete(void* pbData, LPCSTR lpszFileName, int nLine);
@@ -930,7 +930,7 @@ protected:
 	TCHAR m_szMessage[128];
 	UINT m_nResourceID;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	BOOL m_bReadyForDelete;
 #endif
 };
@@ -1135,7 +1135,7 @@ public:
 // Implementation
 public:
 	virtual ~CArchiveException();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 	virtual BOOL GetErrorMessage(LPTSTR lpszError, UINT nMaxError,
@@ -1186,7 +1186,7 @@ public:
 // Implementation
 public:
 	virtual ~CFileException();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 #endif
 	virtual BOOL GetErrorMessage(LPTSTR lpszError, UINT nMaxError,
@@ -1297,7 +1297,7 @@ public:
 // Implementation
 public:
 	virtual ~CFile();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1336,7 +1336,7 @@ public:
 // Implementation
 public:
 	virtual ~CStdioFile();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext& dc) const;
 #endif
 	virtual DWORD GetPosition() const;
@@ -1390,7 +1390,7 @@ protected:
 
 public:
 	virtual ~CMemFile();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -1470,7 +1470,7 @@ protected:
 	CString m_strRoot;
 	TCHAR m_chDirSeparator;     // not '\\' for Internet classes
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext& dc) const;
 	void AssertValid() const;
 #endif
@@ -1524,7 +1524,7 @@ public:
 	CString Format(UINT nID) const;
 
 	// serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc,CTimeSpan timeSpan);
 #endif
 	friend CArchive& AFXAPI operator<<(CArchive& ar, CTimeSpan timeSpan);
@@ -1595,7 +1595,7 @@ public:
 #endif
 
 	// serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	friend CDumpContext& AFXAPI operator<<(CDumpContext& dc, CTime time);
 #endif
 	friend CArchive& AFXAPI operator<<(CArchive& ar, CTime time);
@@ -1618,7 +1618,7 @@ struct CFileStatus
 	BYTE _m_padding;        // pad the structure to a WORD
 	TCHAR m_szFullName[_MAX_PATH]; // absolute path name
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -1632,7 +1632,7 @@ BOOL AFXAPI AfxIsValidAddress(const void* lp,
 BOOL AFXAPI AfxIsValidString(LPCWSTR lpsz, int nLength = -1);
 BOOL AFXAPI AfxIsValidString(LPCSTR lpsz, int nLength = -1);
 
-#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
+#if defined(MFC_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
 
 // Memory tracking allocation
 void* AFX_CDECL operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
@@ -1739,13 +1739,13 @@ void AFXAPI AfxDoForAllClasses(void (AFX_CDECL *pfn)(const CRuntimeClass* pClass
 #define AfxOutputDebugString(lpsz) ::OutputDebugString(lpsz)
 
 // diagnostic initialization
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #define AfxDiagnosticInit() TRUE
 #else
 BOOL AFXAPI AfxDiagnosticInit(void);
 #endif
 
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // Archives for serializing CObject data
@@ -1893,7 +1893,7 @@ protected:
 #define AFX_STACK_DUMP_TARGET_CLIPBOARD 0x0002
 #define AFX_STACK_DUMP_TARGET_BOTH          0x0003
 #define AFX_STACK_DUMP_TARGET_ODS           0x0004
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 #define AFX_STACK_DUMP_TARGET_DEFAULT       AFX_STACK_DUMP_TARGET_TRACE
 #else
 #define AFX_STACK_DUMP_TARGET_DEFAULT       AFX_STACK_DUMP_TARGET_CLIPBOARD
@@ -1944,7 +1944,7 @@ public:
 	CFile* m_pFile;
 };
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 extern AFX_DATA CDumpContext afxDump;
 extern AFX_DATA BOOL afxTraceEnabled;
 #endif
@@ -1969,7 +1969,7 @@ extern AFX_DATA BOOL afxTraceEnabled;
 #ifdef _AFX_ENABLE_INLINES
 #define _AFX_INLINE AFX_INLINE
 
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 #define _AFX_PUBLIC_INLINE AFX_INLINE
 #else
 #define _AFX_PUBLIC_INLINE

+ 9 - 9
libs/mfc/include/afx.inl

@@ -21,8 +21,8 @@ _AFX_INLINE void CObject::Serialize(CArchive&)
 	{ /* CObject does not serialize anything by default */ }
 _AFX_INLINE void* PASCAL CObject::operator new(size_t, void* p)
 	{ return p; }
-#ifndef _DEBUG
-// _DEBUG versions in afxmem.cpp
+#ifndef MFC_DEBUG
+// MFC_DEBUG versions in afxmem.cpp
 _AFX_INLINE void PASCAL CObject::operator delete(void* p)
 	{ ::operator delete(p); }
 
@@ -34,17 +34,17 @@ _AFX_INLINE void PASCAL CObject::operator delete(void* p, void*)
 #endif
 _AFX_INLINE void* PASCAL CObject::operator new(size_t nSize)
 	{ return ::operator new(nSize); }
-// _DEBUG versions in objcore.cpp
+// MFC_DEBUG versions in objcore.cpp
 #ifdef _AFXDLL
 _AFX_INLINE void CObject::AssertValid() const
 	{ /* no asserts in release builds */ }
 _AFX_INLINE void CObject::Dump(CDumpContext&) const
 	{ /* no dumping in release builds */ }
 #endif //_AFXDLL
-#endif //!_DEBUG
+#endif //!MFC_DEBUG
 _AFX_INLINE const CObject* AFX_CDECL AfxDynamicDownCast(CRuntimeClass* pClass, const CObject* pObject)
 	{ return (const CObject*)AfxDynamicDownCast(pClass, (CObject*)pObject); }
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 _AFX_INLINE const CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, const CObject* pObject)
 	{ return (const CObject*)AfxStaticDownCast(pClass, (CObject*)pObject); }
 #endif
@@ -56,7 +56,7 @@ _AFX_INLINE CSimpleException::CSimpleException()
 	{ m_bInitialized = FALSE; m_bLoaded = FALSE; }
 _AFX_INLINE CSimpleException::CSimpleException(BOOL bAutoDelete)
 	: CException(bAutoDelete) { m_bInitialized = FALSE; m_bLoaded = FALSE; }
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 _AFX_INLINE CSimpleException::~CSimpleException()
 	{ }
 #endif
@@ -218,7 +218,7 @@ _AFX_INLINE bool AFXAPI operator>=(LPCTSTR s1, const CString& s2)
 	{ return s2.Compare(s1) <= 0; }
 
 // CTime and CTimeSpan
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 _AFX_INLINE CTimeSpan::CTimeSpan()
 	{ }
 #endif
@@ -266,13 +266,13 @@ _AFX_INLINE BOOL CTimeSpan::operator>=(CTimeSpan timeSpan) const
 	{ return m_timeSpan >= timeSpan.m_timeSpan; }
 
 
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 _AFX_INLINE CTime::CTime()
 	{ }
 #endif
 _AFX_INLINE CTime::CTime(time_t time)
 	{ m_time = time; }
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 _AFX_INLINE CTime::CTime(const CTime& timeSrc)
 	{ m_time = timeSrc.m_time; }
 #endif

+ 1 - 1
libs/mfc/include/afxcmn.h

@@ -842,7 +842,7 @@ public:
 // Implementation
 public:
 	virtual ~CImageList();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif

+ 17 - 17
libs/mfc/include/afxcoll.h

@@ -121,7 +121,7 @@ public:
 	~CByteArray();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -194,7 +194,7 @@ public:
 	~CWordArray();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -267,7 +267,7 @@ public:
 	~CDWordArray();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -338,7 +338,7 @@ protected:
 
 public:
 	~CUIntArray();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -409,7 +409,7 @@ protected:
 
 public:
 	~CPtrArray();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -482,7 +482,7 @@ public:
 	~CObArray();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -565,7 +565,7 @@ public:
 	~CStringArray();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -665,7 +665,7 @@ protected:
 
 public:
 	~CPtrList();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -765,7 +765,7 @@ public:
 	~CObList();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -873,7 +873,7 @@ public:
 	~CStringList();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -950,7 +950,7 @@ protected:
 
 public:
 	~CMapWordToPtr();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1032,7 +1032,7 @@ protected:
 
 public:
 	~CMapPtrToWord();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1114,7 +1114,7 @@ protected:
 
 public:
 	~CMapPtrToPtr();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1200,7 +1200,7 @@ public:
 	~CMapWordToOb();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1283,7 +1283,7 @@ protected:
 
 public:
 	~CMapStringToPtr();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1367,7 +1367,7 @@ public:
 	~CMapStringToOb();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1451,7 +1451,7 @@ public:
 	~CMapStringToString();
 
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif

+ 5 - 5
libs/mfc/include/afxctl.h

@@ -456,7 +456,7 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -486,7 +486,7 @@ public:
 	virtual void OnDataAvailable(DWORD dwSize, DWORD bscfFlag);
 	virtual void Close();
 	virtual void ResetData();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -811,10 +811,10 @@ public:
 	~COleControl();
 	void RequestAsynchronousExchange(DWORD dwVersion);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void AssertValid() const;
 	void Dump(CDumpContext& dc) const;
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 protected:
 	// Friend classes
@@ -1591,7 +1591,7 @@ private:
 
 	HGLOBAL m_hDialog;          // Handle of the dialog resource
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 protected:
 	BOOL m_bNonStandardSize;
 #endif

+ 23 - 23
libs/mfc/include/afxdao.h

@@ -52,7 +52,7 @@
 // Win32 libraries
 
 #ifdef _AFXDLL
-	#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+	#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 		#ifndef _UNICODE
 			#pragma comment(lib, "mfco42d.lib")
 			#pragma comment(lib, "mfcd42d.lib")
@@ -128,7 +128,7 @@ struct CDaoErrorInfo
 	CString m_strHelpFile;
 	long m_lHelpContext;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -140,7 +140,7 @@ struct CDaoWorkspaceInfo
 	CString m_strUserName;          // Secondary
 	BOOL m_bIsolateODBCTrans;       // All
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -156,7 +156,7 @@ struct CDaoDatabaseInfo
 	short m_nQueryTimeout;          // Secondary
 	CString m_strConnect;           // All
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -175,7 +175,7 @@ struct CDaoTableDefInfo
 	CString m_strValidationText;    // All
 	long m_lRecordCount;            // All
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -198,7 +198,7 @@ struct CDaoFieldInfo
 	CString m_strValidationText;    // All
 	CString m_strDefaultValue;      // All
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -209,7 +209,7 @@ struct CDaoIndexFieldInfo
 	CString m_strName;              // Primary
 	BOOL m_bDescending;             // Primary
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -235,7 +235,7 @@ struct CDaoIndexInfo
 	virtual ~CDaoIndexInfo();
 	BOOL m_bCleanupFieldInfo;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -246,7 +246,7 @@ struct CDaoRelationFieldInfo
 	CString m_strName;              // Primary
 	CString m_strForeignName;       // Primary
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -268,7 +268,7 @@ struct CDaoRelationInfo
 	virtual ~CDaoRelationInfo();
 	BOOL m_bCleanupFieldInfo;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -286,7 +286,7 @@ struct CDaoQueryDefInfo
 	CString m_strConnect;           // All
 	short m_nODBCTimeout;           // See readme
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -298,7 +298,7 @@ struct CDaoParameterInfo
 	short m_nType;                  // Primary
 	COleVariant m_varValue;         // Secondary
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -367,12 +367,12 @@ void AFXAPI AfxDaoCheck(SCODE scode, LPCSTR lpszDaoCall,
 	LPCSTR lpszFile, int nLine, int nError = NO_AFX_DAO_ERROR,
 	BOOL bMemOnly = FALSE);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 void AFXAPI AfxDaoTrace(SCODE scode, LPCSTR lpszDaoCall,
 	LPCSTR lpszFile, int nLine);
 #endif
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 #define DAO_CHECK(f)            AfxDaoCheck(f, #f, THIS_FILE, __LINE__)
 #define DAO_CHECK_ERROR(f, err) AfxDaoCheck(f, #f, THIS_FILE, __LINE__, err)
 #define DAO_CHECK_MEM(f)        AfxDaoCheck(f, #f, THIS_FILE, __LINE__, \
@@ -407,7 +407,7 @@ public:
 		MarkForAddNew,          // marks fields dirty if not PSEUDO NULL
 		MarkForEdit,            // marks fields dirty if don't match cache
 		SetDirtyField,          // sets field values marked as dirty
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 		DumpField,
 #endif
 		MaxDFXOperation,        // dummy operation type for input checking
@@ -453,9 +453,9 @@ public:
 	UINT m_nParam;
 	UINT m_nFieldFound;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	CDumpContext* m_pdcDump;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 };
 
 /////////////////////////////////////////////////////////////////////////////
@@ -617,7 +617,7 @@ public:
 public:
 	virtual ~CDaoWorkspace();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -761,7 +761,7 @@ public:
 public:
 	virtual ~CDaoDatabase();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -869,7 +869,7 @@ public:
 public:
 	~CDaoTableDef();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -963,7 +963,7 @@ public:
 public:
 	~CDaoQueryDef();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1146,7 +1146,7 @@ public:
 	virtual COleVariant GetFieldValue(LPCTSTR lpszName);
 	virtual COleVariant GetFieldValue(int nIndex);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1265,7 +1265,7 @@ public:
 // Implementation
 public:
 	virtual ~CDaoRecordView();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 13 - 13
libs/mfc/include/afxdb.h

@@ -45,7 +45,7 @@
 // Win32 libraries
 
 #ifdef _AFXDLL
-	#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+	#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 		#ifndef _UNICODE
 			#pragma comment(lib, "mfcd42d.lib")
 		#else
@@ -203,7 +203,7 @@ public:
 	virtual BOOL GetErrorMessage(LPTSTR lpszError, UINT nMaxError,
 		PUINT pnHelpContext = NULL);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void TraceErrorMessage(LPCTSTR szTrace) const;
 #endif // DEBUG
 
@@ -276,12 +276,12 @@ public:
 public:
 	virtual ~CDatabase();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 
 	BOOL m_bTransactionPending;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 	// general error check
 	virtual BOOL Check(RETCODE nRetCode) const;
@@ -359,7 +359,7 @@ public:
 		AllocCache,         // allocate cache used for dirty field check
 		AllocMultiRowBuffer,    // allocate buffer holding multi rows of data
 		DeleteMultiRowBuffer,   // delete buffer holding multi rows of data
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 		DumpField,          // dump bound field name and value
 #endif
 	};
@@ -411,9 +411,9 @@ public:
 	long m_lDefaultLBFetchSize;     // For fetching CLongBinary data of unknown len
 	long m_lDefaultLBReallocSize;   // For fetching CLongBinary data of unknown len
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	CDumpContext* m_pdcDump;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 };
 
@@ -706,10 +706,10 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 	virtual BOOL Check(RETCODE nRetCode) const; // general error check
 
@@ -759,9 +759,9 @@ public:
 	void MarkForUpdate();
 	void AllocDataCache();
 	void FreeDataCache();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void DumpFields(CDumpContext& dc) const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 	// RFX operation helper functions
 	virtual void ThrowDBException(RETCODE nRetCode, HSTMT hstmt = SQL_NULL_HSTMT);
@@ -906,7 +906,7 @@ struct CFieldInfo
 	long m_nLength;
 	int m_nDataType;
 	BYTE m_bStatus;
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void* m_pvBindAddress;
 #endif
 };
@@ -1006,7 +1006,7 @@ public:
 // Implementation
 public:
 	virtual ~CRecordView();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 2 - 2
libs/mfc/include/afxdb_.h

@@ -63,10 +63,10 @@ public:
 public:
 	virtual ~CLongBinary();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 };
 
 //////////////////////////////////////////////////////////////////////////////

+ 7 - 7
libs/mfc/include/afxdisp.h

@@ -51,7 +51,7 @@
 // Win32 libraries
 
 #ifdef _AFXDLL
-	#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+	#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 		#ifndef _UNICODE
 			#pragma comment(lib, "mfco42d.lib")
 		#else
@@ -569,7 +569,7 @@ protected:
 // Implementation
 public:
 	virtual ~COleObjectFactory();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void AssertValid() const;
 	void Dump(CDumpContext& dc) const;
 #endif
@@ -1000,7 +1000,7 @@ public:
 };
 
 // COleVariant diagnostics and serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, COleVariant varSrc);
 #endif
 CArchive& AFXAPI operator<<(CArchive& ar, COleVariant varSrc);
@@ -1075,7 +1075,7 @@ public:
 };
 
 // COleCurrency diagnostics and serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, COleCurrency curSrc);
 #endif
 CArchive& AFXAPI operator<<(CArchive& ar, COleCurrency curSrc);
@@ -1183,7 +1183,7 @@ protected:
 };
 
 // COleDateTime diagnostics and serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, COleDateTime dateSrc);
 #endif
 CArchive& AFXAPI operator<<(CArchive& ar, COleDateTime dateSrc);
@@ -1260,7 +1260,7 @@ public:
 };
 
 // COleDateTimeSpan diagnostics and serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 CDumpContext& AFXAPI operator<<(CDumpContext& dc,COleDateTimeSpan dateSpanSrc);
 #endif
 CArchive& AFXAPI operator<<(CArchive& ar, COleDateTimeSpan dateSpanSrc);
@@ -1348,7 +1348,7 @@ public:
 };
 
 // COleSafeArray diagnostics and serialization
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, COleSafeArray& saSrc);
 #endif
 

+ 10 - 10
libs/mfc/include/afxdlgs.h

@@ -168,7 +168,7 @@ protected:
 	virtual void OnTypeChange();
 
 // Implementation
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -234,7 +234,7 @@ public:
 	DWORD FillInLogFont(const CHARFORMAT& cf);
 #endif
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -276,7 +276,7 @@ protected:
 
 // Implementation
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -329,7 +329,7 @@ protected:
 	static UINT CALLBACK PaintHookProc(HWND hWnd, UINT message, WPARAM wParam,
 		LPARAM lParam);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -385,7 +385,7 @@ public:
 
 // Implementation
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -444,7 +444,7 @@ public:
 protected:
 	virtual void PostNcDestroy();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 public:
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -544,7 +544,7 @@ public:
 // Implementation
 public:
 	virtual ~CPropertyPage();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -596,7 +596,7 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -673,7 +673,7 @@ public:
 // Implementation
 public:
 	virtual ~CPropertySheet();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -745,7 +745,7 @@ public:
 // Implementation
 public:
 	virtual ~CPropertySheetEx();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 3 - 3
libs/mfc/include/afxdll_.h

@@ -67,10 +67,10 @@ public:
 	CDynLinkLibrary* m_pNextDLL;        // simple singly linked list
 	virtual ~CDynLinkLibrary();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 };
 
 // call in every DLL_PROCESS_ATTACH
@@ -80,7 +80,7 @@ void AFXAPI AfxTermExtensionModule(AFX_EXTENSION_MODULE&, BOOL bAll = FALSE);
 
 // special function(s) for stand-alone DLLs (and controls)
 void AFXAPI AfxCoreInitModule();
-#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 void AFXAPI AfxOleInitModule();
 void AFXAPI AfxNetInitModule();
 void AFXAPI AfxDbInitModule();

+ 3 - 3
libs/mfc/include/afxdocob.h

@@ -182,7 +182,7 @@ protected:
 	void DoBeginPrinting(CView* pView, CDC* pDC, CPrintInfo* pprintInfo);
 	void DoEndPrinting(CView* pView, CDC* pDC, CPrintInfo* pprintInfo);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -312,7 +312,7 @@ protected:
 // Implementation
 public:
 	virtual ~COleDocIPFrameWnd();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -357,7 +357,7 @@ public:
 // Implementation
 public:
 	virtual ~CDocObjectServerItem();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 8 - 8
libs/mfc/include/afxext.h

@@ -92,7 +92,7 @@ public:
 
 // Implementation:
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -167,7 +167,7 @@ public:
 // Implementation
 public:
 	virtual ~CControlBar();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -296,7 +296,7 @@ public:
 	void CalcInsideRect(CRect& rect, BOOL bHorz) const;
 	virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 	void EnableDocking(DWORD dwDockStyle);
@@ -397,7 +397,7 @@ public:
 	BOOL AddReplaceBitmap(HBITMAP hbmImageWell);
 	virtual void OnBarStyleChange(DWORD dwOldStyle, DWORD dwNewStyle);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -532,7 +532,7 @@ public:
 	virtual int OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
 	virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
 	virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void EnableDocking(DWORD dwDockStyle);
 #endif
 
@@ -649,7 +649,7 @@ public:
 // Implementation
 public:
 	virtual ~CSplitterWnd();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -740,7 +740,7 @@ protected:      // must derive your own class
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -823,7 +823,7 @@ protected:
 // Implementation
 public:
 	virtual ~CEditView();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 2 - 2
libs/mfc/include/afxext.inl

@@ -90,7 +90,7 @@ _AFXEXT_INLINE void CStatusBar::SetBorders(LPCRECT lpRect)
 	{ SetBorders(lpRect->left, lpRect->top, lpRect->right, lpRect->bottom); }
 _AFXEXT_INLINE void CStatusBar::SetBorders(int cxLeft, int cyTop, int cxRight, int cyBottom)
 	{ ASSERT(cyTop >= 2); CControlBar::SetBorders(cxLeft, cyTop, cxRight, cyBottom); }
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 // status bars do not support docking
 _AFXEXT_INLINE void CStatusBar::EnableDocking(DWORD)
 	{ ASSERT(FALSE); }
@@ -99,7 +99,7 @@ _AFXEXT_INLINE void CStatusBar::EnableDocking(DWORD)
 // CReBar
 _AFXEXT_INLINE CReBarCtrl& CReBar::GetReBarCtrl() const
 	{ return *(CReBarCtrl*)this; }
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 // rebars do not support docking
 _AFXEXT_INLINE void CReBar::EnableDocking(DWORD)
 	{ ASSERT(FALSE); }

+ 1 - 1
libs/mfc/include/afxhtml.h

@@ -168,7 +168,7 @@ public:
 public:
 	virtual ~CHtmlView();
 	CWnd m_wndBrowser;
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 11 - 11
libs/mfc/include/afxinet.h

@@ -159,7 +159,7 @@ protected:
 	BOOL m_bCallbackEnabled;
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -239,7 +239,7 @@ protected:
 	LPBYTE m_pbReadBuffer;
 	UINT m_nReadBufferBytes;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -308,7 +308,7 @@ protected:
 	CString m_strObject;
 	CString m_strVerb;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -360,7 +360,7 @@ public:
 	~CInternetConnection();
 	DECLARE_DYNAMIC(CInternetConnection)
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	void AssertValid() const;
 #endif
@@ -410,7 +410,7 @@ protected:
 	CString m_strServerName;
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -464,7 +464,7 @@ protected:
 	static const LPCTSTR szHtmlVerbs[];
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -504,7 +504,7 @@ public:
 	virtual void Close();
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -533,7 +533,7 @@ protected:
 	DWORD m_dwContext;
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -589,7 +589,7 @@ protected:
 public:
 	virtual ~CGopherFile();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -646,7 +646,7 @@ public:
 	CString GetFileURL() const;
 	CString GetRoot() const;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -670,7 +670,7 @@ public:
 // Implementation
 public:
 	~CInternetException();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 	virtual BOOL GetErrorMessage(LPTSTR lpstrError, UINT nMaxError,

+ 12 - 12
libs/mfc/include/afxisapi.h

@@ -31,7 +31,7 @@
 #pragma warning(disable: 4705)  // statement has no effect in optimized code
 #pragma warning(disable: 4191)  // pointer-to-function casting
 // warnings caused by normal optimizations
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #pragma warning(disable: 4701)  // local variable *may* be used without init
 #pragma warning(disable: 4702)  // unreachable code caused by optimizations
 #pragma warning(disable: 4791)  // loss of debugging info in retail version
@@ -50,7 +50,7 @@
 
 #define STRICT 1
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #ifndef _AFX_ENABLE_INLINES
 #define _AFX_ENABLE_INLINES
 #endif
@@ -67,7 +67,7 @@
 #endif
 
 #ifndef UNUSED
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 #define UNUSED(x)
 #else
 #define UNUSED(x) x
@@ -88,7 +88,7 @@
 #ifndef _AFX_NOFORCE_LIBS
 
 #ifdef _AFXDLL
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	#ifdef _UNICODE
 		#pragma comment(lib, "MFCISUD.lib")
 	#else
@@ -100,9 +100,9 @@
 	#else
 		#pragma comment(lib, "EAFXIS.lib")
 	#endif // _UNICODE
-#endif // _DEBUG
+#endif // MFC_DEBUG
 #else
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	#ifdef _UNICODE
 		#pragma comment(lib, "UAFXISD.lib")
 	#else
@@ -114,7 +114,7 @@
 	#else
 		#pragma comment(lib, "NAFXIS.lib")
 	#endif // _UNICODE
-#endif // _DEBUG
+#endif // MFC_DEBUG
 #endif // _AFXDLL
 
 #pragma comment(lib, "kernel32.lib")
@@ -368,7 +368,7 @@ public:
 	EXTENSION_CONTROL_BLOCK* const m_pECB;
 	CHtmlStream* m_pStream;
 	DWORD m_dwEndOfHeaders;
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	DWORD m_dwOldEndOfHeaders;
 #endif
 
@@ -570,18 +570,18 @@ public:
 #define ISAPITRACE1(str, arg1)              TRACE1(str, arg1)
 #define ISAPITRACE2(str, arg1, arg2)        TRACE2(str, arg1, arg2)
 #define ISAPITRACE3(str, arg1, arg2, arg3)  TRACE3(str, arg1, arg2, arg3)
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 #define ISAPIVERIFY(f)                      ASSERT(f)
 #else
 #define ISAPIVERIFY(f)                      ((void)(f))
-#endif // _DEBUG
+#endif // MFC_DEBUG
 #else // !_AFX
 #define ISAPIASSERT(expr)                   _ASSERTE(expr)
 #define ISAPITRACE0(str)                    _RPT0(_CRT_WARN, str)
 #define ISAPITRACE1(str, arg1)              _RPT1(_CRT_WARN, str, arg1)
 #define ISAPITRACE2(str, arg1, arg2)        _RPT2(_CRT_WARN, str, arg1, arg2)
 #define ISAPITRACE3(str, arg1, arg2, arg3)  _RPT3(_CRT_WARN, arg1, arg2, arg3)
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 void AFXISAPI_CDECL AfxISAPITrace(LPCTSTR lpszFormat, ...);
 #define ISAPIVERIFY(expr)                   _ASSERTE(expr)
 #define ISAPITRACE                          AfxISAPITrace
@@ -589,7 +589,7 @@ void AFXISAPI_CDECL AfxISAPITrace(LPCTSTR lpszFormat, ...);
 AFX_INLINE void AfxISAPITrace(LPCTSTR, ...) { }
 #define ISAPIVERIFY(expr)                   ((void)(expr))
 #define ISAPITRACE                          AfxISAPITrace
-#endif // _DEBUG
+#endif // MFC_DEBUG
 #endif // _AFX
 
 

+ 1 - 1
libs/mfc/include/afxisapi.inl

@@ -13,7 +13,7 @@
 #ifdef _AFXISAPI_INLINE
 
 _AFXISAPI_INLINE CHttpServerContext::CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB)
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	: m_dwStatusCode(DWORD(-1)), m_bSendHeaders(TRUE), m_pECB(pECB),
 	  m_pStream(NULL), m_dwEndOfHeaders(0), m_dwOldEndOfHeaders(0),
 	  m_dwChunkSize(0)

+ 1 - 1
libs/mfc/include/afxmt.h

@@ -69,7 +69,7 @@ public:
 // Implementation
 public:
 	virtual ~CSyncObject();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	CString m_strName;
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;

+ 10 - 10
libs/mfc/include/afxodlgs.h

@@ -116,7 +116,7 @@ public:
 public:
 	int MapResult(UINT nResult);
 	COleDialog(CWnd* pParentWnd);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 
@@ -164,7 +164,7 @@ public:
 // Implementation
 public:
 	virtual ~COleInsertDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 
@@ -214,7 +214,7 @@ public:
 // Implementation
 public:
 	virtual ~COleConvertDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -245,7 +245,7 @@ public:
 // Implementation
 public:
 	virtual ~COleChangeIconDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -292,7 +292,7 @@ public:
 // Implementation
 public:
 	virtual ~COlePasteSpecialDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -321,7 +321,7 @@ public:
 // Implementation
 public:
 	virtual ~COleLinksDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -349,7 +349,7 @@ public:
 // Implementation
 public:
 	virtual ~COleUpdateDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 
@@ -381,7 +381,7 @@ public:
 // Implementation
 public:
 	~COleBusyDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 
@@ -418,7 +418,7 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -475,7 +475,7 @@ public:
 	COleUILinkInfo m_xLinkInfo;
 
 	virtual ~COleChangeSourceDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif

+ 15 - 15
libs/mfc/include/afxole.h

@@ -240,7 +240,7 @@ public:
 // Implementation
 public:
 	virtual ~COleDataSource();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -307,7 +307,7 @@ protected:
 public:
 	virtual void Serialize(CArchive& ar);   // for Native data
 	virtual ~CDocItem();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -364,7 +364,7 @@ public:
 public:
 	CObList m_docItemList;  // not owned items
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -666,7 +666,7 @@ public:
 public:
 	virtual ~COleClientItem();
 	virtual void Serialize(CArchive& ar);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -950,7 +950,7 @@ public:
 	LPDATAADVISEHOLDER m_lpDataAdviseHolder;    // may be NULL
 
 	virtual ~COleServerItem();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1060,7 +1060,7 @@ protected:
 public:
 	COleObjectFactory* m_pFactory;  // back-pointer to server
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1237,7 +1237,7 @@ protected:
 
 public:
 	virtual ~COleServerDoc();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1392,7 +1392,7 @@ public:
 	virtual BOOL PreTranslateMessage(MSG* pMsg);
 	virtual LRESULT OnSetMessageString(WPARAM wParam, LPARAM lParam);
 	virtual ~COleIPFrameWnd();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1509,7 +1509,7 @@ public:
 // Implementation
 public:
 	LPSTREAM m_lpStream;
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1598,7 +1598,7 @@ public:
 
 	virtual void Flush();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 	// Calls COleStreamFile::Dump(), and prints out moniker value.
@@ -1697,7 +1697,7 @@ protected:
 // Implementation
 public:
 	virtual ~CAsyncMonikerFile();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 	// Calls CMonikerFile::Dump(), and prints out IBinding,
@@ -1739,7 +1739,7 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 
@@ -1793,7 +1793,7 @@ public:
 // Implementation
 public:
 	virtual ~COleDropTarget();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1860,7 +1860,7 @@ public:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1911,7 +1911,7 @@ public:
 void AFXAPI AfxOleSetEditMenu(COleClientItem* pClient, CMenu* pMenu,
 	UINT iMenuItem, UINT nIDVerbMin, UINT nIDVerbMax = 0, UINT nIDConvert = 0);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 // Mapping SCODEs to readable text
 LPCTSTR AFXAPI AfxGetFullScodeString(SCODE sc);
 LPCTSTR AFXAPI AfxGetScodeString(SCODE sc);

+ 1 - 1
libs/mfc/include/afxoledb.h

@@ -39,7 +39,7 @@ extern CComModule _Module;
 
 #ifndef _AFX_NOFORCE_LIBS
 #ifdef _AFXDLL
-	#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+	#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 		#ifndef _UNICODE
 			#pragma comment(lib, "mfco42d.lib")
 			#pragma comment(lib, "mfcd42d.lib")

+ 4 - 4
libs/mfc/include/afxpriv.h

@@ -250,7 +250,7 @@ public:
 // Implementation
 public:
 	virtual ~CPreviewDC();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -369,7 +369,7 @@ protected:
 public:
 	virtual ~CPreviewView();
 	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void AssertValid() const;
 	void Dump(CDumpContext& dc) const;
 #endif
@@ -593,7 +593,7 @@ public:
 // Implementation
 public:
 	virtual ~CDockBar();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -676,7 +676,7 @@ public:
 	void OnIdleUpdateCmdUI();
 	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra,
 		AFX_CMDHANDLERINFO* pHandlerInfo);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void AssertValid() const;
 #endif
 };

+ 3 - 3
libs/mfc/include/afxrich.h

@@ -176,7 +176,7 @@ public:
 	HRESULT ShowContainerUI(BOOL b);
 	static DWORD CALLBACK EditStreamCallBack(DWORD dwCookie,
 		LPBYTE pbBuff, LONG cb, LONG *pcb);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -323,7 +323,7 @@ public:
 	CRichEditCntrItem* LookupItem(LPOLEOBJECT lpobj) const;
 	void InvalidateObjectCache();
 	virtual void Serialize(CArchive& ar);   // overridden for document i/o
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -367,7 +367,7 @@ public:
 	virtual void SetDrawAspect(DVASPECT nDrawAspect);
 	virtual void OnDeactivateUI(BOOL bUndoable);
 	virtual BOOL CanActivate();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 4 - 4
libs/mfc/include/afxsock.h

@@ -36,7 +36,7 @@
 // Win32 libraries
 
 #ifdef _AFXDLL
-	#if defined(_DEBUG) && !defined(_AFX_MONOLITHIC)
+	#if defined(MFC_DEBUG) && !defined(_AFX_MONOLITHIC)
 		#ifndef _UNICODE
 			#pragma comment(lib, "mfcn42d.lib")
 		#else
@@ -195,7 +195,7 @@ public:
 		FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
 		int nProtocolType = 0, int nAddressFormat = PF_INET);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -272,7 +272,7 @@ protected:
 
 	virtual BOOL PumpMessages(UINT uStopFlag);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -295,7 +295,7 @@ public:
 
 	virtual ~CSocketFile();
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif

+ 2 - 2
libs/mfc/include/afxstat_.h

@@ -25,7 +25,7 @@
 /////////////////////////////////////////////////////////////////////////////
 // _AFX_DEBUG_STATE
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 class _AFX_DEBUG_STATE : public CNoTrackObject
 {
@@ -36,7 +36,7 @@ public:
 
 EXTERN_PROCESS_LOCAL(_AFX_DEBUG_STATE, afxDebugState)
 
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // _AFX_WIN_STATE

+ 13 - 13
libs/mfc/include/afxtempl.h

@@ -26,7 +26,7 @@
 #pragma pack(push, _AFX_PACKING)
 #endif
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 static char _szAfxTempl[] = "afxtempl.h";
 #undef THIS_FILE
 #define THIS_FILE _szAfxTempl
@@ -99,7 +99,7 @@ void AFXAPI SerializeElements(CArchive& ar, TYPE* pElements, int nCount)
 		ar.Read((void*)pElements, nCount * sizeof(TYPE));
 }
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 template<class TYPE>
 void AFXAPI DumpElements(CDumpContext& dc, const TYPE* pElements, int nCount)
 {
@@ -160,7 +160,7 @@ template<> void AFXAPI ConstructElements<COleVariant> (COleVariant* pElements, i
 template<> void AFXAPI DestructElements<COleVariant> (COleVariant* pElements, int nCount);
 template<> void AFXAPI CopyElements<COleVariant> (COleVariant* pDest, const COleVariant* pSrc, int nCount);
 template<> void AFXAPI SerializeElements<COleVariant> (CArchive& ar, COleVariant* pElements, int nCount);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 template<> void AFXAPI DumpElements<COleVariant> (CDumpContext& dc, const COleVariant* pElements, int nCount);
 #endif
 template<> UINT AFXAPI HashKey<const struct tagVARIANT&> (const struct tagVARIANT& var);
@@ -169,7 +169,7 @@ void AFXAPI ConstructElements(COleVariant* pElements, int nCount);
 void AFXAPI DestructElements(COleVariant* pElements, int nCount);
 void AFXAPI CopyElements(COleVariant* pDest, const COleVariant* pSrc, int nCount);
 void AFXAPI SerializeElements(CArchive& ar, COleVariant* pElements, int nCount);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 void AFXAPI DumpElements(CDumpContext& dc, const COleVariant* pElements, int nCount);
 #endif
 UINT AFXAPI HashKey(const struct tagVARIANT& var);
@@ -231,7 +231,7 @@ protected:
 public:
 	~CArray();
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -527,7 +527,7 @@ void CArray<TYPE, ARG_TYPE>::Serialize(CArchive& ar)
 	SerializeElements<TYPE>(ar, m_pData, m_nSize);
 }
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 template<class TYPE, class ARG_TYPE>
 void CArray<TYPE, ARG_TYPE>::Dump(CDumpContext& dc) const
 {
@@ -561,7 +561,7 @@ void CArray<TYPE, ARG_TYPE>::AssertValid() const
 		ASSERT(AfxIsValidAddress(m_pData, m_nMaxSize * sizeof(TYPE)));
 	}
 }
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // CList<TYPE, ARG_TYPE>
@@ -646,7 +646,7 @@ protected:
 public:
 	~CList();
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1071,7 +1071,7 @@ void CList<TYPE, ARG_TYPE>::Serialize(CArchive& ar)
 	}
 }
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 template<class TYPE, class ARG_TYPE>
 void CList<TYPE, ARG_TYPE>::Dump(CDumpContext& dc) const
 {
@@ -1109,7 +1109,7 @@ void CList<TYPE, ARG_TYPE>::AssertValid() const
 		ASSERT(AfxIsValidAddress(m_pNodeTail, sizeof(CNode)));
 	}
 }
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // CMap<KEY, ARG_KEY, VALUE, ARG_VALUE>
@@ -1173,7 +1173,7 @@ protected:
 public:
 	~CMap();
 	void Serialize(CArchive&);
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void Dump(CDumpContext&) const;
 	void AssertValid() const;
 #endif
@@ -1484,7 +1484,7 @@ void CMap<KEY, ARG_KEY, VALUE, ARG_VALUE>::Serialize(CArchive& ar)
 	}
 }
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 template<class KEY, class ARG_KEY, class VALUE, class ARG_VALUE>
 void CMap<KEY, ARG_KEY, VALUE, ARG_VALUE>::Dump(CDumpContext& dc) const
 {
@@ -1520,7 +1520,7 @@ void CMap<KEY, ARG_KEY, VALUE, ARG_VALUE>::AssertValid() const
 	ASSERT(m_nCount == 0 || m_pHashTable != NULL);
 		// non-empty map should have hash table
 }
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // CTypedPtrArray<BASE_CLASS, TYPE>

+ 1 - 1
libs/mfc/include/afxtls_.h

@@ -131,7 +131,7 @@ public:
 	void* PASCAL operator new(size_t nSize);
 	void PASCAL operator delete(void*);
 
-#if defined(_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
+#if defined(MFC_DEBUG) && !defined(_AFX_NO_DEBUG_CRT)
 	void* PASCAL operator new(size_t nSize, LPCSTR, int);
 #if _MSC_VER >= 1200
 	void PASCAL operator delete(void* pObject, LPCSTR, int);

+ 9 - 9
libs/mfc/include/afxver_.h

@@ -41,8 +41,8 @@
 #define AFX_OLE5_SEG    _TEXTSEG(AFX_OLE5)  // and even more OLE support
 #define AFX_OLERA_SEG   _TEXTSEG(AFX_OLERA) // (reserved for future use)
 #define AFX_PRINT_SEG   _TEXTSEG(AFX_PRNT)  // Printing functionality
-#define AFX_DBG1_SEG    _TEXTSEG(AFX_DBG1)  // inlines go here in _DEBUG
-#define AFX_DBG2_SEG    _TEXTSEG(AFX_DBG2)  // inlines go here in _DEBUG
+#define AFX_DBG1_SEG    _TEXTSEG(AFX_DBG1)  // inlines go here in MFC_DEBUG
+#define AFX_DBG2_SEG    _TEXTSEG(AFX_DBG2)  // inlines go here in MFC_DEBUG
 #define AFX_VDEL_SEG    _TEXTSEG(AFX_VDEL)  // vector deleting destructors
 #define AFX_TERM_SEG    _TEXTSEG(AFX_TERM)  // cleanup routines
 #define AFX_MAPI_SEG    _TEXTSEG(AFX_MAPI)  // simple MAPI support
@@ -64,8 +64,8 @@
 #define AFX_OLE5_SEG                        // and even more OLE support
 #define AFX_OLERA_SEG                       // (reserved for future use)
 #define AFX_PRINT_SEG                       // Printing functionality
-#define AFX_DBG1_SEG                        // inlines go here in _DEBUG
-#define AFX_DBG2_SEG                        // inlines go here in _DEBUG
+#define AFX_DBG1_SEG                        // inlines go here in MFC_DEBUG
+#define AFX_DBG2_SEG                        // inlines go here in MFC_DEBUG
 #define AFX_VDEL_SEG                        // vector deleting destructors
 #define AFX_TERM_SEG                        // cleanup routines
 #define AFX_MAPI_SEG                        // simple MAPI support
@@ -106,13 +106,13 @@
 //   _CUSTOM   : for custom configurations (causes afxv_cfg.h to be included)
 //
 // Additional build options:
-//  _DEBUG              debug versions (full diagnostics)
+//  MFC_DEBUG              debug versions (full diagnostics)
 //  _AFXDLL             use shared MFC DLL
 //  _AFXEXT             extension DLL version, implies _AFXDLL
 //  _USRDLL             create regular DLL (_AFXDLL is valid too)
 //
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 	#define _AFX_ENABLE_INLINES
 #endif
 
@@ -193,12 +193,12 @@
 #endif
 #endif
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #ifdef AfxDebugBreak
 #undef AfxDebugBreak
 #endif
 #define AfxDebugBreak()
-#endif  // _DEBUG
+#endif  // MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////
 // Standard preprocessor symbols if not already defined
@@ -287,7 +287,7 @@
 // This macro is used to reduce size requirements of some classes
 #ifndef AFX_ALWAYS_VTABLE
 #ifndef AFX_NOVTABLE
-#if _MSC_VER >= 1100 && !defined(_DEBUG)
+#if _MSC_VER >= 1100 && !defined(MFC_DEBUG)
 #define AFX_NOVTABLE __declspec(novtable)
 #else
 #define AFX_NOVTABLE

+ 37 - 37
libs/mfc/include/afxwin.h

@@ -339,12 +339,12 @@ public:
 	CRect MulDiv(int nMultiplier, int nDivisor) const;
 };
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 // Diagnostic Output
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, SIZE size);
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, POINT point);
 CDumpContext& AFXAPI operator<<(CDumpContext& dc, const RECT& rect);
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 // Serialization
 CArchive& AFXAPI operator<<(CArchive& ar, SIZE size);
@@ -419,7 +419,7 @@ public:
 // Implementation
 public:
 	virtual ~CGdiObject();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -453,7 +453,7 @@ public:
 // Implementation
 public:
 	virtual ~CPen();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -486,7 +486,7 @@ public:
 // Implementation
 public:
 	virtual ~CBrush();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -516,7 +516,7 @@ public:
 // Implementation
 public:
 	virtual ~CFont();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -555,7 +555,7 @@ public:
 // Implementation
 public:
 	virtual ~CBitmap();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 #endif
 };
@@ -992,7 +992,7 @@ public:
 // Implementation
 public:
 	virtual ~CDC();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1026,7 +1026,7 @@ public:
 // Implementation
 public:
 	virtual ~CPaintDC();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1047,7 +1047,7 @@ protected:
 // Implementation
 public:
 	virtual ~CClientDC();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1068,7 +1068,7 @@ protected:
 // Implementation
 public:
 	virtual ~CWindowDC();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1150,7 +1150,7 @@ public:
 // Implementation
 public:
 	virtual ~CMenu();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -1619,7 +1619,7 @@ public:
 // Implementation
 public:
 	virtual ~CCmdTarget();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext& dc) const;
 	virtual void AssertValid() const;
 #endif
@@ -2449,7 +2449,7 @@ protected:
 public:
 	virtual ~CWnd();
 	virtual BOOL CheckAutoCenter();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -2619,7 +2619,7 @@ protected:
 // Implementation
 public:
 	virtual ~CDialog();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -2857,7 +2857,7 @@ protected:
 
    void SetSelectionCheck( int nCheck );
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void PreSubclassWindow();
 #endif
 
@@ -3226,7 +3226,7 @@ protected:
 	static const DWORD dwDockBarMap[4][2];
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -3356,7 +3356,7 @@ public:
 public:
 	HWND m_hWndMDIClient;       // MDI Client window handle
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -3421,7 +3421,7 @@ protected:
 	HMENU m_hMenuShared;        // menu when we are active
 
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -3608,10 +3608,10 @@ protected:
 // Implementation
 public:
 	virtual ~CView();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 	// Advanced: for implementing custom print preview
 	BOOL DoPrintPreview(UINT nIDResource, CView* pPrintView,
@@ -3687,10 +3687,10 @@ protected:
 
 // Implementation
 public:
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 protected:
 	afx_msg void OnPaint();
@@ -3760,10 +3760,10 @@ protected:
 
 public:
 	virtual ~CScrollView();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 	virtual void CalcWindowRect(LPRECT lpClientRect,
 		UINT nAdjustType = adjustBorder);
 	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
@@ -3842,7 +3842,7 @@ public:
 // Implementation
 public:
 	virtual ~CWinThread();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 	int m_nDisablePumpCount; // Diagnostic trap to detect illegal re-entrancy
@@ -4016,7 +4016,7 @@ public:
 
 public:
 	virtual ~CDocManager();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -4226,7 +4226,7 @@ public: // public for implementation access
 
 public:
 	virtual ~CWinApp();
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void AssertValid() const;
 	virtual void Dump(CDumpContext& dc) const;
 #endif
@@ -4358,7 +4358,7 @@ public:
 	HMENU m_hMenuInPlaceServer;
 	HACCEL m_hAccelInPlaceServer;
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
 #endif
@@ -4404,10 +4404,10 @@ public:
 		LPCTSTR lpszPathName, BOOL bMakeVisible = TRUE);
 	virtual void SetDefaultTitle(CDocument* pDocument);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 protected:  // standard implementation
 	CDocument* m_pOnlyDoc;
@@ -4439,10 +4439,10 @@ public:
 		LPCTSTR lpszPathName, BOOL bMakeVisible = TRUE);
 	virtual void SetDefaultTitle(CDocument* pDocument);
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 
 protected:  // standard implementation
 	CPtrList m_docList;          // open documents of this type
@@ -4519,10 +4519,10 @@ public:
 	BOOL m_bAutoDelete;     // TRUE => delete document when no more views
 	BOOL m_bEmbedded;       // TRUE => document is being created by OLE
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	virtual void Dump(CDumpContext&) const;
 	virtual void AssertValid() const;
-#endif //_DEBUG
+#endif //MFC_DEBUG
 	virtual ~CDocument();
 
 	// implementation helpers
@@ -4558,7 +4558,7 @@ protected:
 /////////////////////////////////////////////////////////////////////////////
 // Extra diagnostic tracing options
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 extern AFX_DATA UINT afxTraceFlags;
 enum AfxTraceFlags
@@ -4572,7 +4572,7 @@ enum AfxTraceFlags
 	traceInternet = 64      // special Internet client trace
 };
 
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 //////////////////////////////////////////////////////////////////////////////
 // MessageBox helpers

+ 1 - 1
libs/mfc/include/afxwin1.inl

@@ -83,7 +83,7 @@ _AFXWIN_INLINE CPoint::CPoint()
 	{ /* random filled */ }
 _AFXWIN_INLINE CPoint::CPoint(int initX, int initY)
 	{ x = initX; y = initY; }
-#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(_DEBUG)
+#if !defined(_AFX_CORE_IMPL) || !defined(_AFXDLL) || defined(MFC_DEBUG)
 _AFXWIN_INLINE CPoint::CPoint(POINT initPt)
 	{ *(POINT*)this = initPt; }
 #endif

+ 1 - 1
libs/mfc/include/atlconv.h

@@ -24,7 +24,7 @@
 // Make sure MFC's afxconv.h hasn't already been loaded to do this
 #ifndef USES_CONVERSION
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #   define USES_CONVERSION int _convert; _convert
 #else
 #   define USES_CONVERSION int _convert = 0;

+ 2 - 2
libs/mfc/source/afximpl.h

@@ -243,7 +243,7 @@ typedef struct tagAFX_OLDTOOLINFO {
 #define _UNICODE_SUFFIX _T("u")
 #endif
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 #define _DEBUG_SUFFIX
 #else
 #define _DEBUG_SUFFIX _T("d")
@@ -531,7 +531,7 @@ CHandleMap* PASCAL afxMapHMENU(BOOL bCreate = FALSE);
 /////////////////////////////////////////////////////////////////////////////
 // Debugging/Tracing helpers
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 	void AFXAPI _AfxTraceMsg(LPCTSTR lpszPrefix, const MSG* pMsg);
 	BOOL AFXAPI _AfxCheckDialogTemplate(LPCTSTR lpszResource,
 		BOOL bInvisibleChild);

+ 3 - 3
libs/mfc/source/borland.mak

@@ -117,7 +117,7 @@ LPATH=..\..\LIB;..\..\LIB\PSDK
 
 # MFC Include directory base
 !ifndef MFCINCL
-MFCINCL=..\..\include\mfc
+MFCINCL=..\include
 !endif
 
 # BC Include directory
@@ -501,8 +501,8 @@ $(CPPFLAGS) -I$(BCINCL);$(MFCINCL) /c $(PCH_CPP).cpp
 $(LIBDIR)\$(GOAL).lib: $(D)\$(OBJS)
 	# @-if exist $@ erase $@
 	@$(LIB32) $@ /P2048 @&&!
-+-$(**: = &^
-+-)
++$(**: = &^
++)
 !
 
 !endif #DLL!=2

+ 3 - 3
libs/mfc/source/fixalloc.h

@@ -40,7 +40,7 @@ protected:
 	CRITICAL_SECTION m_protect;
 };
 
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 
 // DECLARE_FIXED_ALLOC -- used in class definition
 #define DECLARE_FIXED_ALLOC(class_name) \
@@ -67,11 +67,11 @@ protected: \
 #define IMPLEMENT_FIXED_ALLOC(class_name, block_size) \
 CFixedAlloc class_name::s_alloc(sizeof(class_name), block_size) \
 
-#else //!_DEBUG
+#else //!MFC_DEBUG
 
 #define DECLARE_FIXED_ALLOC(class_name)     // nothing in debug
 #define IMPLEMENT_FIXED_ALLOC(class_name, block_size)   // nothing in debug
 
-#endif //!_DEBUG
+#endif //!MFC_DEBUG
 
 #endif

+ 2 - 2
libs/mfc/source/mfcdb.rc

@@ -22,7 +22,7 @@
 #include "winver.h"
 #include "afxbld_.h"
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 // Version Info for MFCD42D.DLL
 VS_VERSION_INFO     VERSIONINFO
@@ -98,6 +98,6 @@ BEGIN
 	END
 END
 
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////

+ 2 - 2
libs/mfc/source/mfcdll.rc

@@ -41,7 +41,7 @@
 #include "winver.h"
 #include "afxbld_.h"
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 // Version Info for MFC42[U]D.DLL
 VS_VERSION_INFO     VERSIONINFO
@@ -119,6 +119,6 @@ BEGIN
 	END
 END
 
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////

+ 1 - 1
libs/mfc/source/mfcnet.rc

@@ -19,7 +19,7 @@
 #include "winver.h"
 #include "afxbld_.h"
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 // Version Info for MFCN42D.DLL
 VS_VERSION_INFO     VERSIONINFO

+ 2 - 2
libs/mfc/source/mfcole.rc

@@ -24,7 +24,7 @@
 #include "winver.h"
 #include "afxbld_.h"
 
-#ifdef _DEBUG
+#ifdef MFC_DEBUG
 
 // Version Info for MFCO42D.DLL
 VS_VERSION_INFO     VERSIONINFO
@@ -102,6 +102,6 @@ BEGIN
 	END
 END
 
-#endif // _DEBUG
+#endif // MFC_DEBUG
 
 /////////////////////////////////////////////////////////////////////////////

+ 1 - 1
libs/mfc/source/oleimpl2.h

@@ -262,7 +262,7 @@ BOOL AFXAPI _AfxCopyStgMedium(
 
 // helper for reliable and small Release calls
 DWORD AFXAPI _AfxRelease(LPUNKNOWN* plpUnknown);
-#ifndef _DEBUG
+#ifndef MFC_DEBUG
 // generate smaller code in release build
 #define RELEASE(lpUnk) _AfxRelease((LPUNKNOWN*)&lpUnk)
 #else

+ 2 - 2
libs/mfc/source/winhand_.h

@@ -73,8 +73,8 @@ public:
 	friend class CWinThread;
 };
 
-// Note: out-of-line _DEBUG version is in winhand.cpp
-#ifndef _DEBUG
+// Note: out-of-line MFC_DEBUG version is in winhand.cpp
+#ifndef MFC_DEBUG
 inline void CHandleMap::SetPermanent(HANDLE h, CObject* permOb)
 	{ m_permanentMap[(LPVOID)h] = permOb; }
 

+ 0 - 1
readme.md

@@ -5,7 +5,6 @@ To build WinSCP you need:
 - [Build Tools and Agents for Visual Studio 2019](https://visualstudio.microsoft.com/) (for C# 9.0)
 - [nasm](https://www.nasm.us/) (store it to `buildtools/tools/nasm.exe`)
 - [Object file converter](https://www.agner.org/optimize/#objconv) (store it to `buildtools/tools/objconv.exe`)
-- Build MFC (see [`readme_mfc.txt`](readme_mfc.txt)).
 
 To build WinSCP from source by yourself, modify and use [`build.bat`](build.bat) in root folder.
 

+ 0 - 12
readme_mfc.txt

@@ -1,12 +0,0 @@
-1) copy libs\mfc\source to $(BDS)\source\mfc
-
-2) copy libs\mfc\include to $(BDS)\include\mfc
-
-3) compile the mfc library using the command:
-   make -fborland.mak NO_WARNINGS=1
-   (warnings about missing object in library are ok, for the first build)
-
-4) compile the debug mfc library using the command:
-   make -fborland.mak NO_WARNINGS=1 -DDEBUG
-
-By default the library will be at $(BDS)\lib\UafxcW.lib

+ 1 - 1
source/FileZilla.cbproj

@@ -46,7 +46,7 @@
 		<Defines>_WIN32;$(Defines)</Defines>
 		<FinalOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</FinalOutputDir>
 		<ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(ILINK_LibraryPath)</ILINK_LibraryPath>
-		<IncludePath>filezilla\misc\;filezilla\;resource;core;..\libs\openssl\include;$(BDS)\include;$(BDS)\include\windows\vcl;$(BDS)\include\mfc;$(IncludePath)</IncludePath>
+		<IncludePath>filezilla\misc\;filezilla\;resource;core;..\libs\openssl\include;..\libs\mfc\include;$(BDS)\include;$(BDS)\include\windows\vcl;$(IncludePath)</IncludePath>
 		<IntermediateOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</IntermediateOutputDir>
 		<Manifest_File>None</Manifest_File>
 		<Multithreaded>true</Multithreaded>

+ 1 - 1
source/ScpCore.cbproj

@@ -39,7 +39,7 @@
 		<Defines>WINSCP;_WINDOWS;WIN32;WINNT;_CRTIMP=;_LIB;$(BUILD_TYPE);$(Defines)</Defines>
 		<FinalOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</FinalOutputDir>
 		<ILINK_LibraryPath>$(BDS)\lib;$(ILINK_LibraryPath)</ILINK_LibraryPath>
-		<IncludePath>core\;putty;putty\windows;filezilla;resource;..\libs\openssl\include;..\libs\expat\lib;..\libs\neon\src;..\libs\libs3\inc;$(BDS)\include;$(BDS)\include\windows\vcl;$(BDS)\include\Mfc;$(IncludePath)</IncludePath>
+		<IncludePath>core\;putty;putty\windows;filezilla;resource;..\libs\openssl\include;..\libs\expat\lib;..\libs\neon\src;..\libs\libs3\inc;..\libs\mfc\include;$(BDS)\include;$(BDS)\include\windows\vcl;$(IncludePath)</IncludePath>
 		<IntermediateOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</IntermediateOutputDir>
 		<Manifest_File>None</Manifest_File>
 		<Multithreaded>true</Multithreaded>

+ 1 - 1
source/WinSCP.cbproj

@@ -66,7 +66,7 @@
 		<ILINK_GenerateDRC>true</ILINK_GenerateDRC>
 		<ILINK_LibraryPath>windows\;forms\;packages\filemng;packages\tbx;packages\png;..\libs\lib;$(LIB_PATH);$(ILINK_LibraryPath)</ILINK_LibraryPath>
 		<ILINK_MapFileType>DetailedSegments</ILINK_MapFileType>
-		<IncludePath>console;windows\;forms\;core;resource;components;dragext;packages\filemng;packages\dragndrop;packages\my;packages\tb2k;packages\tbx;packages\png;packages\jcl;$(BDS)\include\mfc;$(BDS)\include\windows;$(BDS)\include\windows\sdk;$(BDS)\include\windows\vcl;$(IncludePath)</IncludePath>
+		<IncludePath>console;windows\;forms\;core;resource;components;dragext;packages\filemng;packages\dragndrop;packages\my;packages\tb2k;packages\tbx;packages\png;packages\jcl;..\libs\mfc\include;$(BDS)\include\windows;$(BDS)\include\windows\sdk;$(BDS)\include\windows\vcl;$(IncludePath)</IncludePath>
 		<IntermediateOutputDir>$(INTERM_PATH)\$(Platform)\$(Config)</IntermediateOutputDir>
 		<LinkPackageStatics>vcl.lib;rtl.lib;vclx.lib;ws2_32.lib;secur32.lib;My.lib;DriveDir.lib;DragDropP.lib;tb2k.lib;tbxp.lib;bcbie.lib;Crypt32.lib;PngComponents.lib;xmlrtl.lib;vclactnband.lib;vclimg.lib;winhttp.lib;jcl.lib;vclie.lib;urlmon.lib;shlwapi.lib;powrprof.lib;soaprtl.lib</LinkPackageStatics>
 		<Manifest_File>windows\WinSCP.exe.manifest</Manifest_File>

+ 0 - 4
source/filezilla/FileZillaIntf.cpp

@@ -4,11 +4,7 @@
 #include "FileZillaIntf.h"
 #include "FileZillaIntern.h"
 //---------------------------------------------------------------------------
-#ifndef _DEBUG
 #pragma comment(lib, "uafxcw.lib")
-#else
-#pragma comment(lib, "uafxcwd.lib")
-#endif
 //---------------------------------------------------------------------------
 #pragma package(smart_init)
 //---------------------------------------------------------------------------