diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-08-11 15:38:49 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-08-11 15:38:49 +0200 |
commit | 5e4bc6ec7947a403da3b1989c39accf16449f601 (patch) | |
tree | 7fe4acd3fcdc86a51664bdde4478fe5b534bc3e4 /libssh | |
parent | f3612879a8c8ceabd4c1ed85839b8f58d11f9ed1 (diff) | |
download | libssh-5e4bc6ec7947a403da3b1989c39accf16449f601.tar.gz libssh-5e4bc6ec7947a403da3b1989c39accf16449f601.tar.xz libssh-5e4bc6ec7947a403da3b1989c39accf16449f601.zip |
Fix compilation with MSVC and use declspec to export functions.
Thanks to Patrick Spendrin <ps_ml@gmx.de> for all the MSVC fixes.
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/CMakeLists.txt | 17 | ||||
-rw-r--r-- | libssh/channels.c | 2 | ||||
-rw-r--r-- | libssh/libssh.def | 208 |
3 files changed, 8 insertions, 219 deletions
diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt index fa8eb41..83469f3 100644 --- a/libssh/CMakeLists.txt +++ b/libssh/CMakeLists.txt @@ -136,13 +136,6 @@ if (WITH_SERVER) ) endif (WITH_SERVER) -if (MSVC) - set(libssh_SRCS - ${libssh_SRCS} - libssh.def - ) -endif (MSVC) - include_directories( ${LIBSSH_PUBLIC_INCLUDE_DIRS} ${LIBSSH_PRIVATE_INCLUDE_DIRS} @@ -161,6 +154,8 @@ set_target_properties( ${LIBRARY_SOVERSION} OUTPUT_NAME ssh + DEFINE_SYMBOL + SSH_EXPORTS ) if (UNIX AND CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -175,10 +170,10 @@ endif (UNIX AND CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug install( TARGETS ${LIBSSH_SHARED_LIBRARY} - DESTINATION - ${LIB_INSTALL_DIR} - COMPONENT - libraries + RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + COMPONENT libraries ) if (WITH_STATIC_LIB) diff --git a/libssh/channels.c b/libssh/channels.c index c603d7a..c006d24 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -1335,6 +1335,7 @@ error: return rc; } +#ifndef _WIN32 /** * @brief Accept an X11 forwarding channel. * @@ -1372,6 +1373,7 @@ ssh_channel channel_accept_x11(ssh_channel channel, int timeout_ms) { return NULL; } +#endif /** * @brief Set environement variables. diff --git a/libssh/libssh.def b/libssh/libssh.def deleted file mode 100644 index 7b0ea79..0000000 --- a/libssh/libssh.def +++ /dev/null @@ -1,208 +0,0 @@ -LIBRARY libssh -EXPORTS -buffer_free -buffer_get -buffer_get_len -buffer_new -channel_change_pty_size -channel_close -channel_free -channel_get_exit_status -channel_get_session -channel_is_closed -channel_is_eof -channel_is_open -channel_new -channel_open_forward -channel_open_session -channel_poll -channel_read -channel_read_buffer -channel_read_nonblocking -channel_request_env -channel_request_exec -channel_request_pty -channel_request_pty_size -channel_request_sftp -channel_request_shell -channel_request_subsystem -channel_request_x11 -channel_accept_x11 -channel_select -channel_send_eof -channel_set_blocking -channel_write -channel_write_stderr -privatekey_free -privatekey_from_file -publickey_free -publickey_from_file -publickey_from_privatekey -publickey_to_string -sftp_async_read -sftp_async_read_begin -sftp_attributes_free -sftp_canonicalize_path -sftp_chmod -sftp_chown -sftp_close -sftp_closedir -sftp_dir_eof -sftp_extensions_get_count -sftp_extensions_get_data -sftp_extensions_get_name -sftp_file_set_blocking -sftp_file_set_nonblocking -sftp_free -sftp_fstat -sftp_get_error -sftp_init -sftp_lstat -sftp_mkdir -sftp_new -sftp_open -sftp_opendir -sftp_read -sftp_readdir -sftp_readlink -sftp_rename -sftp_rewind -sftp_rmdir -sftp_seek -sftp_seek64 -sftp_server_init -sftp_server_new -sftp_server_version -sftp_setstat -sftp_stat -sftp_symlink -sftp_tell -sftp_tell64 -sftp_unlink -sftp_utimes -sftp_write -ssh_accept -ssh_auth_list -ssh_bind_accept -ssh_bind_fd_toaccept -ssh_bind_free -ssh_bind_get_fd -ssh_bind_listen -ssh_bind_new -ssh_bind_set_blocking -ssh_bind_set_fd -ssh_bind_set_options -ssh_clean_pubkey_hash -ssh_connect -ssh_copyright -ssh_disconnect -ssh_finalize -ssh_get_disconnect_message -ssh_get_error -ssh_get_error_code -ssh_get_fd -ssh_get_hexa -ssh_get_issue_banner -ssh_get_openssh_version -ssh_get_pubkey -ssh_get_pubkey_hash -ssh_get_random -ssh_get_status -ssh_get_version -ssh_init -ssh_is_server_known -ssh_log -ssh_message_auth_password -ssh_message_auth_publickey -ssh_message_auth_reply_pk_ok -ssh_message_auth_reply_success -ssh_message_auth_set_methods -ssh_message_auth_user -ssh_message_channel_request_channel -ssh_message_channel_request_command -ssh_message_channel_request_env_name -ssh_message_channel_request_env_value -ssh_message_channel_request_open_destination -ssh_message_channel_request_open_destination_port -ssh_message_channel_request_open_originator -ssh_message_channel_request_open_originator_port -ssh_message_channel_request_open_reply_accept -ssh_message_channel_request_pty_height -ssh_message_channel_request_pty_pxheight -ssh_message_channel_request_pty_pxwidth -ssh_message_channel_request_pty_term -ssh_message_channel_request_pty_width -ssh_message_channel_request_reply_success -ssh_message_channel_request_subsystem -ssh_message_free -ssh_message_get -ssh_message_reply_default -ssh_message_retrieve -ssh_message_service_reply_success -ssh_message_service_service -ssh_message_subtype -ssh_message_type -ssh_new -ssh_options_allow_ssh1 -ssh_options_allow_ssh2 -ssh_options_copy -ssh_options_free -ssh_options_getopt -ssh_options_new -ssh_options_set_auth_callback -ssh_options_set_banner -ssh_options_set_bind -ssh_options_set_dsa_server_key -ssh_options_set_fd -ssh_options_set_host -ssh_options_set_identity -ssh_options_set_known_hosts_file -ssh_options_set_log_function -ssh_options_set_log_verbosity -ssh_options_set_port -ssh_options_set_rsa_server_key -ssh_options_set_ssh_dir -ssh_options_set_status_callback -ssh_options_set_timeout -ssh_options_set_username -ssh_options_set_wanted_algos -ssh_print_hexa -ssh_scp_close -ssh_scp_free -ssh_scp_init -ssh_scp_new -ssh_scp_push_file -ssh_scp_write -ssh_select -ssh_service_request -ssh_set_blocking -ssh_set_fd_except -ssh_set_fd_toread -ssh_set_fd_towrite -ssh_set_message_callback -ssh_set_options -ssh_silent_disconnect -ssh_userauth_agent_pubkey -ssh_userauth_autopubkey -ssh_userauth_kbdint -ssh_userauth_kbdint_getinstruction -ssh_userauth_kbdint_getname -ssh_userauth_kbdint_getnprompts -ssh_userauth_kbdint_getprompt -ssh_userauth_kbdint_setanswer -ssh_userauth_list -ssh_userauth_none -ssh_userauth_offer_pubkey -ssh_userauth_password -ssh_userauth_pubkey -ssh_version -ssh_write_knownhost -string_burn -string_copy -string_data -string_fill -string_free -string_from_char -string_len -string_new -string_to_char |