summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2000-12-05 17:21:52 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2000-12-05 17:21:52 (GMT)
commitd9ba836b00a1232409e6433e38f2e270ea7e254c (patch)
tree360828547ba326006ba99cce04720ae5c4cff865 /tools
parentb2992ce84170f0cba23c327f2aa56285c598ca90 (diff)
downloadhdf5-d9ba836b00a1232409e6433e38f2e270ea7e254c.zip
hdf5-d9ba836b00a1232409e6433e38f2e270ea7e254c.tar.gz
hdf5-d9ba836b00a1232409e6433e38f2e270ea7e254c.tar.bz2
[svn-r3077]
Purpose: a bug fix for windows Description: ignore checking the permission of file and directory on windows Solution: using ifndef WIN32 endif to ignore checking this feature. Will find how windows deal with file checking stuff later. Platforms tested: WIN 2000, and confirmed at eirene(Linux)
Diffstat (limited to 'tools')
-rw-r--r--tools/h4toh5main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/h4toh5main.c b/tools/h4toh5main.c
index abf3d89..4af7b90 100644
--- a/tools/h4toh5main.c
+++ b/tools/h4toh5main.c
@@ -96,7 +96,7 @@ int main(int argc, char ** argv) {
case 1: /* h4toh5 file1 */
h4_filename = argv[0];
-
+#ifndef WIN32
if (test_file(h4_filename,O_EXCL,292) != 0 ) {
/* 292 Decimal - 0444 Octal, a+r */
printf("the current hdf4 file name is not set properly.\n");
@@ -108,7 +108,7 @@ int main(int argc, char ** argv) {
status = -1;
break;
}
-
+#endif
/*0. check whether this file is an hdf file. */
if(!Hishdf(h4_filename)){
@@ -124,14 +124,14 @@ int main(int argc, char ** argv) {
status = -1;
break;
}
-
+#ifndef WIN32
if (test_file(h5_filename,O_CREAT|O_EXCL,436) != 0) {
/* 436 Decimal - 0664 Octal, ug+rw,o+r */
printf("permission of hdf5 file is not set properly.\n");
status = -1;
break;
}
-
+#endif
status = h4toh5(h4_filename, h5_filename);
if ( status == FAIL ) {
@@ -149,6 +149,7 @@ int main(int argc, char ** argv) {
h4_filename = argv[0];
h5_filename = argv[1];
+#ifndef WIN32
if (test_file(h4_filename,O_EXCL,292) != 0 ) {
/* 292 Decimal - 0444 Octal, a+r */
printf("permission of hdf4 file is not set properly.\n");
@@ -162,6 +163,7 @@ int main(int argc, char ** argv) {
break;
}
+#endif
/*0. check whether this file is a hdf file. */
if(!Hishdf(h4_filename)){
@@ -171,6 +173,7 @@ int main(int argc, char ** argv) {
break;
}
+#ifndef WIN32
if (test_file(h5_filename,O_CREAT|O_RDWR,436) != 0) { /* 436 Decimal - 0664 Octal, ug+rw,o+r */
printf("permission of hdf5 file is not set properly.\n");
status = -1;
@@ -183,6 +186,7 @@ int main(int argc, char ** argv) {
break;
}
+#endif
status = h4toh5(h4_filename, h5_filename);
if ( status == FAIL ) {
printf("error in converting %sinto %s\n",h4_filename,h5_filename);