From owner-freebsd-ports@FreeBSD.ORG Mon Jun 11 19:53:45 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 541B416A468 for ; Mon, 11 Jun 2007 19:53:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id F17E113C448 for ; Mon, 11 Jun 2007 19:53:44 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5DE10.dip.t-dialin.net [84.165.222.16]) by redbull.bpaserver.net (Postfix) with ESMTP id 5E12C2E1E1 for ; Mon, 11 Jun 2007 21:53:25 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id EFABC5B490D for ; Mon, 11 Jun 2007 20:34:27 +0200 (CEST) Date: Mon, 11 Jun 2007 20:35:00 +0200 From: Alexander Leidinger To: freebsd-ports@freebsd.org Message-ID: <20070611203500.6d0d4238@deskjail> In-Reply-To: <20070607200602.35a0ee2a@deskjail> References: <20070607200602.35a0ee2a@deskjail> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=MP_+eRwfVrMvhuumfY5MPARDN6 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=4.378, required 8, BAYES_20 1.00, DKIM_POLICY_SIGNSOME 0.00, J_CHICKENPOX_13 0.60, J_CHICKENPOX_45 0.60, RDNS_DYNAMIC 0.10, TW_CV 0.08, US_8BIT 2.00) X-BPAnet-MailScanner-SpamScore: ssss X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Subject: Re: fix for ghostscript gpl on current? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2007 19:53:45 -0000 --MP_+eRwfVrMvhuumfY5MPARDN6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Quoting Alexander Leidinger (Thu, 7 Jun 2007 20:06:02 +0200): > Hi, > > does someone has a fix for the illegal instruction problem (gcc inserts > an illegal instruction instead of bailing out with an error on some > special kind of bad C code) with ghostscript gpl on current? As nobody seems to have the same problem here's the patch (maybe crude but "quick") for the archives in case someone needs it too. Bye, Alexander. -- Other people's romantic gestures seem novel and exciting. Your own romantic gestures seem fooolish and clumsy. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 --MP_+eRwfVrMvhuumfY5MPARDN6 Content-Type: text/x-patch; name=patch-gs-typepunning Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename=patch-gs-typepunning --- ./src/ttfmain.c.orig Mon Jun 11 19:53:06 2007 +++ ./src/ttfmain.c Mon Jun 11 19:53:09 2007 @@ -141,19 +141,23 @@ int ttfInterpreter__obtain(ttfMemory *mem, ttfInterpreter **ptti) { ttfInterpreter *tti; + void * temp_var; if (*ptti) { (*ptti)->lock++; return 0; } - tti = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)&st_ttfInterpreter, "ttfInterpreter__obtain"); + + temp_var = &st_ttfInterpreter; + tti = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)temp_var, "ttfInterpreter__obtain"); if (!tti) return fMemoryError; tti->usage = 0; tti->usage_size = 0; tti->ttf_memory = mem; tti->lock = 1; - tti->exec = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)&st_TExecution_Context, "ttfInterpreter__obtain"); + temp_var = &st_TExecution_Context; + tti->exec = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)temp_var, "ttfInterpreter__obtain"); if (!tti->exec) { mem->free(mem, tti, "ttfInterpreter__obtain"); return fMemoryError; @@ -225,6 +229,7 @@ TT_Instance I; ttfMemory *mem = tti->ttf_memory; F26Dot6 ww, hh; + void *temp_var; this->tti = tti; this->design_grid = design_grid; @@ -297,7 +302,8 @@ return fMemoryError; tti->usage_size = this->nMaxComponents * MAX_SUBGLYPH_NESTING; } - this->face = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)&st_TFace, "ttfFont__Open"); + temp_var = &st_TFace; + this->face = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)temp_var, "ttfFont__Open"); if (this->face == NULL) return fMemoryError; memset(this->face, 0, sizeof(*this->face)); @@ -310,7 +316,8 @@ code = r->Error(r); if (code < 0) return fBadFontData; - this->inst = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)&st_TInstance, "ttfFont__Open"); + temp_var = &st_TInstance; + this->inst = mem->alloc_struct(mem, (const ttfMemoryDescriptor *)temp_var, "ttfFont__Open"); if (this->inst == NULL) return fMemoryError; memset(this->inst, 0, sizeof(*this->inst)); --- ./src/gdevpdfd.c.orig Mon Jun 11 19:53:18 2007 +++ ./src/gdevpdfd.c Mon Jun 11 19:53:54 2007 @@ -833,6 +833,7 @@ gs_id id = gs_next_ids(cvd->mdev.memory, 1); cos_value_t v; const pdf_resource_t *pres; + void *temp_var; memset(&s, 0, sizeof(s)); s.ctm.xx = cvd->m.xx; @@ -842,7 +843,8 @@ s.ctm.tx = cvd->m.tx; s.ctm.ty = cvd->m.ty; memset(&inst, 0, sizeof(inst)); - inst.saved = (gs_state *)&s; /* HACK : will use s.ctm only. */ + temp_var = &s; + inst.saved = (gs_state *)temp_var; /* HACK : will use s.ctm only. */ inst.template.PaintType = 1; inst.template.TilingType = 1; inst.template.BBox.p.x = inst.template.BBox.p.y = 0; --- ./src/gdevpdfi.c.orig Mon Jun 11 19:54:05 2007 +++ ./src/gdevpdfi.c Mon Jun 11 19:58:52 2007 @@ -922,6 +922,7 @@ cos_value_t v; const pdf_resource_t *pres; int code; + void *temp_var; memset(&s, 0, sizeof(s)); s.ctm.xx = pmat->xx; @@ -931,7 +932,8 @@ s.ctm.tx = pmat->tx; s.ctm.ty = pmat->ty; memset(&inst, 0, sizeof(inst)); - inst.saved = (gs_state *)&s; /* HACK : will use s.ctm only. */ + temp_var = &s; + inst.saved = (gs_state *)temp_var; /* HACK : will use s.ctm only. */ inst.template.PaintType = 1; inst.template.TilingType = 1; inst.template.BBox.p.x = inst.template.BBox.p.y = 0; --- ./src/gdevplnx.c.orig Mon Jun 11 19:59:11 2007 +++ ./src/gdevplnx.c Mon Jun 11 20:02:41 2007 @@ -549,8 +549,8 @@ if (lop != lop_orig) { lopis = *pis; - gs_set_logical_op((gs_state *)&lopis, lop); pis_draw = &lopis; + gs_set_logical_op((gs_state *)pis_draw, lop); } return dev_proc(plane_dev, fill_path) (plane_dev, pis_draw, ppath, params, &dcolor, pcpath); @@ -582,8 +582,8 @@ if (lop != lop_orig) { lopis = *pis; - gs_set_logical_op((gs_state *)&lopis, lop); pis_draw = &lopis; + gs_set_logical_op((gs_state *)pis_draw, lop); } return dev_proc(plane_dev, stroke_path) (plane_dev, pis_draw, ppath, params, &dcolor, pcpath); --MP_+eRwfVrMvhuumfY5MPARDN6--