[Ttssh2-commit] [7839] 依存APIの対象外チェックを追加した。

scmno****@osdn***** scmno****@osdn*****
2019年 7月 10日 (水) 21:25:33 JST


Revision: 7839
          https://osdn.net/projects/ttssh2/scm/svn/commits/7839
Author:   yutakapon
Date:     2019-07-10 21:25:32 +0900 (Wed, 10 Jul 2019)
Log Message:
-----------
依存APIの対象外チェックを追加した。
チケット #36876 

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/36876

Modified Paths:
--------------
    branches/openssl_1_1_1_v2/installer/checksymbol/check_symbol.pl

-------------- next part --------------
Modified: branches/openssl_1_1_1_v2/installer/checksymbol/check_symbol.pl
===================================================================
--- branches/openssl_1_1_1_v2/installer/checksymbol/check_symbol.pl	2019-07-09 14:59:28 UTC (rev 7838)
+++ branches/openssl_1_1_1_v2/installer/checksymbol/check_symbol.pl	2019-07-10 12:25:32 UTC (rev 7839)
@@ -29,6 +29,17 @@
 	'win95' => 'api\\win95_dll.txt',
 );
 
+# Windows95\x82Ŗ\xE2\x91\xE8\x82Ȃ\xA2API\x82̈ꗗ
+my @g_whitelist_win95 = (
+	"CommDlgExtendedError",
+	"GetSaveFileNameA",
+	"GetOpenFileNameA",
+	"DnsQuery_A",
+	"DnsRecordListFree",
+	"GetMonitorInfoA",
+	"MonitorFromWindow"
+);
+
 if (@ARGV != 1) {
 	print "ERROR: no argument!\n";
 	help();
@@ -131,7 +142,7 @@
 	for $key (keys %g_apilist) {
 		$os = $key;
 		$file = $g_apilist{$key};
-		print "$os, $file\n";
+		print "[$os, $file]\n";
 		
 		open(FP, "<$file") || next;
 		@whole_file = <FP>;	
@@ -140,6 +151,10 @@
 		# \x83\x82\x83W\x83\x85\x81[\x83\x8B\x82̈ˑ\xB6API\x82\xF0\x83`\x83F\x83b\x83N\x82\xB7\x82\xE9
 		foreach $api (@g_module_symbols) {
 			#print "API($api)\n";
+			if (excluded_check_api($api)) {
+				next;
+			}
+			
 			@match = grep(/$api/, @whole_file);
 			if (@match == 0) {
 				print "API\x82\xAA\x8C\xA9\x93\x96\x82\xBD\x82\xE8\x82܂\xB9\x82\xF1($api)\n";
@@ -149,3 +164,16 @@
 	}
 }
 
+# \x83`\x83F\x83b\x83N\x91ΏۊO\x82\xCCAPI\x82\xA9
+sub excluded_check_api {
+	my($arg) = @_;
+	my($s);
+	
+	foreach $s (@g_whitelist_win95) {
+		if ($s eq $arg) {
+			#print "$arg API is excluded.\n";
+			return 1;
+		}
+	}
+	return 0
+}


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