From owner-freebsd-ports Thu Apr 4 11:26:45 2002 Delivered-To: freebsd-ports@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 10CC237B416; Thu, 4 Apr 2002 11:24:25 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id E230EAE1FE; Thu, 4 Apr 2002 11:24:24 -0800 (PST) Date: Thu, 4 Apr 2002 11:24:24 -0800 From: Alfred Perlstein To: ports@FreeBSD.org Cc: kris@freebsd.org Subject: ghostscript-gnu fix Message-ID: <20020404192424.GN93885@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org this unbreaks ghostscript-gnu for 5.x, it looks correct, but this is untested. patch-src:dviprlib.c: --- src/dviprlib.c.orig Tue May 13 00:14:09 1997 +++ src/dviprlib.c Thu Apr 4 03:18:57 2002 @@ -1433,7 +1433,8 @@ char *dviprt_prtcodename[] = { CFG_PRTCODE_NAME, NULL }; char *dviprt_encodename[] = { CFG_ENCODE_NAME, NULL }; -private FILE *dviprt_messagestream = stderr; +private FILE *dviprt_messagestream; +private int dviprt_messagestream_init; /*--- library functions ---*/ int @@ -1505,6 +1506,10 @@ liblocal int dviprt_printmessage(char *str,int len) { + if (!dviprt_messagestream_init) { + dviprt_messagestream = stderr; + dviprt_messagestream_init = 1; + } if (dviprt_messagestream && str) { if (len >= 0) fwrite(str,len,1,dviprt_messagestream); else fputs(str,dviprt_messagestream); -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message