aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-01 12:44:07 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-01 12:44:07 +0000
commit5eeaff823506ab8a97801d3d7f9cf7f668681b58 (patch)
tree46c48018761bfb8b695e8a3508cf9fccc2bb72fc /lib
parent7d2e8728280f797bced37434d54e85ba95f02505 (diff)
Support 'z' for size_t-sized integer printing, as in %zd or %zx.
Diffstat (limited to 'lib')
-rw-r--r--lib/mprintf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 8956cb6ca..c653425f9 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -179,7 +179,7 @@ static BOOL dprintf_IsQualifierNoDollar(char c)
case '-': case '+': case ' ': case '#': case '.':
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- case 'h': case 'l': case 'L': case 'Z': case 'q':
+ case 'h': case 'l': case 'L': case 'z': case 'q':
case '*': case 'O':
return TRUE;
default:
@@ -383,14 +383,15 @@ static int dprintf_Pass1(char *format, va_stack_t *vto, char **endpos, va_list a
case 'q':
flags |= FLAGS_LONGLONG;
break;
-#if 0
- case 'Z':
- if (sizeof(size_t) > sizeof(unsigned long int))
+ case 'z':
+ /* the code below generates a warning if -Wunreachable-code is
+ used */
+ if (sizeof(size_t) > sizeof(unsigned long))
flags |= FLAGS_LONGLONG;
if (sizeof(size_t) > sizeof(unsigned int))
flags |= FLAGS_LONG;
break;
-#endif
+
case 'O':
#if SIZEOF_CURL_OFF_T > 4
flags |= FLAGS_LONGLONG;