#define SPECIAL 32 /* 0x */
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
+#ifdef CFG_64BIT_VSPRINTF
+#define do_div(n,base) ({ \
+ unsigned int __res; \
+ __res = ((unsigned long long) n) % base; \
+ n = ((unsigned long long) n) / base; \
+ __res; \
+})
+#else
#define do_div(n,base) ({ \
int __res; \
- __res = ((unsigned long) n) % (unsigned) base; \
- n = ((unsigned long) n) / (unsigned) base; \
+ __res = ((unsigned long) n) % base; \
+ n = ((unsigned long) n) / base; \
__res; \
})
+#endif
#ifdef CFG_64BIT_VSPRINTF
-static char * number(char * str, long long num, int base, int size, int precision ,int type)
+static char * number(char * str, long long num, unsigned int base, int size, int precision ,int type)
#else
-static char * number(char * str, long num, int base, int size, int precision ,int type)
+static char * number(char * str, long num, unsigned int base, int size, int precision ,int type)
#endif
{
char c,sign,tmp[66];
qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'q') {
qualifier = *fmt;
+ if (qualifier == 'l' && *(fmt+1) == 'l') {
+ qualifier = 'q';
+ ++fmt;
+ }
++fmt;
}