[sane-devel] [PATCH] undef linux before defining STRINGIFY
Niels Ole Salscheider
niels_ole at salscheider-online.de
Sun Jun 7 20:14:53 UTC 2015
Otherwise, "linux" will be expanded to "1" when it is stringified.
This is a problem for e. g. LIBDIR, which might contain a target triplet.
On my system, /usr/x86_64-pc-linux-gnu-gcc would expand to x86_64-pc-1-gnu-gcc.
---
include/sane/sanei.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/sane/sanei.h b/include/sane/sanei.h
index ece1beb..90ec028 100644
--- a/include/sane/sanei.h
+++ b/include/sane/sanei.h
@@ -140,6 +140,9 @@
/** @hideinitializer */
#define NELEMS(a) ((int)(sizeof (a) / sizeof (a[0])))
+/* undef linux so that it can be stringified. It would expand to 1 otherwise. */
+#undef linux
+
/** @hideinitializer */
#define STRINGIFY1(x) #x
/** @hideinitializer */
--
2.4.2
More information about the sane-devel
mailing list