From 33b948cab991cb9ef4834ea02b19cf38623bcc3f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 28 Mar 2009 21:43:53 +0000 Subject: Add an option WITH_LIBZ to compile with zlib support. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@289 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/gzip.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libssh/gzip.c') diff --git a/libssh/gzip.c b/libssh/gzip.c index 0af45f1..74de6f8 100644 --- a/libssh/gzip.c +++ b/libssh/gzip.c @@ -19,17 +19,16 @@ You should have received a copy of the GNU Lesser General Public License along with the SSH Library; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "config.h" #include "libssh/priv.h" -#ifdef HAVE_LIBZ -#undef NO_GZIP -#else -#define NO_GZIP -#endif -#ifndef NO_GZIP +#if defined(HAVE_LIBZ) && defined(WITH_LIBZ) + #include #include #include + #define BLOCKSIZE 4092 static z_stream *initcompress(SSH_SESSION *session,int level){ @@ -42,7 +41,7 @@ static z_stream *initcompress(SSH_SESSION *session,int level){ return stream; } -BUFFER *gzip_compress(SSH_SESSION *session,BUFFER *source,int level){ +static BUFFER *gzip_compress(SSH_SESSION *session,BUFFER *source,int level){ BUFFER *dest; static unsigned char out_buf[BLOCKSIZE]; void *in_ptr=buffer_get(source); @@ -96,7 +95,7 @@ static z_stream *initdecompress(SSH_SESSION *session){ return stream; } -BUFFER *gzip_decompress(SSH_SESSION *session,BUFFER *source){ +static BUFFER *gzip_decompress(SSH_SESSION *session,BUFFER *source){ BUFFER *dest; static unsigned char out_buf[BLOCKSIZE]; void *in_ptr=buffer_get_rest(source); @@ -138,4 +137,5 @@ int decompress_buffer(SSH_SESSION *session,BUFFER *buf){ return 0; } -#endif /* NO_GZIP */ +#endif /* HAVE_LIBZ && WITH_LIBZ */ + -- cgit