]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
foomatic-rip: fix compilation with -fno-common 184/head
authorMartin Wilck <mwilck@suse.com>
Thu, 9 Jan 2020 09:20:46 +0000 (10:20 +0100)
committerMartin Wilck <mwilck@suse.com>
Thu, 9 Jan 2020 09:20:46 +0000 (10:20 +0100)
Starting from the upcoming GCC release 10, the default of -fcommon option will
change to -fno-common. This causes compilation errors in foomatic-rip. These
seem to be due to missing "external" declarations.

https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Code-Gen-Options.html#index-fno-common

filter/foomatic-rip/foomaticrip.c
filter/foomatic-rip/options.c

index 3b27ce939e4656517a03c86057abe7f2920f672c..2c6cdb66152f8deb259c6f59226e346425293039 100644 (file)
@@ -105,7 +105,7 @@ jobparams_t * get_current_job()
 }
 
 
-dstr_t *postpipe;  /* command into which the output of this filter should be piped */
+dstr_t *postpipe = NULL;  /* command into which the output of this filter should be piped */
 FILE *postpipe_fh = NULL;
 
 FILE * open_postpipe()
index 481e5c5435eaffc5c71bdb8b2412ff21a9f07623..3c6b63d41567b5c8c4d203bbbd21af1e7e4fb328 100644 (file)
@@ -38,14 +38,14 @@ typedef struct icc_mapping_entry_s {
 } icc_mapping_entry_t;
 
 /* Values from foomatic keywords in the ppd file */
-char printer_model [256];
+extern char printer_model [256];
 char printer_id [256];
 char driver [128];
 char cmd [4096];
 char cmd_pdf [4096];
-dstr_t *postpipe = NULL;  /* command into which the output of this
+extern dstr_t *postpipe;  /* command into which the output of this
                              filter should be piped */
-char cupsfilter [256];
+extern char cupsfilter [256];
 int jobentitymaxlen = 0;
 int userentitymaxlen = 0;
 int hostentitymaxlen = 0;