summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-06 18:57:38 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:20:19 (GMT)
commit14578dabd4c518f8c0f852907c60fd6a6bdd1692 (patch)
tree79df8b88cf53e80d11c6021547e8467812693c5e /src
parent56d210ac3ffd799d3b53392019f036990b6683e7 (diff)
downloadhdf5-14578dabd4c518f8c0f852907c60fd6a6bdd1692.zip
hdf5-14578dabd4c518f8c0f852907c60fd6a6bdd1692.tar.gz
hdf5-14578dabd4c518f8c0f852907c60fd6a6bdd1692.tar.bz2
Fix compile errors - mostly in jni
Diffstat (limited to 'src')
-rw-r--r--src/H5private.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/H5private.h b/src/H5private.h
index f566304..d8838f4 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1193,13 +1193,23 @@ typedef off_t h5_stat_size_t;
#define HDrandom() HDrand()
#endif /* HDrandom */
H5_DLL int HDrand(void);
-#elif H5_HAVE_RANDOM
+ #ifndef HDsrandom
+ #define HDsrandom(S) HDsrand(S)
+ #endif /* HDsrandom */
+ H5_DLL void HDsrand(unsigned int seed);
+#elif defined(H5_HAVE_RANDOM)
#ifndef HDrand
#define HDrand() random()
#endif /* HDrand */
#ifndef HDrandom
#define HDrandom() random()
#endif /* HDrandom */
+ #ifndef HDsrand
+ #define HDsrand(S) srandom(S)
+ #endif /* HDsrand */
+ #ifndef HDsrandom
+ #define HDsrandom(S) srandom(S)
+ #endif /* HDsrandom */
#else /* H5_HAVE_RANDOM */
#ifndef HDrand
#define HDrand() rand()
@@ -1207,6 +1217,12 @@ typedef off_t h5_stat_size_t;
#ifndef HDrandom
#define HDrandom() rand()
#endif /* HDrandom */
+ #ifndef HDsrand
+ #define HDsrand(S) srand(S)
+ #endif /* HDsrand */
+ #ifndef HDsrandom
+ #define HDsrandom(S) srand(S)
+ #endif /* HDsrandom */
#endif /* H5_HAVE_RANDOM */
#ifndef HDread
@@ -1327,26 +1343,6 @@ typedef off_t h5_stat_size_t;
#ifndef HDsqrt
#define HDsqrt(X) sqrt(X)
#endif /* HDsqrt */
-#ifdef H5_HAVE_RAND_R
- H5_DLL void HDsrand(unsigned int seed);
- #ifndef HDsrandom
- #define HDsrandom(S) HDsrand(S)
- #endif /* HDsrandom */
-#elif H5_HAVE_RANDOM
- #ifndef HDsrand
- #define HDsrand(S) srandom(S)
- #endif /* HDsrand */
- #ifndef HDsrandom
- #define HDsrandom(S) srandom(S)
- #endif /* HDsrandom */
-#else /* H5_HAVE_RAND_R */
- #ifndef HDsrand
- #define HDsrand(S) srand(S)
- #endif /* HDsrand */
- #ifndef HDsrandom
- #define HDsrandom(S) srand(S)
- #endif /* HDsrandom */
-#endif /* H5_HAVE_RAND_R */
#ifndef HDsscanf
#define HDsscanf(S,FMT,...) sscanf(S,FMT,__VA_ARGS__)
#endif /* HDsscanf */