summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-01-11 15:41:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-01-11 15:41:48 (GMT)
commitaabfa5c03f1637afce3b04d0c9cdb30360c30a18 (patch)
tree7d13d0693e2a0b15be7b59541f2be6f84ca92d8b /src
parentc5d5a551c93abd0e26d955d40c27beaed297045b (diff)
downloadhdf5-aabfa5c03f1637afce3b04d0c9cdb30360c30a18.zip
hdf5-aabfa5c03f1637afce3b04d0c9cdb30360c30a18.tar.gz
hdf5-aabfa5c03f1637afce3b04d0c9cdb30360c30a18.tar.bz2
[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)
Diffstat (limited to 'src')
-rw-r--r--src/H5.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/H5.c b/src/H5.c
index 451eb0d..ce143f6 100644
--- a/src/H5.c
+++ b/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;
}