Ar an dara lá de mí Eanair, scríobh Robert Pluim:
[...] I currently have a hack in place that avoids including the
windows
api headers from glyphs-eimage.c, but was wondering if someone could
suggest a cleaner solution. For reference, here's what I'm doing:
I’d prefer something like this, which limits the hackery to just the one
file. But I can’t see any clean way of doing it, it’s a broken situation.
diff -r 2fc3f2f35523 src/glyphs-eimage.c
--- a/src/glyphs-eimage.c Mon Jan 02 13:35:31 2012 +0000
+++ b/src/glyphs-eimage.c Tue Jan 03 00:48:31 2012 +0000
@@ -118,11 +118,7 @@
/* And another one... jmorecfg.h defines the 'boolean' type as int,
which conflicts with the standard Windows 'boolean' definition as
unsigned char. Ref:
http://www.asmail.be/msg0054688232.html */
-#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
-typedef unsigned char boolean;
-#endif
-#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-#endif
+#define boolean JPEGBOOLEAN
/* Yet more breakage... jmorecfg.h unconditionally defines FAR either as
"far" or as blank. Windef.h unconditionally defines FAR as
"far".
@@ -132,6 +128,9 @@
#include <jpeglib.h>
#include <jerror.h>
+
+#undef boolean
#undef FAR
#define FAR far
END_C_DECLS
@@ -234,7 +233,7 @@
}
#if defined(JPEG_LIB_VERSION) && (JPEG_LIB_VERSION >= 61)
-METHODDEF(boolean)
+METHODDEF(JPEGBOOLEAN)
#else
METHODDEF boolean
#endif
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta