[Ttssh2-commit] [7233] MinGWでプラグインをロードできるようにした

scmno****@osdn***** scmno****@osdn*****
2018年 9月 8日 (土) 03:51:22 JST


Revision: 7233
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7233
Author:   zmatsuo
Date:     2018-09-08 03:51:22 +0900 (Sat, 08 Sep 2018)
Log Message:
-----------
MinGWでプラグインをロードできるようにした

Modified Paths:
--------------
    branches/cmake/teraterm/teraterm/ttplug.c

-------------- next part --------------
Modified: branches/cmake/teraterm/teraterm/ttplug.c
===================================================================
--- branches/cmake/teraterm/teraterm/ttplug.c	2018-09-07 18:51:10 UTC (rev 7232)
+++ branches/cmake/teraterm/teraterm/ttplug.c	2018-09-07 18:51:22 UTC (rev 7233)
@@ -72,7 +72,12 @@
   if (NumExtensions>=MAXNUMEXTENSIONS) return;
   LibHandle[NumExtensions] = LoadLibrary(fileName);
   if (LibHandle[NumExtensions] != NULL) {
-    TTXBindProc bind = (TTXBindProc)GetProcAddress(LibHandle[NumExtensions], "_TTXBind @ 8");
+#if defined(_MSC_VER)
+    const char *TTXBIND = "_TTXBind @ 8";
+#else
+    const char *TTXBIND = "TTXBind @ 8";
+#endif
+    TTXBindProc bind = (TTXBindProc)GetProcAddress(LibHandle[NumExtensions], TTXBIND);
     if (bind==NULL)
       bind = (TTXBindProc)GetProcAddress(LibHandle[NumExtensions], "TTXBind");
     if (bind != NULL) {



Ttssh2-commit メーリングリストの案内