summaryrefslogtreecommitdiffstats
path: root/fastjar/jartool.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-22 03:20:24 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-22 03:20:24 +0000
commit40ead9a628ffc4d7914c57cab0498cd1616598dd (patch)
tree179957b4baea96950d926ea9bc6f1053652cec40 /fastjar/jartool.c
parent7b0432270e5426b04e593ac3a93050d65e268197 (diff)
downloadppe42-gcc-40ead9a628ffc4d7914c57cab0498cd1616598dd.tar.gz
ppe42-gcc-40ead9a628ffc4d7914c57cab0498cd1616598dd.zip
2002-11-21 Ranjit Mathew <rmathew@hotmail.com>
* jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fastjar/jartool.c')
-rw-r--r--fastjar/jartool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index cd2efcb109f..7cc06aaad5b 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -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");
OpenPOWER on IntegriCloud