diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2015-08-24 17:38:15 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2015-08-25 09:10:57 +0100 |
commit | 8fcea1fef23c45a81ad5d13a5e3afd5662e0efef (patch) | |
tree | 7149c397dfa1e571c799d67bf66e5c3a2183da27 /base | |
parent | a32ece5ee924a6a4a581f7e6dd298f9d9af6d475 (diff) | |
download | ghostpdl-8fcea1fef23c45a81ad5d13a5e3afd5662e0efef.tar.gz |
Bug 696126 (2): PCL/XPS should (sort of) ignore COMPILE_INITS (for now)
As the PCL and XPS exes *must* have the icc profiles available in a romfs, they
will paretially ignore the COMPILE_INITS setting, and always use a rom file
system for the ICC profiles. COMPILE_INITS=0 will cause PCL to not include
it's fonts in the romfs.
This means always including the romfs I/O code in the graphics library, then
building an empty romfs into Ghostscript for COMPILE_INITS=0, and the romfs i/o
will now return gs_error_unregistered from its file_status method if
the empty romfs is found (identified by gs_romfs_buildtime being zero).
No cluster differences.
Diffstat (limited to 'base')
-rw-r--r-- | base/gs.mak | 5 | ||||
-rw-r--r-- | base/gsiorom.c | 8 | ||||
-rw-r--r-- | base/gsromfs0.c | 4 | ||||
-rw-r--r-- | base/lib.mak | 70 |
4 files changed, 67 insertions, 20 deletions
diff --git a/base/gs.mak b/base/gs.mak index 388107ff4..ae3a9b9dd 100644 --- a/base/gs.mak +++ b/base/gs.mak @@ -393,7 +393,7 @@ DEVICE_DEVS_ALL=$(DEVICE_DEVS) $(DEVICE_DEVS1) \ $(DEVICE_DEVS10) $(DEVICE_DEVS11) $(DEVICE_DEVS12) $(DEVICE_DEVS13) \ $(DEVICE_DEVS14) $(DEVICE_DEVS15) $(DEVICE_DEVS16) $(DEVICE_DEVS17) \ $(DEVICE_DEVS18) $(DEVICE_DEVS19) $(DEVICE_DEVS20) $(DEVICE_DEVS21) \ - $(DEVICE_DEVS_EXTRA) $(GLD)romfs$(COMPILE_INITS).dev + $(DEVICE_DEVS_EXTRA) PSI_DEVS_ALL=$(GSPLAT_DEVS_ALL) \ $(PSI_FEATURE_DEVS) \ @@ -419,7 +419,7 @@ DEVS_ALL=$(GLGENDIR)$(D)$(GSPLATFORM).dev\ $(DEVICE_DEVS10) $(DEVICE_DEVS11) $(DEVICE_DEVS12) $(DEVICE_DEVS13) \ $(DEVICE_DEVS14) $(DEVICE_DEVS15) $(DEVICE_DEVS16) $(DEVICE_DEVS17) \ $(DEVICE_DEVS18) $(DEVICE_DEVS19) $(DEVICE_DEVS20) $(DEVICE_DEVS21) \ - $(DEVICE_DEVS_EXTRA) $(GLD)romfs$(COMPILE_INITS).dev + $(DEVICE_DEVS_EXTRA) $(GLGENDIR)$(D)fdevs.tr: $(GS_MAK) $(TOP_MAKEFILES) $(ECHOGS_XE) $(GSPLAT_DEVS_ALL) $(FEATURE_DEVS) @@ -451,7 +451,6 @@ $(GLGENDIR)$(D)devdevs.tr: $(GS_MAK) $(TOP_MAKEFILES) $(ECHOGS_XE) $(DEVICE_DEVS $(EXP)$(ECHOGS_XE) -a $(GLGENDIR)$(D)devdevs.tr -+ $(DEVICE_DEVS20) $(EXP)$(ECHOGS_XE) -a $(GLGENDIR)$(D)devdevs.tr -+ $(DEVICE_DEVS21) $(EXP)$(ECHOGS_XE) -a $(GLGENDIR)$(D)devdevs.tr -+ $(DEVICE_DEVS_EXTRA) - $(EXP)$(ECHOGS_XE) -a $(GLGENDIR)$(D)devdevs.tr -+ $(GLD)romfs$(COMPILE_INITS).dev $(EXP)$(ECHOGS_XE) -a $(GLGENDIR)$(D)devdevs.tr - $(GLGENDIR)$(D)libcore devs_tr=$(GLGENDIR)$(D)devs.tr diff --git a/base/gsiorom.c b/base/gsiorom.c index ca4a90cbe..1f15593c8 100644 --- a/base/gsiorom.c +++ b/base/gsiorom.c @@ -308,6 +308,14 @@ romfs_file_status(gx_io_device * iodev, const char *fname, struct stat *pstat) char *filename; uint namelen = strlen(fname); + /* a build time of zero indicates we have the "dummy" romfs + * used when COMPILE_INITS==0 - returning a specific error here + * gives us a quick way to check for that. + */ + if (gs_romfs_buildtime == (time_t)0) { + return_error(gs_error_unregistered); + } + memset(pstat, 0, sizeof(struct stat)); /* scan the inodes to find the requested file */ for (i=0; node_scan != 0; i++, node_scan = gs_romfs[i]) { diff --git a/base/gsromfs0.c b/base/gsromfs0.c index 3129067df..f817e8355 100644 --- a/base/gsromfs0.c +++ b/base/gsromfs0.c @@ -18,5 +18,9 @@ #include "stdint_.h" +#include "time_.h" + + time_t gs_romfs_buildtime = 0; + uint32_t *gs_romfs[] = { 0 }; diff --git a/base/lib.mak b/base/lib.mak index 3d059d617..e5c00ab58 100644 --- a/base/lib.mak +++ b/base/lib.mak @@ -1358,7 +1358,7 @@ LIB_ALL=$(LIBs) $(LIBx) $(LIBd) # but not in the link, to catch compilation problems. LIB_O=$(GLOBJ)gdevmpla.$(OBJ) $(GLOBJ)gdevmrun.$(OBJ) $(GLOBJ)gshtx.$(OBJ) $(GLOBJ)gsnogc.$(OBJ) $(GLD)libs.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIBs) $(LIB_O) $(GLD)gsiodevs.dev $(GLD)translib.dev \ - $(GLD)clist.dev $(GLD)gxfapi.dev $(MAKEDIRS) + $(GLD)clist.dev $(GLD)gxfapi.dev $(GLD)romfs1.dev $(MAKEDIRS) $(SETMOD) $(GLD)libs $(LIB0s) $(ADDMOD) $(GLD)libs $(LIB1s) $(ADDMOD) $(GLD)libs $(LIB2s) @@ -1379,6 +1379,7 @@ $(GLD)libs.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIBs) $(LIB_O) $(GLD)gsiodevs.dev $(G $(ADDMOD) $(GLD)libs -include $(GLD)gsiodevs $(ADDMOD) $(GLD)libs -include $(GLD)translib $(ADDMOD) $(GLD)libs -include $(GLD)clist + $(ADDMOD) $(GLD)libs -include $(GLD)romfs1 $(ADDMOD) $(GLD)libs $(GLD)gxfapi $(ADDMOD) $(GLD)libs -init fapi $(GLD)libx.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIBx) $(MAKEDIRS) @@ -3187,13 +3188,13 @@ $(GLGEN)gsromfs1.c : $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) $(CP_) $(GLGEN)gsromfs1_$(UFST_BRIDGE).c $(GLGEN)gsromfs1.c # pcl -$(GLGEN)pclromfs1_.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) +$(GLGEN)pclromfs1_.c : $(MKROMFS_XE) $(MAKEDIRS) $(EXP)$(MKROMFS_XE) -o $(GLGEN)pclromfs1_.c \ -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ $(PCLXL_FONT_ROMFS_ARGS) $(PCLXL_ROMFS_ARGS) $(PJL_ROMFS_ARGS) \ $(PJL_ROMFS_ARGS) $(GL_ROMFS_ARGS) -$(GLGEN)pclromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) +$(GLGEN)pclromfs1_1.c : $(MKROMFS_XE) $(MAKEDIRS) $(EXP)$(MKROMFS_XE) -o $(GLGEN)pclromfs1_1.c \ -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ $(UFST_ROMFS_ARGS) $(PCLXL_ROMFS_ARGS) $(PJL_ROMFS_ARGS) \ @@ -3202,13 +3203,26 @@ $(GLGEN)pclromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) $(GLGEN)pclromfs1.c : $(GLGEN)pclromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) $(CP_) $(GLGEN)pclromfs1_$(UFST_BRIDGE).c $(GLGEN)pclromfs1.c +$(GLGEN)pclromfs0_.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)pclromfs0_.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)pclromfs0_1.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)pclromfs0_1.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)pclromfs0.c : $(GLGEN)pclromfs0_$(UFST_BRIDGE).c $(MAKEDIRS) + $(CP_) $(GLGEN)pclromfs0_$(UFST_BRIDGE).c $(GLGEN)pclromfs0.c + # xps -$(GLGEN)xpsromfs1_.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) +$(GLGEN)xpsromfs1_.c : $(MKROMFS_XE) $(MAKEDIRS) $(EXP)$(MKROMFS_XE) -o $(GLGEN)xpsromfs1_.c \ -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ $(XPS_ROMFS_ARGS) $(XPS_FONT_ROMFS_ARGS) $(GL_ROMFS_ARGS) -$(GLGEN)xpsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) +$(GLGEN)xpsromfs1_1.c : $(MKROMFS_XE) $(MAKEDIRS) $(EXP)$(MKROMFS_XE) -o $(GLGEN)xpsromfs1_1.c \ -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ $(XPS_ROMFS_ARGS) $(GL_ROMFS_ARGS) @@ -3216,6 +3230,18 @@ $(GLGEN)xpsromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) $(GLGEN)xpsromfs1.c : $(GLGEN)xpsromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) $(CP_) $(GLGEN)xpsromfs1_$(UFST_BRIDGE).c $(GLGEN)xpsromfs1.c +$(GLGEN)xpsromfs0_.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)xpsromfs0_.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)xpsromfs0_1.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)xpsromfs0_1.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)xpsromfs0.c : $(GLGEN)xpsromfs0_$(UFST_BRIDGE).c $(MAKEDIRS) + $(CP_) $(GLGEN)xpsromfs0_$(UFST_BRIDGE).c $(GLGEN)xpsromfs0.c # pdl $(GLGEN)pdlromfs1_.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) @@ -3234,6 +3260,19 @@ $(GLGEN)pdlromfs1_1.c : $(MKROMFS_XE) $(PS_ROMFS_DEPS) $(MAKEDIRS) $(GLGEN)pdlromfs1.c : $(GLGEN)pdlromfs1_$(UFST_BRIDGE).c $(MAKEDIRS) $(CP_) $(GLGEN)pdlromfs1_$(UFST_BRIDGE).c $(GLGEN)pdlromfs1.c +$(GLGEN)pdlromfs0_.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)pdlromfs0_.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)pdlromfs0_1.c : $(MKROMFS_XE) $(MAKEDIRS) + $(EXP)$(MKROMFS_XE) -o $(GLGEN)pdlromfs0_1.c \ + -X .svn -X CVS -P $(GLSRCDIR)$(D)..$(D) iccprofiles$(D)* \ + $(GL_ROMFS_ARGS) + +$(GLGEN)pdlromfs0.c : $(GLGEN)pdlromfs0_$(UFST_BRIDGE).c $(MAKEDIRS) + $(CP_) $(GLGEN)pdlromfs0_$(UFST_BRIDGE).c $(GLGEN)pdlromfs0.c + # the following module is only included if the romfs.dev FEATURE is enabled $(GLOBJ)gsiorom_1.$(OBJ) : $(GLSRC)gsiorom.c $(gsiorom_h) \ @@ -3258,26 +3297,23 @@ $(GLOBJ)gsromfs0.$(OBJ) : $(GLSRC)gsromfs0.c $(stdint__h) $(MAKEDIRS) $(GLOBJ)gsromfs1.$(OBJ) : $(GLOBJ)gsromfs1.c $(time__h) $(MAKEDIRS) $(GLCC) $(GLO_)gsromfs1.$(OBJ) $(C_) $(GLOBJ)gsromfs1.c -# A dummy pclromfs module for COMPILE_INITS=0 -# NOTE: object file name does not match source file name -$(GLOBJ)pclromfs0.$(OBJ) : $(GLSRC)gsromfs0.c $(stdint__h) $(MAKEDIRS) - $(GLCC) $(GLO_)pclromfs0.$(OBJ) $(C_) $(GLSRC)gsromfs0.c +# A pclromfs module with only ICC profiles for COMPILE_INITS=0 +$(GLOBJ)pclromfs0.$(OBJ) : $(GLGEN)pclromfs0.c $(stdint__h) $(MAKEDIRS) + $(GLCC) $(GLO_)pclromfs0.$(OBJ) $(C_) $(GLGEN)pclromfs0.c $(GLOBJ)pclromfs1.$(OBJ) : $(GLOBJ)pclromfs1.c $(time__h) $(MAKEDIRS) $(GLCC) $(GLO_)pclromfs1.$(OBJ) $(C_) $(GLOBJ)pclromfs1.c -# A dummy xpsromfs module for COMPILE_INITS=0 -# NOTE: object file name does not match source file name -$(GLOBJ)xpsromfs0.$(OBJ) : $(GLSRC)gsromfs0.c $(stdint__h) $(MAKEDIRS) - $(GLCC) $(GLO_)xpsromfs0.$(OBJ) $(C_) $(GLSRC)gsromfs0.c +# A xpsromfs module with only ICC profiles for COMPILE_INITS=0 +$(GLOBJ)xpsromfs0.$(OBJ) : $(GLGEN)xpsromfs0.c $(stdint__h) $(MAKEDIRS) + $(GLCC) $(GLO_)xpsromfs0.$(OBJ) $(C_) $(GLGEN)xpsromfs0.c $(GLOBJ)xpsromfs1.$(OBJ) : $(GLOBJ)xpsromfs1.c $(time__h) $(MAKEDIRS) $(GLCC) $(GLO_)xpsromfs1.$(OBJ) $(C_) $(GLOBJ)xpsromfs1.c -# A dummy pdlromfs module for COMPILE_INITS=0 -# NOTE: object file name does not match source file name -$(GLOBJ)pdlromfs0.$(OBJ) : $(GLSRC)gsromfs0.c $(stdint__h) $(MAKEDIRS) - $(GLCC) $(GLO_)pdlromfs0.$(OBJ) $(C_) $(GLSRC)gsromfs0.c +# A pdlromfs module with only ICC profiles for COMPILE_INITS=0 +$(GLOBJ)pdlromfs0.$(OBJ) : $(GLGEN)pdlromfs0.c $(stdint__h) $(MAKEDIRS) + $(GLCC) $(GLO_)pdlromfs0.$(OBJ) $(C_) $(GLGEN)pdlromfs0.c $(GLOBJ)pdlromfs1.$(OBJ) : $(GLOBJ)pdlromfs1.c $(time__h) $(MAKEDIRS) $(GLCC) $(GLO_)pdlromfs1.$(OBJ) $(C_) $(GLOBJ)pdlromfs1.c |