[PATCH] printf: use %ll instead of %j

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MSYS libc does not support %j[dXx] format, only %ll[dXx] is supported.

diff --git a/src/bltin/printf.c b/src/bltin/printf.c
index 893295c..12ce660 100644
--- a/src/bltin/printf.c
+++ b/src/bltin/printf.c
@@ -319,11 +319,12 @@ mklong(const char *str, const char *ch)
        char *copy;
        size_t len;

-       len = ch - str + 3;
+       len = ch - str + 4;
        STARTSTACKSTR(copy);
        copy = makestrspace(len, copy);
-       memcpy(copy, str, len - 3);
-       copy[len - 3] = 'j';
+       memcpy(copy, str, len - 4);
+       copy[len - 4] = 'l';
+       copy[len - 3] = 'l';
        copy[len - 2] = *ch;
        copy[len - 1] = '\0';
        return (copy);

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux