From: Michael Elkins Date: Tue, 6 Apr 2010 16:47:15 +0000 (-0700) Subject: fix for compiling Mutt with clang: check for wchar_h prior to wctype_h in check for... X-Git-Tag: mutt-1-5-21-rel~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43c9b632c5f0c8d04ba85e255141f3b021ed1d88;p=mutt fix for compiling Mutt with clang: check for wchar_h prior to wctype_h in check for wc funcs --- diff --git a/configure.ac b/configure.ac index b7227d37..65347220 100644 --- a/configure.ac +++ b/configure.ac @@ -1252,11 +1252,11 @@ if test "$wc_funcs" != yes && test "$wc_funcs" != no; then #define _XOPEN_SOURCE 1 #include #include -#ifdef HAVE_WCTYPE_H -#include -#endif #ifdef HAVE_WCHAR_H #include +#endif +#ifdef HAVE_WCTYPE_H +#include #endif], [mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0); iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)], diff --git a/muttlib.c b/muttlib.c index c867ce9f..f530f6bc 100644 --- a/muttlib.c +++ b/muttlib.c @@ -177,13 +177,13 @@ void mutt_free_body (BODY **p) if (b->parameter) mutt_free_parameter (&b->parameter); - if (b->unlink && b->filename) + if (b->filename) { - dprint (1, (debugfile, "mutt_free_body: Unlinking %s.\n", b->filename)); - unlink (b->filename); + if (b->unlink) + unlink (b->filename); + dprint (1, (debugfile, "mutt_free_body: %sunlinking %s.\n", + b->unlink ? "" : "not ", b->filename)); } - else if (b->filename) - dprint (1, (debugfile, "mutt_free_body: Not unlinking %s.\n", b->filename)); FREE (&b->filename); FREE (&b->content);