summaryrefslogtreecommitdiffstats
path: root/tools/test/perform/perf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/perform/perf.c')
-rw-r--r--tools/test/perform/perf.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index a06fb77..a19e5d5 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -136,12 +136,11 @@ main(int argc, char **argv)
if (mynod == 0)
printf("# Using hdf5-io calls.\n");
- /* kindof a weird hack- if the location of the pvfstab file was
- * specified on the command line, then spit out this location into
- * the appropriate environment variable: */
-
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
+#ifdef H5_HAVE_UNISTD_H
+ /* Kind of a weird hack- if the location of the pvfstab file was
+ * specified on the command line, then spit out this location into
+ * the appropriate environment variable.
+ */
if (opt_pvfstab_set) {
if ((setenv("PVFSTAB_FILE", opt_pvfstab, 1)) < 0) {
perror("setenv");
@@ -372,9 +371,8 @@ main(int argc, char **argv)
die_jar_jar_die:
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
- /* clear the environment variable if it was set earlier */
+#ifdef H5_HAVE_UNISTD
+ /* Clear the environment variable if it was set earlier */
if (opt_pvfstab_set) {
unsetenv("PVFSTAB_FILE");
}