ghostscript/ghostscript-runlibfileifexists.patch
2007-11-30 09:03:51 +00:00

27 lines
989 B
Diff

diff -up ghostscript-8.61/lib/gs_init.ps.runlibfileifexists ghostscript-8.61/lib/gs_init.ps
--- ghostscript-8.61/lib/gs_init.ps.runlibfileifexists 2007-10-31 17:00:55.000000000 +0000
+++ ghostscript-8.61/lib/gs_init.ps 2007-11-30 09:02:19.000000000 +0000
@@ -671,6 +671,14 @@ systemdict /internaldict dup .makeintern
{ /undefinedfilename signalerror }
ifelse
} bind def
+/runlibfileifexists
+ { % We don't want to bind 'run' into this procedure,
+ % since run may get redefined.
+ findlibfile
+ { exch pop /run .systemvar exec }
+ { pop }
+ ifelse
+ } bind def
/selectdevice
{ finddevice setdevice .setdefaultscreen } bind def
/signalerror % <object> <errorname> signalerror -
@@ -839,6 +847,7 @@ userdict /.currentresourcefile //null pu
} bind def
% Temporarily substitute it for the real runlibfile.
/.runlibfile /runlibfile load def
+/.runlibfileifexists /runlibfile load def
/runlibfile /runlibfile0 load def
% Create the error handling machinery.