From 48b4388ba49ca9f5f1cd8dacf8b644104d5048eb Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 5 Apr 2002 01:23:08 +0000 Subject: hopefully fix 5.x breakage by not using 'stderr' to initialize a global. --- print/ghostscript7/files/patch-src:dviprlib.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 print/ghostscript7/files/patch-src:dviprlib.c (limited to 'print/ghostscript7/files') diff --git a/print/ghostscript7/files/patch-src:dviprlib.c b/print/ghostscript7/files/patch-src:dviprlib.c new file mode 100644 index 0000000..1fc25e4 --- /dev/null +++ b/print/ghostscript7/files/patch-src:dviprlib.c @@ -0,0 +1,23 @@ +--- 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); -- cgit v1.1