From 8ca8fde8a2f94e9446efc5aa68020c0badeecb4d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 7 Oct 2014 20:18:07 +0300 Subject: Fix bug #18650 with warning about zlib when loading url-vars.el. src/decompress.c (init_zlib_functions): Move the message about zlib being unavailable from here... (Fzlib_decompress_region): ...to here. lisp/url/url-http.el (url-http-create-request): Recheck zlib availability on windows-nt each time it might be required. --- src/ChangeLog | 6 ++++++ src/decompress.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index b57c76d5e3f..7a6b38f3b90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-10-07 Eli Zaretskii + + * decompress.c (init_zlib_functions): Move the message about zlib + being unavailable from here... + (Fzlib_decompress_region): ...to here. (Bug#18650) + 2014-10-07 Dmitry Antipov * font.c (Ffont_get_glyphs): Use validate_subarray and fix diff --git a/src/decompress.c b/src/decompress.c index cd8a3d1e962..24ce852245c 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -60,10 +60,7 @@ init_zlib_functions (void) HMODULE library = w32_delayed_load (Qzlib_dll); if (!library) - { - message1 ("zlib library not found"); - return false; - } + return false; LOAD_ZLIB_FN (library, inflateInit2_); LOAD_ZLIB_FN (library, inflate); @@ -150,7 +147,10 @@ This function can be called only in unibyte buffers. */) if (!zlib_initialized) zlib_initialized = init_zlib_functions (); if (!zlib_initialized) - return Qnil; + { + message1 ("zlib library not found"); + return Qnil; + } #endif /* This is a unibyte buffer, so character positions and bytes are -- cgit v1.2.1