Add WITH_SERVER option.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@293 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
parent
fce4840c77
commit
e02a6e0225
@ -58,3 +58,7 @@ if (WITH_SSH1)
|
||||
set(WITH_SSH1 1)
|
||||
endif (WITH_SSH1)
|
||||
|
||||
if (WITH_SERVER)
|
||||
set(WITH_SERVER 1)
|
||||
endif (WITH_SERVER)
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
option(WITH_LIBZ "Build with ZLIB support" ON)
|
||||
option(WITH_SSH1 "Build with SSH1 support" OFF)
|
||||
option(WITH_SERVER "Build with SSH server support" ON)
|
||||
option(WITH_STATIC_LIB "Build with a static library" OFF)
|
||||
|
@ -65,6 +65,9 @@
|
||||
/* Define to 1 if you want to enable SSH1 */
|
||||
#cmakedefine WITH_SSH1 1
|
||||
|
||||
/* Define to 1 if you want to enable server support */
|
||||
#cmakedefine WITH_SERVER 1
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
|
@ -3,18 +3,32 @@ project(libssh-headers C)
|
||||
set(libssh_HDRS
|
||||
libssh.h
|
||||
crypto.h
|
||||
server.h
|
||||
sftp.h
|
||||
ssh1.h
|
||||
ssh2.h
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
install(
|
||||
FILES
|
||||
${libssh_HDRS}
|
||||
DESTINATION
|
||||
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
|
||||
COMPONENT
|
||||
libraries
|
||||
headers
|
||||
)
|
||||
|
||||
if (WITH_SERVER)
|
||||
set(server_HDRS
|
||||
server.h
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${server_HDRS}
|
||||
DESTINATION
|
||||
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
|
||||
COMPONENT
|
||||
libraries
|
||||
)
|
||||
endif (WITH_SERVER)
|
||||
|
||||
|
@ -607,7 +607,7 @@ char *sftp_canonicalize_path(SFTP_SESSION *sftp, const char *path);
|
||||
*/
|
||||
int sftp_server_version(SFTP_SESSION *sftp);
|
||||
|
||||
#ifndef NO_SERVER
|
||||
#ifdef WITH_SERVER
|
||||
/**
|
||||
* @brief Create a new sftp server session.
|
||||
*
|
||||
@ -627,7 +627,7 @@ SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan);
|
||||
* @return 0 on success, < 0 on error.
|
||||
*/
|
||||
int sftp_server_init(SFTP_SESSION *sftp);
|
||||
#endif
|
||||
#endif /* WITH_SERVER */
|
||||
|
||||
/* this is not a public interface */
|
||||
#define SFTP_HANDLES 256
|
||||
|
@ -59,7 +59,7 @@ SFTP_SESSION *sftp_new(SSH_SESSION *session){
|
||||
return sftp;
|
||||
}
|
||||
|
||||
#ifndef NO_SERVER
|
||||
#ifdef WITH_SERVER
|
||||
SFTP_SESSION *sftp_server_new(SSH_SESSION *session, CHANNEL *chan){
|
||||
SFTP_SESSION *sftp=malloc(sizeof(SFTP_SESSION));
|
||||
memset(sftp,0,sizeof(SFTP_SESSION));
|
||||
@ -110,7 +110,7 @@ int sftp_server_init(SFTP_SESSION *sftp){
|
||||
sftp_leave_function();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* WITH_SERVER */
|
||||
|
||||
void sftp_free(SFTP_SESSION *sftp){
|
||||
struct request_queue *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user