[Ttssh2-commit] [8390] MinGWでビルドできるよう修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 11月 21日 (木) 23:44:47 JST


Revision: 8390
          https://osdn.net/projects/ttssh2/scm/svn/commits/8390
Author:   zmatsuo
Date:     2019-11-21 23:44:46 +0900 (Thu, 21 Nov 2019)
Log Message:
-----------
MinGWでビルドできるよう修正

- CMAKE_BUILD_TYPE=Debug時にビルドエラー
  - '_strdup_dbg' was not declared in this scope
  - gcc.exe (Rev2, Built by MSYS2 project) 9.2.0
- _CRTDBG_MAP_ALLOC を使ってデバッグバージョンのヒープ割り当て関数へ切り替え
  - r8304
  - [Ttssh2-devel 4056]

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/2
    https://osdn.net/projects/ttssh2/scm/svn/commits/8304

Modified Paths:
--------------
    trunk/teraterm/teraterm/addsetting.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/addsetting.cpp
===================================================================
--- trunk/teraterm/teraterm/addsetting.cpp	2019-11-21 11:30:17 UTC (rev 8389)
+++ trunk/teraterm/teraterm/addsetting.cpp	2019-11-21 14:44:46 UTC (rev 8390)
@@ -37,6 +37,8 @@
 #include <commctrl.h>
 #include <time.h>
 #include <tchar.h>
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
 #include <crtdbg.h>
 
 #include "teraterm.h"
@@ -51,18 +53,6 @@
 
 #include "tipwin.h"
 
-#ifdef _DEBUG
-#define free(p)		_free_dbg((p), _NORMAL_BLOCK)
-#define _strdup(s)	_strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define _wcsdup(s)	_wcsdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#undef _tcsdup
-#ifdef _UNICODE
-#define _tcsdup(s)	_wcsdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#else
-#define _tcsdup(s)	_strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-#endif
-
 const mouse_cursor_t MouseCursor[] = {
 	{"ARROW", IDC_ARROW},
 	{"IBEAM", IDC_IBEAM},


Ttssh2-commit メーリングリストの案内
Back to archive index