From: Ranjit Mathew Date: Fri, 22 Nov 2002 03:20:24 +0000 (+0000) Subject: jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extrac... X-Git-Tag: releases/gcc-3.3.0~1679 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fe75c032469f6490ba30421f4d3cc482acd1932;p=thirdparty%2Fgcc.git jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files. 2002-11-21 Ranjit Mathew * jartool.c (extract_jar): Use "open" with O_BINARY instead of "creat" to create extracted files. From-SVN: r59366 --- diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 5adc87d3db63..db86fb37923b 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,8 @@ +2002-11-21 Ranjit Mathew + + * jartool.c (extract_jar): Use "open" with O_BINARY instead of + "creat" to create extracted files. + 2002-11-11 Tom Tromey * dostime.c (dos2unixtime): Mask for seconds is 0x1f. Correctly diff --git a/fastjar/jartool.c b/fastjar/jartool.c index cd2efcb109f3..7cc06aaad5bb 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");