]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extrac...
authorRanjit Mathew <rmathew@hotmail.com>
Fri, 22 Nov 2002 03:20:24 +0000 (03:20 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 22 Nov 2002 03:20:24 +0000 (03:20 +0000)
2002-11-21  Ranjit Mathew <rmathew@hotmail.com>

* jartool.c (extract_jar): Use "open" with O_BINARY instead of
"creat" to create extracted files.

From-SVN: r59366

fastjar/ChangeLog
fastjar/jartool.c

index 5adc87d3db639cd8c504db5aeafd10dcea192e00..db86fb37923bb66bd4de9966932970f2a605e9ef 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-21  Ranjit Mathew <rmathew@hotmail.com>
+
+       * jartool.c (extract_jar): Use "open" with O_BINARY instead of
+       "creat" to create extracted files.
+
 2002-11-11  Tom Tromey  <tromey@redhat.com>
 
        * dostime.c (dos2unixtime): Mask for seconds is 0x1f.  Correctly
index cd2efcb109f3e300f4600a2db642c1f67bada775..7cc06aaad5bb2d4ac73b33570b84bd698f853761 100644 (file)
@@ -1455,7 +1455,8 @@ int extract_jar(int fd, char **files, int file_num){
     }
 
     if(f_fd != -1 && handle){
-      f_fd = creat((const char *)filename, 00644);
+      f_fd = open((const char *)filename,
+                  O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644);
 
       if(f_fd < 0){
         fprintf(stderr, "Error extracting JAR archive!\n");