[gs-code-review] Contributed drivers must include std.h before any file that includes sys/types.h

Alex Cherepanov alexcher at quadnet.net
Sun Aug 26 20:23:12 PDT 2007


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.
-------------- next part --------------
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>


More information about the gs-code-review mailing list