summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FDlog.c9
-rw-r--r--src/H5FDsec2.c9
-rw-r--r--src/H5FDstdio.c9
-rw-r--r--src/H5config.h.in3
-rw-r--r--src/H5private.h15
5 files changed, 36 insertions, 9 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 552fd55..c9f075e 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -622,8 +622,17 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (f1->fileindexlo > f2->fileindexlo) ret_value= 1;
#else
+#ifdef H5_DEV_T_IS_SCALAR
if (f1->device < f2->device) ret_value= -1;
if (f1->device > f2->device) ret_value= 1;
+#else /* H5_DEV_T_IS_SCALAR */
+ /* If dev_t isn't a scalar value on this system, just use memcmp to
+ * determine if the values are the same or not. The actual return value
+ * shouldn't really matter...
+ */
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) ret_value= -1;
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) ret_value= 1;
+#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode) ret_value= -1;
if (f1->inode > f2->inode) ret_value= 1;
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index ff3a2bb..fda1e81 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -390,8 +390,17 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (f1->fileindexlo > f2->fileindexlo) ret_value= 1;
#else
+#ifdef H5_DEV_T_IS_SCALAR
if (f1->device < f2->device) ret_value= -1;
if (f1->device > f2->device) ret_value= 1;
+#else /* H5_DEV_T_IS_SCALAR */
+ /* If dev_t isn't a scalar value on this system, just use memcmp to
+ * determine if the values are the same or not. The actual return value
+ * shouldn't really matter...
+ */
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) ret_value= -1;
+ if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) ret_value= 1;
+#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode) ret_value= -1;
if (f1->inode > f2->inode) ret_value= 1;
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 07885b4..3c1a0a6 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -422,8 +422,17 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
if (f1->fileindexlo > f2->fileindexlo) return 1;
#else
+#ifdef H5_DEV_T_IS_SCALAR
if (f1->device < f2->device) return -1;
if (f1->device > f2->device) return 1;
+#else /* H5_DEV_T_IS_SCALAR */
+ /* If dev_t isn't a scalar value on this system, just use memcmp to
+ * determine if the values are the same or not. The actual return value
+ * shouldn't really matter...
+ */
+ if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t))<0) return -1;
+ if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) return 1;
+#endif /* H5_DEV_T_IS_SCALAR */
if (f1->inode < f2->inode) return -1;
if (f1->inode > f2->inode) return 1;
diff --git a/src/H5config.h.in b/src/H5config.h.in
index ddfdadb..969c801 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -47,6 +47,9 @@
/* Define if it's safe to use `long long' for hsize_t and hssize_t */
#undef HAVE_LARGE_HSIZET
+/* Define if it's safe to use `long long' for hsize_t and hssize_t */
+#undef DEV_T_IS_SCALAR
+
/* Define if the HDF5 v1.2 compatibility functions are to be compiled in */
#undef WANT_H5_V1_2_COMPAT
diff --git a/src/H5private.h b/src/H5private.h
index 61e0c9e..c791a91 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -140,13 +140,6 @@
#define VC_EXTRALEAN /*Exclude rarely-used stuff from Windows headers */
#include <windows.h>
-/* H5_inline */
-
-/* remove any previous defs made by configure in unix */
-#ifdef H5_inline
-# undef H5_inline
-#endif
-
/*
inline is now in C but in the C99 standard and not the old C89 version so
MS doesn't recognize it yet (as of April 2001)
@@ -157,9 +150,13 @@ MS doesn't recognize it yet (as of April 2001)
# define H5_inline
#endif
+#endif /*WIN32*/
+
+/* H5_inline */
+#ifndef H5_inline
+#define H5_inline
+#endif /* H5_inline */
-#endif
-/*WIN32*/
#ifndef F_OK
# define F_OK 00