summaryrefslogtreecommitdiff
path: root/mail/mutt-devel/files/patch-mktemp
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-05-10 11:38:52 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-05-10 11:38:52 +0000
commit536fda27c1ab9ef2aaa7a0e3858414423e2edc96 (patch)
tree314d0b6cb5e66da59faed81b8d7b0935d7bdbe92 /mail/mutt-devel/files/patch-mktemp
parent- Fix mutt's tmp-file-naming to fix syntax highlightning for (diff)
- Fix mutt's tmp-file-naming to fix syntax highlightning for
the vim editor. - Add the WITHOUT_MUTT_ICONV knob and add dependency on iconv if that knob is not defined. PR: ports/66444 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=108823
Diffstat (limited to 'mail/mutt-devel/files/patch-mktemp')
-rw-r--r--mail/mutt-devel/files/patch-mktemp11
1 files changed, 7 insertions, 4 deletions
diff --git a/mail/mutt-devel/files/patch-mktemp b/mail/mutt-devel/files/patch-mktemp
index d6c18b85c52d..bb02ae52e2f7 100644
--- a/mail/mutt-devel/files/patch-mktemp
+++ b/mail/mutt-devel/files/patch-mktemp
@@ -1,12 +1,15 @@
---- muttlib.c.orig Sun Feb 1 18:15:17 2004
-+++ muttlib.c Mon Feb 9 08:44:36 2004
-@@ -657,7 +657,8 @@
+--- muttlib.c.orig Thu Apr 22 14:43:58 2004
++++ muttlib.c Thu Apr 22 14:51:01 2004
+@@ -657,7 +657,11 @@
void _mutt_mktemp (char *s, const char *src, int line)
{
- snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-%d-%d", NONULL (Tempdir), NONULL(Hostname), (int) getpid (), Counter++);
-+ snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-XXXXXXXX", NONULL(Tempdir), NONULL(Hostname));
++ char t[7];
++ snprintf (t, 7, "-%05d", Counter++);
++ snprintf (s, _POSIX_PATH_MAX-7, "%s/mutt-%s-XXXXXXXX", NONULL(Tempdir), NONULL(Hostname));
+ mktemp (s);
++ strncat(s, t, _POSIX_PATH_MAX);
dprint (1, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s));
unlink (s);
}