diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2003-01-14 21:23:09 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2003-01-14 21:23:09 (GMT) |
commit | 37151401465dfe0882458328de4423b450f72bdc (patch) | |
tree | 9f735b3483f4a15c97127521a63fc44381be8507 /src/H5private.h | |
parent | be8d47204c16db5277e3341e5b9bdf9198527572 (diff) | |
download | hdf5-37151401465dfe0882458328de4423b450f72bdc.zip hdf5-37151401465dfe0882458328de4423b450f72bdc.tar.gz hdf5-37151401465dfe0882458328de4423b450f72bdc.tar.bz2 |
[svn-r6283]
Purpose:
Change some macros to make windows happy
Description:
Currently no srandom and random functions on windows,
Function gethostname cannot be resolved when DLL turned on
Solution:
use srand and rand to replace srandom and random
turn off the option to check gethostname
Platforms tested:
windows 2000, linux 2.2.18smp
Misc. update:
Update MANIFEST if you add or remove any file.
Update release_docs/RELEASE for bug fixes, new features, etc.
Update applicable document files too.
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h index 7ae8353..baff347 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -691,7 +691,11 @@ typedef struct stat h5_stat_t; #define HDqsort(M,N,Z,F) qsort(M,N,Z,F) #define HDraise(N) raise(N) #define HDrand() rand() -#define HDrandom() random() +#ifdef WIN32 +#define HDrandom() rand() +#else +#define HDrandom() random() +#endif #define HDread(F,M,Z) read(F,M,Z) #define HDreaddir(D) readdir(D) #define HDrealloc(M,Z) realloc(M,Z) @@ -734,7 +738,11 @@ typedef struct stat h5_stat_t; /* sprintf() variable arguments */ #define HDsqrt(X) sqrt(X) #define HDsrand(N) srand(N) +#ifdef WIN32 +#define HDsrandom(N) srand(N) +#else #define HDsrandom(N) srandom(N) +#endif /* sscanf() variable arguments */ |