[Ttssh2-commit] [7832] InitializeCriticalSectionAndSpinCount関数はWindows98から

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 7月 7日 (日) 23:13:50 JST


Revision: 7832
          https://osdn.net/projects/ttssh2/scm/svn/commits/7832
Author:   yutakapon
Date:     2019-07-07 23:13:50 +0900 (Sun, 07 Jul 2019)
Log Message:
-----------
InitializeCriticalSectionAndSpinCount関数はWindows98から
追加されたAPIであるため、使わないようにするパッチを追加した。
チケット #36876 

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

Modified Paths:
--------------
    branches/openssl_1_1_1_v2/libs/openssl_patch/check_patch.bat

Added Paths:
-----------
    branches/openssl_1_1_1_v2/libs/openssl_patch/InitializeCriticalSectionAndSpinCount_patch.txt
    branches/openssl_1_1_1_v2/libs/openssl_patch/ws2_32_dll_patch.txt

Removed Paths:
-------------
    branches/openssl_1_1_1_v2/libs/openssl_patch/openssl_build_patch.txt

-------------- next part --------------
Added: branches/openssl_1_1_1_v2/libs/openssl_patch/InitializeCriticalSectionAndSpinCount_patch.txt
===================================================================
--- branches/openssl_1_1_1_v2/libs/openssl_patch/InitializeCriticalSectionAndSpinCount_patch.txt	                        (rev 0)
+++ branches/openssl_1_1_1_v2/libs/openssl_patch/InitializeCriticalSectionAndSpinCount_patch.txt	2019-07-07 14:13:50 UTC (rev 7832)
@@ -0,0 +1,22 @@
+*** openssl-1.1.1c/crypto/threads_win.c	2019-05-28 22:12:20.000000000 +0900
+--- openssl/crypto/threads_win.c	2019-07-07 21:47:16.730284500 +0900
+*************** CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(vo
+*** 24,30 ****
+          return NULL;
+      }
+  
+! #if !defined(_WIN32_WCE)
+      /* 0x400 is the spin count value suggested in the documentation */
+      if (!InitializeCriticalSectionAndSpinCount(lock, 0x400)) {
+          OPENSSL_free(lock);
+--- 24,33 ----
+          return NULL;
+      }
+  
+! //#if !defined(_WIN32_WCE)
+! // We do not use InitializeCriticalSectionAndSpinCount API for
+! // running on Windows95. The API has been added on Windows98.
+! #if 0
+      /* 0x400 is the spin count value suggested in the documentation */
+      if (!InitializeCriticalSectionAndSpinCount(lock, 0x400)) {
+          OPENSSL_free(lock);

Modified: branches/openssl_1_1_1_v2/libs/openssl_patch/check_patch.bat
===================================================================
--- branches/openssl_1_1_1_v2/libs/openssl_patch/check_patch.bat	2019-07-07 13:34:52 UTC (rev 7831)
+++ branches/openssl_1_1_1_v2/libs/openssl_patch/check_patch.bat	2019-07-07 14:13:50 UTC (rev 7832)
@@ -7,6 +7,9 @@
 findstr /c:"# undef AI_PASSIVE" ..\openssl\crypto\bio\bio_lcl.h
 if ERRORLEVEL 1 goto fail
 
+findstr /c:"running on Windows95" ..\openssl\crypto\threads_win.c
+if ERRORLEVEL 1 goto fail
+
 echo "\x83p\x83b\x83`\x82͓K\x97p\x82\xB3\x82\xEA\x82Ă\xA2\x82܂\xB7"
 timeout 5
 goto end

Deleted: branches/openssl_1_1_1_v2/libs/openssl_patch/openssl_build_patch.txt
===================================================================
--- branches/openssl_1_1_1_v2/libs/openssl_patch/openssl_build_patch.txt	2019-07-07 13:34:52 UTC (rev 7831)
+++ branches/openssl_1_1_1_v2/libs/openssl_patch/openssl_build_patch.txt	2019-07-07 14:13:50 UTC (rev 7832)
@@ -1,13 +0,0 @@
-diff -cwrp openssl-1.1.1c/crypto/bio/bio_lcl.h openssl/crypto/bio/bio_lcl.h
-*** openssl-1.1.1c/crypto/bio/bio_lcl.h	2019-05-28 22:12:20.000000000 +0900
---- openssl/crypto/bio/bio_lcl.h	2019-06-26 19:48:45.072802700 +0900
-***************
-*** 11,16 ****
---- 11,18 ----
-  #include "internal/sockets.h"
-  #include "internal/refcount.h"
-  
-+ # undef AI_PASSIVE
-+ 
-  /* BEGIN BIO_ADDRINFO/BIO_ADDR stuff. */
-  

Copied: branches/openssl_1_1_1_v2/libs/openssl_patch/ws2_32_dll_patch.txt (from rev 7831, branches/openssl_1_1_1_v2/libs/openssl_patch/openssl_build_patch.txt)
===================================================================
--- branches/openssl_1_1_1_v2/libs/openssl_patch/ws2_32_dll_patch.txt	                        (rev 0)
+++ branches/openssl_1_1_1_v2/libs/openssl_patch/ws2_32_dll_patch.txt	2019-07-07 14:13:50 UTC (rev 7832)
@@ -0,0 +1,13 @@
+diff -cwrp openssl-1.1.1c/crypto/bio/bio_lcl.h openssl/crypto/bio/bio_lcl.h
+*** openssl-1.1.1c/crypto/bio/bio_lcl.h	2019-05-28 22:12:20.000000000 +0900
+--- openssl/crypto/bio/bio_lcl.h	2019-06-26 19:48:45.072802700 +0900
+***************
+*** 11,16 ****
+--- 11,18 ----
+  #include "internal/sockets.h"
+  #include "internal/refcount.h"
+  
++ # undef AI_PASSIVE
++ 
+  /* BEGIN BIO_ADDRINFO/BIO_ADDR stuff. */
+  


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