summaryrefslogtreecommitdiffstats
path: root/perform/benchpar.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-08-15 14:06:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-08-15 14:06:53 (GMT)
commit8d80bf4a93a2de494e710eb9719483178ad215e8 (patch)
tree733fc801d4b04608cd57bc5003a52513c193dc4d /perform/benchpar.c
parent03a4dd9fc38eba695cb9c169d6879280fc665f3f (diff)
downloadhdf5-8d80bf4a93a2de494e710eb9719483178ad215e8.zip
hdf5-8d80bf4a93a2de494e710eb9719483178ad215e8.tar.gz
hdf5-8d80bf4a93a2de494e710eb9719483178ad215e8.tar.bz2
[svn-r21228] Added #ifdefs around #include unistd.h and created windows getlogin() function for building HDF5 parallel on windows.
Reviewed and tested locally and tested by user.
Diffstat (limited to 'perform/benchpar.c')
-rw-r--r--perform/benchpar.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/perform/benchpar.c b/perform/benchpar.c
index 035e9d6..ea1195b 100644
--- a/perform/benchpar.c
+++ b/perform/benchpar.c
@@ -13,7 +13,9 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <stdlib.h>
#include <assert.h>
#include <math.h>
@@ -23,6 +25,11 @@
#include "hdf5.h"
/* Local macros */
+#ifdef _MSC_VER /* H5_HAVE_VISUAL_STUDIO */
+#define HDgetlogin() Wgetlogin()
+#else /* H5_HAVE_VISUAL_STUDIO */
+#define HDgetlogin() getlogin()
+#endif /* H5_HAVE_VISUAL_STUDIO */
/*
* HDF Boolean type.
@@ -115,13 +122,13 @@ static hid_t create_fapl(MPI_Comm comm, MPI_Info info, int acc_type )
/* set parallel access with communicator, using MPI-I/O driver */
if (acc_type == FACC_MPIO) {
- ret = H5Pset_fapl_mpio(fapl, comm, info);
+ ret = H5Pset_fapl_mpio(fapl, comm, info);
assert(ret>=0);
} /* end if */
/* set parallel access with communicator, using MPI-posix driver */
if (acc_type == FACC_MPIPOSIX) {
- ret = H5Pset_fapl_mpiposix(fapl, comm, use_gpfs);
+ ret = H5Pset_fapl_mpiposix(fapl, comm, use_gpfs);
assert(ret>=0);
} /* end if */
@@ -312,7 +319,7 @@ int main(int argc, char *argv[])
char *login; /* Pointer to login name */
/* Get the login name for this user */
- login=getlogin();
+ login=HDgetlogin();
if(login==NULL)
login=DEFAULT_USERNAME;