[Ttssh2-commit] [7554] VS2005pro+SDK7.0でビルドが通らなかったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 4月 7日 (日) 00:40:47 JST


Revision: 7554
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7554
Author:   zmatsuo
Date:     2019-04-07 00:40:46 +0900 (Sun, 07 Apr 2019)
Log Message:
-----------
VS2005pro+SDK7.0でビルドが通らなかったので修正
teraterm_conf.h を追加 _WIN32_WINNT などを定義

Modified Paths:
--------------
    trunk/teraterm/common/compat_win.h
    trunk/teraterm/common/ttlib.c
    trunk/teraterm/teraterm/addsetting.cpp
    trunk/teraterm/teraterm/ftdlg.cpp
    trunk/teraterm/teraterm/teraterm.cpp
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/teraterm/winjump.c
    trunk/teraterm/ttpdlg/ttdlg.c
    trunk/ttssh2/ttxssh/ttxssh.c

Added Paths:
-----------
    trunk/teraterm/common/teraterm_conf.h

-------------- next part --------------
Modified: trunk/teraterm/common/compat_win.h
===================================================================
--- trunk/teraterm/common/compat_win.h	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/common/compat_win.h	2019-04-06 15:40:46 UTC (rev 7554)
@@ -28,6 +28,11 @@
 
 /* compat_win */
 
+/*
+ * \x8Eg\x97p\x82\xB5\x82Ă\xA2\x82\xE9 Windows SDK, Visual Studio \x82̍\xB7\x82\xF0\x82Ȃ\xAD\x82\xB7\x82\xBD\x82߂̃t\x83@\x83C\x83\x8B
+ * windows.h \x82Ȃǂ̃t\x83@\x83C\x83\x8B\x82\xF0 include \x82\xB5\x82\xBD\x8C\xE3\x82\xC9 include \x82\xB7\x82\xE9
+ */
+
 #pragma once
 
 #include <windows.h>
@@ -37,15 +42,21 @@
 #endif
 
 #if !defined(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE)
-#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE          ((DPI_AWARENESS_CONTEXT)-2)
-#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE     ((DPI_AWARENESS_CONTEXT)-3)
-#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2  ((DPI_AWARENESS_CONTEXT)-4)
+#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE			((DPI_AWARENESS_CONTEXT)-2)
+#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE		((DPI_AWARENESS_CONTEXT)-3)
+#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2	((DPI_AWARENESS_CONTEXT)-4)
 DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
 #endif
 
 #if !defined(WM_DPICHANGED)
-#define WM_DPICHANGED                   0x02E0
+#define WM_DPICHANGED					0x02E0
 #endif
+#if !defined(CF_INACTIVEFONTS)
+#define CF_INACTIVEFONTS				0x02000000L
+#endif
+#if !defined(OPENFILENAME_SIZE_VERSION_400A)
+#define OPENFILENAME_SIZE_VERSION_400A	76
+#endif
 
 extern BOOL (WINAPI *pAlphaBlend)(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
 extern BOOL (WINAPI *pEnumDisplayMonitors)(HDC,LPCRECT,MONITORENUMPROC,LPARAM);

Added: trunk/teraterm/common/teraterm_conf.h
===================================================================
--- trunk/teraterm/common/teraterm_conf.h	                        (rev 0)
+++ trunk/teraterm/common/teraterm_conf.h	2019-04-06 15:40:46 UTC (rev 7554)
@@ -0,0 +1,82 @@
+/*
+ * (C) 2019 TeraTerm Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* teraterm_conf.h */
+
+/*
+ * windows.h \x82Ȃǂ\xF0 include \x82\xB7\x82\xE9\x91O\x82\xC9 include \x82\xB7\x82\xE9\x83t\x83@\x83C\x83\x8B
+ * \x95K\x97v\x82Ȓ\xE8\x8B`\x82\xF0\x8Ds\x82\xA4
+ */
+
+#pragma once
+
+/* \x8Eg\x97p\x82\xB7\x82\xE9 Windows SDK \x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Ew\x92肷\x82\xE9
+ *		\x81EWindows SDK(header)\x93\xE0\x82̊e\x8E\xED\x92\xE8\x8B`\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Ew\x92肷\x82\xE9
+ *		\x81ETera Term \x93\xE0\x82Ŏg\x97p\x82\xB5\x82Ă\xA2\x82\xE9\x8Ae\x8E\xED\x92\xE8\x8B`\x82\xAASDK\x82ɂȂ\xAF\x82\xEA\x82\xCE
+ *		  compat_win.h \x82Œ\xE8\x8B`\x82\xB3\x82\xEA\x82\xE9
+ */
+#if !defined(_WIN32_WINNT)
+//#define	_WIN32_WINNT 0x0a00		// _WINNT_WIN10	Windows 10
+#define		_WIN32_WINNT 0x0501		// _WINNT_WINXP	Windows XP \x81\xAAbuild ok
+//#define	_WIN32_WINNT 0x0500		// _WINNT_WIN2K	Windows 2000 \x81\xABbuild ng
+//#define	_WIN32_WINNT 0x0400		// _WINNT_NT4	Windows NT 4.0(95)
+#endif
+
+/*
+ *	_WIN32_WINNT\x82\xA9\x82玟\x82\xCCdefine\x82\xF0\x93K\x90؂ɐݒ肷\x82\xE9
+ *		NTDDI_VERSION
+ *		WINVER
+ *		_WIN32_IE
+ *	\x82\xB1\x82\xCCdefine\x82͒\xE8\x8B`\x82\xB3\x82\xEA\x82Ȃ\xA2
+ *		_WIN32_WINDOWS
+ */
+//#include <sdkddkver.h>
+
+
+/*
+ *	SDK 7.0
+ *		Windows Server 2003 R2 Platform SDK
+ *		(Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1)
+ *	SDK 7.1
+ *		Microsoft Windows SDK for Windows 7 and .NET Framework 4
+ */
+/*
+ * SDK 7.0 \x91΍\xF4
+ *	7.0 \x82\xCD 7.1 \x88ȍ~\x82Ǝ\x9F\x82̈Ⴂ\x82\xAA\x82\xA0\x82\xE9
+ *	- _WIN32_WINNT \x82\xAA\x92\xE8\x8B`\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ\x81A\x8E\xA9\x93\xAE\x82Őݒ肵\x82Ȃ\xA2
+ *		_WIN32_IE\x82Ȃǂ\xE0\x8E\xA9\x93\xAE\x82Őݒ肳\x82\xEA\x82Ȃ\xA2
+ *	- sdkddkver.h \x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2
+ *		_WIN32_WINNT \x82\xA9\x82\xE7 _WIN32_IE \x82Ȃǂ\xF0\x93K\x90؂Ȓl\x82Ɏ\xA9\x93\xAE\x90ݒ肷\x82\xE9\x83w\x83b\x83_
+ *		\x8E蓮\x82Őݒ肷\x82\xE9
+ *	- WinSDKVer.h \x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2
+ *		_WIN32_WINNT_MAXVER \x82\xAA\x82Ȃ\xA2
+ *		\x8Eg\x97p\x82\xB5\x82Ă\xA2\x82\xE9 SDK \x82̃o\x81[\x83W\x83\x87\x83\x93\x82̃q\x83\x93\x83g\x82𓾂\xE7\x82\xEA\x82Ȃ\xA2
+ */
+#if !defined(_WIN32_IE)
+#define _WIN32_IE       0x0600		// _WIN32_IE_XP
+#endif

Modified: trunk/teraterm/common/ttlib.c
===================================================================
--- trunk/teraterm/common/ttlib.c	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/common/ttlib.c	2019-04-06 15:40:46 UTC (rev 7554)
@@ -41,6 +41,7 @@
 
 #include "teraterm.h"
 #include "tttypes.h"
+#include "compat_win.h"
 
 /* OS version with GetVersionEx(*1)
 
@@ -1436,17 +1437,10 @@
 // OPENFILENAMEA.lStructSize \x82ɑ\xE3\x93\xFC\x82\xB7\x82\xE9\x92l
 DWORD get_OPENFILENAME_SIZE()
 {
-#if (_WIN32_WINNT >= 0x0500)
-#if !defined(OPENFILENAME_SIZE_VERSION_400A)
-#define OPENFILENAME_SIZE_VERSION_400A 76
-#endif
 	if (IsWindows2000OrLater()) {
 		return sizeof(OPENFILENAMEA);
 	}
 	return OPENFILENAME_SIZE_VERSION_400A;
-#else
-	return sizeof(OPENFILENAMEA);
-#endif
 }
 
 // convert table for KanjiCodeID and ListID

Modified: trunk/teraterm/teraterm/addsetting.cpp
===================================================================
--- trunk/teraterm/teraterm/addsetting.cpp	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/teraterm/addsetting.cpp	2019-04-06 15:40:46 UTC (rev 7554)
@@ -29,6 +29,7 @@
 /*
  * Additional settings dialog
  */
+#include "teraterm_conf.h"
 
 #include <stdio.h>
 #include <tchar.h>

Modified: trunk/teraterm/teraterm/ftdlg.cpp
===================================================================
--- trunk/teraterm/teraterm/ftdlg.cpp	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/teraterm/ftdlg.cpp	2019-04-06 15:40:46 UTC (rev 7554)
@@ -28,10 +28,13 @@
  */
 
 /* TERATERM.EXE, file transfer dialog box */
+#include "teraterm_conf.h"
+
 #include <stdio.h>
 #include <windows.h>
 #include <commctrl.h>
 #include <tchar.h>
+
 #include "teraterm.h"
 #include "tttypes.h"
 #include "ttftypes.h"

Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/teraterm/teraterm.cpp	2019-04-06 15:40:46 UTC (rev 7554)
@@ -29,6 +29,8 @@
 
 /* TERATERM.EXE, main */
 
+#include "teraterm_conf.h"
+
 #include <crtdbg.h>
 #include <tchar.h>
 #include "teraterm.h"

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/teraterm/vtwin.cpp	2019-04-06 15:40:46 UTC (rev 7554)
@@ -30,6 +30,7 @@
 
 /* TERATERM.EXE, VT window */
 
+#include "teraterm_conf.h"
 #include "teraterm.h"
 #include "tttypes.h"
 
@@ -4706,11 +4707,9 @@
 		CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT |
 		CF_SHOWHELP | CF_NOVERTFONTS |
 		CF_ENABLEHOOK;
-#if (WINVER >= _WIN32_WINNT_WIN7) && defined(CF_INACTIVEFONTS)
 	if (IsWindows7OrLater() && ts.ListHiddenFonts) {
 		cf.Flags |= CF_INACTIVEFONTS;
 	}
-#endif
 	cf.lpfnHook = (LPCFHOOKPROC)(&TFontHook);
 	cf.nFontType = REGULAR_FONTTYPE;
 	cf.hInstance = hInst;

Modified: trunk/teraterm/teraterm/winjump.c
===================================================================
--- trunk/teraterm/teraterm/winjump.c	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/teraterm/winjump.c	2019-04-06 15:40:46 UTC (rev 7554)
@@ -46,6 +46,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "teraterm_conf.h"
+
 #include <windows.h>
 #include <assert.h>
 #include <stdio.h>
@@ -392,7 +394,7 @@
     0x000214ee, 0x0000, 0x0000, {0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}
 };
 #endif
-#if (NTDDI_VERSION < NTDDI_WIN7)
+#if (_WIN32_WINNT < 0x0601)		// _WIN32_WINNT_WIN7
 static const IID IID_ICustomDestinationList = {
     0x6332debf, 0x87b5, 0x4670, {0x90,0xc0,0x5e,0x57,0xb4,0x08,0xa4,0x9e}
 };

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2019-04-06 15:40:46 UTC (rev 7554)
@@ -29,6 +29,7 @@
 /* IPv6 modification is Copyright(C) 2000 Jun-ya Kato <kato****@win6*****> */
 
 /* TTDLG.DLL, dialog boxes */
+#include "teraterm_conf.h"
 #include "teraterm.h"
 #include <stdio.h>
 #include <string.h>

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2019-04-04 17:01:40 UTC (rev 7553)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2019-04-06 15:40:46 UTC (rev 7554)
@@ -33,6 +33,7 @@
    Tera Term by Takashi Teranishi (teran****@rikax*****)
 */
 
+#include "teraterm_conf.h"
 #include "ttxssh.h"
 #include "fwdui.h"
 #include "util.h"
@@ -79,6 +80,7 @@
 #include "sftp.h"
 
 #include "compat_w95.h"
+#include "compat_win.h"
 
 #include "libputty.h"
 
@@ -2404,11 +2406,13 @@
 	SendMessage(GetDlgItem(dlg, IDC_PUTTY_VERSION), WM_SETTEXT, 0, (LPARAM)buf);
 }
 
+#if 0
 // WM_MOUSEWHEEL \x82\xCD winuser.h \x83w\x83b\x83_\x82Ő錾\x82\xB3\x82\xEA\x82Ă\xA2\x82܂\xB7\x82\xAA\x81A#define _WIN32_WINNT 0x0400 \x82\xAA\x90錾\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x82ƔF\x8E\xAF\x82\xB3\x82\xEA\x82܂\xB9\x82\xF1\x81B
-#define WM_MOUSEWHEEL                   0x020A
+#define WM_MOUSEWHEEL                   0x020A1
 #define WHEEL_DELTA                     120
 #define GET_WHEEL_DELTA_WPARAM(wParam)  ((short)HIWORD(wParam))
 #define GET_KEYSTATE_WPARAM(wParam)     (LOWORD(wParam))
+#endif
 
 static WNDPROC g_defAboutDlgEditWndProc;  // Edit Control\x82̃T\x83u\x83N\x83\x89\x83X\x89\xBB\x97p
 static int g_deltaSumAboutDlg = 0;        // \x83}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82\xCCDelta\x97ݐϗp


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