mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r4813] Purpose:
Bug fix Description: HDfprintf was not handling Microsoft's "%I64d" extension to printf for printing thier '__int64' type. Solution: Added code to properly detect and use this extension. Platforms tested: None! (Kent will be testing shortly)
This commit is contained in:
parent
c5d5a551c9
commit
aabfa5c03f
26
src/H5.c
26
src/H5.c
@ -797,7 +797,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
|
||||
}
|
||||
|
||||
/* Type modifier */
|
||||
if (HDstrchr ("ZHhlqL", *s)) {
|
||||
if (HDstrchr ("ZHhlqLI", *s)) {
|
||||
switch (*s) {
|
||||
case 'H':
|
||||
if (sizeof(hsize_t)<sizeof(long)) {
|
||||
@ -818,16 +818,26 @@ HDfprintf (FILE *stream, const char *fmt, ...)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Handle 'll' for long long types */
|
||||
if(*s=='l' && *(s+1)=='l') {
|
||||
/* Handle 'I64' modifier for Microsoft's "__int64" type */
|
||||
if(*s=='I' && *(s+1)=='6' && *(s+2)=='4') {
|
||||
modifier[0] = *s;
|
||||
modifier[1] = *s;
|
||||
modifier[2] = '\0';
|
||||
s++; /* Increment over first 'l', second is taken care of below */
|
||||
modifier[1] = *(s+1);
|
||||
modifier[2] = *(s+2);
|
||||
modifier[3] = '\0';
|
||||
s+=2; /* Increment over 'I6', the '4' is taken care of below */
|
||||
} /* end if */
|
||||
else {
|
||||
modifier[0] = *s;
|
||||
modifier[1] = '\0';
|
||||
/* Handle 'll' for long long types */
|
||||
if(*s=='l' && *(s+1)=='l') {
|
||||
modifier[0] = *s;
|
||||
modifier[1] = *s;
|
||||
modifier[2] = '\0';
|
||||
s++; /* Increment over first 'l', second is taken care of below */
|
||||
} /* end if */
|
||||
else {
|
||||
modifier[0] = *s;
|
||||
modifier[1] = '\0';
|
||||
} /* end else */
|
||||
} /* end else */
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user