1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00

Use libssh2_EXPORTS as an alternative to _WINDLL (#470)

Files: libssh2.h

Notes:
`_WINDLL` is only defined when a Visual Studio CMake generator is used, `libssh2_EXPORTS` is used though for all CMake generator if a shared libssh2 library is being built.

Credit:
Uwe L. Korn
This commit is contained in:
Uwe L. Korn
2021-10-26 18:21:56 +02:00
committed by GitHub
parent d39e9ccc5e
commit 1f0fe7443a

View File

@@ -100,7 +100,7 @@ extern "C" {
/* Allow alternate API prefix from CFLAGS or calling app */
#ifndef LIBSSH2_API
# ifdef LIBSSH2_WIN32
# ifdef _WINDLL
# if defined(_WINDLL) || defined(libssh2_EXPORTS)
# ifdef LIBSSH2_LIBRARY
# define LIBSSH2_API __declspec(dllexport)
# else