[sane-devel] [PATCH] undef linux before defining STRINGIFY

m. allan noah kitno455 at gmail.com
Tue Jun 9 12:21:44 UTC 2015


We need more info here. Where do you see this expansion problem?

allan

On Sun, Jun 7, 2015 at 4:14 PM, Niels Ole Salscheider
<niels_ole at salscheider-online.de> wrote:
> 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
>
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org



-- 
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"



More information about the sane-devel mailing list