[Ttssh2-commit] [4158] NO_INET6 でビルドが通るようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 11月 19日 (金) 13:06:40 JST


Revision: 4158
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4158
Author:   doda
Date:     2010-11-19 13:06:40 +0900 (Fri, 19 Nov 2010)

Log Message:
-----------
NO_INET6 でビルドが通るようにした。

Modified Paths:
--------------
    trunk/teraterm/teraterm/commlib.c
    trunk/teraterm/teraterm/ttwsk.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/commlib.c
===================================================================
--- trunk/teraterm/teraterm/commlib.c	2010-11-16 22:33:55 UTC (rev 4157)
+++ trunk/teraterm/teraterm/commlib.c	2010-11-19 04:06:40 UTC (rev 4158)
@@ -19,11 +19,12 @@
 #ifndef NO_INET6
 #include <winsock2.h>
 #include <ws2tcpip.h>
+#endif /* NO_INET6 */
 #include <stdio.h> /* for _snprintf() */
-#endif /* NO_INET6 */
 #include <time.h>
 #include <locale.h>
 
+#ifndef NO_INET6
 static SOCKET OpenSocket(PComVar);
 static void AsyncConnect(PComVar);
 static int CloseSocket(SOCKET);
@@ -73,6 +74,7 @@
 {
 	return Pclosesocket(s);
 }
+#endif /* NO_INET6 */
 
 #define CommInQueSize 8192
 #define CommOutQueSize 2048
@@ -440,18 +442,22 @@
 
 	if (InvalidHost)
 	{
-	  if (cv->NoMsg==0)
-	    MessageBox(cv->HWin,"Invalid host",ErrorCaption,
-	      MB_TASKMODAL | MB_ICONEXCLAMATION);
+	  if (cv->NoMsg==0) {
+	    get_lang_msg("MSG_TT_ERROR", uimsg, sizeof(uimsg), "Tera Term: Error", ts->UILanguageFile);
+	    get_lang_msg("MSG_INVALID_HOST_ERROR", ts->UIMsg, sizeof(ts->UIMsg), "Invalid host", ts->UILanguageFile);
+	    MessageBox(cv->HWin, ts->UIMsg, uimsg, MB_TASKMODAL | MB_ICONEXCLAMATION);
+	  }
 	}
 	else {
 	  cv->s= Psocket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
 	  if (cv->s==INVALID_SOCKET)
 	  {
 	    InvalidHost = TRUE;
-	    if (cv->NoMsg==0)
-	      MessageBox(cv->HWin,ErrorCantConn,ErrorCaption,
-		MB_TASKMODAL | MB_ICONEXCLAMATION);
+	    if (cv->NoMsg==0) {
+	      get_lang_msg("MSG_TT_ERROR", uimsg, sizeof(uimsg), "Tera Term: Error", ts->UILanguageFile);
+	      get_lang_msg("MSG_COMM_TIMEOUT_ERROR", ts->UIMsg, sizeof(ts->UIMsg), "Cannot connect the host", ts->UILanguageFile);
+	      MessageBox(cv->HWin, ts->UIMsg, uimsg, MB_TASKMODAL | MB_ICONEXCLAMATION);
+	    }
 	  }
 	  else {
 	    BBuf = TRUE;
@@ -648,9 +654,10 @@
 					return;
 				}
 #else
-	if (cv->NoMsg==0)
-	  MessageBox(cv->HWin,ErrMsg,ErrorCaption,
-	    MB_TASKMODAL | MB_ICONEXCLAMATION);
+	if (cv->NoMsg==0) {
+	  get_lang_msg("MSG_TT_ERROR", uimsg, sizeof(uimsg), "Tera Term: Error", ts->UILanguageFile);
+	  MessageBox(cv->HWin, ErrMsg, uimsg, MB_TASKMODAL | MB_ICONEXCLAMATION);
+	}
 	PostMessage(cv->HWin, WM_USER_COMMNOTIFY, 0, FD_CLOSE);
 	return;
 #endif /* NO_INET6 */

Modified: trunk/teraterm/teraterm/ttwsk.c
===================================================================
--- trunk/teraterm/teraterm/ttwsk.c	2010-11-16 22:33:55 UTC (rev 4157)
+++ trunk/teraterm/teraterm/ttwsk.c	2010-11-19 04:06:40 UTC (rev 4158)
@@ -6,7 +6,9 @@
 
 #include "teraterm.h"
 #include "ttwsk.h"
+#ifndef NO_INET6
 #include "WSAAsyncGetAddrInfo.h"
+#endif /* NO_INET6 */
 
 static HANDLE HWinsock = NULL;
 
@@ -148,7 +150,9 @@
     PWSACleanup = (TWSACleanup)GetProcAddress(HWinsock, MAKEINTRESOURCE(IdWSACLEANUP));
     if (PWSACleanup==NULL) Err = TRUE;
 
+#ifndef NO_INET6
     PWSAAsyncGetAddrInfo = WSAAsyncGetAddrInfo;
+#endif /* NO_INET6 */
 
     if (Err)
     {



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