From d71d55958c65724ff085cbc97d3b90f0c2ec56ae Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Mon, 10 May 2004 11:37:58 +0000 Subject: - 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/66443 Submitted by: maintainer --- mail/mutt14/files/patch-mktemp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mail/mutt14/files/patch-mktemp') diff --git a/mail/mutt14/files/patch-mktemp b/mail/mutt14/files/patch-mktemp index 56bc36e7cd91..e8c26f8fc061 100644 --- a/mail/mutt14/files/patch-mktemp +++ b/mail/mutt14/files/patch-mktemp @@ -1,12 +1,15 @@ ---- muttlib.c.orig Mon Feb 9 08:25:28 2004 -+++ muttlib.c Mon Feb 9 08:32:46 2004 -@@ -656,7 +656,8 @@ +--- muttlib.c.orig Fri May 7 17:30:35 2004 ++++ muttlib.c Fri May 7 17:32:13 2004 +@@ -656,7 +656,11 @@ void mutt_mktemp (char *s) { - 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); unlink (s); } -- cgit v1.2.3