summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2003-01-14 21:23:09 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2003-01-14 21:23:09 (GMT)
commit37151401465dfe0882458328de4423b450f72bdc (patch)
tree9f735b3483f4a15c97127521a63fc44381be8507 /src/H5detect.c
parentbe8d47204c16db5277e3341e5b9bdf9198527572 (diff)
downloadhdf5-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/H5detect.c')
-rw-r--r--src/H5detect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5detect.c b/src/H5detect.c
index e43ac44..b129701 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -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