@@ -19,11 +19,14 @@ #include #include #include #include #include -#include + +#ifdef HAVE_WCHAR_H +# include +#endif #ifdef HAVE_ASPRINTF_L # include #endif #ifdef HAVE_XLOCALE_H @@ -579,18 +582,20 @@ case LENGTH_MODIFIER_NONE: tmpLen = asprintf(&tmp, ctx->subformat, va_arg(ctx->arguments, int)); break; case LENGTH_MODIFIER_L: -#if WINT_MAX >= INT_MAX +#ifdef HAVE_WCHAR_H +# if WINT_MAX >= INT_MAX tmpLen = asprintf(&tmp, ctx->subformat, va_arg(ctx->arguments, wint_t)); -#else +# else tmpLen = asprintf(&tmp, ctx->subformat, va_arg(ctx->arguments, int)); -#endif +# endif break; +#endif default: return false; } break; @@ -598,14 +603,16 @@ switch (ctx->lengthModifier) { case LENGTH_MODIFIER_NONE: tmpLen = asprintf(&tmp, ctx->subformat, va_arg(ctx->arguments, const char*)); break; +#ifdef HAVE_WCHAR_T case LENGTH_MODIFIER_L: tmpLen = asprintf(&tmp, ctx->subformat, va_arg(ctx->arguments, const wchar_t*)); break; +#endif default: return false; } break;