summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5config.h.in6
-rw-r--r--src/H5private.h12
2 files changed, 12 insertions, 6 deletions
diff --git a/src/H5config.h.in b/src/H5config.h.in
index d805b36..a5f0d11 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -205,6 +205,9 @@
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
+/* Define to 1 if you have the `random' function. */
+#undef HAVE_RANDOM
+
/* Define to 1 if you have the <setjmp.h> header file. */
#undef HAVE_SETJMP_H
@@ -223,6 +226,9 @@
/* Define if `socklen_t' is defined */
#undef HAVE_SOCKLEN_T
+/* Define to 1 if you have the `srandom' function. */
+#undef HAVE_SRANDOM
+
/* Define if `struct stat' has the `st_blocks' field */
#undef HAVE_STAT_ST_BLOCKS
diff --git a/src/H5private.h b/src/H5private.h
index ba4ddc7..eb8eae4 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -758,10 +758,10 @@ typedef off_t h5_stat_size_t;
#define HDqsort(M,N,Z,F) qsort(M,N,Z,F)
#define HDraise(N) raise(N)
#define HDrand() rand()
-#ifdef WIN32
-#define HDrandom() rand()
-#else
+#ifdef H5_HAVE_RANDOM
#define HDrandom() random()
+#else
+#define HDrandom() rand()
#endif
#define HDread(F,M,Z) read(F,M,Z)
#define HDreaddir(D) readdir(D)
@@ -801,10 +801,10 @@ typedef off_t h5_stat_size_t;
/* sprintf() variable arguments */
#define HDsqrt(X) sqrt(X)
#define HDsrand(N) srand(N)
-#ifdef WIN32
-#define HDsrandom(N) srand(N)
-#else
+#ifdef H5_HAVE_SRANDOM
#define HDsrandom(N) srandom(N)
+#else
+#define HDsrandom(N) srand(N)
#endif
/* sscanf() variable arguments */