diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-05-05 17:38:59 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-05-05 17:38:59 (GMT) |
commit | b0e5134171d5c92a0b50bae4daba97651eeeafe6 (patch) | |
tree | ddef77a0e5d0a56eda180c068b4fe66398998a68 /src/H5private.h | |
parent | 8570c314ef67c03f9b3ef9609c49cff7ee6488c0 (diff) | |
download | hdf5-b0e5134171d5c92a0b50bae4daba97651eeeafe6.zip hdf5-b0e5134171d5c92a0b50bae4daba97651eeeafe6.tar.gz hdf5-b0e5134171d5c92a0b50bae4daba97651eeeafe6.tar.bz2 |
[svn-r10730] Purpose:
Portability feature
Description:
The random() and srandom() functions are not available on all machines.
Set up the configure script to automatically detect them, rather than
requiring their presence or absence to be hardcoded.
Solution:
Added AC_CHECK_FUNCS macro to configure.in and replaced
#ifdef WIN32 conditionals with #ifdef H5_HAVE_RANDOM conditionals.
Platforms tested:
sleipnir, Windows
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 */ |