Revision: 10267 https://osdn.net/projects/ttssh2/scm/svn/commits/10267 Author: zmatsuo Date: 2022-09-14 23:15:56 +0900 (Wed, 14 Sep 2022) Log Message: ----------- cmakeビルド時、libresslライブラリ内の関数をコールするためのヘッダを追加 - r10261から arc4random() は libressl 内部の関数を使用するようになった - 通常(cmakeではない)ビルド時、libs/libressl/include/compat/stdlib.h 参照する - cmakeビルド時、このファイルを参照できないので libs/include に置くようにした - libressl を make install して生成された include/ には arc4random.c() のプロトタイプを含んだヘッダは入っていないため Modified Paths: -------------- trunk/ttssh2/ttxssh/CMakeLists.txt Added Paths: ----------- trunk/libs/include/ trunk/libs/include/README.md trunk/libs/include/compat/ trunk/libs/include/compat/stdlib.h -------------- next part -------------- Added: trunk/libs/include/README.md =================================================================== --- trunk/libs/include/README.md (rev 0) +++ trunk/libs/include/README.md 2022-09-14 14:15:56 UTC (rev 10267) @@ -0,0 +1,3 @@ + +- compat/stdlib.h + - libressl内の関数をコールするためプロトタイプを定義したヘッダ Added: trunk/libs/include/compat/stdlib.h =================================================================== --- trunk/libs/include/compat/stdlib.h (rev 0) +++ trunk/libs/include/compat/stdlib.h 2022-09-14 14:15:56 UTC (rev 10267) @@ -0,0 +1,36 @@ +/* + * (C) 2022- TeraTerm Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +/* + * libressl \x93\xE0\x95\x94\x82̊\x94 + * BSD \x82̓\xAF\x96\xBC\x8A\x94,stdlib.h + */ +uint32_t arc4random(void); +void arc4random_buf(void *_buf, size_t n); Modified: trunk/ttssh2/ttxssh/CMakeLists.txt =================================================================== --- trunk/ttssh2/ttxssh/CMakeLists.txt 2022-09-13 10:13:27 UTC (rev 10266) +++ trunk/ttssh2/ttxssh/CMakeLists.txt 2022-09-14 14:15:56 UTC (rev 10267) @@ -164,6 +164,7 @@ ../../teraterm/common ../matcher ../putty + ../../libs/include ${ZLIB_INCLUDE_DIRS} )