1
1

removed conditional sources from Makefile.inc

added ifdef blocks to libgcrypt.c, pem.c, openssl.c
Этот коммит содержится в:
Guenter Knauf 2009-09-07 18:10:49 +02:00
родитель 766127ad57
Коммит 7c32c84d0e
4 изменённых файлов: 15 добавлений и 7 удалений

Просмотреть файл

@ -1,11 +1,5 @@
CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \ CSOURCES = channel.c comp.c crypt.c hostkey.c kex.c mac.c misc.c \
packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \ packet.c publickey.c scp.c session.c sftp.c userauth.c transport.c \
version.c knownhost.c version.c knownhost.c openssl.c libgcrypt.c pem.c
ifdef LIBGCRYPT
CSOURCES += libgcrypt.c pem.c
else
CSOURCES += openssl.c
endif
HHEADERS = libssh2_priv.h openssl.h libgcrypt.h transport.h channel.h comp.h mac.h misc.h HHEADERS = libssh2_priv.h openssl.h libgcrypt.h transport.h channel.h comp.h mac.h misc.h

Просмотреть файл

@ -37,6 +37,9 @@
*/ */
#include "libssh2_priv.h" #include "libssh2_priv.h"
#ifdef LIBSSH2_LIBGCRYPT /* compile only if we build with libgcrypt */
#include <string.h> #include <string.h>
int int
@ -572,3 +575,5 @@ _libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx,
} }
return ret; return ret;
} }
#endif /* LIBSSH2_LIBGCRYPT */

Просмотреть файл

@ -37,6 +37,9 @@
*/ */
#include "libssh2_priv.h" #include "libssh2_priv.h"
#ifndef LIBSSH2_LIBGCRYPT /* compile only if we build with OpenSSL */
#include <string.h> #include <string.h>
#ifndef EVP_MAX_BLOCK_LENGTH #ifndef EVP_MAX_BLOCK_LENGTH
@ -337,3 +340,5 @@ _libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
return 0; return 0;
} }
#endif /* !LIBSSH2_LIBGCRYPT */

Просмотреть файл

@ -38,6 +38,8 @@
#include "libssh2_priv.h" #include "libssh2_priv.h"
#ifdef LIBSSH2_LIBGCRYPT /* compile only if we build with libgcrypt */
static int static int
readline(char *line, int line_size, FILE * fp) readline(char *line, int line_size, FILE * fp)
{ {
@ -207,3 +209,5 @@ _libssh2_pem_decode_integer(unsigned char **data, unsigned int *datalen,
return 0; return 0;
} }
#endif /* LIBSSH2_LIBGCRYPT */