From 31fb8860dbaae3e0b7d38f2a647ee527b4b2a95f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 7 Mar 2023 15:14:22 +0000 Subject: [PATCH] build: more fixes and tidy-up (mostly for Windows) - cmake: always link `ws2_32` on Windows. Also add it to `libssh2.pc`. Fixes #745 - agent: fix gcc compiler warning: `src/agent.c:296:35: warning: 'snprintf' output truncated before the last format character [-Wformat-truncation=]` - autotools: fix `EVP_aes_128_ctr` detection with binutils `ld` The prerequisite for a successful detection is setting `LIBS=-lbcrypt` if the chosen openssl-compatible library requires it, e.g. libressl, or quictls/openssl built with `-DUSE_BCRYPTGENRANDOM`. With llvm `lld`, detection works out of the box. With binutils `ld`, it does not. The reason is `ld`s world-famous pickiness with lib order. To fix it, we pass all custom libs before and after the TLS libs. This ugly hack makes `ld` happy and detection succeed. - agent: fix Windows-specific warning: `src/agent.c:318:10: warning: implicit conversion loses integer precision: 'LRESULT' (aka 'long long') to 'int' [-Wshorten-64-to-32]` - src: fix llvm/clang compiler warning: `src/libssh2_priv.h:987:28: warning: variadic macros are a C99 feature [-Wvariadic-macros]` - src: support `inline` with `__GNUC__` (llvm/clang and gcc), fixing: ``` src/libssh2_priv.h:990:8: warning: extension used [-Wlanguage-extension-token] static inline void ^ ``` - blowfish: support `inline` keyword with MSVC. Also switch to `__inline__` (from `__inline`) for `__GNUC__`: https://gcc.gnu.org/onlinedocs/gcc/Inline.html https://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes - example/test: fix MSVC compiler warnings: - `example\direct_tcpip.c(209): warning C4244: 'function': conversion from 'unsigned int' to 'u_short', possible loss of data` - `tests\session_fixture.c(96): warning C4013: 'getcwd' undefined; assuming extern returning int` - `tests\session_fixture.c(100): warning C4013: 'chdir' undefined; assuming extern returning int` - delete unused macros: - `HAVE_SOCKET` - `HAVE_INET_ADDR` - `NEED_LIB_NSL` - `NEED_LIB_SOCKET` - `HAVE_NTSTATUS_H` - `HAVE_NTDEF_H` - build: delete stale zlib/openssl version numbers from path defaults. - cmake: convert tabs to spaces, add newline at EOFs. Closes #811 --- CMakeLists.txt | 4 ++ acinclude.m4 | 6 +- cmake/CheckFunctionExistsMayNeedLibrary.cmake | 12 ++-- cmake/CheckNonblockingSocketSupport.cmake | 16 ++--- cmake/FindLibgcrypt.cmake | 2 +- cmake/SocketLibraries.cmake | 64 ------------------- cmake/Toolchain-Linux-32.cmake | 2 +- example/CMakeLists.txt | 3 - example/direct_tcpip.c | 2 +- example/tcpip-forward.c | 2 +- nw/GNUmakefile | 8 +-- nw/test/GNUmakefile | 5 +- os400/libssh2_config.h | 6 -- src/CMakeLists.txt | 9 ++- src/agent.c | 4 +- src/blowfish.c | 6 +- src/libssh2_config_cmake.h.in | 4 -- src/libssh2_priv.h | 6 +- tests/CMakeLists.txt | 2 - tests/session_fixture.c | 5 ++ win32/GNUmakefile | 4 +- win32/Makefile.Watcom | 6 +- win32/config.mk | 8 +-- win32/test/GNUmakefile | 4 +- 24 files changed, 58 insertions(+), 132 deletions(-) delete mode 100644 cmake/SocketLibraries.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index cd365776..5dc3be3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,10 @@ install( include(max_warnings) include(FeatureSummary) +if(WIN32) + list(APPEND LIBRARIES ws2_32) +endif() + add_subdirectory(src) option(BUILD_EXAMPLES "Build libssh2 examples" ON) diff --git a/acinclude.m4 b/acinclude.m4 index cc9463a2..e4806b73 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -422,7 +422,9 @@ m4_case([$1], # Not all OpenSSL have AES-CTR functions. libssh2_save_LIBS="$LIBS" - LIBS="$LIBS $LIBSSL" + # Duplicate $LIBS to make binutils ld (known to be fatally + # sensitive to lib order) happy. + LIBS="$LIBS $LIBSSL $LIBS" AC_CHECK_FUNCS(EVP_aes_128_ctr) LIBS="$libssh2_save_LIBS" @@ -462,8 +464,6 @@ m4_case([$1], [wincng], [ # Look for Windows Cryptography API: Next Generation - AC_CHECK_HEADERS([ntdef.h ntstatus.h], [], [], [#include ]) - LIBSSH2_LIB_HAVE_LINKFLAGS([crypt32], [], [ #include #include diff --git a/cmake/CheckFunctionExistsMayNeedLibrary.cmake b/cmake/CheckFunctionExistsMayNeedLibrary.cmake index 8ac61abe..2de0a70e 100644 --- a/cmake/CheckFunctionExistsMayNeedLibrary.cmake +++ b/cmake/CheckFunctionExistsMayNeedLibrary.cmake @@ -69,13 +69,13 @@ function(check_function_exists_may_need_library function variable) # new test check_library_exists(${lib} ${function} "" HAVE_${function}_IN_${lib}) if(HAVE_${function}_IN_${lib}) - set(${variable} 1 CACHE INTERNAL - "Function ${function} found in library ${lib}") - set(NEED_LIB_${UP_LIB} 1 CACHE INTERNAL - "Need to link ${lib}") - break() + set(${variable} 1 CACHE INTERNAL + "Function ${function} found in library ${lib}") + set(NEED_LIB_${UP_LIB} 1 CACHE INTERNAL + "Need to link ${lib}") + break() endif() endforeach() endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/cmake/CheckNonblockingSocketSupport.cmake b/cmake/CheckNonblockingSocketSupport.cmake index 74f4776a..ba771ed2 100644 --- a/cmake/CheckNonblockingSocketSupport.cmake +++ b/cmake/CheckNonblockingSocketSupport.cmake @@ -86,7 +86,7 @@ int main() HAVE_IOCTLSOCKET) if(NOT HAVE_IOCTLSOCKET) - check_c_source_compiles("/* IoctlSocket test (Amiga?) */ + check_c_source_compiles("/* IoctlSocket test (Amiga?) */ #include int main() @@ -97,7 +97,7 @@ int main() HAVE_IOCTLSOCKET_CASE) if(NOT HAVE_IOCTLSOCKET_CASE) - check_c_source_compiles("/* SO_NONBLOCK test (BeOS) */ + check_c_source_compiles("/* SO_NONBLOCK test (BeOS) */ #include int main() @@ -108,12 +108,12 @@ int main() }" HAVE_SO_NONBLOCK) - if(NOT HAVE_SO_NONBLOCK) - # No non-blocking socket method found - set(HAVE_DISABLED_NONBLOCKING 1) - endif() - endif() + if(NOT HAVE_SO_NONBLOCK) + # No non-blocking socket method found + set(HAVE_DISABLED_NONBLOCKING 1) + endif() + endif() endif() endif() endif() -endmacro() \ No newline at end of file +endmacro() diff --git a/cmake/FindLibgcrypt.cmake b/cmake/FindLibgcrypt.cmake index 44a79873..4de3888d 100644 --- a/cmake/FindLibgcrypt.cmake +++ b/cmake/FindLibgcrypt.cmake @@ -50,4 +50,4 @@ include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libgcrypt DEFAULT_MSG LIBGCRYPT_LIBRARY LIBGCRYPT_INCLUDE_DIR) -mark_as_advanced(LIBGCRYPT_INCLUDE_DIR LIBGCRYPT_LIBRARY) \ No newline at end of file +mark_as_advanced(LIBGCRYPT_INCLUDE_DIR LIBGCRYPT_LIBRARY) diff --git a/cmake/SocketLibraries.cmake b/cmake/SocketLibraries.cmake deleted file mode 100644 index bfbbd711..00000000 --- a/cmake/SocketLibraries.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2014 Alexander Lamaison -# -# Redistribution and use in source and binary forms, -# with or without modification, are permitted provided -# that the following conditions are met: -# -# Redistributions of source code must retain the above -# copyright notice, this list of conditions and the -# following disclaimer. -# -# 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. -# -# Neither the name of the copyright holder nor the names -# of any other contributors may be used to endorse or -# promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -# CONTRIBUTORS "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 COPYRIGHT OWNER OR -# CONTRIBUTORS 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. - -# Some systems have their socket functions in a library. -# (Solaris -lsocket/-lnsl, Windows -lws2_32). This macro appends those -# libraries to the given list -macro(append_needed_socket_libraries LIBRARIES_LIST) - if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4) - # x86 Windows uses STDCALL for these functions, so their names are mangled, - # meaning the platform checks don't work. Hardcoding these until we get - # a better solution. - set(HAVE_SOCKET 1) - set(HAVE_SELECT 1) - set(HAVE_INET_ADDR 1) - set(NEED_LIB_WS2_32 1) - else() - check_function_exists_may_need_library(socket HAVE_SOCKET socket ws2_32) - check_function_exists_may_need_library(select HAVE_SELECT ws2_32) - check_function_exists_may_need_library(inet_addr HAVE_INET_ADDR nsl ws2_32) - endif() - - if(NEED_LIB_SOCKET) - list(APPEND ${LIBRARIES_LIST} socket) - endif() - if(NEED_LIB_NSL) - list(APPEND ${LIBRARIES_LIST} nsl) - endif() - if(NEED_LIB_WS2_32) - list(APPEND ${LIBRARIES_LIST} ws2_32) - endif() - -endmacro() \ No newline at end of file diff --git a/cmake/Toolchain-Linux-32.cmake b/cmake/Toolchain-Linux-32.cmake index 6aad9b1e..9535a646 100644 --- a/cmake/Toolchain-Linux-32.cmake +++ b/cmake/Toolchain-Linux-32.cmake @@ -39,4 +39,4 @@ set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR "i386") set(CMAKE_CXX_COMPILER_ARG1 "-m32") -set(CMAKE_C_COMPILER_ARG1 "-m32") \ No newline at end of file +set(CMAKE_C_COMPILER_ARG1 "-m32") diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 3198c4d6..e1fa939d 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -36,7 +36,6 @@ include(CheckIncludeFiles) include(CheckSymbolExists) include(CopyRuntimeDependencies) -include(SocketLibraries) set(EXAMPLES direct_tcpip @@ -63,8 +62,6 @@ set(EXAMPLES subsystem_netconf tcpip-forward) -append_needed_socket_libraries(LIBRARIES) - foreach(example ${EXAMPLES}) add_executable(example-${example} ${example}.c) list(APPEND EXAMPLE_TARGETS example-${example}) diff --git a/example/direct_tcpip.c b/example/direct_tcpip.c index 5fb47026..5261564a 100644 --- a/example/direct_tcpip.c +++ b/example/direct_tcpip.c @@ -206,7 +206,7 @@ int main(int argc, char *argv[]) } sin.sin_family = AF_INET; - sin.sin_port = htons(local_listenport); + sin.sin_port = htons((unsigned short)local_listenport); sin.sin_addr.s_addr = inet_addr(local_listenip); if(INADDR_NONE == sin.sin_addr.s_addr) { perror("inet_addr"); diff --git a/example/tcpip-forward.c b/example/tcpip-forward.c index 6ed4466d..96d3a95c 100644 --- a/example/tcpip-forward.c +++ b/example/tcpip-forward.c @@ -229,7 +229,7 @@ int main(int argc, char *argv[]) } sin.sin_family = AF_INET; - sin.sin_port = htons(local_destport); + sin.sin_port = htons((unsigned short)local_destport); sin.sin_addr.s_addr = inet_addr(local_destip); if(INADDR_NONE == sin.sin_addr.s_addr) { perror("inet_addr"); diff --git a/nw/GNUmakefile b/nw/GNUmakefile index 4098b51f..764ac04b 100644 --- a/nw/GNUmakefile +++ b/nw/GNUmakefile @@ -14,12 +14,12 @@ endif # Edit the path below to point to the base of your Zlib sources. ifndef ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 +ZLIB_PATH = ../../zlib endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-0.9.8zc +OPENSSL_PATH = ../../openssl endif # Edit the path below to point to your Distribution folder. @@ -436,7 +436,6 @@ endif @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@ @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@ @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ - @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@ @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@ @echo $(DL)#define HAVE_LL 1$(DL) >> $@ @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ @@ -447,7 +446,6 @@ endif @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@ @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@ @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@ - @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@ @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@ @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@ @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@ @@ -627,5 +625,3 @@ endif @echo $(DL)$(MAKE) objclean$(DL) @echo $(DL)$(MAKE) test$(DL) @echo $(DL)===========================================================$(DL) - - diff --git a/nw/test/GNUmakefile b/nw/test/GNUmakefile index 86bf6b68..5749a377 100644 --- a/nw/test/GNUmakefile +++ b/nw/test/GNUmakefile @@ -13,12 +13,12 @@ endif # Edit the path below to point to the base of your Zlib sources. ifndef ZLIB_PATH -ZLIB_PATH = ../../../zlib-1.2.8 +ZLIB_PATH = ../../../zlib endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../../openssl-0.9.8zc +OPENSSL_PATH = ../../../openssl endif # Edit the var below to enable static linking of libssh2 and libz @@ -308,4 +308,3 @@ ifdef LDLIBS endif @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@ endif - diff --git a/os400/libssh2_config.h b/os400/libssh2_config.h index 03158130..c77ac80f 100644 --- a/os400/libssh2_config.h +++ b/os400/libssh2_config.h @@ -113,12 +113,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 -/* Define to 1 if you have the header file. */ -#undef HAVE_NTDEF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NTSTATUS_H - /* use O_NONBLOCK for non-blocking sockets */ #define HAVE_O_NONBLOCK 1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c76071e6..a9ae1191 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,7 +40,6 @@ include(CheckIncludeFiles) include(CheckTypeSize) include(CheckSymbolExists) include(CheckNonblockingSocketSupport) -include(SocketLibraries) ## Cryptography backend choice @@ -139,9 +138,6 @@ if(CRYPTO_BACKEND STREQUAL "WinCNG" OR NOT CRYPTO_BACKEND) list(APPEND LIBRARIES bcrypt) list(APPEND PC_LIBS -lbcrypt) - check_include_files(ntdef.h HAVE_NTDEF_H) - check_include_files(ntstatus.h HAVE_NTSTATUS_H) - # Reading keys from files is optional and depends on Wincrypt check_include_files("windows.h;wincrypt.h" HAVE_WINCRYPT_H) @@ -342,7 +338,10 @@ else() check_function_exists(poll HAVE_POLL) endif() -append_needed_socket_libraries(LIBRARIES) +if(WIN32) + set(HAVE_SELECT 1) + list(APPEND PC_LIBS -lws2_32) +endif() # Non-blocking socket support tests. Must be after library tests to # link correctly diff --git a/src/agent.c b/src/agent.c index e3b1ff5b..f1a35825 100644 --- a/src/agent.c +++ b/src/agent.c @@ -279,7 +279,7 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx) HANDLE filemap; unsigned char *p; unsigned char *p2; - int id; + LRESULT id; COPYDATASTRUCT cds; if(!transctx || 4 + transctx->request_len > PAGEANT_MAX_MSGLEN) @@ -292,7 +292,7 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx) "found no pageant"); snprintf(mapname, sizeof(mapname), - "PageantRequest%08x%c", (unsigned)GetCurrentThreadId(), '\0'); + "PageantRequest%08x", (unsigned)GetCurrentThreadId()); filemap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, PAGEANT_MAX_MSGLEN, mapname); diff --git a/src/blowfish.c b/src/blowfish.c index 94bc0c6f..2535e9f5 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -53,10 +53,12 @@ #undef inline #ifdef __GNUC__ +#define inline __inline__ +#elif defined(_MSC_VER) #define inline __inline -#else /* !__GNUC__ */ +#else #define inline -#endif /* !__GNUC__ */ +#endif /* Function for Feistel Networks */ diff --git a/src/libssh2_config_cmake.h.in b/src/libssh2_config_cmake.h.in index 4a915815..da9e68af 100644 --- a/src/libssh2_config_cmake.h.in +++ b/src/libssh2_config_cmake.h.in @@ -47,8 +47,6 @@ #cmakedefine HAVE_SYS_UN_H #cmakedefine HAVE_WS2TCPIP_H #cmakedefine HAVE_WINSOCK2_H -#cmakedefine HAVE_NTDEF_H -#cmakedefine HAVE_NTSTATUS_H /* Libraries */ #cmakedefine HAVE_LIBCRYPT32 @@ -58,10 +56,8 @@ /* Functions */ #cmakedefine HAVE_GETTIMEOFDAY -#cmakedefine HAVE_INET_ADDR #cmakedefine HAVE_POLL #cmakedefine HAVE_SELECT -#cmakedefine HAVE_SOCKET #cmakedefine HAVE_STRTOLL #cmakedefine HAVE_STRTOI64 #cmakedefine HAVE_SNPRINTF diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 0dfe60c8..1274a661 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -121,8 +121,10 @@ #define snprintf _libssh2_snprintf #endif -#ifdef _MSC_VER /* "inline" keyword is valid only with C++ engine! */ +#ifdef __GNUC__ +#define inline __inline__ +#elif defined(_MSC_VER) #define inline __inline #endif @@ -977,7 +979,7 @@ void _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...); #else #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ - defined(__GNUC__) + (defined(__GNUC__) && !defined(__clang__)) /* C99 supported and also by older GCC */ #define _libssh2_debug(x,y,...) do {} while (0) #else diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e7d8da52..54d82db3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -37,7 +37,6 @@ include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckSymbolExists) include(CopyRuntimeDependencies) -include(SocketLibraries) ## Platform checks check_include_files(inttypes.h HAVE_INTTYPES_H) @@ -50,7 +49,6 @@ check_include_files(netinet/in.h HAVE_NETINET_IN_H) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/libssh2_config_cmake.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libssh2_config.h") -append_needed_socket_libraries(LIBRARIES) ## Cryptography backend choice diff --git a/tests/session_fixture.c b/tests/session_fixture.c index f494c7e5..521e60bf 100644 --- a/tests/session_fixture.c +++ b/tests/session_fixture.c @@ -47,6 +47,11 @@ #ifdef WIN32 #include +#ifdef _MSC_VER +#include +#define getcwd _getcwd +#define chdir _chdir +#endif #endif #ifdef HAVE_WINSOCK2_H #include diff --git a/win32/GNUmakefile b/win32/GNUmakefile index 4c74cd35..eaafe233 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -9,12 +9,12 @@ # Edit the path below to point to the base of your Zlib sources. ifndef ZLIB_PATH -ZLIB_PATH = ../../zlib-1.2.8 +ZLIB_PATH = ../../zlib endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../openssl-1.0.2d +OPENSSL_PATH = ../../openssl endif # Edit the path below to point to your Distribution folder. diff --git a/win32/Makefile.Watcom b/win32/Makefile.Watcom index 8aa9d31b..8b39d51c 100644 --- a/win32/Makefile.Watcom +++ b/win32/Makefile.Watcom @@ -64,13 +64,13 @@ CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6 !ifdef %zlib_root ZLIB_ROOT = $(%zlib_root) !else -ZLIB_ROOT = ..\..\zlib-1.2.8 +ZLIB_ROOT = ..\..\zlib !endif !ifdef %openssl_root OPENSSL_ROOT = $(%openssl_root) !else -OPENSSL_ROOT = ..\..\openssl-0.9.8zc +OPENSSL_ROOT = ..\..\openssl !endif !ifdef %use_zlib @@ -186,5 +186,3 @@ $(LINK_ARG): $(__MAKEFILES__) $(LIB_ARG): $(__MAKEFILES__) %create $^@ @for %f in ($(OBJS_STAT)) do @%append $^@ +- %f - - diff --git a/win32/config.mk b/win32/config.mk index 84ee608c..e57f8fe9 100644 --- a/win32/config.mk +++ b/win32/config.mk @@ -1,18 +1,18 @@ # Tweak these for your system !if "$(OPENSSLINC)" == "" -OPENSSLINC=..\openssl-0.9.8zc\inc32 +OPENSSLINC=..\openssl\include !endif !if "$(OPENSSLLIB)" == "" -OPENSSLLIB=..\openssl-0.9.8zc\out32dll +OPENSSLLIB=..\openssl\lib !endif !if "$(ZLIBINC)" == "" -ZLIBINC=..\zlib-1.2.8 +ZLIBINC=..\zlib !endif !if "$(ZLIBLIB)" == "" -ZLIBLIB=..\zlib-1.2.8 +ZLIBLIB=..\zlib !endif !if "$(TARGET)" == "" diff --git a/win32/test/GNUmakefile b/win32/test/GNUmakefile index 8cfedb62..3be0095d 100644 --- a/win32/test/GNUmakefile +++ b/win32/test/GNUmakefile @@ -9,12 +9,12 @@ # Edit the path below to point to the base of your Zlib sources. ifndef ZLIB_PATH -ZLIB_PATH = ../../../zlib-1.2.8 +ZLIB_PATH = ../../../zlib endif # Edit the path below to point to the base of your OpenSSL package. ifndef OPENSSL_PATH -OPENSSL_PATH = ../../../openssl-0.9.8zc +OPENSSL_PATH = ../../../openssl endif # Project root