Fix for 687006, Missing function prototypes

Alex Cherepanov <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Organization Coscript Software
Message-ID <[email protected]>
Fix compiler warnings. Include gpmisc.h when needed.
Fix bug 687006.

_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
gpmisc.diff (text/plain, 8.2 KB)
Index: gs/src/stdio_.h
===================================================================
RCS file: /cvs/ghostscript/gs/src/stdio_.h,v
retrieving revision 1.8
diff -b -u -r1.8 stdio_.h
--- gs/src/stdio_.h	7 Oct 2002 08:28:56 -0000	1.8
+++ gs/src/stdio_.h	20 Oct 2003 19:37:28 -0000
@@ -69,7 +69,8 @@
 #endif
 
 #if defined(_MSC_VER)
-#define fdopen(handle,mode) _fdopen(handle,mode)
+#  define fdopen(handle,mode) _fdopen(handle,mode)
+#  define fileno(file) _fileno(file)
 #endif
 
 #endif /* stdio__INCLUDED */
Index: gs/src/zfile.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/zfile.c,v
retrieving revision 1.38
diff -b -u -r1.38 zfile.c
--- gs/src/zfile.c	21 Aug 2003 17:18:08 -0000	1.38
+++ gs/src/zfile.c	20 Oct 2003 19:37:28 -0000
@@ -18,10 +18,12 @@
 /* Non-I/O file operators */
 #include "memory_.h"
 #include "string_.h"
+#include "unistd_.h"
 #include "ghost.h"
 #include "gscdefs.h"		/* for gx_io_device_table */
 #include "gsutil.h"		/* for bytes_compare */
 #include "gp.h"
+#include "gpmisc.h"
 #include "gsfname.h"
 #include "gsstruct.h"		/* for registering root */
 #include "gxalloc.h"		/* for streams */
Index: gs/src/int.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/int.mak,v
retrieving revision 1.117
diff -b -u -r1.117 int.mak
--- gs/src/int.mak	19 Oct 2003 17:48:20 -0000	1.117
+++ gs/src/int.mak	20 Oct 2003 19:38:44 -0000
@@ -315,7 +315,8 @@
  $(store_h)
 	$(PSCC) $(PSO_)zdict.$(OBJ) $(C_) $(PSSRC)zdict.c
 
-$(PSOBJ)zfile.$(OBJ) : $(PSSRC)zfile.c $(OP) $(memory__h) $(string__h) $(gp_h)\
+$(PSOBJ)zfile.$(OBJ) : $(PSSRC)zfile.c $(OP)\
+ $(memory__h) $(string__h) $(unistd__h) $(gp_h) $(gpmisc_h)\
  $(gscdefs_h) $(gsfname_h) $(gsstruct_h) $(gsutil_h) $(gxalloc_h) $(gxiodev_h)\
  $(dstack_h) $(estack_h) $(files_h)\
  $(ialloc_h) $(idict_h) $(ilevel_h) $(iname_h) $(interp_h) $(iutil_h)\
Index: gs/src/gp_unifn.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_unifn.c,v
retrieving revision 1.14
diff -b -u -r1.14 gp_unifn.c
--- gs/src/gp_unifn.c	20 Aug 2003 17:58:32 -0000	1.14
+++ gs/src/gp_unifn.c	20 Oct 2003 19:38:44 -0000
@@ -18,6 +18,7 @@
 /* Unix-like file name syntax platform routines for Ghostscript */
 #include "gx.h"
 #include "gp.h"
+#include "gpmisc.h"
 #include "gsutil.h"
 
 /* Define the character used for separating file names in a list. */
Index: gs/src/lib.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/lib.mak,v
retrieving revision 1.144
diff -b -u -r1.144 lib.mak
--- gs/src/lib.mak	8 Oct 2003 11:34:06 -0000	1.144
+++ gs/src/lib.mak	20 Oct 2003 19:38:44 -0000
@@ -2550,7 +2550,7 @@
 # File system implementation.
 
 # MS-DOS file system, also used by Desqview/X.
-$(GLOBJ)gp_dosfs.$(OBJ) : $(GLSRC)gp_dosfs.c $(AK) $(dos__h) $(gp_h) $(gx_h)
+$(GLOBJ)gp_dosfs.$(OBJ) : $(GLSRC)gp_dosfs.c $(AK) $(dos__h) $(gp_h) $(gpmisc_h) $(gx_h)
 	$(GLCC) $(GLO_)gp_dosfs.$(OBJ) $(C_) $(GLSRC)gp_dosfs.c
 
 # MS-DOS file enumeration, *not* used by Desqview/X.
@@ -2567,7 +2567,7 @@
 	$(GLCC) $(GLO_)gp_unifs.$(OBJ) $(C_) $(GLSRC)gp_unifs.c
 
 # Unix(-like) file name syntax, *not* used by Desqview/X.
-$(GLOBJ)gp_unifn.$(OBJ) : $(GLSRC)gp_unifn.c $(AK) $(gx_h) $(gp_h)
+$(GLOBJ)gp_unifn.$(OBJ) : $(GLSRC)gp_unifn.c $(AK) $(gx_h) $(gp_h) $(gpmisc_h)
 	$(GLCC) $(GLO_)gp_unifn.$(OBJ) $(C_) $(GLSRC)gp_unifn.c
 
 # Pipes.  These are actually the same on all platforms that have them.
Index: gs/src/gp_dosfs.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_dosfs.c,v
retrieving revision 1.15
diff -b -u -r1.15 gp_dosfs.c
--- gs/src/gp_dosfs.c	20 Aug 2003 17:58:30 -0000	1.15
+++ gs/src/gp_dosfs.c	20 Oct 2003 19:38:44 -0000
@@ -20,6 +20,7 @@
 #include "dos_.h"
 #include "gx.h"
 #include "gp.h"
+#include "gpmisc.h"
 
 /* ------ Printer accessing ------ */
 
Index: gs/src/gp_macio.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_macio.c,v
retrieving revision 1.31
diff -b -u -r1.31 gp_macio.c
--- gs/src/gp_macio.c	20 Aug 2003 17:58:31 -0000	1.31
+++ gs/src/gp_macio.c	20 Oct 2003 19:38:44 -0000
@@ -56,6 +56,7 @@
 
 #include "gx.h"
 #include "gp.h"
+#include "gpmisc.h"
 #include "gxdevice.h"
 
 #include "gp_mac.h"
Index: gs/src/macos-mcp.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/macos-mcp.mak,v
retrieving revision 1.21
diff -b -u -r1.21 macos-mcp.mak
--- gs/src/macos-mcp.mak	6 Aug 2003 16:24:29 -0000	1.21
+++ gs/src/macos-mcp.mak	20 Oct 2003 19:38:44 -0000
@@ -340,7 +340,7 @@
 systypes_h=$(GLOBJ)sys/types.h
 
 $(GLOBJ)gp_mac.$(OBJ): $(GLSRC)gp_mac.c
-$(GLOBJ)gp_macio.$(OBJ): $(GLSRC)gp_macio.c
+$(GLOBJ)gp_macio.$(OBJ): $(GLSRC)gp_macio.c $(gx_h) $(gp_h) $(gpmisc_h)
 $(GLOBJ)gp_stdin.$(OBJ): $(GLSRC)gp_stdin.c $(AK) $(stdio__h) $(gx_h) $(gp_h)
 
 # ------------------------------------------------------------------- #
Index: gs/src/gp_ntfs.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_ntfs.c,v
retrieving revision 1.20
diff -b -u -r1.20 gp_ntfs.c
--- gs/src/gp_ntfs.c	20 Aug 2003 17:58:31 -0000	1.20
+++ gs/src/gp_ntfs.c	20 Oct 2003 19:38:44 -0000
@@ -28,6 +28,7 @@
 #include "gsmemory.h"
 #include "gsstruct.h"
 #include "gp.h"
+#include "gpmisc.h"
 #include "gsutil.h"
 #include "windows_.h"
 
Index: gs/src/winplat.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/winplat.mak,v
retrieving revision 1.4
diff -b -u -r1.4 winplat.mak
--- gs/src/winplat.mak	21 Feb 2002 22:24:54 -0000	1.4
+++ gs/src/winplat.mak	20 Oct 2003 19:38:44 -0000
@@ -28,7 +28,7 @@
 
 $(GLOBJ)gp_ntfs.$(OBJ): $(GLSRC)gp_ntfs.c $(AK)\
  $(dos__h) $(memory__h) $(stdio__h) $(string__h) $(windows__h)\
- $(gp_h) $(gsmemory_h) $(gsstruct_h) $(gstypes_h) $(gsutil_h)
+ $(gp_h) $(gpmisc_h) $(gsmemory_h) $(gsstruct_h) $(gstypes_h) $(gsutil_h)
 	$(GLCCWIN) $(GLO_)gp_ntfs.$(OBJ) $(C_) $(GLSRC)gp_ntfs.c
 
 $(GLOBJ)gp_win32.$(OBJ): $(GLSRC)gp_win32.c $(AK)\
Index: gs/src/gp_vms.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gp_vms.c,v
retrieving revision 1.35
diff -b -u -r1.35 gp_vms.c
--- gs/src/gp_vms.c	4 Sep 2003 16:17:42 -0000	1.35
+++ gs/src/gp_vms.c	20 Oct 2003 19:38:53 -0000
@@ -21,6 +21,7 @@
 #include "memory_.h"
 #include "gx.h"
 #include "gp.h"
+#include "gpmisc.h"
 #include "gsstruct.h"
 #include <stat.h>
 #include <stdlib.h>		/* for exit() with some compiler versions */
Index: gs/src/openvms.mak
===================================================================
RCS file: /cvs/ghostscript/gs/src/openvms.mak,v
retrieving revision 1.31
diff -b -u -r1.31 openvms.mak
--- gs/src/openvms.mak	20 May 2003 19:52:29 -0000	1.31
+++ gs/src/openvms.mak	20 Oct 2003 19:38:53 -0000
@@ -450,7 +450,7 @@
 $(GLGEN)openvms_.dev : $(openvms__) $(GLGEN)nosync.dev
 	$(SETMOD) $(GLGEN)openvms_ $(openvms__) -include $(GLGEN)nosync
 
-$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gsstruct_h)
+$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gpmisc_h) $(gsstruct_h)
 	$(CC_)/include=($(GLGENDIR),$(GLSRCDIR))/obj=$(GLOBJ)gp_vms.$(OBJ) $(GLSRC)gp_vms.c
 
 $(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK) $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
Index: gs/src/openvms.mmk
===================================================================
RCS file: /cvs/ghostscript/gs/src/openvms.mmk,v
retrieving revision 1.26
diff -b -u -r1.26 openvms.mmk
--- gs/src/openvms.mmk	4 Sep 2003 09:52:32 -0000	1.26
+++ gs/src/openvms.mmk	20 Oct 2003 19:38:53 -0000
@@ -514,7 +514,7 @@
 $(GLOBJDIR)genht.$(OBJ) : $(GLSRCDIR)genht.c $(GENHT_DEPS)
 $(GLOBJDIR)geninit.$(OBJ) : $(GLSRCDIR)geninit.c $(GENINIT_DEPS)
 
-$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gsstruct_h)
+$(GLOBJ)gp_vms.$(OBJ) : $(GLSRC)gp_vms.c $(string__h) $(memory__h) $(gx_h) $(gp_h) $(gpmisc_h) $(gsstruct_h)
 	$(CC_)/include=($(GLGENDIR),$(GLSRCDIR))/obj=$(GLOBJ)gp_vms.$(OBJ) $(GLSRC)gp_vms.c
 
 $(GLOBJ)gp_stdia.$(OBJ) : $(GLSRC)gp_stdia.c $(AK) $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.