Applied patch to let gdevcups use automatic memory allocation.

This commit is contained in:
Tim Waugh 2010-09-02 14:42:58 +01:00
parent 92552fba1e
commit d24aadea6e
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,31 @@
diff -up ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache ghostscript-8.71/cups/gdevcups.c
--- ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache 2010-09-02 14:38:53.886818591 +0100
+++ ghostscript-8.71/cups/gdevcups.c 2010-09-02 14:40:49.925943426 +0100
@@ -915,8 +915,7 @@ cups_get_space_params(const gx_device_pr
switch (sscanf(cache_env, "%f%254s", &cache_size, cache_units))
{
case 0 :
- cache_size = 8 * 1024 * 1024;
- break;
+ return;
case 1 :
cache_size *= 4 * CUPS_TILE_SIZE * CUPS_TILE_SIZE;
break;
@@ -933,12 +932,15 @@ cups_get_space_params(const gx_device_pr
}
}
else
- cache_size = 8 * 1024 * 1024;
+ return;
+
+ if (cache_size == 0)
+ return;
dprintf1("DEBUG2: cache_size = %.0f\n", cache_size);
space_params->MaxBitmap = (int)cache_size;
- space_params->BufferSpace = (int)cache_size / 10;
+ space_params->BufferSpace = (int)cache_size;
}

View File

@ -41,6 +41,7 @@ Patch22: ghostscript-SEARCH_HERE_FIRST.patch
Patch23: ghostscript--P-.patch
Patch24: ghostscript-epstopdf-failure.patch
Patch25: ghostscript-bbox-close.patch
Patch26: ghostscript-gdevcups-ripcache.patch
Requires: urw-fonts >= 1.1, ghostscript-fonts
BuildRequires: xz
@ -190,6 +191,10 @@ rm -rf libpng zlib jpeg jasper
# Applied patch to fix NULL dereference in bbox driver (bug #591624).
%patch25 -p1 -b .bbox-close
# Applied patch to let gdevcups use automatic memory allocation. Use
# RIPCache=auto in /etc/cups/cupsd.conf to enable.
%patch26 -p1 -b .gdevcups-ripcache
# Convert manual pages to UTF-8
from8859_1() {
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
@ -379,6 +384,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Sep 2 2010 Tim Waugh <twaugh@redhat.com> 8.71-12
- Applied patch to let gdevcups use automatic memory allocation. Use
RIPCache=auto in /etc/cups/cupsd.conf to enable.
- Applied patch to fix NULL dereference in bbox driver (bug #591624).
- Applied upstream patch to fix iname.c segfault (bug #465311).