# HG changeset patch # User Jim Meyering # Date 949307271 0 # Node ID c4a8e51bfd939d3aa650ae3e7f50b2d9ed2e9b75 # Parent baf7824839aa6c9848f9e0f558af5ade912e032a (ISASCII): Add #undef and move definition to follow inclusion of wctype.h to work around solaris2.6 namespace pollution. (ISPRINT): Likewise. diff --git a/lib/quotearg.c b/lib/quotearg.c --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -26,12 +26,6 @@ #include #include -#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -# define ISASCII(c) 1 -#else -# define ISASCII(c) isascii (c) -#endif -#define ISPRINT(c) (ISASCII (c) && isprint (c)) #if ENABLE_NLS # include @@ -73,6 +67,17 @@ #define INT_BITS (sizeof (int) * CHAR_BIT) +#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) +/* Undefine to protect against the definition in wctype.h of solaris2.6. */ +# undef ISASCII +# define ISASCII(c) 1 +#else +# define ISASCII(c) isascii (c) +#endif +/* Undefine to protect against the definition in wctype.h of solaris2.6. */ +#undef ISASCII +#define ISPRINT(c) (ISASCII (c) && isprint (c)) + struct quoting_options { /* Basic quoting style. */