If A4 is defined gdevescp.c tries to call fwrite instead of gp_fwrite: #ifdef A4 /* ** After reset, the Stylus is set up for US letter paper. ** We need to set the page size appropriately for A4 paper. ** For some bizarre reason the ESC/P2 language wants the bottom ** margin measured from the *top* of the page: */ fwrite("\033(U\001\0\n\033(C\002\0t\020\033(c\004\0\0\0t\020", 1, 22, prn_stream); #endif https://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=devices/gdevescp.c;h=91a9205272954c17cdb763c1ea4afb09a03239d0;hb=HEAD#l165 Leading to build failure with stricter compilers like ie GCC 14.
That file and a couple of others that were missed are fixed in this commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=73a5763fd9d15 Thanks for spotting that!