mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-07 16:37:56 +08:00
[svn-r4020] Purpose:
Bug Fix Description: On some platforms, long long is printed with the "ll" modifier. HDfprintf didn't handle this case. Solution: Added code which checks if there's an "ll" modifier on the template. If so, then it uses that as the modifier. Platforms tested: Kelgia and Dangermouse
This commit is contained in:
parent
fd78a6021d
commit
0b008afcb4
11
src/H5.c
11
src/H5.c
@ -752,7 +752,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
|
||||
fmt += 2;
|
||||
nout++;
|
||||
} else if ('%'==fmt[0]) {
|
||||
s = fmt+1;
|
||||
s = fmt + 1;
|
||||
|
||||
/* Flags */
|
||||
while (HDstrchr ("-+ #", *s)) {
|
||||
@ -821,7 +821,14 @@ HDfprintf (FILE *stream, const char *fmt, ...)
|
||||
HDstrcpy (modifier, PRINTF_LL_WIDTH);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
/* takes care of "long long (ll)" modifiers */
|
||||
if (*(s + 1) == 'l') {
|
||||
HDstrcpy(modifier, "ll");
|
||||
s++;
|
||||
break;
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
default:
|
||||
/* Handle 'll' for long long types */
|
||||
if(*s=='l' && *(s+1)=='l') {
|
||||
|
Loading…
Reference in New Issue
Block a user