Re: Contributed drivers must include std.h before any file that includes sys/types.h
"Leonardo" <[email protected]> Mon, 27 Aug 2007 10:44:04 +0400
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
Fine with me. ----- Original Message ----- From: "Alex Cherepanov" <[email protected]> To: <[email protected]> Sent: Monday, August 27, 2007 7:23 AM Subject: [gs-code-review] Contributed drivers must include std.h before any file that includes sys/types.h > Contributed drivers must include std.h before any file that includes > sys/types.h. The patch does just that. > > Alternatively, we can use our portable headers instead of raw system > headers. I cannot decide whether it's worth the trouble. > -------------------------------------------------------------------------------- > Index: gs/contrib/gdevlx50.c > =================================================================== > --- gs/contrib/gdevlx50.c (revision 8204) > +++ gs/contrib/gdevlx50.c (working copy) > @@ -227,6 +227,7 @@ > /************************************************************************ > * I N C L U D E F I L E S * > ************************************************************************/ > +#include "std.h" > #include <unistd.h> > #include "gdevprn.h" > #include "gsparam.h" > Index: gs/contrib/opvp/gdevopvp.c > =================================================================== > --- gs/contrib/opvp/gdevopvp.c (revision 8204) > +++ gs/contrib/opvp/gdevopvp.c (working copy) > @@ -20,6 +20,7 @@ > /* gdevopvp.c ver.1.00 rel.1.0 26 Nov 2004 */ > /* OpenPrinting Vector Printer Driver Glue Code */ > > +#include "std.h" > #include <stdio.h> > #include <stdlib.h> > #include <unistd.h> > Index: gs/contrib/gomni.c > =================================================================== > --- gs/contrib/gomni.c (revision 8204) > +++ gs/contrib/gomni.c (working copy) > @@ -88,6 +88,7 @@ > /* */ > /************************************************************************/ > > +#include "std.h" > #ifdef OMNI_USE_GLIB > /* Include these first. Ghostscript redefines printf */ > #include <glib.h> > Index: gs/contrib/pcl3/src/pclcap.c > =================================================================== > --- gs/contrib/pcl3/src/pclcap.c (revision 8204) > +++ gs/contrib/pcl3/src/pclcap.c (working copy) > @@ -24,6 +24,7 @@ > #endif > > /* Standard headers */ > +#include "std.h" > #include <assert.h> > #include <string.h> /* for memset() */ > #include <stdlib.h> >