summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-19 08:04:54 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-19 08:04:54 +0200
commitb64e11fdc1deab66b8e0c5334fbb8c7eb1d8eb56 (patch)
tree4b9ec90b1fa976011ff8f0eb65dc5bc7dd91f874
parent6f9e0c1090189e9e39e1820f2e2bda5de5f5d078 (diff)
downloadgnutls-b64e11fdc1deab66b8e0c5334fbb8c7eb1d8eb56.tar.gz
Make LZO compression support build.
Tiny patch from Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>.
-rw-r--r--THANKS1
-rw-r--r--lib/gnutls_compress.c13
-rw-r--r--lib/gnutls_compress.h14
-rw-r--r--libextra/gnutls_extra.c7
4 files changed, 18 insertions, 17 deletions
diff --git a/THANKS b/THANKS
index 03d9b945d6..0311b1090b 100644
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@ Matthias Koenig <mkoenig@suse.de>
Christian Grothoff <christian@grothoff.org>
James Westby <jw+debian@jameswestby.net>
Kevin Quick <quick@sparq.org>
+Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
----------------------------------------------------------------------
Copying and distribution of this file, with or without modification,
diff --git a/lib/gnutls_compress.c b/lib/gnutls_compress.c
index 38570e1ec3..038ac57232 100644
--- a/lib/gnutls_compress.c
+++ b/lib/gnutls_compress.c
@@ -89,19 +89,6 @@ _gnutls_m_compressed2plaintext (gnutls_session_t session,
#define MAX_COMP_METHODS 5
const int _gnutls_comp_algorithms_size = MAX_COMP_METHODS;
-struct gnutls_compression_entry
-{
- const char *name;
- gnutls_compression_method_t id;
- int num; /* the number reserved in TLS for the specific compression method */
-
- /* used in zlib compressor */
- int window_bits;
- int mem_level;
- int comp_level;
-};
-typedef struct gnutls_compression_entry gnutls_compression_entry;
-
gnutls_compression_entry _gnutls_compression_algorithms[MAX_COMP_METHODS] = {
GNUTLS_COMPRESSION_ENTRY (GNUTLS_COMP_NULL, 0x00, 0, 0, 0),
#ifdef HAVE_LIBZ
diff --git a/lib/gnutls_compress.h b/lib/gnutls_compress.h
index 789ceb85a0..8a3b2641c2 100644
--- a/lib/gnutls_compress.h
+++ b/lib/gnutls_compress.h
@@ -59,4 +59,18 @@ int _gnutls_decompress (comp_hd_t handle, opaque * compressed,
int _gnutls_compress (comp_hd_t, const opaque * plain, size_t plain_size,
opaque ** compressed, size_t max_comp_size);
+struct gnutls_compression_entry
+{
+ const char *name;
+ gnutls_compression_method_t id;
+ /* the number reserved in TLS for the specific compression method */
+ int num;
+
+ /* used in zlib compressor */
+ int window_bits;
+ int mem_level;
+ int comp_level;
+};
+typedef struct gnutls_compression_entry gnutls_compression_entry;
+
#endif
diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c
index ad42cf3016..5b60e02186 100644
--- a/libextra/gnutls_extra.c
+++ b/libextra/gnutls_extra.c
@@ -35,15 +35,14 @@
# endif
#endif
+#ifdef USE_LZO
+#include <gnutls_compress.h>
/* the number of the compression algorithms available in the compression
* structure.
*/
extern int _gnutls_comp_algorithms_size;
-/* Functions in gnutls that have not been initialized.
- */
-#ifdef USE_LZO
typedef int (*LZO_FUNC) ();
extern LZO_FUNC _gnutls_lzo1x_decompress_safe;
extern LZO_FUNC _gnutls_lzo1x_1_compress;
@@ -86,7 +85,7 @@ _gnutls_add_lzo_comp (void)
static int _gnutls_init_extra = 0;
/**
- * gnutls_global_init_extra - This function initializes the global state of gnutls-extra
+ * gnutls_global_init_extra - initializes the global state of gnutls-extra
*
* This function initializes the global state of gnutls-extra library
* to defaults. Returns zero on success.