summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2000-12-04 19:55:59 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2000-12-04 19:55:59 (GMT)
commitc279c82a75093a7fde87ece311d8beaa8bde2882 (patch)
treeeef0a2b5362a3475282765ab0bc8e5fcee848607 /tools
parent16eb2223198a3d6d38718039031baff26ee26101 (diff)
downloadhdf5-c279c82a75093a7fde87ece311d8beaa8bde2882.zip
hdf5-c279c82a75093a7fde87ece311d8beaa8bde2882.tar.gz
hdf5-c279c82a75093a7fde87ece311d8beaa8bde2882.tar.bz2
[svn-r3072]
Purpose: turn off "checking file and directory permission right" on windows platform Description: Adding #ifndef WIN32 #endif block at the corresponding test-file and test-dir functions. Solution: See above. Platforms tested: Win NT 4.0,5.0; and confirm the result the same on eirene and arabica
Diffstat (limited to 'tools')
-rw-r--r--tools/h5toh4.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/h5toh4.c b/tools/h5toh4.c
index 5b72985..19f4bf3 100644
--- a/tools/h5toh4.c
+++ b/tools/h5toh4.c
@@ -128,6 +128,7 @@ main(int argc, char *argv[])
status = -1;
break;
}
+#ifndef WIN32
if (test_file(h5_filename,O_EXCL,292) != 0 ) { /* 292 Decimal - 0444 Octal, a+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status = -1;
@@ -139,7 +140,7 @@ main(int argc, char *argv[])
status = -1;
break;
}
-
+#endif
h4_extension = HDstrdup("hdf");
h4_filename = BuildFilename(h5_filename,h4_extension);
@@ -148,13 +149,13 @@ main(int argc, char *argv[])
status = -1;
break;
}
-
+#ifndef WIN32
if (test_file(h4_filename,O_CREAT|O_EXCL,436) != 0) { /* 436 Decimal - 0664 Octal, ug+rw,o+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status = -1;
break;
}
-
+#endif
status = h5toh4(h5_filename, h4_filename);
if ( status != 0 ) {
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
@@ -175,6 +176,7 @@ main(int argc, char *argv[])
status = -1;
break;
}
+#ifndef WIN32
if (test_file(h5_filename,O_EXCL,292) != 0 ) { /* 292 Decimal - 0444 Octal, a+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status = -1;
@@ -197,7 +199,7 @@ main(int argc, char *argv[])
status = -1;
break;
}
-
+#endif
status = h5toh4(h5_filename, h4_filename);
if ( status != 0 ) {
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
@@ -225,6 +227,7 @@ main(int argc, char *argv[])
status2 = -1;
break;
}
+#ifndef WIN32
if (test_file(h5_filename,O_EXCL,292) != 0 ) { /* 292 Decimal - 0444 Octal, a+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status2 = -1;
@@ -236,7 +239,7 @@ main(int argc, char *argv[])
status2 = -1;
continue;
}
-
+#endif
h4_extension = HDstrdup("hdf");
h4_filename = BuildFilename(h5_filename,h4_extension);
@@ -245,13 +248,13 @@ main(int argc, char *argv[])
status2 = -1;
continue;
}
-
+#ifndef WIN32
if (test_file(h4_filename,O_CREAT|O_EXCL,436) != 0) { /* 436 Decimal - 0664 Octal, ug+rw,o+r */
DEBUG_PRINT("Error detected in %s() [%s line %d]\n", "main", __FILE__, __LINE__);
status2 = -1;
continue;
}
-
+#endif
status = h5toh4(h5_filename, h4_filename);
if ( status != 0 ) {
fprintf(stderr,"Error: Problem with %s\n",h5_filename);