diff options
author | Antony Dovgal <tony2001@php.net> | 2007-08-03 14:30:59 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-08-03 14:30:59 +0000 |
commit | 77701c003a0afa77a8f76bb0a94a7989f8529848 (patch) | |
tree | 8db9ff13496865177db0eb2bb5ab705d5f98d822 /main | |
parent | 498fbd90f6dfe694bf1670d7038fbef446f5f35e (diff) | |
download | php-git-77701c003a0afa77a8f76bb0a94a7989f8529848.tar.gz |
'I32' and 'I' support (per request by Marcus)
Diffstat (limited to 'main')
-rw-r--r-- | main/snprintf.c | 11 | ||||
-rw-r--r-- | main/spprintf.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/main/snprintf.c b/main/snprintf.c index e93913e6f9..3db627ef61 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -714,7 +714,16 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) / modifier = LM_LONG_LONG; } else #endif - modifier = LM_LONG; + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } break; case 'l': fmt++; diff --git a/main/spprintf.c b/main/spprintf.c index b790ca0c79..6e2661c4f4 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -347,7 +347,16 @@ static void xbuf_format_converter(int unicode, smart_str *xbuf, const char *fmt, modifier = LM_LONG_LONG; } else #endif - modifier = LM_LONG; + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } break; case 'l': fmt++; |