summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-28 17:02:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-28 17:02:12 (GMT)
commit12ba2eed6ad676507de5ad5aabe2e3631d8a1100 (patch)
tree57488773a49ee6c58f52352412052aa789505113 /src
parentb3d2f04490363a24f1d43581116a61356ca89f77 (diff)
downloadhdf5-12ba2eed6ad676507de5ad5aabe2e3631d8a1100.zip
hdf5-12ba2eed6ad676507de5ad5aabe2e3631d8a1100.tar.gz
hdf5-12ba2eed6ad676507de5ad5aabe2e3631d8a1100.tar.bz2
[svn-r8425] Purpose:
Bug fix (sorta) Description: The SGI machines have problems accurately (and consistently) converting unsigned long values to float and double values, so put in a bit of a hack in the datatype conversion test code to allow them to get "close enough". This hack is enabled at configure time by a flag which should only be set on machines with this problem. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5Tconv.c4
-rw-r--r--src/H5config.h.in4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 78744d5..156e359 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -9369,9 +9369,9 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
*/
/* Check 1st dropoff bit, see if it's set. */
- if(H5T_bit_get_d(int_buf, (first-dst.u.f.msize-1), 1)) {
+ if(H5T_bit_get_d(int_buf, ((first-dst.u.f.msize)-1), 1)) {
/* Check all bits after 1st dropoff bit, see if any of them is set. */
- if((first-dst.u.f.msize-1) > 0 && H5T_bit_get_d(int_buf, 0, (first-dst.u.f.msize-1)))
+ if(((first-dst.u.f.msize)-1) > 0 && H5T_bit_get_d(int_buf, 0, ((first-dst.u.f.msize)-1)))
do_round = 1;
else { /* The .50...0 case */
/* Check if the least significant bit is odd. */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 3a2924c..dffdb8a 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -501,6 +501,10 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define if your system can accurately convert unsigned long long values to
+ floating-point values. */
+#undef SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
+
/* Define if your system supports pthread_attr_setscope(&attribute,
PTHREAD_SCOPE_SYSTEM) call. */
#undef SYSTEM_SCOPE_THREADS