summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2004-05-13 08:27:37 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2004-05-13 08:27:37 +0000
commit0a8b936bd02cd6b04f87c9a179532ac8d22655ff (patch)
tree678b7febcb54ab2f80648a05d9a1bd4e48189412 /lib
parent962b647a10e13a2098d81faaccca9e4363477c64 (diff)
downloadgnutls-0a8b936bd02cd6b04f87c9a179532ac8d22655ff.tar.gz
some fixes in the compilation system.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnutls_compress_int.c23
-rw-r--r--lib/gnutls_handshake.c3
-rw-r--r--lib/gnutls_priority.c2
3 files changed, 19 insertions, 9 deletions
diff --git a/lib/gnutls_compress_int.c b/lib/gnutls_compress_int.c
index 9b98ca84be..2b83f92d4d 100644
--- a/lib/gnutls_compress_int.c
+++ b/lib/gnutls_compress_int.c
@@ -24,20 +24,24 @@
#include <gnutls_compress.h>
#include <gnutls_algorithms.h>
#include "gnutls_errors.h"
-#ifdef USE_MINILZO
-# include "../libextra/minilzo.h" /* get the prototypes only.
+
+#ifdef USE_LZO
+# ifdef USE_MINILZO
+# include "../libextra/minilzo.h" /* get the prototypes only.
* Since LZO is a GPLed library, the gnutls_global_init_extra() has
* to be called, before LZO compression can be used.
*/
-#else
-# include <lzo1x.h>
-#endif
+# else
+# include <lzo1x.h>
+# endif
typedef int (*LZO_FUNC)();
LZO_FUNC _gnutls_lzo1x_decompress_safe = NULL;
LZO_FUNC _gnutls_lzo1x_1_compress = NULL;
+#endif
+
/* The flag d is the direction (compress, decompress). Non zero is
* decompress.
*/
@@ -93,6 +97,7 @@ int err;
break;
}
#endif
+#ifdef USE_LZO
case GNUTLS_COMP_LZO:
if (d) /* LZO does not use memory on decompressor */
{ /* ret->handle = NULL; */ }
@@ -108,6 +113,7 @@ int err;
}
break;
+#endif
}
return ret;
}
@@ -147,6 +153,7 @@ int err;
*/
switch( handle->algo) {
+#ifdef USE_LZO
case GNUTLS_COMP_LZO: {
lzo_uint out_len;
size_t size;
@@ -172,7 +179,8 @@ int err;
compressed_size = out_len;
break;
- }
+ }
+#endif
#ifdef HAVE_LIBZ
case GNUTLS_COMP_DEFLATE: {
uLongf size;
@@ -238,6 +246,7 @@ int cur_pos;
*/
switch(handle->algo) {
+#ifdef USE_LZO
case GNUTLS_COMP_LZO: {
lzo_uint out_size;
lzo_uint new_size;
@@ -272,7 +281,7 @@ int cur_pos;
plain_size = new_size;
break;
}
-
+#endif
#ifdef HAVE_LIBZ
case GNUTLS_COMP_DEFLATE: {
uLongf out_size;
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index cf4d3e5398..2cbe9a688f 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -2377,7 +2377,7 @@ inline static int check_server_params( gnutls_session session, gnutls_kx_algorit
if (remove == 1) return 1;
-
+#ifdef ENABLE_ANON
} else if ( cred_type == GNUTLS_CRD_ANON) {
anon_cred =
_gnutls_get_cred(session->key, cred_type, NULL);
@@ -2385,6 +2385,7 @@ inline static int check_server_params( gnutls_session session, gnutls_kx_algorit
if (anon_cred != NULL) {
dh_params = _gnutls_anon_get_dh_params(anon_cred, session);
}
+#endif
} else return 0; /* no need for params */
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index 3a6a6d9907..7a39b827a1 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -191,7 +191,7 @@ int gnutls_protocol_set_priority(gnutls_session session, const int *list)
int gnutls_certificate_type_set_priority(gnutls_session session,
const int *list)
{
-#ifdef HAVE_LIBOPENCDK
+#ifdef USE_OPENPGP
int num = 0, i;