[Ttssh2-commit] [9232] 少し古いmingwでもビルドできるようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 5月 4日 (火) 00:05:01 JST


Revision: 9232
          https://osdn.net/projects/ttssh2/scm/svn/commits/9232
Author:   zmatsuo
Date:     2021-05-04 00:05:01 +0900 (Tue, 04 May 2021)
Log Message:
-----------
少し古いmingwでもビルドできるようにした

- debian buster の mingw でもビルドできるよう考慮
  - mingw-w64-i686-dev 6.0.0

Modified Paths:
--------------
    trunk/teraterm/common/comportinfo.cpp
    trunk/teraterm/common/devpkey_teraterm.h

-------------- next part --------------
Modified: trunk/teraterm/common/comportinfo.cpp
===================================================================
--- trunk/teraterm/common/comportinfo.cpp	2021-05-03 15:04:52 UTC (rev 9231)
+++ trunk/teraterm/common/comportinfo.cpp	2021-05-03 15:05:01 UTC (rev 9232)
@@ -43,10 +43,10 @@
  *	devpkey.h \x82\xAA\x82\xA0\x82\xE9\x8A‹\xAB?
  *		HAS_DEVPKEY_H \x82\xAA define \x82\xB3\x82\xEA\x82\xE9
  */
-#if	(_MSC_VER > 1400) || defined(__MINGW32__)
+#if	defined(_MSC_VER)
+#if	(_MSC_VER > 1400)
 
 // VS2019\x82̂Ƃ\xAB(VS2005\x82\xE6\x82\xE8\x91傫\x82\xA2\x82Ƃ\xB5\x82Ă\xA2\x82\xE9)
-// MinGW(32&64bit)\x82̂Ƃ\xAB
 #define HAS_DEVPKEY_H	1
 
 #else // _MSC_VER > 1400
@@ -59,8 +59,16 @@
 #define HAS_DEVPKEY_H	1
 
 #endif  //  defined(_INC_SDKDDKVER)
-#endif  // _MSC_VER == 1400
+#endif
+#elif defined(__MINGW32__)
 
+#if	__MINGW64_VERSION_MAJOR >= 8
+// mingw64 8+ \x82̂Ƃ\xAB
+#define HAS_DEVPKEY_H	1
+#endif
+
+#endif  // defined(_MSC_VER)
+
 /*
  *	devpkey.h \x82\xCC include
  */

Modified: trunk/teraterm/common/devpkey_teraterm.h
===================================================================
--- trunk/teraterm/common/devpkey_teraterm.h	2021-05-03 15:04:52 UTC (rev 9231)
+++ trunk/teraterm/common/devpkey_teraterm.h	2021-05-03 15:05:01 UTC (rev 9232)
@@ -28,10 +28,13 @@
 
 #pragma once
 
-// \x82\xB1\x82̃t\x83@\x83C\x83\x8B\x82\xCDVS2005\x82̎\x9E\x82\xBE\x82\xAF\x8EQ\x8FƂ\xB3\x82\xEA\x82\xE9
-#if defined(__MINGW32__) || _MSC_VER != 1400
+// \x82\xB1\x82̃t\x83@\x83C\x83\x8B\x82͂\xA0\x82\xBD\x82炵\x82\xA2\x83R\x83\x93\x83p\x83C\x83\x89\x8A‹\xAB\x82ł͕s\x97v
+#if defined(_MSC_VER) && _MSC_VER >= 1400
 #error check file dependency
 #endif
+#if defined(__MINGW32__) && __MINGW64_VERSION_MAJOR >= 8
+#error check file dependency
+#endif
 
 typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
 #define DEVPROP_TYPE_FILETIME                   0x00000010  // file time (FILETIME)
@@ -40,12 +43,16 @@
 typedef GUID  DEVPROPGUID, *PDEVPROPGUID;
 typedef ULONG DEVPROPID,   *PDEVPROPID;
 
+#if defined(_MSC_VER)
 typedef struct _DEVPROPKEY {
     DEVPROPGUID fmtid;
     DEVPROPID   pid;
 } DEVPROPKEY, *PDEVPROPKEY;
+#endif
 
-
+#if defined(__MINGW32__)
+#undef DEFINE_DEVPROPKEY
+#endif
 #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }, pid }
 
 /*


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