X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gas%2Fcompress-debug.c;h=c6f5252a699ad9dcce2df28c9c44480fc8c168c0;hb=4ec9d7d56427e9fa49fd705599bb2ff0c3c5f3c1;hp=c2a8d3d51d08d2b6afd40ccb328ad4f4e9a54859;hpb=79197521139198c6ad50a150eacd32961816953f;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/compress-debug.c b/gas/compress-debug.c index c2a8d3d51d..c6f5252a69 100644 --- a/gas/compress-debug.c +++ b/gas/compress-debug.c @@ -1,5 +1,5 @@ /* compress-debug.c - compress debug sections - Copyright 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -18,25 +18,17 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" #include - +#include #include "ansidecl.h" - -#include "config.h" #include "compress-debug.h" -#ifdef HAVE_ZLIB_H -#include -#endif - /* Initialize the compression engine. */ struct z_stream_s * compress_init (void) { -#ifndef HAVE_ZLIB_H - return NULL; -#else static struct z_stream_s strm; strm.zalloc = NULL; @@ -44,22 +36,15 @@ compress_init (void) strm.opaque = NULL; deflateInit (&strm, Z_DEFAULT_COMPRESSION); return &strm; -#endif /* HAVE_ZLIB_H */ } /* Stream the contents of a frag to the compression engine. Output from the engine goes into the current frag on the obstack. */ int -compress_data (struct z_stream_s *strm ATTRIBUTE_UNUSED, - const char **next_in ATTRIBUTE_UNUSED, - int *avail_in ATTRIBUTE_UNUSED, - char **next_out ATTRIBUTE_UNUSED, - int *avail_out ATTRIBUTE_UNUSED) +compress_data (struct z_stream_s *strm, const char **next_in, + int *avail_in, char **next_out, int *avail_out) { -#ifndef HAVE_ZLIB_H - return -1; -#else int out_size = 0; int x; @@ -79,7 +64,6 @@ compress_data (struct z_stream_s *strm ATTRIBUTE_UNUSED, *avail_out = strm->avail_out; return out_size; -#endif /* HAVE_ZLIB_H */ } /* Finish the compression and consume the remaining compressed output. @@ -87,14 +71,9 @@ compress_data (struct z_stream_s *strm ATTRIBUTE_UNUSED, needed. */ int -compress_finish (struct z_stream_s *strm ATTRIBUTE_UNUSED, - char **next_out ATTRIBUTE_UNUSED, - int *avail_out ATTRIBUTE_UNUSED, - int *out_size ATTRIBUTE_UNUSED) +compress_finish (struct z_stream_s *strm, char **next_out, + int *avail_out, int *out_size) { -#ifndef HAVE_ZLIB_H - return -1; -#else int x; strm->avail_in = 0; @@ -115,5 +94,4 @@ compress_finish (struct z_stream_s *strm ATTRIBUTE_UNUSED, if (strm->avail_out != 0) return -1; return 1; -#endif /* HAVE_ZLIB_H */ }