[gs-cvs] rev 7821 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Thu Apr 5 10:36:44 PDT 2007
Author: alexcher
Date: 2007-04-05 10:36:43 -0700 (Thu, 05 Apr 2007)
New Revision: 7821
Modified:
trunk/gs/src/gdevdbit.c
trunk/gs/src/gserror.h
trunk/gs/src/lib.mak
Log:
Fix compilation on MSVC 6. Add a best effort simulation of C99 __func__
keyword on older compilers.
Modified: trunk/gs/src/gdevdbit.c
===================================================================
--- trunk/gs/src/gdevdbit.c 2007-04-05 01:29:14 UTC (rev 7820)
+++ trunk/gs/src/gdevdbit.c 2007-04-05 17:36:43 UTC (rev 7821)
@@ -14,6 +14,7 @@
/* Default device bitmap copying implementation */
#include "gx.h"
#include "gpcheck.h"
+#include "gserror.h"
#include "gserrors.h"
#include "gsbittab.h"
#include "gsrect.h"
@@ -51,10 +52,10 @@
gx_device_color devc;
if (!data)
- gs_throw(-997, __FUNCTION__ );
+ gs_throw(-997, __func__ );
fit_copy(dev, data, dx, raster, id, x, y, w, h);
if (!data)
- gs_throw(-997, __FUNCTION__ );
+ gs_throw(-997, __func__ );
if (one != gx_no_color_index) {
invert = false;
color = one;
@@ -70,10 +71,10 @@
color = zero;
}
if (!data)
- gs_throw(-997, __FUNCTION__ );
+ gs_throw(-997, __func__ );
set_nonclient_dev_color(&devc, color);
if (!data)
- gs_throw(-997, __FUNCTION__ );
+ gs_throw(-997, __func__ );
return gx_dc_default_fill_masked
(&devc, data, dx, raster, id, x, y, w, h, dev, rop3_T, invert);
}
Modified: trunk/gs/src/gserror.h
===================================================================
--- trunk/gs/src/gserror.h 2007-04-05 01:29:14 UTC (rev 7820)
+++ trunk/gs/src/gserror.h 2007-04-05 17:36:43 UTC (rev 7821)
@@ -24,9 +24,15 @@
#define gs_note_error(err) gs_log_error(err, __FILE__, __LINE__)
#define return_error(err) return gs_note_error(err)
-# if defined(__WIN32__)
-#define __func__ __FUNCTION__
-# endif
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
+# if defined(__FUNCTION__)
+# define __func__ __FUNCTION__
+# elif defined(__FUNC__)
+# define __func__ __FUNC__
+# else
+# define __func__ "<unknown>"
+# endif
+#endif
/*
* Error reporting macros.
Modified: trunk/gs/src/lib.mak
===================================================================
--- trunk/gs/src/lib.mak 2007-04-05 01:29:14 UTC (rev 7820)
+++ trunk/gs/src/lib.mak 2007-04-05 17:36:43 UTC (rev 7821)
@@ -1037,7 +1037,7 @@
### Default driver procedure implementations
-$(GLOBJ)gdevdbit.$(OBJ) : $(GLSRC)gdevdbit.c $(GXERR) $(gpcheck_h)\
+$(GLOBJ)gdevdbit.$(OBJ) : $(GLSRC)gdevdbit.c $(GXERR) $(gserror_h) $(gpcheck_h)\
$(gdevmem_h) $(gsbittab_h) $(gsrect_h) $(gsropt_h)\
$(gxcpath_h) $(gxdcolor_h) $(gxdevice_h) $(gxdevmem_h)
$(GLCC) $(GLO_)gdevdbit.$(OBJ) $(C_) $(GLSRC)gdevdbit.c
More information about the gs-cvs
mailing list