Revision: 9783 https://osdn.net/projects/ttssh2/scm/svn/commits/9783 Author: zmatsuo Date: 2022-03-05 00:49:59 +0900 (Sat, 05 Mar 2022) Log Message: ----------- ビルドに失敗することがあったので修正 - filesys_log.cpp - VS2005 のときビルドできなかったので修正 - ttknownfolders.c - 定数 FOLDERID_* を常に obj 内に生成するようにした - compat_win.cpp - Unicodeビルドの時でも正しくコンパイルできるように修正 Modified Paths: -------------- branches/cygterm/teraterm/common/compat_win.cpp branches/cygterm/teraterm/common/ttknownfolders.c branches/cygterm/teraterm/teraterm/filesys_log.cpp -------------- next part -------------- Modified: branches/cygterm/teraterm/common/compat_win.cpp =================================================================== --- branches/cygterm/teraterm/common/compat_win.cpp 2022-03-04 14:02:22 UTC (rev 9782) +++ branches/cygterm/teraterm/common/compat_win.cpp 2022-03-04 15:49:59 UTC (rev 9783) @@ -62,7 +62,7 @@ HWND (WINAPI *pGetConsoleWindow)(void); DWORD (WINAPI *pExpandEnvironmentStringsW)(LPCWSTR lpSrc, LPWSTR lpDst, DWORD nSize); static ULONGLONG (WINAPI *pVerSetConditionMask)(ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, BYTE dwConditionMask); -static BOOL (WINAPI *pVerifyVersionInfoA)(LPOSVERSIONINFOEX lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask); +static BOOL (WINAPI *pVerifyVersionInfoA)(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask); BOOL (WINAPI *pSetDefaultDllDirectories)(DWORD DirectoryFlags); BOOL (WINAPI *pSetDllDirectoryA)(LPCSTR lpPathName); @@ -126,7 +126,7 @@ char pszOldWindowTitle[MY_BUFSIZE]; // Contains original WindowTitle. // Fetch current window title. - DWORD size = GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE); + DWORD size = GetConsoleTitleA(pszOldWindowTitle, MY_BUFSIZE); if (size == 0) { DWORD err = GetLastError(); if (err == ERROR_INVALID_HANDLE) { @@ -136,19 +136,19 @@ } // Format a "unique" NewWindowTitle. - wsprintf(pszNewWindowTitle, "%d/%d", GetTickCount(), GetCurrentProcessId()); + wsprintfA(pszNewWindowTitle, "%d/%d", GetTickCount(), GetCurrentProcessId()); // Change current window title. - SetConsoleTitle(pszNewWindowTitle); + SetConsoleTitleA(pszNewWindowTitle); // Ensure window title has been updated. Sleep(40); // Look for NewWindowTitle. - hwndFound = FindWindow(NULL, pszNewWindowTitle); + hwndFound = FindWindowA(NULL, pszNewWindowTitle); // Restore original window title. - SetConsoleTitle(pszOldWindowTitle); + SetConsoleTitleA(pszOldWindowTitle); return hwndFound; } @@ -384,7 +384,7 @@ +------------------------------------------- condition of wProductType */ static BOOL _myVerifyVersionInfo( - LPOSVERSIONINFOEX lpVersionInformation, + LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask) { Modified: branches/cygterm/teraterm/common/ttknownfolders.c =================================================================== --- branches/cygterm/teraterm/common/ttknownfolders.c 2022-03-04 14:02:22 UTC (rev 9782) +++ branches/cygterm/teraterm/common/ttknownfolders.c 2022-03-04 15:49:59 UTC (rev 9783) @@ -28,9 +28,6 @@ #include <windows.h> -#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_VISTA) -// FOLDERID_* \x82\xAASDK\x93\xE0\x82ɒ\xE8\x8B`\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2 // \x82\xB1\x82̃t\x83@\x83C\x83\x8B(*.obj)\x82Ɏ\xC0\x91̂\xF0\x92u\x82\xAD #define INITGUID #include "ttknownfolders.h" -#endif Modified: branches/cygterm/teraterm/teraterm/filesys_log.cpp =================================================================== --- branches/cygterm/teraterm/teraterm/filesys_log.cpp 2022-03-04 14:02:22 UTC (rev 9782) +++ branches/cygterm/teraterm/teraterm/filesys_log.cpp 2022-03-04 15:49:59 UTC (rev 9783) @@ -1347,7 +1347,7 @@ char *logdir; if (strlen(ts.LogDefaultPath) > 0) { - logdir = strdup(ts.LogDefaultPath); + logdir = _strdup(ts.LogDefaultPath); } else { logdir = ToCharW(ts.LogDirW);