mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
[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.
This commit is contained in:
parent
be8d47204c
commit
3715140146
@ -994,9 +994,15 @@ bit.\n";
|
||||
* The FQDM of this host or the empty string.
|
||||
*/
|
||||
#ifdef H5_HAVE_GETHOSTNAME
|
||||
#ifdef WIN32
|
||||
/* windows DLL cannot recognize gethostname, so turn off on windows for the time being!
|
||||
KY, 2003-1-14 */
|
||||
host_name[0] = '\0';
|
||||
#else
|
||||
if (gethostname(host_name, sizeof(host_name)) < 0) {
|
||||
host_name[0] = '\0';
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
host_name[0] = '\0';
|
||||
#endif
|
||||
|
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user