build: avoid link failure on at least i386-FreeBSD7.2
authorJim Meyering <meyering@redhat.com>
Sat, 14 May 2011 10:56:08 +0000 (12:56 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 14 May 2011 10:56:08 +0000 (12:56 +0200)
* deflate.c (match_start, prev_length, max_chain_length): Do not
declare these as static.  On some types of system/arch, they are
used via match_.s.
* cfg.mk (_gl_TS_unmarked_extern_vars): Mark those three variables
as known-extern: match_start, prev_length, max_chain_length.

cfg.mk
deflate.c

diff --git a/cfg.mk b/cfg.mk
index 7433015a4e7699a5e0d5ce5469d528ef1eb527a1..39713d15016da9c5aced0fa2b61ee6b02a6ce2d9 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -80,4 +80,5 @@ export _gl_TS_dir = .
 
 # Tell the tight_scope rule that these variables are deliberately "extern".
 export _gl_TS_unmarked_extern_vars = \
-  block_start d_buf inbuf outbuf prev read_buf strstart window
+  block_start d_buf inbuf outbuf prev read_buf strstart window \
+  match_start prev_length max_chain_length
index 461fdda76a55f5fa725558c528e239c03219b4e4..c4a764867a3151848cc2849bbdbe4ad666c7d6c8 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -180,17 +180,17 @@ local unsigned ins_h;  /* hash index of string to be inserted */
  *   H_SHIFT * MIN_MATCH >= HASH_BITS
  */
 
-static unsigned int near prev_length;
+       unsigned int near prev_length;
 /* Length of the best match at previous step. Matches not greater than this
  * are discarded. This is used in the lazy match evaluation.
  */
 
       unsigned near strstart;      /* start of string to insert */
-local unsigned near match_start;   /* start of matching string */
+      unsigned near match_start;   /* start of matching string */
 local int           eofile;        /* flag set at end of input file */
 local unsigned      lookahead;     /* number of valid bytes ahead in window */
 
-static unsigned max_chain_length;
+       unsigned max_chain_length;
 /* To speed up deflation, hash chains are never searched beyond this length.
  * A higher limit improves compression ratio but degrades the speed.
  */