diff options
author | Kevin Lo <kevlo@FreeBSD.org> | 2000-07-31 10:20:23 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@FreeBSD.org> | 2000-07-31 10:20:23 +0000 |
commit | 4690ebba1e823541ed2bff399a823773c828bd73 (patch) | |
tree | f4b2642dda963a9bdf7453f3cf5738980e0746cf /archivers/lha/files/patch-ae | |
parent | 5507a6a39d81a431141f479e4e0b6c4bf9c30cf7 (diff) | |
download | ports-4690ebba1e823541ed2bff399a823773c828bd73.tar.gz ports-4690ebba1e823541ed2bff399a823773c828bd73.zip |
Update to version 1.14g
PR: 20262
Submitted by: Port Fury
Notes
Notes:
svn path=/head/; revision=31159
Diffstat (limited to 'archivers/lha/files/patch-ae')
-rw-r--r-- | archivers/lha/files/patch-ae | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/archivers/lha/files/patch-ae b/archivers/lha/files/patch-ae new file mode 100644 index 000000000000..225ac6e50993 --- /dev/null +++ b/archivers/lha/files/patch-ae @@ -0,0 +1,40 @@ +--- src/lhadd.c.orig Mon Jul 31 18:09:53 2000 ++++ src/lhadd.c Mon Jul 31 18:14:20 2000 +@@ -270,13 +270,35 @@ + { + int old_umask; + FILE *afp; ++ int tempfd; ++ ++ #ifdef TMP_FILENAME_TEMPLATE ++ if (extract_directory == NULL) { ++ strcpy(temporary_name, TMP_FILENAME_TEMPLATE); ++ } ++ else { ++ sprintf(temporary_name, "%s/lhXXXXXX", extract_directory); ++ } ++ tempfd = mkstemp(temporary_name); ++ #else ++ char *p, *s; ++ ++ strcpy(temporary_name, archive_name); ++ for (p = temporary_name, s = (char *) 0; *p; p++) ++ if (*p == '/') ++ s = p; ++ strcpy((s ? s + 1 : temporary_name), "lhXXXXXX"); ++ tempfd = mkstemp(temporary_name); ++ #endif ++ if (tempfd == -1) ++ return NULL; + +- build_temporary_name(); + signal(SIGINT, interrupt); + signal(SIGHUP, interrupt); + + old_umask = umask(077); +- afp = xfopen(temporary_name, WRITE_BINARY); ++ /*afp = xfopen(temporary_name, WRITE_BINARY);*/ ++ afp = fdopen(tempfd, "w+"); + remove_temporary_at_error = TRUE; + temporary_fp = afp; + umask(old_umask); |