• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7657 (tree)
Time2019-05-08 01:48:01
Authorzmatsuo

Log Message

cmakeでdebugビルド時、_DEBUGをdefineするようにした。version_info.h内にbuild_typeを出力するようにした。

Change Summary

Incremental Difference

--- trunk/CMakeLists.txt (revision 7656)
+++ trunk/CMakeLists.txt (revision 7657)
@@ -50,10 +50,12 @@
5050 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
5151 endif()
5252 elseif(MINGW)
53+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=${_WIN32_WINNT}")
5354 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=${_WIN32_WINNT}")
54- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=${_WIN32_WINNT}")
5555 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -static -ffunction-sections -fdata-sections ${C_ONLY_FLAGS}")
5656 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -static -ffunction-sections -fdata-sections")
57+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
58+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
5759 if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
5860 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static-libstdc++")
5961 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
--- trunk/teraterm/teraterm/vtwin.cpp (revision 7656)
+++ trunk/teraterm/teraterm/vtwin.cpp (revision 7657)
@@ -119,8 +119,10 @@
119119 #ifdef _DEBUG
120120 #define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
121121 #define free(p) _free_dbg((p), _NORMAL_BLOCK)
122+#if defined(_MSC_VER)
122123 #define new ::new(_NORMAL_BLOCK, __FILE__, __LINE__)
123124 #endif
125+#endif
124126
125127 // ウィンドウ最大化ボタンを有効にする (2005.1.15 yutaka)
126128 #define WINDOW_MAXMIMUM_ENABLED 1
--- trunk/teraterm/ttpmacro/ttmacro.cpp (revision 7656)
+++ trunk/teraterm/ttpmacro/ttmacro.cpp (revision 7657)
@@ -49,7 +49,7 @@
4949 #include "ttmlib.h"
5050 #include "ttlib.h"
5151
52-#ifdef _DEBUG
52+#if defined(_MSC_VER) && defined(_DEBUG)
5353 #define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
5454 #endif
5555
@@ -115,7 +115,7 @@
115115 DWORD SleepTick = 1;
116116
117117 #ifdef _DEBUG
118- ::_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
118+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
119119 #endif
120120
121121 init();
@@ -158,10 +158,10 @@
158158 }
159159 }
160160
161- // TODO すでに閉じられている、この処理不要?
162- if (pCCtrlWindow) {
163- pCCtrlWindow->DestroyWindow();
164- }
161+ pCCtrlWindow->DestroyWindow();
162+ delete pCCtrlWindow;
165163 pCCtrlWindow = NULL;
164+
165+ DLLExit();
166166 return ExitCode;
167167 }
--- trunk/version_info.h.in (revision 7656)
+++ trunk/version_info.h.in (revision 7657)
@@ -11,6 +11,8 @@
1111 // @CMAKE_GENERATOR@
1212 // CMAKE_GENERATOR_TOOLSET (VS 2010 and above)
1313 // @CMAKE_GENERATOR_TOOLSET@
14+// CMAKE_BUILD_TYPE (single-configuration generator)
15+// @CMAKE_BUILD_TYPE@
1416 // CMAKE_COMMAND
1517 // @CMAKE_COMMAND@
1618 // CMAKE_C_COMPILER
Show on old repository browser